Forum Moderators: phranque

Message Too Old, No Replies

Extra info for php.ini

Having some problems with the php.ini file to work on apache.

         

supersword

7:27 pm on Sep 7, 2005 (gmt 0)

10+ Year Member



Ok guys, I have installed Apache Server on my computer, and started the installation for php. I get the message where it says that php.ini has not yet been written, and I should correct it.

So I open C:/WINDOWS/php.ini and add the following line to doc_root.

doc_root = "C:/Program Files/Apache Group/Apache2/htdocs"

The right at the bottom, I add the following lines:

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"

Do to test if php is working, I make a test.php with
<?
phpinfo();
?>

So this should just show the php details, but it shows the plain text
<?
phpinfo();
?>

Where have I gonw wrong?

Thanks,
Sam

coopster

9:06 pm on Sep 7, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You are adding Apache directives to the php.ini file, you should be adding them to your httpd.conf file.

supersword

6:27 am on Sep 8, 2005 (gmt 0)

10+ Year Member



So what do I neeed to add to http.conf?

Thanks,
Sam

coopster

4:21 pm on Sep 8, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



The Apache directives.
ScriptAlias /php/ "c:/php/" 
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"
They shouldn't be in your php.ini file.