Bug #42849 [Com]: Configuration File (php.ini) Path incorrect

2012-04-30 Thread zzz20120427 at pby dot com
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:

Well, I achieved success, but didn't pin down the bug.

I stripped *everything* out of my php.ini except the active lines, comparing 
them to the working Windows 7 machine (from which I copied the Apache and PHP 
installers that fail on this Windows 7 machine).

The PHP msi must have added "C:\Program Files\PHP\;" to my PATH, and added 
"PHPRC=C:\Program Files\PHP\" to my environment variables.  This would have 
been a despised absolute last resort for me, but it led me to comment out 
PHPIniDir "C:/Program Files/PHP/" in httpd.conf.  Apache and PHP still started 
with the still-unterminated (by a quote) include_path string in php.ini.

As a crude solution, I tried moving include_path to the end of the file so that 
all the stuff after it wouldn't be added to include path.  Apache wouldn't 
start.  Putting it back, I began moving it downward to try find the point where 
it fails.  It first failed in the [PHP_EXIF] section, so I commented out the 
extension=php_exif.dll.  It failed again in the [PHP_MSSQL] and [PHP_PDO_MSSQL] 
sections; commented those extensions too.  There were no more crashes as I 
moved further down the file so I put the include_path back in its original 
position; all was well.  Then, I added the terminating quote to the 
include_path - it worked!  All of the modules appeared in phpinfo.php.  It 
still (correctly) shows Loaded Configuration File as C:\Program 
Files\PHP\php.ini but doggedly continues to show Configuration File (php.ini) 
Path as C:\Windows.  (Afterward, I restored PHPIniDir to httpd.conf which 
caused no change.)

Funny thing: once I got it working, PHP finally began writing errors to its 
error log.  Thanks alot, eh?  (The errors were a missing browscap.ini file that 
I had just added to the php.ini  It's gone now.)

Perhaps those three modules load C:\Program Files\PHP\PEAR\go-pear.phar and 
that module objects to the close quote on include_path, which causes everything 
else to go wrong?  Curiously, my other Windows 7 machine doesn't object to 
PHP_MSSQL or PHP_PDO_MSSQL.

I hope this provides some clues to the developers.  It may not be quite the bug 
reported but it was a sympton of another bug I was researching.

Apache installer:
httpd-2.2.16-win32-x86-openssl-0.9.8o.msi
PHP installer:
php-5.2.14-win32-installer.msi


Previous Comments:

[2012-04-28 03:46:35] zzz20120427 at pby dot com

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.


[2010-05-28 00:23:24] paj...@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

Bug #42849 [Com]: Configuration File (php.ini) Path incorrect

2012-04-27 Thread zzz20120427 at pby dot com
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] paj...@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


-- 

Bug #42849 [Com]: Configuration File (php.ini) Path incorrect

2010-05-27 Thread vera_cai at hotmail dot com
Edit report at http://bugs.php.net/bug.php?id=42849&edit=1

 ID:   42849
 Comment by:   vera_cai at hotmail dot com
 Reported by:  inglis-php at yahoo dot com dot au
 Summary:  Configuration File (php.ini) Path incorrect
 Status:   No Feedback
 Type: Bug
 Package:  *General Issues
 Operating System: win xp pro
 PHP Version:  5.2.4

 New Comment:

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.


Previous Comments:

[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..


[2009-09-16 18:41:00] misc at imerk dot net

I've just run into this problem. Using win2k8 r2 x64. And php 5.2.5



I copied the php installation that is working on a win2k3 server to this


win2k8 box. I put the path to the ini file in both the system PATH 

variable as well as creating a reg key in 

local_machine/software/php5/iniFilePath = C:\php5



I still get (none) for the loaded config file. This is working fine on 

the win2k3 machine though.


[2009-09-05 03:57:57] headnok at yahoo dot com

I had the same damn problem and was pulling my hair out for a week. 
Please!!! Either instruct the users to move the php.ini file into the
C:\windows directory your installation instructions or fix the problem! 
Please!!!




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

http://bugs.php.net/bug.php?id=42849


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=42849&edit=1


Bug #42849 [Com]: Configuration File (php.ini) Path incorrect

2010-03-18 Thread rsberger1 at hotmail dot com
Edit report at http://bugs.php.net/bug.php?id=42849&edit=1

 ID:   42849
 Comment by:   rsberger1 at hotmail dot com
 Reported by:  inglis-php at yahoo dot com dot au
 Summary:  Configuration File (php.ini) Path incorrect
 Status:   No Feedback
 Type: Bug
 Package:  *General Issues
 Operating System: win xp pro
 PHP Version:  5.2.4

 New Comment:

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.


Previous Comments:

[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..


[2009-09-16 18:41:00] misc at imerk dot net

I've just run into this problem. Using win2k8 r2 x64. And php 5.2.5



I copied the php installation that is working on a win2k3 server to this


win2k8 box. I put the path to the ini file in both the system PATH 

variable as well as creating a reg key in 

local_machine/software/php5/iniFilePath = C:\php5



I still get (none) for the loaded config file. This is working fine on 

the win2k3 machine though.


[2009-09-05 03:57:57] headnok at yahoo dot com

I had the same damn problem and was pulling my hair out for a week. 
Please!!! Either instruct the users to move the php.ini file into the
C:\windows directory your installation instructions or fix the problem! 
Please!!!


[2008-12-11 06:22:55] yaddayadda at mailinator dot com

I'm a new user of PHP/MySQL. I installed both and phpMyAdmin with no
deviation from the instructions and could not get phpMyAdmin to work at
all (it could not load the mysql extension). Despite reading numerous
posts about what to uncomment in php.ini and what to add to the PATH,
whatever I did did not seem to have any effect. Only after I ran
phpinfo() did I find out that the path to php.ini was somehow pointing
the Windows folder. I was editing php.ini in C:\PHP. 



There are many, many frustrated students and beginners out there having
this exact issue. They don't know it is a bug. They are told to "just
copy php.ini to your Windows folder" as a fix. I did not want to do this
because I set the PATH to C:\PHP so I knew it should be looking there
and NOT in C:\Windows (because there was no php.ini there, it should
continue looking through the locations specified in PATH). I still do
not know how to change this and ended up moving the file out of
frustration and everything began to work. 



So many people are experiencing this frustration and wasting hours
trying to fix it. Some are even giving up and moving to hosts that
already have PHP installed rather than continue to learn on their own.
If you install PHP to C:\PHP, the php.ini file it looks for should be
there!




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

http://bugs.php.net/bug.php?id=42849


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=42849&edit=1