Bug #42849 [Com]: Configuration File (php.ini) Path incorrect
| From: | zzz20120427 at pby dot com | Date: | Sat, 28 Apr 2012 03:46:35 +0000 |
| Subject: | Bug #42849 [Com]: Configuration File (php.ini) Path incorrect | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-170006@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=42849&edit=1
ID: 42849
Comment by: zzz20120427 at pby dot com
Reported by: inglis-php at yahoo dot com dot au
Summary: Configuration File (php.ini) Path incorrect
Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: win xp pro
PHP Version: 5.2.4
Block user comment: N
Private report: N
New Comment:
After installing PHP 5.2.14 via the msi installer, Apache 2.2.16 would no longer start - until I
tried the PHPIniDir 'C:\Program Files\PHP' trick (single quotes and backslashes). But
PHPInfo showed Configuration File (php.ini) Path as C:\Windows and Loaded Configuration File as
(none). (I have only one PHP.ini file and it's in C:\Program Files\PHP.)
Double-checking with PHP -i, I got several dialog boxes warning that the built-in dlls weren't
loaded. PHPInfo showed an incorrect default directory for include_path so I uncommented
include_path and set it to C:\Program Files\PHP\PEAR. No idea if this is correct but the dialog
boxes went away, but only if I didn't use a terminating quote! (Otherwise Apache wouldn't
start.)
I also noticed that Loaded Configuration File was now displaying correctly - whether I used slashes
or backslashes, double-quotes or single-quotes. Unfortunately, PHPInfo did not show the modules I
had enabled in PHP.ini.
I wonder why PHP will let Apache start with three quotes and not four. Here are the settings I made
(I switched to forward slashes so the trailing backslash of a Windows path could not accidently
escape the quote.
httpd.conf:
PHPIniDir "C:/Program Files/PHP/"
PHP.ini:
include_path = ".;C:/Program Files/PHP/PEAR
BTW, moving the trailing quote from PHPIniDir to PHP.ini prevented Apache from starting.
Previous Comments:
------------------------------------------------------------------------
[2010-05-28 00:23:24] pajoye@php.net
Ask support in the PHP setup or PHP Windows mailing. Or to one of the numerous support channel out
there.
------------------------------------------------------------------------
[2010-05-28 00:06:37] vera_cai at hotmail dot com
I have exactly the same problem that because of this bug, my PHP just can not work with mysql and
keep complainning "Call to undefined function mysql_connect() ".
I've tried 5.2.13, 5.3.2 and both had problem. Until searched forum with somebody mentioned to
use "phpinfo" check where the php.ini located, I eventually find this bug. With one line
added in httpd.conf file "PHPIniDir 'c:\php'", the problem is gone.
Can somebody help to fix this problem as this is not only annoying, I
am not able to get PHP work with mysql because of this.
------------------------------------------------------------------------
[2010-03-18 23:30:08] rsberger1 at hotmail dot com
Since this bug was suspended due to "no feedback", I thought I'd supply
the requested feedback and hope that someone would fix this annoyance.
The two places in my phpinfo output regarding php.ini are:
Configuration File (php.ini) Path C:\Windows
Loaded Configuration File D:\Apps\MyFolder\php-5.3.2\php.ini
Apparently my php.ini is being loaded from my php-5.3.2 folder, but
phpinfo erroneously reports php.ini's path as C:\Windows.
------------------------------------------------------------------------
[2009-12-28 05:33:09] u2gohome at gmail dot com
Hi. For me this problem was only occurring when php was executed via apache. Executing php -i from
the command line listed the mysql extension whereas a phpinfo() request via the browser did not.
Try adding the following line to your apache httpd.conf file (to point to the directory containing
php.ini) eg.
PHPIniDir 'C:\php'
Adding this line changed phpinfo()'s reported 'Loaded Configuration File' from (none)
to C:\php\php.ini, and mysql started talking. However, phpinfo() still reports c:\windows as the
php.ini directory.
Cheers, Matt
------------------------------------------------------------------------
[2009-10-12 11:48:21] alim at fourplusadvertising dot com
I am quite confused with this whole thing on my mac (leopard).. i thought my PHP was the perfect
installation..;-).. till i realised that my PHP.ini setting of upload_max_filesize was still 2 MB
inspite of me having changed it to 32 MB!!..
how do i get php to use the php.ini values and not the default.. I am facing the same issue on my
imac.. there's some loaded configuration file which shows /private/etc while the Configuration
File (php.ini) Path is /etc
But they are I think symlinked.. but whatever I edit in the php.ini does not reflect in the
phpinfo()..
please help..
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=42849
--
Edit this bug report at https://bugs.php.net/bug.php?id=42849&edit=1