[PHP] php.ini and command line

2008-06-23 Thread Marten Lehmann

Hello,

within a CGI-wrapped hosting environment, we are calling PHP as command 
line interpreter (not cli). This works fine, except one thing: Settings 
from parent php.inis are not inherited. This is very annoying. Lets say, 
there is a script /user/123/index.php and some libraries in 
/user/123/include/*.php, then settings from /user/123/php.ini are not 
available for /user/123/include/*.php, even if the environment-variable 
DOCUMENT_ROOT is set to /user, so PHP would be able to look for settings 
in php.ini beginning in /user and ending in the current directory 
/user/123 or /user/123/include.


Why does PHP work different here in the command line mode as in the 
Apache-Module mode?


Is there a way to enable php.ini-inheritance for command line PHP?

Regards
Marten

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php.ini and command line

2008-06-23 Thread Wolf

 Marten Lehmann [EMAIL PROTECTED] wrote: 
 Hello,
 
 within a CGI-wrapped hosting environment, we are calling PHP as command 
 line interpreter (not cli). This works fine, except one thing: Settings 
 from parent php.inis are not inherited. This is very annoying. Lets say, 
 there is a script /user/123/index.php and some libraries in 
 /user/123/include/*.php, then settings from /user/123/php.ini are not 
 available for /user/123/include/*.php, even if the environment-variable 
 DOCUMENT_ROOT is set to /user, so PHP would be able to look for settings 
 in php.ini beginning in /user and ending in the current directory 
 /user/123 or /user/123/include.
 
 Why does PHP work different here in the command line mode as in the 
 Apache-Module mode?
 
 Is there a way to enable php.ini-inheritance for command line PHP?
 
 Regards
 Marten

Have you tried modifying your command line php calls with a -c as some of the 
documentation states?

What have you tried (direct calls) and what has the output been?

What do your error logs say?

HTH,
Wolf

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php.ini and command line

2008-06-23 Thread Wolf

 Marten Lehmann [EMAIL PROTECTED] wrote: 
 Hello,
 
 within a CGI-wrapped hosting environment, we are calling PHP as command 
 line interpreter (not cli). This works fine, except one thing: Settings 
 from parent php.inis are not inherited. This is very annoying. Lets say, 
 there is a script /user/123/index.php and some libraries in 
 /user/123/include/*.php, then settings from /user/123/php.ini are not 
 available for /user/123/include/*.php, even if the environment-variable 
 DOCUMENT_ROOT is set to /user, so PHP would be able to look for settings 
 in php.ini beginning in /user and ending in the current directory 
 /user/123 or /user/123/include.
 
 Why does PHP work different here in the command line mode as in the 
 Apache-Module mode?
 
 Is there a way to enable php.ini-inheritance for command line PHP?
 
 Regards
 Marten
 

Also, if you do use Google and search, the first answer it comes back with is 
this link:
http://bugs.php.net/bug.php?id=44526edit=1

So, just wondering here, what searches did you run?  
http://www.google.com/search?hl=enclient=firefox-arls=com.ubuntu%3Aen-US%3Aunofficialhs=jaCq=PHP%3A+php.ini+inheritance++clibtnG=Search

Wolf

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php