#36716 [Bgs-Csd]: php.ini not found in scriptdirectory see Bug #33882

2006-03-20 Thread schwarz at power-netz dot de
 ID:   36716
 User updated by:  schwarz at power-netz dot de
 Reported By:  schwarz at power-netz dot de
-Status:   Bogus
+Status:   Closed
 Bug Type: CGI related
 Operating System: linux 2.4.32
 PHP Version:  5.1.2
 New Comment:

RESOLVED would be a good status :)

The error is simple to remove :

Add a ./: before your configure --with-config-file-path
option, like i.e. --with-config-file-path=./:/usr/local/apache/conf

Problem solved. 

If you have stated that matter in the changelogs,
we didn't see it , but if not, you should mention it.

5.0.3 :
 './configure'
'--with-pdflib=/home/power-netz/PDFlib-Lite-6.0.0p1/bind/pdflib/c/'
'--with-mysql=/usr' '--with-imap=/usr/src/imap-2002d' '--with-openssl'
'--with-jpeg-dir' '--with-zlib-dir' '--enable-ftp' '--with-gd'
'--with-freetype-dir=/usr/include/freetype2' '--with-png-dir'
'--with-session' '--enable-trans-sid' '--enable-gd-native-ttf'
'--with-ming' '--with-curl' '--with-mcrypt'
'--with-mysql-sock=/opt/root/tmp/mysql.sock'
'--with-imap-ssl=/usr/src/imap-2002d'
'--with-config-file-path=/usr/local/apache/conf/' '--with-idn'
'--enable-force-cgi-redirect'

5.1.2 :

 './configure'
'--with-pdflib=/home/power-netz/PDFlib-Lite-6.0.0p1/bind/pdflib/c/'
'--with-mysql=/usr' '--with-imap=/usr/src/imap-2002d' '--with-openssl'
'--with-jpeg-dir' '--with-zlib-dir' '--enable-ftp' '--with-gd'
'--with-freetype-dir=/usr/include/freetype2' '--with-png-dir'
'--with-session' '--enable-trans-sid' '--enable-gd-native-ttf'
'--with-ming' '--with-curl' '--with-mcrypt'
'--with-mysql-sock=/opt/root/tmp/mysql.sock'
'--with-imap-ssl=/usr/src/imap-2002d'
'--with-config-file-path=.:/usr/local/apache/conf/' '--with-idn'
'--enable-force-cgi-redirect'


Previous Comments:


[2006-03-19 18:08:51] [EMAIL PROTECTED]

Works fine here:

[EMAIL PROTECTED]:~/development/testimonials$ strace -o t
../php/5.1/sapi/cgi/php -i /dev/null; grep \.ini t; rm t;
lstat64(/home/mike/development/php/5.1/sapi/cgi/php-cgi.ini,
0xbfedf5fc) = -1 ENOENT (No such file or directory)
open(/home/mike/development/php/5.1/sapi/cgi/php-cgi.ini, O_RDONLY) =
-1 ENOENT (No such file or directory)
lstat64(/home/mike/development/testimonials/php-cgi.ini, 0xbfedf5fc)
= -1 ENOENT (No such file or directory)
open(/home/mike/development/testimonials/php-cgi.ini, O_RDONLY) = -1
ENOENT (No such file or directory)
lstat64(/home/mike/development/php/5.1/sapi/cgi/php.ini,
{st_mode=S_IFLNK|0777, st_size=13, ...}) = 0
readlink(/home/mike/development/php/5.1/sapi/cgi/php.ini,
../../php.ini, 4096) = 13
lstat64(/home/mike/development/php/5.1/php.ini,
{st_mode=S_IFREG|0644, st_size=103, ...}) = 0
open(/home/mike/development/php/5.1/php.ini, O_RDONLY) = 3
lstat64(/home/mike/development/php/5.1/sapi/cgi/php.ini,
{st_mode=S_IFLNK|0777, st_size=13, ...}) = 0
readlink(/home/mike/development/php/5.1/sapi/cgi/php.ini,
../../php.ini, 4096) = 13
lstat64(/home/mike/development/php/5.1/php.ini,
{st_mode=S_IFREG|0644, st_size=103, ...}) = 0
write(1, Configuration File (php.ini) Pat..., 33) = 33




