Jump to content


Photo

Configuration File Path (php.ini) Path is incorrect


  • Please log in to reply
4 replies to this topic

#1 adam12

adam12
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 30 September 2006 - 06:08 AM

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.

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 30 September 2006 - 12:14 PM

Open you httpd.conf file for Apache and add the following to the end of the httpd.conf file:
PHPIniDir "C:/php5"

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?

#3 adam12

adam12
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 30 September 2006 - 02:01 PM

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?

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 30 September 2006 - 03:18 PM

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.

#5 Ricky_Coder

Ricky_Coder
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 14 October 2006 - 01:41 AM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users