Click to See Complete Forum and Search --> : Windows NT 4, Apache & PHP


Anon
07-13-2000, 01:40 PM
So, I'm trying to learn PHP and installed (successfully!) Apache on my NT box at work. I have followed 2 sets of instructions (one from php.net and one from the book _PHP Essentials_) to install PHP on NT and every time I go to test it, Windows asks me what I want to do with this strange 'test.php3' file - save it, or open it - and when I choose open it, it sends the file to Photoshop of all things.

I'm following the php.net manual instructions at the moment, am on my 3rd install and have no idea what I'm doing wrong.

Any advice you can provide would be gratefully appreciated.

Anon
07-13-2000, 02:41 PM
Make sure your httpd.conf is setup with the correct mime extensions and that they are being handled by the php3.exe. In order to do that, these lines should be somewhere in your httpd.conf file.

ScriptAlias /cgi-bin/ "c:/path/to/cgi-bin/"
AddType application/x-httpd-php3 .php3
Action application/x-httpd-php3 "/cgi-bin/php3.exe"

Also, be sure to restart the apache service either through Control Panels > Services or through the shortcuts given in the start menu.

Hope this helps.

Eden

Anon
07-13-2000, 04:35 PM
Yes! Thank you Eden. I rechecked my httpd.conf entries and restarted Apache and it works!

Woohoo!!

Anon
07-14-2000, 03:11 AM
It would be a lot easier if you were to use IIS, it only takes about 30 seconds to configure php to run.

//////////////////////////////////////////
this may sound stupid but you never know//
//////////////////////////////////////////
make sure you are typing in the file name of your php page like: "http://localhost/yourscript.php3" and not just double clicking on the file to try and open it!
///////////////////////////////////////////

You should have a look at your "file types" allocation under "view"....."folder options" or something like that in my computer or windows explorer, etc. See if there is an extention called .php3 and if there is see what it is being opened with. If there isn't then you may want to create one and have it open with explorer or netscape.

Then in your httpd.conf file in Apache/conf/ make sure you added these:

ScriptAlias /php3/ "c:/path-to-php-dir/php.exe"

AddType application/x-httpd-php3 .php3

AddType application/x-httpd-php3 .phtml

Action application/x-httpd-php3 "php3/php.exe"

You should see other similar lines of code already there so you know where to paste everything.


See if this helps.

regards,
scott d~