Problems installing PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jive
Forum Newbie
Posts: 20
Joined: Thu May 23, 2002 1:34 pm
Contact:

Problems installing PHP

Post by jive »

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??
duke9
Forum Newbie
Posts: 7
Joined: Thu May 23, 2002 4:17 pm

Re: Problems installing PHP

Post by duke9 »

I'm assuming that this is not a copy/paste error.
jive wrote: # Action application/x-httpd-php /php/php.exe
You need to uncomment that line (remove the # from the beginning)
User avatar
Johnm
Forum Contributor
Posts: 344
Joined: Mon May 13, 2002 12:05 pm
Location: Michigan, USA
Contact:

Post by Johnm »

What would the solution be for the same problem in Unix?

Thanks,
John
Post Reply