[PHP] exit() function question
Why exit() funtion always exit with 255 value instead of the passed value, in php 4.2.2, even when I compile with --enable-cli. Check the code bellow, to see # cat t3.php #!/usr/src/php-4.2.2/php ?php echo Version: ,phpversion(),\n; exit(1); ? # ./t3.php ; echo last run exit value:$? Version: 4.2.2 last run exit value:255 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: command line argument vs. urlencode ?
\+ does not work too, php treat command line arguments as a POST/GET , so I should urlencode/urldecode, I would like to know if there is a alway to turn this behavior off. Thanks any way. Renato Richard Lynch wrote: Any one know why the + (plus sign) is not passed as argument to $argv when calling a php script from linux shell ? php test.php 123 xxx+ Best guess is + is a special character in the shell, so you need: php test.php 123 xxx+ Or maybe even so far as: php test.php 123 xxx\+ You'd have to read man sh to be 100% sure why + is special. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: What's the trick ?
testing sorry... Richard Lynch wrote: Hi guys, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] command line argument vs. urlencode ?
Hi, Any one know why the + (plus sign) is not passed as argument to $argv when calling a php script from linux shell ? if this is not a bug, how do I pass a + as argument ? should I use urlencode/urldecode ? is that any php.ini variable to turn off this behavior ? try this and you will see : teste.php-- ?php foreach( $argv as $x ) printf(p: %s\n,$x); ? --- call with : php test.php 123 xxx+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ploblem with safe_mode_include_dir
Dear Rasmus, I must be wrong, because fetching the cvs I found an entry in the Chanlog file 2002-02-01 James E. Flemer [EMAIL PROTECTED] * main/fopen_wrappers.c main/fopen_wrappers.h: Changed php.ini directive 'safe_mode_include_dir' to accept a (semi)colon separated path, rather than a single directory. Also moved checking of said path into a separate path for code readability. Which led me to think that such parameter would enable php scripts with an open_base_dir setting to access a separate include_path so system wide libraries would not need to be duplicated in every VirtualDomain hosted. Can you help me out with this ? Rasmus Lerdorf wrote: There is no such feature. On Mon, 4 Mar 2002, Renato Lins wrote: Sorry, I may not haven been clear. What should I do to include from a safe area (/myuser/safe) when I have open_basedir set to other path (/myuser/public_html) ? Rasmus Lerdorf wrote: open_basedir doesn't take a list of paths. On Mon, 4 Mar 2002, Renato Lins wrote: Some one can help me. Why this is not working ? # apache conf Directory /myuser/public_html/ php_admin_flag safe_mode on php_admin_value safe_mode_include_dir /myuser/safe/ php_admin_value doc_root /myuser/public_html/ php_admin_value open_basedir /myuser/public_html/:/tmp/ /Directory #cat /myuser/public_html/x2.php ?php echo 'Current PHP version: ' . phpversion().BR; require(/myuser/safe/x4.php); echo I am in x2br ? #cat /myuser/safe/x4.php ?php echo I am in X4br ? #browser result Current PHP version: 4.2.0-dev *Warning*: open_basedir restriction in effect. File is in wrong directory in */myuser/public_html/x1.php* on line 2 *Fatal error*: Failed opening required '/myuser/safe/x4.php' (include_path='') in */home/rlins/public_html/x1.php* on line 2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ploblem with safe_mode_include_dir
Some one can help me Why this is not working ? # apache conf Directory /myuser/public_html/ php_admin_flag safe_mode on php_admin_value safe_mode_include_dir /myuser/safe/ php_admin_value doc_root /myuser/public_html/ php_admin_value open_basedir /myuser/public_html/:/tmp/ /Directory #cat /myuser/public_html/x2php ?php echo 'Current PHP version: ' phpversion()BR; require(/myuser/safe/x4php); echo I am in x2br ? #cat /myuser/safe/x4php ?php echo I am in X4br ? #browser result Current PHP version: 420-dev *Warning*: open_basedir restriction in effect File is in wrong directory in */myuser/public_html/x1php* on line 2 *Fatal error*: Failed opening required '/myuser/safe/x4php' (include_path='') in */home/rlins/public_html/x1php* on line 2 -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp
Re: [PHP] ploblem with safe_mode_include_dir
Sorry, I may not haven been clear What should I do to include from a safe area (/myuser/safe) when I have open_basedir set to other path (/myuser/public_html) ? Rasmus Lerdorf wrote: open_basedir doesn't take a list of paths On Mon, 4 Mar 2002, Renato Lins wrote: Some one can help me Why this is not working ? # apache conf Directory /myuser/public_html/ php_admin_flag safe_mode on php_admin_value safe_mode_include_dir /myuser/safe/ php_admin_value doc_root /myuser/public_html/ php_admin_value open_basedir /myuser/public_html/:/tmp/ /Directory #cat /myuser/public_html/x2php ?php echo 'Current PHP version: ' phpversion()BR; require(/myuser/safe/x4php); echo I am in x2br ? #cat /myuser/safe/x4php ?php echo I am in X4br ? #browser result Current PHP version: 420-dev *Warning*: open_basedir restriction in effect File is in wrong directory in */myuser/public_html/x1php* on line 2 *Fatal error*: Failed opening required '/myuser/safe/x4php' (include_path='') in */home/rlins/public_html/x1php* on line 2 -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp