#23594 [Ctl]: 19292 is back (open_basdir restriction)!
| From: | momo@php.net | Date: | Tue, 13 May 2003 13:45:10 +0000 |
| Subject: | #23594 [Ctl]: 19292 is back (open_basdir restriction)! | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-39524@lists.php.net to get a copy of this message | ||
ID: 23594
Updated by: momo@php.net
Reported By: momo@php.net
Status: Critical
Bug Type: CGI related
Operating System: RH9
PHP Version: 4CVS-2003-05-12 (stable)
New Comment:
oops my mistake here is the right bt:
#0 php_check_open_basedir (path=0x8295ffc "/home/moshe/share/v0.wav")
at /root/php-dev/php4/main/fopen_wrappers.c:171
#1 0x0815104a in php_plain_files_stream_opener (wrapper=0x81ee89c,
path=0x8295ffc "/home/moshe/share/v0.wav", mode=0x8282004 "rb",
options=4, opened_path=0x0, context=0x0, __php_stream_call_depth=1,
__zend_filename=0x81adf40 "/root/php-dev/php4/main/streams.c",
__zend_lineno=2580, __zend_orig_filename=0x819ea40
"/root/php-dev/php4/ext/standard/file.c", __zend_orig_lineno=1105)
at /root/php-dev/php4/main/streams.c:2379
#2 0x081517d1 in _php_stream_open_wrapper_ex (path=0x8295ffc
"/home/moshe/share/v0.wav", mode=0x8282004 "rb", options=12,
opened_path=0x0,
context=0x0, __php_stream_call_depth=0, __zend_filename=0x819ea40
"/root/php-dev/php4/ext/standard/file.c", __zend_lineno=1105,
__zend_orig_filename=0x0, __zend_orig_lineno=0) at
/root/php-dev/php4/main/streams.c:2578
#3 0x080d2306 in php_if_fopen (ht=2, return_value=0x82b50f4,
this_ptr=0x0, return_value_used=1)
at /root/php-dev/php4/ext/standard/file.c:1103
#4 0x081897ae in execute (op_array=0x828d0ac) at
/root/php-dev/php4/Zend/zend_execute.c:1606
#5 0x081899e1 in execute (op_array=0x8281c44) at
/root/php-dev/php4/Zend/zend_execute.c:1650
#6 0x08178418 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /root/php-dev/php4/Zend/zend.c:869
#7 0x08142b87 in php_execute_script (primary_file=0xbfffd9b0) at
/root/php-dev/php4/main/main.c:1642
#8 0x0818fb18 in main (argc=2, argv=0xbfffda44) at
/root/php-dev/php4/sapi/cli/php_cli.c:787
#9 0x42015574 in __libc_start_main () from /lib/tls/libc.so.6
Previous Comments:
------------------------------------------------------------------------
[2003-05-13 08:28:57] momo@php.net
AFAIK, the open_basedir restriction have nothing with fopen() command.
here is the bt:
#0 php_check_open_basedir (path=0x8295ffc
"/htdocs/audio/wav.class.php") at
/root/php-dev/php4/main/fopen_wrappers.c:171
#1 0x0814fc8e in _php_stream_fopen_with_path (filename=0x8295ffc
"/htdocs/audio/wav.class.php", mode=0x81aca03 "rb",
path=0x81ac6b0 ".:/usr/local/lib/php", opened_path=0xbfffbc08,
options=165, __php_stream_call_depth=3,
__zend_filename=0x81adf40 "/root/php-dev/php4/main/streams.c",
__zend_lineno=2376,
__zend_orig_filename=0x81ac860 "/root/php-dev/php4/main/main.c",
__zend_orig_lineno=766)
at /root/php-dev/php4/main/streams.c:1726
#2 0x08151028 in php_plain_files_stream_opener (wrapper=0x81ee89c,
path=0x8295ffc "/htdocs/audio/wav.class.php",
mode=0x81aca03 "rb", options=165, opened_path=0xbfffbc08,
context=0x0, __php_stream_call_depth=2,
__zend_filename=0x81adf40 "/root/php-dev/php4/main/streams.c",
__zend_lineno=2580,
__zend_orig_filename=0x81ac860 "/root/php-dev/php4/main/main.c",
__zend_orig_lineno=766)
at /root/php-dev/php4/main/streams.c:2376
#3 0x081517d1 in _php_stream_open_wrapper_ex (path=0x8295ffc
"/htdocs/audio/wav.class.php", mode=0x81aca03 "rb", options=173,
opened_path=0xbfffbc08, context=0x0, __php_stream_call_depth=1,
__zend_filename=0x81adf40 "/root/php-dev/php4/main/streams.c",
__zend_lineno=2658,
__zend_orig_filename=0x81ac860 "/root/php-dev/php4/main/main.c",
__zend_orig_lineno=766)
at /root/php-dev/php4/main/streams.c:2578
#4 0x08151b75 in _php_stream_open_wrapper_as_file (path=0x8295ffc
"/htdocs/audio/wav.class.php", mode=0x81aca03 "rb",
options=141, opened_path=0xbfffbc08, __php_stream_call_depth=0,
__zend_filename=0x81ac860 "/root/php-dev/php4/main/main.c",
__zend_lineno=766, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /root/php-dev/php4/main/streams.c:2658
#5 0x08140c90 in php_fopen_wrapper_for_zend (filename=0x8295ffc
"/htdocs/audio/wav.class.php", opened_path=0xbfffbc08)
at /root/php-dev/php4/main/main.c:766
#6 0x0815c83c in open_file_for_scanning (file_handle=0xbfffbc00) at
zend_language_scanner.l:237
#7 0x0815ca16 in compile_file (file_handle=0xbfffbc00, type=2) at
zend_language_scanner.l:336
---Type <return> to continue, or q <return> to quit---
#8 0x0815cbe8 in compile_filename (type=2, filename=0xbfffbe8c) at
zend_language_scanner.l:401
#9 0x0818b7f3 in execute (op_array=0x827ac54) at
/root/php-dev/php4/Zend/zend_execute.c:2142
#10 0x0818b97c in execute (op_array=0x8281c44) at
/root/php-dev/php4/Zend/zend_execute.c:2173
#11 0x08178418 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /root/php-dev/php4/Zend/zend.c:869
#12 0x08142b87 in php_execute_script (primary_file=0xbfffe9b0) at
/root/php-dev/php4/main/main.c:1642
#13 0x0818fb18 in main (argc=2, argv=0xbfffea44) at
/root/php-dev/php4/sapi/cli/php_cli.c:787
#14 0x42015574 in __libc_start_main () from /lib/tls/libc.so.6
does the problem is with ZEND?
------------------------------------------------------------------------
[2003-05-12 10:51:25] momo@php.net
first, coz the overload of 19292 i started new bug:
here the conf:
./configure --disable-cgi --disable-ctype \
--with-gd --with-zlib-dir=/usr/lib \
--enable-debug \
--with-apxs=/www/bin/apxs \
--with-wavsmpl
now:
------------------------------------
[root@moshe-lap php-dev]# php -a
Interactive mode enabled
<?
$p = fopen("/root/.bash_history","rb");
Warning: fopen(): open_basedir restriction in effect.
File(/root/.bash_history) is not within the allowed path(s):
(.:/usr/local/lib/php) in - on line 2
Warning: fopen(/root/.bash_history): failed to open stream: Operation
not permitted in - on line 2
$p = fopen("/tmp/g","rb");
-----------------------------------
the problem also affects CLI.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23594&edit=1