[2006-03-16 10:50:08] schwarz at power-netz dot de

reconsider it.



[2006-03-14 10:16:52] schwarz at power-netz dot de

You are right, php4 and 5.0.3 don't seek inside 
the script dir directly. The Apache sets the current
directory to the scripts directory and php4 + 5.0.3 
try to open ./php-cgi.ini which 5.1.2 does not 
try.

Pls see here for the difference:


bash-2.04# pwd
/home/benderircde/public_html/php5


bash-2.04# cd /home/benderircde/public_html/php5
bash-2.04# strace php5 /home/benderircde/public_html/php5/info.php 21
| grep php5-cgi.ini
open(/usr/local/apache/conf//php5-cgi.ini, O_RDONLY) = 3
lstat64(/usr/local/apache/conf/php5-cgi.ini, {st_mode=S_IFREG|0644,
st_size=25282, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/usr/local/apache/conf/php5-cgi.ini /td/tr


bash-2.04# strace php5.0.3 /home/benderircde/public_html/php5/info.php
21 | grep php5-cgi.ini
open(./php5-cgi.ini, O_RDONLY)= 3
lstat64(/home/benderircde/public_html/php5/php5-cgi.ini,
{st_mode=S_IFREG|0644, st_size=339, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/home/benderircde/public_html/php5/php5-cgi.ini /td/tr

bash-2.04# strace php /home/benderircde/public_html/php5/info.php 21
| grep php-cgi.ini
open(./php-cgi.ini, O_RDONLY) = 3
lstat64(/home/benderircde/public_html/php5/php-cgi.ini,
{st_mode=S_IFREG|0644, st_size=339, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/home/benderircde/public_html/php5/php-cgi.ini /td/tr
bash-2.04#



[2006-03-14 09:28:07] [EMAIL PROTECTED]

PHP4 doesn't behave this way and I doubt PHP5 will do it either, just
because

#36716 [Bgs-Opn]: php.ini not found in scriptdirectory see Bug #33882

2006-03-16 Thread schwarz at power-netz dot de
 ID:   36716
 User updated by:  schwarz at power-netz dot de
 Reported By:  schwarz at power-netz dot de
-Status:   Bogus
+Status:   Open
 Bug Type: CGI related
 Operating System: linux 2.4.32
 PHP Version:  5.1.2
 New Comment:

reconsider it.


Previous Comments:


[2006-03-14 10:16:52] schwarz at power-netz dot de

You are right, php4 and 5.0.3 don't seek inside 
the script dir directly. The Apache sets the current
directory to the scripts directory and php4 + 5.0.3 
try to open ./php-cgi.ini which 5.1.2 does not 
try.

Pls see here for the difference:


bash-2.04# pwd
/home/benderircde/public_html/php5


bash-2.04# cd /home/benderircde/public_html/php5
bash-2.04# strace php5 /home/benderircde/public_html/php5/info.php 21
| grep php5-cgi.ini
open(/usr/local/apache/conf//php5-cgi.ini, O_RDONLY) = 3
lstat64(/usr/local/apache/conf/php5-cgi.ini, {st_mode=S_IFREG|0644,
st_size=25282, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/usr/local/apache/conf/php5-cgi.ini /td/tr


bash-2.04# strace php5.0.3 /home/benderircde/public_html/php5/info.php
21 | grep php5-cgi.ini
open(./php5-cgi.ini, O_RDONLY)= 3
lstat64(/home/benderircde/public_html/php5/php5-cgi.ini,
{st_mode=S_IFREG|0644, st_size=339, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/home/benderircde/public_html/php5/php5-cgi.ini /td/tr

bash-2.04# strace php /home/benderircde/public_html/php5/info.php 21
| grep php-cgi.ini
open(./php-cgi.ini, O_RDONLY) = 3
lstat64(/home/benderircde/public_html/php5/php-cgi.ini,
{st_mode=S_IFREG|0644, st_size=339, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/home/benderircde/public_html/php5/php-cgi.ini /td/tr
bash-2.04#



[2006-03-14 09:28:07] [EMAIL PROTECTED]

PHP4 doesn't behave this way and I doubt PHP5 will do it either, just
because putting php.ini into scripts directory doesn't make any sense
to me.
PHP looks for .ini in TWO directories: the directory where PHP binary
is placed and the directory specified with --with-config-file-path
option. Also you can use -c option when running PHP binary to specify
ini file path. 



[2006-03-14 09:12:52] schwarz at power-netz dot de

yes.. where else should the USER php.ini be searched?

Just behave like php4 or php5.0.3 :)



[2006-03-13 19:51:41] [EMAIL PROTECTED]

I don't quite understand: you want PHP to look for the ini file in the
directory where the script is?



[2006-03-13 14:19:01] schwarz at power-netz dot de

Description:

php 5.1.2 does not search in /home/user/public_html/xxx/
for the php.ini if the script lies i.e. here 
/home/user/public_html/xxx/script.php

Same as bug #33882 from 2005

Notes:

We have renamed the php-cgi.ini to php5-cgi.ini to 
be able to use php4 and php5 on the same system.
Source has been changed since 5.0.0 and worked up to/including  
5.0.3 without any problems.


Expected result:

bash-2.04# pwd

/home/benderircde/public_html   

bash-2.04# strace php5 /home/benderircde/public_html/php5/info.php 21
| grep php5-cgi.ini

open(/home/benderircde/public_html/php5/php5-cgi.ini, O_RDONLY) = -1
ENOENT (No such file or directory)
open(/usr/local/apache/conf//php5-cgi.ini, O_RDONLY) = 3
lstat64(/usr/local/apache/conf/php5-cgi.ini, {st_mode=S_IFREG|0644,
st_size=25282, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/usr/local/apache/conf/php5-cgi.ini /td/tr


Actual result:
--
bash-2.04# pwd

/home/benderircde/public_html   

bash-2.04# strace php5 /home/benderircde/public_html/php5/info.php 21
| grep php5-cgi.ini

open(/home/benderircde/public_html/php5-cgi.ini, O_RDONLY) = -1
ENOENT (No such file or directory)
open(/usr/local/apache/conf//php5-cgi.ini, O_RDONLY) = 3
lstat64(/usr/local/apache/conf/php5-cgi.ini, {st_mode=S_IFREG|0644,
st_size=25282, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/usr/local/apache/conf/php5-cgi.ini /td/tr






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


#36716 [Fbk-Opn]: php.ini not found in scriptdirectory see Bug #33882

2006-03-14 Thread schwarz at power-netz dot de
 ID:   36716
 User updated by:  schwarz at power-netz dot de
 Reported By:  schwarz at power-netz dot de
-Status:   Feedback
+Status:   Open
 Bug Type: CGI related
 Operating System: linux 2.4.32
 PHP Version:  5.1.2
 New Comment:

yes.. where else should the USER php.ini be searched?

Just behave like php4 or php5.0.3 :)


Previous Comments:


[2006-03-13 19:51:41] [EMAIL PROTECTED]

I don't quite understand: you want PHP to look for the ini file in the
directory where the script is?



[2006-03-13 14:19:01] schwarz at power-netz dot de

Description:

php 5.1.2 does not search in /home/user/public_html/xxx/
for the php.ini if the script lies i.e. here 
/home/user/public_html/xxx/script.php

Same as bug #33882 from 2005

Notes:

We have renamed the php-cgi.ini to php5-cgi.ini to 
be able to use php4 and php5 on the same system.
Source has been changed since 5.0.0 and worked up to/including  
5.0.3 without any problems.


Expected result:

bash-2.04# pwd

/home/benderircde/public_html   

bash-2.04# strace php5 /home/benderircde/public_html/php5/info.php 21
| grep php5-cgi.ini

open(/home/benderircde/public_html/php5/php5-cgi.ini, O_RDONLY) = -1
ENOENT (No such file or directory)
open(/usr/local/apache/conf//php5-cgi.ini, O_RDONLY) = 3
lstat64(/usr/local/apache/conf/php5-cgi.ini, {st_mode=S_IFREG|0644,
st_size=25282, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/usr/local/apache/conf/php5-cgi.ini /td/tr


Actual result:
--
bash-2.04# pwd

/home/benderircde/public_html   

bash-2.04# strace php5 /home/benderircde/public_html/php5/info.php 21
| grep php5-cgi.ini

open(/home/benderircde/public_html/php5-cgi.ini, O_RDONLY) = -1
ENOENT (No such file or directory)
open(/usr/local/apache/conf//php5-cgi.ini, O_RDONLY) = 3
lstat64(/usr/local/apache/conf/php5-cgi.ini, {st_mode=S_IFREG|0644,
st_size=25282, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/usr/local/apache/conf/php5-cgi.ini /td/tr






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


#36716 [Bgs]: php.ini not found in scriptdirectory see Bug #33882

2006-03-14 Thread schwarz at power-netz dot de
 ID:   36716
 User updated by:  schwarz at power-netz dot de
 Reported By:  schwarz at power-netz dot de
 Status:   Bogus
 Bug Type: CGI related
 Operating System: linux 2.4.32
 PHP Version:  5.1.2
 New Comment:

You are right, php4 and 5.0.3 don't seek inside 
the script dir directly. The Apache sets the current
directory to the scripts directory and php4 + 5.0.3 
try to open ./php-cgi.ini which 5.1.2 does not 
try.

Pls see here for the difference:


bash-2.04# pwd
/home/benderircde/public_html/php5


bash-2.04# cd /home/benderircde/public_html/php5
bash-2.04# strace php5 /home/benderircde/public_html/php5/info.php 21
| grep php5-cgi.ini
open(/usr/local/apache/conf//php5-cgi.ini, O_RDONLY) = 3
lstat64(/usr/local/apache/conf/php5-cgi.ini, {st_mode=S_IFREG|0644,
st_size=25282, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/usr/local/apache/conf/php5-cgi.ini /td/tr


bash-2.04# strace php5.0.3 /home/benderircde/public_html/php5/info.php
21 | grep php5-cgi.ini
open(./php5-cgi.ini, O_RDONLY)= 3
lstat64(/home/benderircde/public_html/php5/php5-cgi.ini,
{st_mode=S_IFREG|0644, st_size=339, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/home/benderircde/public_html/php5/php5-cgi.ini /td/tr

bash-2.04# strace php /home/benderircde/public_html/php5/info.php 21
| grep php-cgi.ini
open(./php-cgi.ini, O_RDONLY) = 3
lstat64(/home/benderircde/public_html/php5/php-cgi.ini,
{st_mode=S_IFREG|0644, st_size=339, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/home/benderircde/public_html/php5/php-cgi.ini /td/tr
bash-2.04#


Previous Comments:


[2006-03-14 09:28:07] [EMAIL PROTECTED]

PHP4 doesn't behave this way and I doubt PHP5 will do it either, just
because putting php.ini into scripts directory doesn't make any sense
to me.
PHP looks for .ini in TWO directories: the directory where PHP binary
is placed and the directory specified with --with-config-file-path
option. Also you can use -c option when running PHP binary to specify
ini file path. 



[2006-03-14 09:12:52] schwarz at power-netz dot de

yes.. where else should the USER php.ini be searched?

Just behave like php4 or php5.0.3 :)



[2006-03-13 19:51:41] [EMAIL PROTECTED]

I don't quite understand: you want PHP to look for the ini file in the
directory where the script is?



[2006-03-13 14:19:01] schwarz at power-netz dot de

Description:

php 5.1.2 does not search in /home/user/public_html/xxx/
for the php.ini if the script lies i.e. here 
/home/user/public_html/xxx/script.php

Same as bug #33882 from 2005

Notes:

We have renamed the php-cgi.ini to php5-cgi.ini to 
be able to use php4 and php5 on the same system.
Source has been changed since 5.0.0 and worked up to/including  
5.0.3 without any problems.


Expected result:

bash-2.04# pwd

/home/benderircde/public_html   

bash-2.04# strace php5 /home/benderircde/public_html/php5/info.php 21
| grep php5-cgi.ini

open(/home/benderircde/public_html/php5/php5-cgi.ini, O_RDONLY) = -1
ENOENT (No such file or directory)
open(/usr/local/apache/conf//php5-cgi.ini, O_RDONLY) = 3
lstat64(/usr/local/apache/conf/php5-cgi.ini, {st_mode=S_IFREG|0644,
st_size=25282, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/usr/local/apache/conf/php5-cgi.ini /td/tr


Actual result:
--
bash-2.04# pwd

/home/benderircde/public_html   

bash-2.04# strace php5 /home/benderircde/public_html/php5/info.php 21
| grep php5-cgi.ini

open(/home/benderircde/public_html/php5-cgi.ini, O_RDONLY) = -1
ENOENT (No such file or directory)
open(/usr/local/apache/conf//php5-cgi.ini, O_RDONLY) = 3
lstat64(/usr/local/apache/conf/php5-cgi.ini, {st_mode=S_IFREG|0644,
st_size=25282, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/usr/local/apache/conf/php5-cgi.ini /td/tr






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


#36716 [NEW]: php.ini not found in scriptdirectory see Bug #33882

2006-03-13 Thread schwarz at power-netz dot de
From: schwarz at power-netz dot de
Operating system: linux 2.4.32
PHP version:  5.1.2
PHP Bug Type: CGI related
Bug description:  php.ini not found in scriptdirectory see Bug #33882

Description:

php 5.1.2 does not search in /home/user/public_html/xxx/
for the php.ini if the script lies i.e. here 
/home/user/public_html/xxx/script.php

Same as bug #33882 from 2005

Notes:

We have renamed the php-cgi.ini to php5-cgi.ini to 
be able to use php4 and php5 on the same system.
Source has been changed since 5.0.0 and worked up to/including  
5.0.3 without any problems.


Expected result:

bash-2.04# pwd

/home/benderircde/public_html   

bash-2.04# strace php5 /home/benderircde/public_html/php5/info.php 21 |
grep php5-cgi.ini

open(/home/benderircde/public_html/php5/php5-cgi.ini, O_RDONLY) = -1
ENOENT (No such file or directory)
open(/usr/local/apache/conf//php5-cgi.ini, O_RDONLY) = 3
lstat64(/usr/local/apache/conf/php5-cgi.ini, {st_mode=S_IFREG|0644,
st_size=25282, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/usr/local/apache/conf/php5-cgi.ini /td/tr


Actual result:
--
bash-2.04# pwd

/home/benderircde/public_html   

bash-2.04# strace php5 /home/benderircde/public_html/php5/info.php 21 |
grep php5-cgi.ini

open(/home/benderircde/public_html/php5-cgi.ini, O_RDONLY) = -1 ENOENT
(No such file or directory)
open(/usr/local/apache/conf//php5-cgi.ini, O_RDONLY) = 3
lstat64(/usr/local/apache/conf/php5-cgi.ini, {st_mode=S_IFREG|0644,
st_size=25282, ...}) = 0
trtd class=eConfiguration File (php.ini) Path /tdtd
class=v/usr/local/apache/conf/php5-cgi.ini /td/tr


-- 
Edit bug report at http://bugs.php.net/?id=36716edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36716r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36716r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36716r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36716r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=36716r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=36716r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=36716r=needscript
Try newer version:http://bugs.php.net/fix.php?id=36716r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=36716r=support
Expected behavior:http://bugs.php.net/fix.php?id=36716r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=36716r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=36716r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36716r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36716r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36716r=dst
IIS Stability:http://bugs.php.net/fix.php?id=36716r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=36716r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36716r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=36716r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=36716r=mysqlcfg