Page 1 of 1
php local configuration error
Posted: Tue Jan 30, 2007 4:02 pm
by bobvaz
I need to resurrect this problem. Hopefully I am now in the right forum. I am a newbie and recently downloaded php and apache current versions. Working in the local host directory, my problem seems rather simple - I cannot call a php page from an html page. I get the windows alert asking if I want to download the file....I have searched the forums for help on addHandler and addType...I have changed the httpd config file for each of the suggestions, restarted php, but still get the message.....I am stumped and would appreciate any help. Thanks in advance.
Posted: Tue Jan 30, 2007 4:34 pm
by feyd
I think time may be best served if you used a tool such as Xampp.
Posted: Wed Jan 31, 2007 6:52 pm
by RobertGonzalez
When you say you restarted PHP do you mean you stopped and started Apache? Can you post the Add Handler lines of your httpd.conf file so we can see them?
Posted: Tue Feb 06, 2007 6:47 pm
by bobvaz
Sorry for the delay, I was gone for a week......
attached are addHandler lines from config file
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi
#
# For files that include their own HTTP headers:
#
#AddHandler send-as-is asis
#
# For server-parsed imagemap files:
#
#AddHandler imap-file map
#
# For type maps (negotiated resources):
# (This is enabled by default to allow the Apache "It Worked" page
# to be distributed in multiple languages.)
#
AddHandler type-map var .bat .pl
AddHandler server-parsed .html
#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
AddHandler server-parsed .shtml .html lhtm
Posted: Tue Feb 06, 2007 7:10 pm
by RobertGonzalez
My php.conf (or the PHP handling in httpd.conf) looks something like this:
Code: Select all
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
LoadModule php5_module modules/libphp5.so
#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps
Posted: Wed Feb 07, 2007 7:32 am
by bobvaz
Thanks I will try it.....
Apache will not start.....I do not have the libphp5.so in any library.....I have some others that other posts have used, i.e. php5apache2_2.dll" . If I need to load the prior, where do I find it? Thanks again.
Posted: Wed Feb 07, 2007 10:30 am
by RobertGonzalez
Sorry, my installation is a linux install. If you are on Windows, yours should be a .dll.