Jump to content

Archived

This topic is now archived and is closed to further replies.

adam12

Configuration File Path (php.ini) Path is incorrect

Recommended Posts

I am new to PHP, MySQL,Dreamweaver etc... Old Cobol Programmer here and my first post.
I have Apache 2.0.59 and PHP 5.1.6 and Dreamweaver 8.0 using PHPMyAdmin 2.9.1-rcl
when I run the PHPinfo script from my browser it states that the configuration file is pointing to C:\windows
I have searched through this entire compuetr and found no file php.* or php* that is in the windows directory. My php.ini file is in the c:\php5.php.ini location.
This may be the cause of me getting an "Invalid Server Index" error when attempting to start MyPHPAdmin.

Question 1: How do I change to point to the correct path for PHP?
Question 2: Is the MyPHPAdmin error noted above related to the configuration question or do I have 2 separate problems? If 2 separate problems... any ideas on the server index error as well.

Thanks for your help.

Share this post


Link to post
Share on other sites
Open you httpd.conf file for Apache and add the following to the end of the httpd.conf file:
[code]PHPIniDir "C:/php5"[/code]

Save the httpd.conf file and restart Apache. PHP should now be using the correct php.ini

Not sure about the your secound question though. Is this error coming from phpMyadmin or from Apache?

Share this post


Link to post
Share on other sites
Thanks for the info, but placing that exactly as you wrote into the conf file causes the apache2 not to restart. Once I remove it from the conf file the server restarts without error. Any other ideas?

Share this post


Link to post
Share on other sites
Should work I see now reason why it shouldnt. the only option is to put the php.ini either the Windows folder (C:\WINDOWS) or the system23 folder (C:\WINDOWS\system32). Or add the php installation folder to the PATH variable.

Share this post


Link to post
Share on other sites
try this little trick to see what is happening,  helped me a lot.

Make a  info.php file and put these lines inside:

<?php
phpinfo();
?>

Then just run that info.php script and you´ll see all variables inside PHP. Take a look at the very first 3 or 4 lines, it will point you on where that  PHP.INI file it is.

You can also make a global system variable PHPRC pointing to your script path.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.