Problems installing PHP
Posted: Thu May 23, 2002 1:34 pm
Hello,
I've been trying to install php 4.2.1 as a cgi module on my apache server, and I used the tutorial here (thickbook). After I stop the server and start it back up, I type in the url as instructed (http://127.0.0.1/phpinfo.php) and instead of the page it draws up the downloader to download phpinfo.php.
Heres the changes I made to my http.conf file:
first change:
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin/"
ScriptAlias /php/ "C:/php-4.2.1-win32/"
Second Change:
#
# AddType allows you to tweak mime.types without actually editing it, or to
# make certain files to be certain types.
#
AddType application/x-tar .tgz
AddType application/x-httpd-php .phtml .php
AddType application/x-httpd-php-source .phps
Third Change:
#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
# Action application/x-httpd-php /php/php.exe
Then I stop my server, create my .php file. start the server again, and typi in "http://127.0.0.1/phpinfo.php".
Instead of pulling up the document, I get the downloader. Maybe somethings wrong with the way I put it in the lines, but it seems right
Any helps??
I've been trying to install php 4.2.1 as a cgi module on my apache server, and I used the tutorial here (thickbook). After I stop the server and start it back up, I type in the url as instructed (http://127.0.0.1/phpinfo.php) and instead of the page it draws up the downloader to download phpinfo.php.
Heres the changes I made to my http.conf file:
first change:
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin/"
ScriptAlias /php/ "C:/php-4.2.1-win32/"
Second Change:
#
# AddType allows you to tweak mime.types without actually editing it, or to
# make certain files to be certain types.
#
AddType application/x-tar .tgz
AddType application/x-httpd-php .phtml .php
AddType application/x-httpd-php-source .phps
Third Change:
#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
# Action application/x-httpd-php /php/php.exe
Then I stop my server, create my .php file. start the server again, and typi in "http://127.0.0.1/phpinfo.php".
Instead of pulling up the document, I get the downloader. Maybe somethings wrong with the way I put it in the lines, but it seems right
Any helps??