Page 1 of 1

PHP Installation issues

Posted: Tue Feb 10, 2004 3:38 pm
by eletrium
Hey all, first time poster here. Hiyas.

I perused several of the topics posted in this forum before posting this message. I have spent hours on both the php.net and apache.org sites searching through install notes and such.

At the moment, I am running a Win2k box and attempting to run PHP and Apache. My version of Apache is 1.3, installed through the Oracle Home Edition install. Normal html files work fine currently by browsing to localhost/inxex.html or any other html files.

Problem:
But when I try to navigate to .php files currently, it tries to actually run it with the x-hppd program. My browser (Opera 7) simply tries to run the php page as a program whereas Internet Explorer shows up the PHP page as designed... meaning, Internet Explorer works fine it seems whilst Opera7 does not.

Solutions: To hell with Opera, use IE.

Other Issue:
I had MAJOR problems restarting Apache because it is actually run as an Oracle service, and not Apache directly. To stop and start, it works to go to Services and Stop the OracleHomeHTTPServer and to Start IT again. Don't bother using prompts or looking for Apache itself. Might work ok, but I had issues.

Good luck, and hope this helps ppl from banging their heads on the same wall. Or hell, maybe someone can give me a better solution.

Cheers and Beers

Posted: Tue Feb 10, 2004 4:17 pm
by infolock
sounds like it's an issue with either one of the configuration files ( php.ini or httpd.conf ) or you didn't copy the dll's to the proper location...

so, #1, make sure you edited the php.ini file and changed the proper properties that the install.txt that was included with your php distribution suggested. also, make sure you copied the php.ini file to your c:\winnt\ directory.

as for the dll's, you need to copy the following files to your c:\winnt\system32 directory :

php4apache.dll
php4ts.dll


if you have done this, then you need to ensure proper configuration of your httpd.conf file.

the following lines need to be inserted into this file :

ScriptAlias /php/ "c:/php/"

AddType application/x-httpd-php .php .phtml

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


MAKE SURE you put the SCRIPT Alias with the other script alias', the AddType with the OTHER AddType's and the Action application with the other Aciton Application calls found within that configuration file.

in other words, when you see a list of

AddType
AddType
AddType
etc..

you need to put the AddType call at the bottom of the list.

i can't remember about the ScriptAlias /php/ "c:/php/", as it's not required for Apache 2.0, so if you don't see any ScriptAlias calls, just put it at the end of the AddType list ( should be the very next entry after you insert AddType application/x-httpd-php .php .phtml in other words ).

hope this helps. if it doesn't work, try restarting apache and see if you get any errors.

if you don't, then your apache configuration is correct.


the only other thing is, it could be that you arne't putting your php files in the correct directory.

in other words, you need to put them where your path in your php.ini file is pointing to

the default should be something like C:\program files\apache group\apache\htdocs

hope this helps.