#34957 [NEW]: PHP5 ignores any kind of ACL including FS ACL, AFS ACL or trustees (PHP4 works)
From: cunha17 at gmail dot com Operating system: debian sarge kernel 2.6 PHP version: 6CVS-2005-10-22 (CVS) PHP Bug Type: Filesystem function related Bug description: PHP5 ignores any kind of ACL including FS ACL, AFS ACL or trustees (PHP4 works) Description: This bug only exists at PHP5 branch. PHP4 works just fine. This patch which was provided by [EMAIL PROTECTED] fixes these bugs: - Bug #14923 is_readable, is_writable, is_executable fail on POSIX ACL based filesystems (this bug is ancient and is fixed in PHP4 branch, but not fixed on PHP5 branch - regression test problems ?) - Bug #30931 is_writable() and is_readable() return false when access is permit (this bug is marked as no feedback so that's why I opened this bug report) - This bug report itself Reproduce code: --- \n"; echo $file.' is '.(is_writable($file) ? '' : 'NOT ')."writable!\n"; ?> The POSIX ACL on test.php: $ getfacl test.php # file: test.php # owner: root # group: root user::rw- user:swishe:rwx group::--- mask::rwx other::--- Expected result: Logged in as user swishe and using PHP CLI: host:/var$ php test.php test.php is readable! test.php is writable! Actual result: -- Logged in as user swishe and using PHP CLI: host:/var$ php test.php test.php is NOT readable! test.php is NOT writable! Here is the patch provided by [EMAIL PROTECTED] at Bug #30931 which fixes this problem. I tested it over XFS and AFS. Index: ext/standard/filestat.c === RCS file: /repository/php-src/ext/standard/filestat.c,v retrieving revision 1.137 diff -u -r1.137 filestat.c --- ext/standard/filestat.c 23 Aug 2005 12:53:23 - 1.137 +++ ext/standard/filestat.c 22 Oct 2005 14:06:23 - @@ -543,6 +543,7 @@ #define IS_LINK_OPERATION(__t) ((__t) == FS_TYPE || (__t) == FS_IS_LINK || (__t) == FS_LSTAT) #define IS_EXISTS_CHECK(__t) ((__t) == FS_EXISTS || (__t) == FS_IS_W || (__t) == FS_IS_R || (__t) == FS_IS_X || (__t) == FS_IS_FILE || (__t) == FS_IS_DIR || (__t) == FS_IS_LINK) #define IS_ABLE_CHECK(__t) ((__t) == FS_IS_R || (__t) == FS_IS_W || (__t) == FS_IS_X) +#define IS_ACCESS_CHECK(__t) (IS_ABLE_CHECK(type) || (__t) == FS_EXISTS) /* {{{ php_stat */ @@ -552,6 +553,7 @@ *stat_size, *stat_atime, *stat_mtime, *stat_ctime, *stat_blksize, *stat_blocks; struct stat *stat_sb; php_stream_statbuf ssb; + char * local_path; int flags = 0, rmask=S_IROTH, wmask=S_IWOTH, xmask=S_IXOTH; /* access rights defaults to other */ char *stat_sb_names[13]={"dev", "ino", "mode", "nlink", "uid", "gid", "rdev", "size", "atime", "mtime", "ctime", "blksize", "blocks"}; @@ -559,7 +561,21 @@ if (!filename_length) { RETURN_FALSE; } - +#ifndef NETWARE + if (IS_ACCESS_CHECK(type) && + !php_stream_locate_url_wrapper(filename, &local_path, STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC)) { + switch(type) { + case FS_EXISTS: + RETURN_BOOL(access(local_path, F_OK) == 0); + case FS_IS_W: + RETURN_BOOL(access(local_path, W_OK) == 0); + case FS_IS_X: + RETURN_BOOL(access(local_path, X_OK) == 0); + case FS_IS_R: + RETURN_BOOL(access(local_path, R_OK) == 0); + } + } +#endif if (IS_LINK_OPERATION(type)) { flags |= PHP_STREAM_URL_STAT_LINK; } -- Edit bug report at http://bugs.php.net/?id=34957&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34957&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34957&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34957&r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=34957&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=34957&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34957&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34957&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34957&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34957&r=support Expected behavior: http://bugs.php.net/fix.php?id=34957&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34957&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34957&r=submittedtwice register_globals:http://bugs.php.ne
#30931 [Com]: is_writable() and is_readable() return false when access is permitted via ACL
ID: 30931 Comment by: cunha17 at gmail dot com Reported By: bugzilla-php at bwurst dot org Status: No Feedback Bug Type: Filesystem function related Operating System: gentoo linux (kernel 2.6) PHP Version: 5.0.2 New Comment: PHP should not try to calculate permissions because only the Operating System can do it right. As someone pointed out, PHP is ignoring my POSIX ACL and Trustees too. Previous Comments: [2005-09-02 23:01:48] 1 at 234 dot cx I was just wondering if anyone can review the patch which has been posted here. This seems to be a well defined bug with a patch that solves the problem, is there any reason not to check it in? If there *is* a reason not to check the patch in, I am sure one of us will work on improving it. Before we can do this, though, we need a clue what issues people see with the patch as it stands. [2005-08-26 03:03:50] matthew at acintrix dot net I too am expierencing this bug on Fedora Core 4 with PHP 5.0.4. [2005-08-08 18:18:11] ka at pacific dot net Same bug found here in 5.04 on Fedora Core 4 with modphp Symptom: modphp cannot write to files even if they are `chmod 777`, if there is an acl for apache on the file. [2005-06-15 23:51:26] 1 at 234 dot cx I don't know if this is useful to anyone, but this seems to be a regression of bug #14923, which was fixed back in 2002. I have just experienced the bug on Fedora 4. I tried JR's patch, and that solves the problem for me. Thanks, Pete [2005-06-12 16:16:35] jr at terragate dot net I've written a patch to address this issue. It uses POSIX's access function to determine file permissions. I tested this patch on Mac OS 10.4.1, Windows XP SP2 and FreeBSD 5.2.1. I am not sure if this patch also works for Win 9x (maybe R_OK, W_OK etc. are not defined there) and other non POSIX conformant OSes. Probably some more #ifndefs are required. http://jr.terragate.net/access.diff 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/30931 -- Edit this bug report at http://bugs.php.net/?id=30931&edit=1
#28306 [Fbk->Csd]: PHP5-rc2 coredumps with Smarty-2.6.2, error handler and exceptions
ID: 28306 User updated by: cunha17 at gmail dot com -Reported By: cunha17 at uol dot com dot br +Reported By: cunha17 at gmail dot com -Status: Feedback +Status: Closed Bug Type: Reproducible crash Operating System: Redhat Linux 9/Fedora Core 1 PHP Version: 5CVS-2004-05-06 (dev) New Comment: This BUG is not present in current CVS anymore. Thanx. Previous Comments: [2005-01-15 00:21:36] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip [2004-05-19 15:25:53] cunha17 at uol dot com dot br Using the gdb's "next" command, I could get an useful backtrace: Program received signal SIGSEGV, Segmentation fault. 0x in ?? () (gdb) bt #0 0x in ?? () #1 0x0819c798 in execute (op_array=0x4076e378, tsrm_ls=0x8203200) at /usr/src/zend2/php-src/Zend/zend_execute.c:1391 #2 0x0819fd9b in zend_do_fcall_common_helper (execute_data=0xbfffd110, opline=0x4076e174, op_array=0x4076f0a0, tsrm_ls=0x8203200) at /usr/src/zend2/php-src/Zend/zend_execute.c:2728 #3 0x0819c798 in execute (op_array=0x4076f0a0, tsrm_ls=0x8203200) at /usr/src/zend2/php-src/Zend/zend_execute.c:1391 #4 0x0819fd9b in zend_do_fcall_common_helper (execute_data=0xbfffd340, opline=0x40505dfc, op_array=0x40505520, tsrm_ls=0x8203200) at /usr/src/zend2/php-src/Zend/zend_execute.c:2728 #5 0x0819c798 in execute (op_array=0x40505520, tsrm_ls=0x8203200) at /usr/src/zend2/php-src/Zend/zend_execute.c:1391 #6 0x081803ec in zend_execute_scripts (type=8, tsrm_ls=0x8203200, retval=0x0, file_count=3) at /usr/src/zend2/php-src/Zend/zend.c:1058 #7 0x0814a191 in php_execute_script (primary_file=0xb710, tsrm_ls=0x8203200) at /usr/src/zend2/php-src/main/main.c:1630 #8 0x081a7f8a in main (argc=2, argv=0xb794) at /usr/src/zend2/php-src/sapi/cli/php_cli.c:943 #9 0x403d0a67 in __libc_start_main () from /lib/i686/libc.so.6 [2004-05-07 23:40:04] cunha17 at uol dot com dot br I can't generate the backtrace. My php(cli) is already compiled with --enable-debug and I recompiled it with only these options: ./configure --enable-debug --enable-cli When running: # gdb /usr/local/bin/php core.8971 I get: GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1". Core was generated by `/usr/local/bin/php exception_bug.php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libcrypt.so.1...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /lib/libresolv.so.2...done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /lib/tls/libm.so.6...done. Loaded symbols for /lib/tls/libm.so.6 Reading symbols from /lib/libdl.so.2...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libnsl.so.1...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /usr/lib/libz.so.1...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /usr/lib/libxml2.so.2...done. Loaded symbols for /usr/lib/libxml2.so.2 Reading symbols from /lib/tls/libpthread.so.0...done. Loaded symbols for /lib/tls/libpthread.so.0 Reading symbols from /lib/tls/libc.so.6...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 0x in ?? () The backtrace command returns: (gdb) bt #0 0x in ?? () I don't know what else I can do. Any hints ? Cristiano Duarte [2004-05-06 20:00:34] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. ---- [2004-05-06 19:58:05] cunha17 at uol dot com dot br The debug_backtrace() just before the segmentation fault: Array ( [0] => Array ( [file] => /ho
#28444 [Com]: "Cannot access undefined property for object with overloaded property access"
ID: 28444 Comment by: cunha17 at uol dot com dot br Reported By: dennis at inmarket dot lviv dot ua Status: Analyzed Bug Type: Class/Object related Operating System: WinXP PHP Version: 5.0.0RC2 New Comment: This odd behavior is still present in latest CVS and happens in Linux also. Cristiano Duarte Previous Comments: [2004-05-27 16:11:39] dennis at inmarket dot lviv dot ua Well, I am not familiar with the engine code, but it works for getting "undefined property for object with overloaded property access", as the reproduce code clearly shows. [2004-05-27 12:15:55] [EMAIL PROTECTED] The problem here is that it is unclear what actually should happen in this case. When executing $y->x->x = 3, we need to fetch $y->x for writing, i.e., get zval** of it. However, only handler that could give it to us is get_property_ptr_ptr and it is not overridable. We probably could use the result of __get, though it would mean we would have to fake zval**, which could have some strange consequences - needs to be checked. [2004-05-19 12:34:23] dennis at inmarket dot lviv dot ua Description: "Cannot access undefined property for object with overloaded property access" is an error when I try to set a property of an instance, which, in turn, is a property of another instance of an overloaded class, i.e. $a->x->y = 2 triggers the error if $a is an instance of an overloaded class. Note that getting that property works fine. Reproduce code: --- class Object { public $x; function __construct($x) { $this->x = $x; } } class Overloaded { var $props; function __construct($x) { $this->x = new Object($x); } function __get($prop) { return $this->props[$prop]; } function __set($prop, $val) { $this->props[$prop] = $val; } } $y = new Overloaded(2); echo $y->x->x, " "; // Prints 2... echo $y->x->x = 3; //Should print 3... Expected result: 2 3 Actual result: -- 2 Fatal error: Cannot access undefined property for object with overloaded property access in path/to/script.php on line 22 -- Edit this bug report at http://bugs.php.net/?id=28444&edit=1
#28306 [Opn]: PHP5-rc2 coredumps with Smarty-2.6.2, error handler and exceptions
ID: 28306 User updated by: cunha17 at uol dot com dot br Reported By: cunha17 at uol dot com dot br Status: Open Bug Type: Reproducible crash Operating System: Redhat Linux 9/Fedora Core 1 PHP Version: 5CVS-2004-05-06 (dev) New Comment: Using the gdb's "next" command, I could get an useful backtrace: Program received signal SIGSEGV, Segmentation fault. 0x in ?? () (gdb) bt #0 0x in ?? () #1 0x0819c798 in execute (op_array=0x4076e378, tsrm_ls=0x8203200) at /usr/src/zend2/php-src/Zend/zend_execute.c:1391 #2 0x0819fd9b in zend_do_fcall_common_helper (execute_data=0xbfffd110, opline=0x4076e174, op_array=0x4076f0a0, tsrm_ls=0x8203200) at /usr/src/zend2/php-src/Zend/zend_execute.c:2728 #3 0x0819c798 in execute (op_array=0x4076f0a0, tsrm_ls=0x8203200) at /usr/src/zend2/php-src/Zend/zend_execute.c:1391 #4 0x0819fd9b in zend_do_fcall_common_helper (execute_data=0xbfffd340, opline=0x40505dfc, op_array=0x40505520, tsrm_ls=0x8203200) at /usr/src/zend2/php-src/Zend/zend_execute.c:2728 #5 0x0819c798 in execute (op_array=0x40505520, tsrm_ls=0x8203200) at /usr/src/zend2/php-src/Zend/zend_execute.c:1391 #6 0x081803ec in zend_execute_scripts (type=8, tsrm_ls=0x8203200, retval=0x0, file_count=3) at /usr/src/zend2/php-src/Zend/zend.c:1058 #7 0x0814a191 in php_execute_script (primary_file=0xb710, tsrm_ls=0x8203200) at /usr/src/zend2/php-src/main/main.c:1630 #8 0x081a7f8a in main (argc=2, argv=0xb794) at /usr/src/zend2/php-src/sapi/cli/php_cli.c:943 #9 0x403d0a67 in __libc_start_main () from /lib/i686/libc.so.6 Previous Comments: [2004-05-07 23:40:04] cunha17 at uol dot com dot br I can't generate the backtrace. My php(cli) is already compiled with --enable-debug and I recompiled it with only these options: ./configure --enable-debug --enable-cli When running: # gdb /usr/local/bin/php core.8971 I get: GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1". Core was generated by `/usr/local/bin/php exception_bug.php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libcrypt.so.1...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /lib/libresolv.so.2...done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /lib/tls/libm.so.6...done. Loaded symbols for /lib/tls/libm.so.6 Reading symbols from /lib/libdl.so.2...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libnsl.so.1...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /usr/lib/libz.so.1...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /usr/lib/libxml2.so.2...done. Loaded symbols for /usr/lib/libxml2.so.2 Reading symbols from /lib/tls/libpthread.so.0...done. Loaded symbols for /lib/tls/libpthread.so.0 Reading symbols from /lib/tls/libc.so.6...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 0x in ?? () The backtrace command returns: (gdb) bt #0 0x in ?? () I don't know what else I can do. Any hints ? Cristiano Duarte [2004-05-06 20:00:34] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. ---- [2004-05-06 19:58:05] cunha17 at uol dot com dot br The debug_backtrace() just before the segmentation fault: Array ( [0] => Array ( [file] => /home/ten_cunha/bug/templates_c/%%595^%%595330115^exception_bug.tpl.php [line] => 10 [function] => smarty_test [args] => Array ( [0] => Array ( [name] => ExceptionBugTest ) [1] => Smarty Object ( [template_dir] => templates [compile_dir] => temp
#28306 [Fbk->Opn]: PHP5-rc2 coredumps with Smarty-2.6.2, error handler and exceptions
ID: 28306 User updated by: cunha17 at uol dot com dot br Reported By: cunha17 at uol dot com dot br -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: Redhat Linux 9/Fedora Core 1 PHP Version: 5CVS-2004-05-06 (dev) New Comment: I can't generate the backtrace. My php(cli) is already compiled with --enable-debug and I recompiled it with only these options: ./configure --enable-debug --enable-cli When running: # gdb /usr/local/bin/php core.8971 I get: GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1". Core was generated by `/usr/local/bin/php exception_bug.php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libcrypt.so.1...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /lib/libresolv.so.2...done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /lib/tls/libm.so.6...done. Loaded symbols for /lib/tls/libm.so.6 Reading symbols from /lib/libdl.so.2...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libnsl.so.1...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /usr/lib/libz.so.1...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /usr/lib/libxml2.so.2...done. Loaded symbols for /usr/lib/libxml2.so.2 Reading symbols from /lib/tls/libpthread.so.0...done. Loaded symbols for /lib/tls/libpthread.so.0 Reading symbols from /lib/tls/libc.so.6...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 0x in ?? () The backtrace command returns: (gdb) bt #0 0x in ?? () I don't know what else I can do. Any hints ? Cristiano Duarte Previous Comments: [2004-05-06 20:00:34] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. -------- [2004-05-06 19:58:05] cunha17 at uol dot com dot br The debug_backtrace() just before the segmentation fault: Array ( [0] => Array ( [file] => /home/ten_cunha/bug/templates_c/%%595^%%595330115^exception_bug.tpl.php [line] => 10 [function] => smarty_test [args] => Array ( [0] => Array ( [name] => ExceptionBugTest ) [1] => Smarty Object ( [template_dir] => templates [compile_dir] => templates_c [config_dir] => configs [plugins_dir] => Array ( [0] => plugins ) [debugging] => [error_reporting] => [debug_tpl] => [debugging_ctrl] => NONE [compile_check] => 1 [force_compile] => [caching] => 0 [cache_dir] => cache [cache_lifetime] => 3600 [cache_modified_check] => [php_handling] => 0 [security] => [secure_dir] => Array ( ) [security_settings] => Array ( [PHP_HANDLING] => [IF_FUNCS] => Array ( [0] => array [1] => list [2] => isset [3] => empty
#28306 [Opn]: PHP5-rc2 coredumps with Smarty-2.6.2, error handler and exceptions
ID: 28306 User updated by: cunha17 at uol dot com dot br Reported By: cunha17 at uol dot com dot br Status: Open Bug Type: Reproducible crash Operating System: Redhat Linux 9/Fedora Core 1 PHP Version: 5CVS-2004-05-06 (dev) New Comment: The debug_backtrace() just before the segmentation fault: Array ( [0] => Array ( [file] => /home/ten_cunha/bug/templates_c/%%595^%%595330115^exception_bug.tpl.php [line] => 10 [function] => smarty_test [args] => Array ( [0] => Array ( [name] => ExceptionBugTest ) [1] => Smarty Object ( [template_dir] => templates [compile_dir] => templates_c [config_dir] => configs [plugins_dir] => Array ( [0] => plugins ) [debugging] => [error_reporting] => [debug_tpl] => [debugging_ctrl] => NONE [compile_check] => 1 [force_compile] => [caching] => 0 [cache_dir] => cache [cache_lifetime] => 3600 [cache_modified_check] => [php_handling] => 0 [security] => [secure_dir] => Array ( ) [security_settings] => Array ( [PHP_HANDLING] => [IF_FUNCS] => Array ( [0] => array [1] => list [2] => isset [3] => empty [4] => count [5] => sizeof [6] => in_array [7] => is_array [8] => true [9] => false ) [INCLUDE_ANY] => [PHP_TAGS] => [MODIFIER_FUNCS] => Array ( [0] => count ) [ALLOW_CONSTANTS] => ) [trusted_dir] => Array ( ) [left_delimiter] => { [right_delimiter] => } [request_vars_order] => EGPCS [request_use_auto_globals] => 1 [compile_id] => [use_sub_dirs] => [default_modifiers] => Array ( ) [default_resource_type] => file [cache_handler_func] => [autoload_filters] => Array ( ) [config_overwrite] => 1 [config_booleanize] => 1 [config_read_hidden] => [config_fix_newlines] => 1 [default_template_handler_func] => [compiler_file] => Smarty_Compiler.class.php [compiler_class] => Smarty_Compiler [config_class] => Config_File [_error_msg] => [_tpl_vars] => Array ( [SCRIPT_NAME] => exception_bug.php ) [_smarty_vars] => [_sections] => Array (
#28306 [NEW]: PHP5-rc2 coredumps with Smarty-2.6.2, error handler and exceptions
From: cunha17 at uol dot com dot br Operating system: Redhat Linux 9/Fedora Core 1 PHP version: 5CVS-2004-05-06 (dev) PHP Bug Type: Reproducible crash Bug description: PHP5-rc2 coredumps with Smarty-2.6.2, error handler and exceptions Description: First of all: 1. Using PHP-RC2 or PHP-CVS (2004-05-06) 2. Using Smarty-2.6.2 with customized tag(function) 3. Mapping PHP errors to exceptions(user error handler) If there is an error inside the customized Smarty function, the error handler routine raises an exception that doesn't reach any try/catch block outside the Smarty class. In fact, the exception doesn't propagate outside the fetch function in file Smarty.class.php. The exception is raised inside an "include" instruction and it's possible to catch it inside the fetch function, but impossible anywhere else. The fetch function is called from Smarty.class.php:1115 and the "include" instruction is placed at Smarty.class.php:1266. Cristiano Duarte Reproduce code: --- register_function('test', 'smarty_test'); $s->display('exception_bug.tpl'); ?> Here is the template(exception_bug.tpl): Exception BUG {test name="ExceptionBugTest"} Expected result: Uncaught Exception Actual result: -- Segmentation Fault (core dumped) -- Edit bug report at http://bugs.php.net/?id=28306&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28306&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28306&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28306&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28306&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28306&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28306&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28306&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=28306&r=support Expected behavior: http://bugs.php.net/fix.php?id=28306&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=28306&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=28306&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28306&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28306&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28306&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28306&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=28306&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28306&r=float
#25975 [Com]: PHP 5 object references don't survive serialization
ID: 25975 Comment by: cunha17 at uol dot com dot br Reported By: reiersol at online dot no Status: Closed Bug Type: Zend Engine 2 problem Operating System: Linux RedHat 9.0 PHP Version: 5CVS New Comment: If it's not fixed, please don't give up ! Serialization/Deserialization should work transparently in the same script or using sessions !!! Just provide a simple script with the actual and expected results... Previous Comments: [2004-01-19 05:23:13] reiersol at online dot no For the record: I don't think this bug has been fixed, and I think it's a very serious one, but I'm giving up. [2004-01-11 11:00:25] [EMAIL PROTECTED] Seems to be fixed now. [2003-12-04 09:52:38] reiersol at online dot no OK. Here is an example using sessions. Exactly the same thing happens. v1 = new Bar; $this->v2 = $this->v1; } } session_start(); if (isset($_SESSION['g'])) { //Try these two one at a time to see the different behaviors: //$_SESSION['g']->v2 = "I'm no longer an object"; $_SESSION['g']->v2->value = 42; } else { $_SESSION['g'] = new Foo; } ?> [2003-11-28 20:40:06] [EMAIL PROTECTED] Please provide an example script that actually uses sessions, (it's not the same thing when you do the serialize/unserialize inside the same script..) [2003-11-10 05:48:59] reiersol at online dot no Thanks, but I'm afraid this is not quite good enough. What I'm getting now after serialize/unserialize is: object(foo)#3 (2) { ["v1"]=> &object(bar)#4 (1) { ["value"]=> string(42) "and now for something completely different" } ["v2"]=> &object(bar)#4 (1) { ["value"]=> string(42) "and now for something completely different" } } The ampersands occur only after serialization. They indicate that this is what is known as a reference in PHP 4, which is a symbol table alias. The objects still don't behave the same before and after. Try this: $f->v2 = 'I\'m no longer an object'; $g->v2 = 'I\'m no longer an object'; var_dump($f); var_dump($g); As before, $f is the object before serialize/unserialize, $g is the object after. The output is: object(foo)#1 (2) { ["v1"]=> object(bar)#2 (1) { ["value"]=> int(42) } ["v2"]=> string(23) "I'm no longer an object" } object(foo)#3 (2) { ["v1"]=> &string(23) "I'm no longer an object" ["v2"]=> &string(23) "I'm no longer an object" } As I understand it, in $f we are replacing an object reference with a string. In $g, we are replacing the value of a variable that's aliased to another. You might ask whether this has any practical consequences. I think that sooner or later it will (in fact, it seems to be happening in my full-scale example). When it does, it will be very confusing to the people who encounter the problem. You may get away with this for a while, but the longer you get away with it the more difficult it might be to figure out. 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/25975 -- Edit this bug report at http://bugs.php.net/?id=25975&edit=1
#26267 [NEW]: Memory Leaks
From: cunha17 at uol dot com dot br Operating system: RedHat Linux 9.0 PHP version: 5CVS-2003-11-15 (dev) PHP Bug Type: Math related Bug description: Memory Leaks Description: The piece of code below leaks memory. Reproduce code: --- Expected result: Nothing. Actual result: -- /usr/src/zend2/php-src/ext/gmp/gmp.c(119) : Freeing 0x405018B8 (8 bytes), script=- Last leak repeated 1 time /usr/src/zend2/php-src/ext/gmp/gmp.c(127) : Freeing 0x40501878 (8 bytes), script=- === Total 3 memory leaks detected === -- Edit bug report at http://bugs.php.net/?id=26267&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26267&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26267&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26267&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26267&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26267&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26267&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26267&r=support Expected behavior: http://bugs.php.net/fix.php?id=26267&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26267&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26267&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26267&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26267&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26267&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26267&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26267&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26267&r=float
#26177 [Com]: Can't store multiple variables in SHM
ID: 26177 Comment by: cunha17 at uol dot com dot br Reported By: l_faillie at yahoo dot com Status: Open Bug Type: Unknown/Other Function Operating System: Solaris 8 PHP Version: 4.3.3 New Comment: oops! It seems that the second argument should be an integer: int shm_put_var ( int shm_identifier, int variable_key, mixed variable) Previous Comments: [2003-11-08 12:49:26] l_faillie at yahoo dot com Yes it was my workaround but ... if it's the correct beaviour of this function, what is the usefullness of the second argument ? [2003-11-08 12:42:22] cunha17 at uol dot com dot br In fact, you should use an array if you want to store multiple information. Source 1 : storing variables $shm = shm_attach( 2710, 512); $data = array('val'=>'blabla', 'jour'=> date('D')); shm_put_var( $shm, 'data', serialize($data)); Source 2 : reading variables $shm = shm_attach( 2710, 512); $data = unserialize(shm_get_var($shm, 'data')); echo 'val :', $data['val'], "\n"; echo 'jour :', $data['jour'], "\n"; [2003-11-08 10:06:05] l_faillie at yahoo dot com Description: Hi all, It seems only one variable can be stored in a SHM zone. Reproduce code: --- Source 1 : storing variables $shm = shm_attach( 2710, 512); shm_put_var( $shm, 'val', 'blabla'); shm_put_var( $shm, 'jour', date('D')); Source 2 : reading variables $shm = shm_attach( 2710, 512); echo 'val :', shm_get_var($shm, 'val'), "\n"; echo 'jour :', shm_get_var($shm, 'jour'), "\n"; Expected result: val :blabla jour :Sat Actual result: -- val :Sat jour :Sat -- Edit this bug report at http://bugs.php.net/?id=26177&edit=1
#26177 [Com]: Can't store multiple variables in SHM
ID: 26177 Comment by: cunha17 at uol dot com dot br Reported By: l_faillie at yahoo dot com Status: Open Bug Type: Unknown/Other Function Operating System: Solaris 8 PHP Version: 4.3.3 New Comment: In fact, you should use an array if you want to store multiple information. Source 1 : storing variables $shm = shm_attach( 2710, 512); $data = array('val'=>'blabla', 'jour'=> date('D')); shm_put_var( $shm, 'data', serialize($data)); Source 2 : reading variables $shm = shm_attach( 2710, 512); $data = unserialize(shm_get_var($shm, 'data')); echo 'val :', $data['val'], "\n"; echo 'jour :', $data['jour'], "\n"; Previous Comments: [2003-11-08 10:06:05] l_faillie at yahoo dot com Description: Hi all, It seems only one variable can be stored in a SHM zone. Reproduce code: --- Source 1 : storing variables $shm = shm_attach( 2710, 512); shm_put_var( $shm, 'val', 'blabla'); shm_put_var( $shm, 'jour', date('D')); Source 2 : reading variables $shm = shm_attach( 2710, 512); echo 'val :', shm_get_var($shm, 'val'), "\n"; echo 'jour :', shm_get_var($shm, 'jour'), "\n"; Expected result: val :blabla jour :Sat Actual result: -- val :Sat jour :Sat -- Edit this bug report at http://bugs.php.net/?id=26177&edit=1
#25975 [Com]: PHP 5 object references don't survive serialization
ID: 25975 Comment by: cunha17 at uol dot com dot br Reported By: reiersol at online dot no Status: Bogus Bug Type: Session related Operating System: Linux RedHat 9.0 PHP Version: 5CVS-2003-10-24 (dev) New Comment: >>Why would it be same when you change the "contents" of the object after unserializing it? That's the point. If you change the contents of a reference, both contents should be the same ! But, in fact, they aren't the same. >>Still no bug. It's definetly a bug Previous Comments: [2003-11-03 18:43:03] [EMAIL PROTECTED] Why would it be same when you change the "contents" of the object after unserializing it? Still no bug. [2003-11-02 09:36:42] reiersol at online dot no I realized that an even better way to test this is to use the triple equals sign (see http://no.php.net/manual/en/language.oop.object-comparison-php5.php): var_dump($f->v1 === $f->v2); var_dump($g->v1 === $g->v2); This outputs: bool(true) bool(false) Based on the manual, this should mean that the two members refer to the same instance of the same class before serialize/unserialize, but not after. ---- [2003-11-01 14:04:48] cunha17 at uol dot com dot br C'mon sniper, just put $g = $f; instead of $g = unserialize(serialize($f)); and you see that the result will be different, when, in fact, it shouldn't. That's definetly a bug. [2003-11-01 05:22:22] [EMAIL PROTECTED] Still can't see what might be wrong here. The result you get is pretty much what I would expect to get.. [2003-10-31 03:42:04] reiersol at online dot no I guess I'll have to expand my example: class Bar { var $value = 0; } class Foo { var $v1; var $v2; function Foo() { $this->v1 = new Bar; $this->v2 = $this->v1; } } $f = new Foo; $f->v2->value = 42; var_dump($f); $g = unserialize(serialize($f)); $g->v2->value = 'and now for something completely different'; var_dump($g); Here's the output: object(foo)#1 (2) { ["v1"]=> object(bar)#2 (1) { ["value"]=> int(42) } ["v2"]=> object(bar)#2 (1) { ["value"]=> int(42) } } object(foo)#3 (2) { ["v1"]=> object(bar)#4 (1) { ["value"]=> int(42) } ["v2"]=> object(bar)#5 (1) { ["value"]=> string(42) "and now for something completely different" } } That should at least make it clear that there's a difference in behavior before and after serialization. And the behavior before serialization is the behavior of a normal object-oriented language. (I ported the example to Java just to make sure I wasn't crazy.) I'm not trying to split hairs. I tried creating the kind of sophiticated object-oriented structure that PHP 5 makes so much easier. It worked wonderfully. But then I discovered that the structure didn't persist across sessions. So I made this simplified example to demonstrate the problem. 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/25975 -- Edit this bug report at http://bugs.php.net/?id=25975&edit=1
#25975 [Com]: PHP 5 object references don't survive serialization
ID: 25975 Comment by: cunha17 at uol dot com dot br Reported By: reiersol at online dot no Status: Bogus Bug Type: Session related Operating System: Linux RedHat 9.0 PHP Version: 5CVS-2003-10-24 (dev) New Comment: C'mon sniper, just put $g = $f; instead of $g = unserialize(serialize($f)); and you see that the result will be different, when, in fact, it shouldn't. That's definetly a bug. Previous Comments: [2003-11-01 05:22:22] [EMAIL PROTECTED] Still can't see what might be wrong here. The result you get is pretty much what I would expect to get.. [2003-10-31 03:42:04] reiersol at online dot no I guess I'll have to expand my example: class Bar { var $value = 0; } class Foo { var $v1; var $v2; function Foo() { $this->v1 = new Bar; $this->v2 = $this->v1; } } $f = new Foo; $f->v2->value = 42; var_dump($f); $g = unserialize(serialize($f)); $g->v2->value = 'and now for something completely different'; var_dump($g); Here's the output: object(foo)#1 (2) { ["v1"]=> object(bar)#2 (1) { ["value"]=> int(42) } ["v2"]=> object(bar)#2 (1) { ["value"]=> int(42) } } object(foo)#3 (2) { ["v1"]=> object(bar)#4 (1) { ["value"]=> int(42) } ["v2"]=> object(bar)#5 (1) { ["value"]=> string(42) "and now for something completely different" } } That should at least make it clear that there's a difference in behavior before and after serialization. And the behavior before serialization is the behavior of a normal object-oriented language. (I ported the example to Java just to make sure I wasn't crazy.) I'm not trying to split hairs. I tried creating the kind of sophiticated object-oriented structure that PHP 5 makes so much easier. It worked wonderfully. But then I discovered that the structure didn't persist across sessions. So I made this simplified example to demonstrate the problem. [2003-10-30 20:59:30] [EMAIL PROTECTED] There are no references in the before serialize object, so why should there be references after serializing/unserializing? [2003-10-24 08:11:44] reiersol at online dot no The last line of the code example (print $1) is meaningless. Sorry. [2003-10-24 08:08:59] reiersol at online dot no Description: Object references inside PHP5 objects are not preserved through serialize/unserialize like traditional PHP4 references. This means they cannot be used in session-based applications. Reproduce code: --- class Bar {} class Foo { var $v1; var $v2; function Foo() { $this->v1 = new Bar; $this->v2 = $this->v1; } } $f = new Foo; var_dump($f); $g = unserialize(serialize($f)); var_dump($g); print $s1; Expected result: This is what I get if I use $this->v2 = &this->$v1 instead of $this->v2 = $this->v1: object(foo)#1 (2) { ["v1"]=> &object(bar)#2 (0) { } ["v2"]=> &object(bar)#2 (0) { } } object(foo)#3 (2) { ["v1"]=> &object(bar)#4 (0) { } ["v2"]=> &object(bar)#4 (0) { } } Actual result: -- object(foo)#1 (2) { ["v1"]=> object(bar)#2 (0) { } ["v2"]=> object(bar)#2 (0) { } } object(foo)#3 (2) { ["v1"]=> object(bar)#4 (0) { } ["v2"]=> object(bar)#5 (0) { } } -- Edit this bug report at http://bugs.php.net/?id=25975&edit=1
#25323 [Opn]: class constants odd behavior
ID: 25323 User updated by: cunha17 at uol dot com dot br Reported By: cunha17 at uol dot com dot br Status: Open Bug Type: Zend Engine 2 problem Operating System: RedHat Linux 9.0 -PHP Version: 5CVS-2003-08-30 (dev) +PHP Version: 5CVS-2003-09-20 (dev) New Comment: This but still exists in the latest CVS(2003-09-20 22:30) :-( Previous Comments: [2003-09-20 18:35:45] lphuberdeau at sympatico dot ca I have also experienced this problem. The cvs snapshot I am using is around 2 weeks old at this time, the problem might be fixed by now, but it's not reported as fixed here, so here are a few more details about the problem. Information about the server: Gentoo Linux PHP5 from snaps, built with quite standard extensions. I ran a few tests when I saw the segmentation fault in the output of my script. I reduced the code as much as possible to locate the error and here is what I found out. Scripts are called directly from the PHP executable. No problem in this code: class foo { const bar = 1; } Still no problem here: class foo { const bar = 1; const odd = foo::bar; } First error arrives here: Fatal error: Unsupported operand types in /home/httpd/htdocs/foo.php on line 5 class foo { const bar = 1; const odd = foo::bar + 10; } And now with a Segmentation fault: class foo { const bar = 1; const odd = foo::bar . 10; } Summary: I think there is a problem with the internal type of the constants. I hope these details will help solve the problem. [2003-09-10 21:50:47] cunha17 at uol dot com dot br Any information would be appreciated ... [2003-08-30 14:21:48] cunha17 at uol dot com dot br Description: Is this suppose to work ? Currently it does not. class Priority { const DEBUG = 0; const INFO = 1; const WARN = 2; const ERROR = 3; const FATAL = 4; const MAX_PRIORITY = FATAL; } class ExtendedPriority extends Priority { const REMOTE = Priority::MAX_PRIORITY + 1; const URGENT = Priority::MAX_PRIORITY + 2; } if it's not supposed to work, there is some parser problem in ZE2 that accepts a constant expression based on string concatenation. Reproduce code: --- class test { const TEST = "hi"; const TEST1 = self::TEST . "ih"; } Expected result: No parser error nor core dumps. Or a paser error if it's not supposed to work. Actual result: -- Segmentation Fault -- Edit this bug report at http://bugs.php.net/?id=25323&edit=1
#25335 [Opn]: Memory Leak with error handler and exceptions
ID: 25335 User updated by: cunha17 at uol dot com dot br Reported By: cunha17 at uol dot com dot br Status: Open Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5CVS-2003-08-31 (dev) Assigned To: helly New Comment: My knowledge of ZE2 is too limited but I don't think the memory manager got shutdown when the error handler is called (does it?). IMHO it seems the error handler calling mechanism is allocating something and not releasing it since the user function(error handler) is terminated abnormally (exception) and not in the expected way (function end reached, return or exit/die). Previous Comments: [2003-09-14 15:20:55] [EMAIL PROTECTED] For me it seems as if a zval is created after memory manager shutdown. If this is the case we would need to return 'internal zvals' when creating new ones after normal script runtime and also their data must be malloced which is impossible. Or we need to prevent user functions from beeing called after shutdown_executor() gets called. [2003-09-10 21:49:16] cunha17 at uol dot com dot br Is anyone looking at this ? [2003-08-31 19:44:50] cunha17 at uol dot com dot br Description: This code below gives some memory leak. The leak only appears when throwing exceptions inside error handler. The code I'm using is a little more complex 'cause it translates PHP errors into PHP Exceptions, but this piece of code reproduces the leak correctly. Reproduce code: --- Expected result: EXCEPTION!!! Actual result: -- EXCEPTION!!!/usr/src/zend2/php-src/Zend/zend.c(914) : Freeing 0x404C9340 (16 bytes), script=leak.php === Total 1 memory leaks detected === -- Edit this bug report at http://bugs.php.net/?id=25335&edit=1
#25323 [Opn]: class constants odd behavior
ID: 25323 User updated by: cunha17 at uol dot com dot br Reported By: cunha17 at uol dot com dot br Status: Open Bug Type: Zend Engine 2 problem Operating System: RedHat Linux 9.0 PHP Version: 5CVS-2003-08-30 (dev) New Comment: Any information would be appreciated ... Previous Comments: [2003-08-30 14:21:48] cunha17 at uol dot com dot br Description: Is this suppose to work ? Currently it does not. class Priority { const DEBUG = 0; const INFO = 1; const WARN = 2; const ERROR = 3; const FATAL = 4; const MAX_PRIORITY = FATAL; } class ExtendedPriority extends Priority { const REMOTE = Priority::MAX_PRIORITY + 1; const URGENT = Priority::MAX_PRIORITY + 2; } if it's not supposed to work, there is some parser problem in ZE2 that accepts a constant expression based on string concatenation. Reproduce code: --- class test { const TEST = "hi"; const TEST1 = self::TEST . "ih"; } Expected result: No parser error nor core dumps. Or a paser error if it's not supposed to work. Actual result: -- Segmentation Fault -- Edit this bug report at http://bugs.php.net/?id=25323&edit=1
#25335 [Opn]: Memory Leak with error handler and exceptions
ID: 25335 User updated by: cunha17 at uol dot com dot br Reported By: cunha17 at uol dot com dot br Status: Open Bug Type: Zend Engine 2 problem Operating System: RedHat Linux 9.0 PHP Version: 5CVS-2003-08-31 (dev) New Comment: Is anyone looking at this ? Previous Comments: [2003-08-31 19:44:50] cunha17 at uol dot com dot br Description: This code below gives some memory leak. The leak only appears when throwing exceptions inside error handler. The code I'm using is a little more complex 'cause it translates PHP errors into PHP Exceptions, but this piece of code reproduces the leak correctly. Reproduce code: --- Expected result: EXCEPTION!!! Actual result: -- EXCEPTION!!!/usr/src/zend2/php-src/Zend/zend.c(914) : Freeing 0x404C9340 (16 bytes), script=leak.php === Total 1 memory leaks detected === -- Edit this bug report at http://bugs.php.net/?id=25335&edit=1
#25335 [NEW]: Memory Leak with error handler and exceptions
From: cunha17 at uol dot com dot br Operating system: RedHat Linux 9.0 PHP version: 5CVS-2003-08-31 (dev) PHP Bug Type: Zend Engine 2 problem Bug description: Memory Leak with error handler and exceptions Description: This code below gives some memory leak. The leak only appears when throwing exceptions inside error handler. The code I'm using is a little more complex 'cause it translates PHP errors into PHP Exceptions, but this piece of code reproduces the leak correctly. Reproduce code: --- Expected result: EXCEPTION!!! Actual result: -- EXCEPTION!!!/usr/src/zend2/php-src/Zend/zend.c(914) : Freeing 0x404C9340 (16 bytes), script=leak.php === Total 1 memory leaks detected === -- Edit bug report at http://bugs.php.net/?id=25335&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25335&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25335&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25335&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25335&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25335&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25335&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=25335&r=support Expected behavior: http://bugs.php.net/fix.php?id=25335&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=25335&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=25335&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25335&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25335&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25335&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25335&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=25335&r=gnused
#25323 [NEW]: class constants odd behavior
From: cunha17 at uol dot com dot br Operating system: RedHat Linux 9.0 PHP version: 5CVS-2003-08-30 (dev) PHP Bug Type: Zend Engine 2 problem Bug description: class constants odd behavior Description: Is this suppose to work ? Currently it does not. class Priority { const DEBUG = 0; const INFO = 1; const WARN = 2; const ERROR = 3; const FATAL = 4; const MAX_PRIORITY = FATAL; } class ExtendedPriority extends Priority { const REMOTE = Priority::MAX_PRIORITY + 1; const URGENT = Priority::MAX_PRIORITY + 2; } if it's not supposed to work, there is some parser problem in ZE2 that accepts a constant expression based on string concatenation. Reproduce code: --- class test { const TEST = "hi"; const TEST1 = self::TEST . "ih"; } Expected result: No parser error nor core dumps. Or a paser error if it's not supposed to work. Actual result: -- Segmentation Fault -- Edit bug report at http://bugs.php.net/?id=25323&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25323&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25323&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25323&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25323&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25323&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25323&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=25323&r=support Expected behavior: http://bugs.php.net/fix.php?id=25323&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=25323&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=25323&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25323&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25323&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25323&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25323&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=25323&r=gnused
#25109 [Fbk->Opn]: pgsql causes segmentation fault
ID: 25109 User updated by: cunha17 at uol dot com dot br Reported By: cunha17 at uol dot com dot br -Status: Feedback +Status: Open Bug Type: PostgreSQL related Operating System: Redhat Linux 9.0 - Kernel 2.4.21 PHP Version: 4CVS-2003-08-20 New Comment: As I told you I'm using John Lim's ADODB database library for PHP: http://php.weblogs.com/adodb I run the following PHP code: Connect($MM_conn_DATABASE, $MM_conn_USERNAME,$MM_conn_PASSWORD); } else if($MM_conn_DBTYPE == "ibase") { $conn->Connect($MM_conn_HOSTNAME.":".$MM_conn_DATABASE,$MM_conn_USERNAME,$MM_conn_PASSWORD); } else { $conn->Connect($MM_conn_HOSTNAME,$MM_conn_USERNAME,$MM_conn_PASSWORD,$MM_conn_DATABASE); } $concatOp = $conn->concat_operator; $rs = $conn->execute("SELECT * from teste") or die($conn->errorMsg());; print_r($rs->fields); echo "ok"; ?> And got these last lines of backtrace(strace): open("/webpages/sistemas/framework1.5/adodb/adodb.inc.php", O_RDONLY) = 4 fstat64(4, {st_mode=S_IFREG|0755, st_size=2, ...}) = 0 fstat64(4, {st_mode=S_IFREG|0755, st_size=2, ...}) = 0 lseek(4, 0, SEEK_CUR) = 0 lseek(4, 0, SEEK_SET) = 0 close(4)= 0 getcwd("/webpages/sistemas", 4096) = 19 lstat64("/webpages", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat64("/webpages/sistemas", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0 lstat64("/webpages/sistemas/framework1.5", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat64("/webpages/sistemas/framework1.5/adodb", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0 lstat64("/webpages/sistemas/framework1.5/adodb/drivers", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0 lstat64("/webpages/sistemas/framework1.5/adodb/drivers/adodb-postgres7.inc.php", {st_mode=S_IFREG|0755, st_size=2246, ...}) = 0 open("/webpages/sistemas/framework1.5/adodb/drivers/adodb-postgres7.inc.php", O_RDONLY) = 4 fstat64(4, {st_mode=S_IFREG|0755, st_size=2246, ...}) = 0 fstat64(4, {st_mode=S_IFREG|0755, st_size=2246, ...}) = 0 lseek(4, 0, SEEK_CUR) = 0 lseek(4, 0, SEEK_SET) = 0 read(4, "_connect"..., 8192) = 8192 brk(0) = 0x85d6000 brk(0x85d9000) = 0x85d9000 brk(0) = 0x85d9000 brk(0x85dd000) = 0x85dd000 brk(0) = 0x85dd000 brk(0x85ec000) = 0x85ec000 read(4, "f X field\r\n\t*/\r\n\tfunction TextMa"..., 8192) = 5021 brk(0) = 0x85ec000 brk(0x85ed000) = 0x85ed000 brk(0) = 0x85ed000 brk(0x85ee000) = 0x85ee000 brk(0) = 0x85ee000 brk(0x85f2000) = 0x85f2000 brk(0) = 0x85f2000 brk(0x85f5000) = 0x85f5000 read(4, "", 8192) = 0 close(4)= 0 brk(0) = 0x85f5000 brk(0x85f6000) = 0x85f6000 brk(0) = 0x85f6000 brk(0x85f7000) = 0x85f7000 brk(0) = 0x85f7000 brk(0x85fb000) = 0x85fb000 brk(0) = 0x85fb000 brk(0x85fd000) = 0x85fd000 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4 setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0 connect(4, {sa_family=AF_INET, sin_port=htons(5432), sin_addr=inet_addr("10.67.92.57")}, 16) = 0 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 send(4, "\0\0\1(\4\322\26/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 296, 0) = 296 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 recv(4, "N", 1, 0) = 1 fcntl64(4, F_SETFL, O_RDONLY|O_NONBLOCK) = 0 select(5, [], [4], [4], NULL) = 1 (out [4]) rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 send(4, "\0\0\1(\0\2\0\0teste\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 296, 0) = 296 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 select(5, [4], [], [4], NULL) = 1 (in [4]) recv(4, "R\0\0\0\0K\0\0\26\n\6\307\317\202Z", 16384, 0) = 15 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 send(4, "Qbegin; select getdatabaseencodi"..., 45, 0) = 45 rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_IGN}, 8) = 0 select(5, [4], [], [4], NULL) = 1 (in [4]) recv(4, "CBEGIN\0Pblank\0T\0\1getdatabaseenco"..., 16384, 0) = 79 brk(0) = 0x85fd000 brk(0x85fe000)
#25109 [Fbk->Opn]: pgsql causes segmentation fault
ID: 25109 User updated by: cunha17 at uol dot com dot br Reported By: cunha17 at uol dot com dot br -Status: Feedback +Status: Open Bug Type: PostgreSQL related Operating System: Redhat Linux 9.0 - Kernel 2.4.21 PHP Version: 4.3.3RC3 New Comment: The same problem happened with the latest PHP: PHP4-STABLE-200308202130 Previous Comments: [2003-08-16 11:50:51] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2003-08-16 11:47:12] cunha17 at uol dot com dot br Description: I found out that pgsql functions cause segmentation fault if the connection user has no read access on pg_ system tables. I'm using John Lim's ADOdb class to access a PostgreSQL 7.2.4 database. This problem has nothing to do with apache since it happens with the CLI interface too. Reproduce code: --- With an empty postgresql installation, I created an empty database, connected to it, created an user and set all privileges on this new database to this user. Connected as the new user on the new database I created some tables. When trying to access this new tables with PHP and ADOdb classes, I got a segmentation fault. At the very end, when running with strace, I got a message before the segmentation fault saying: 'pg_class access denied' When I grant read access on this table to the new user, I got: 'pg_attribute access denied' and so on... When I grant read access to all pg_* tables, the problem disappear and PHP runs ok. Expected result: PgSQL Error: Access denied to pg_* system table or something like that. Actual result: -- Segmentation Fault if the connection user has no read access on system tables -- Edit this bug report at http://bugs.php.net/?id=25109&edit=1
#25109 [NEW]: pgsql causes segmentation fault
From: cunha17 at uol dot com dot br Operating system: Redhat Linux 9.0 - Kernel 2.4.21 PHP version: 4.3.3RC3 PHP Bug Type: PostgreSQL related Bug description: pgsql causes segmentation fault Description: I found out that pgsql functions cause segmentation fault if the connection user has no read access on pg_ system tables. I'm using John Lim's ADOdb class to access a PostgreSQL 7.2.4 database. This problem has nothing to do with apache since it happens with the CLI interface too. Reproduce code: --- With an empty postgresql installation, I created an empty database, connected to it, created an user and set all privileges on this new database to this user. Connected as the new user on the new database I created some tables. When trying to access this new tables with PHP and ADOdb classes, I got a segmentation fault. At the very end, when running with strace, I got a message before the segmentation fault saying: 'pg_class access denied' When I grant read access on this table to the new user, I got: 'pg_attribute access denied' and so on... When I grant read access to all pg_* tables, the problem disappear and PHP runs ok. Expected result: PgSQL Error: Access denied to pg_* system table or something like that. Actual result: -- Segmentation Fault if the connection user has no read access on system tables -- Edit bug report at http://bugs.php.net/?id=25109&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25109&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25109&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25109&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25109&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25109&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25109&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=25109&r=support Expected behavior: http://bugs.php.net/fix.php?id=25109&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=25109&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=25109&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25109&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25109&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25109&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25109&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=25109&r=gnused
#24950 [Com]: Compiling PHP --with-oci8 --with oracle (Oracle 9i) fails
ID: 24950 Comment by: cunha17 at uol dot com dot br Reported By: fschulze at more-radio dot de Status: Feedback Bug Type: Compile Failure Operating System: Solaris8 PHP Version: 4.3.2 New Comment: This is caused by configure not locating oci.h. Verify that you installed the C/C++ OCI interface (wich must be selected manually with the Installer). I guess that the oci.h file after installation is located inside the demo directory. Hope it helps. Previous Comments: [2003-08-05 10:52:09] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2003-08-05 06:24:26] fschulze at more-radio dot de Description: HI, problem to MAKE php after the following ./configure --with-apxs2=/www/currentsw/apache/bin/apxs --with-mysql=/www/currentsw/mysql --enable-versioning --enable-track-vars=yes --enable-url-includes --with-config-file-path=/www/currentsw/apache/conf --prefix=/www/bin/php-4.3.2 --with-oci8 configure looks good. make brings up hunderts of error-lines. here are the last ones: /www/source/php-4.3.2/ext/oci8/oci8.c:5472: request for member `in_call' in something not a structure or union /www/source/php-4.3.2/ext/oci8/oci8.c:5472: request for member `in_call' in something not a structure or union /www/source/php-4.3.2/ext/oci8/oci8.c:5472: parse error before ')' token /www/source/php-4.3.2/ext/oci8/oci8.c:5472: request for member `in_call' in something not a structure or union /www/source/php-4.3.2/ext/oci8/oci8.c:5480: request for member `coll_typecode' in something not a structure or union /www/source/php-4.3.2/ext/oci8/oci8.c:5494: request for member `in_call' in something not a structure or union /www/source/php-4.3.2/ext/oci8/oci8.c:5494: request for member `in_call' in something not a structure or union /www/source/php-4.3.2/ext/oci8/oci8.c:5494: request for member `tdo' in something not a structure or union /www/source/php-4.3.2/ext/oci8/oci8.c:5494: parse error before ')' token /www/source/php-4.3.2/ext/oci8/oci8.c:5494: request for member `in_call' in something not a structure or union /www/source/php-4.3.2/ext/oci8/oci8.c:5502: request for member `id' in something not a structure or union *** Error code 1 make: Fatal error: Command failed for target `ext/oci8/oci8.lo' if configured without --oci8 everything is ok. any ideas? -- Edit this bug report at http://bugs.php.net/?id=24950&edit=1
#25002 [Com]: Recursive constructor segfaults php
ID: 25002 Comment by: cunha17 at uol dot com dot br Reported By: phil at preterition dot net Status: Bogus Bug Type: Reproducible crash Operating System: Mac OS X or Linux PHP Version: 4.3.3RC3 New Comment: IMHO, error in PHP scripts shoudn't cause program abortion... The engine should throw an error an terminate the program. No to coredumps !!! :-) Previous Comments: [2003-08-09 19:46:33] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Don't use recursive code, it results in stack overflows. This will not be fixed. Either put limits in place to limit the recusivness of your code or better yet don't use recursive functions/methods. [2003-08-09 19:41:55] phil at preterition dot net Description: Script recursively calls class b()'s constructor. Due to the use of alloca for execution of the constructor, the process Dies Horribly rather than issuing a valid error code (which would normally facilitate at least an error message.) when it runs out of stack. Reproduce code: --- {get_parent_class($this)}(); } } class c extends b { function c() { $this->{get_parent_class($this)}(); } } $f = new c(); ?> Expected result: I'd like to see the zend engine throw an error when it runs out of stack, but I don't see how (without moving off of alloca and taking a performance hit) it can be implemented. I don't believe this is a security issue due to libc killing the process rather than returning an error which zend_execute.c doesn't catch. I've worked around the code in question by rearchitecting my class hierarchy. Looking forward to multiple inheritance in PHP5? Actual result: -- Backtrace Follows: Program received signal EXC_BAD_ACCESS, Could not access memory. 0x00172a94 in _zend_is_inconsistent (ht=0x180638, file=0x0, line=0) at /Users/porwig/Development/php-4.3.3RC3/Zend/zend_hash.c:83 83 { (gdb) bt #0 0x00172a94 in _zend_is_inconsistent (ht=0x180638, file=0x0, line=0) at /Users/porwig/Development/php-4.3.3RC3/Zend/zend_hash.c:83 #1 0x00180638 in zend_fetch_var_address (opline=0x4e8868, Ts=0xbff80140, type=0) at /Users/porwig/Development/php-4.3.3RC3/Zend/zend_execute.c:581 #2 0x00182ea4 in execute (op_array=0x4e9fb8) at /Users/porwig/Development/php-4.3.3RC3/Zend/zend_execute.c:1248 #3 0x001853f0 in execute (op_array=0x4e9fb8) at /Users/porwig/Development/php-4.3.3RC3/Zend/zend_execute.c:1660 #4 0x001853f0 in execute (op_array=0x4e9fb8) at /Users/porwig/Development/php-4.3.3RC3/Zend/zend_execute.c:1660 ... snip ... #748 0x001853f0 in execute (op_array=0x4e9fb8) at /Users/porwig/Development/php-4.3.3RC3/Zend/zend_execute.c:1660 #749 0x001853f0 in execute (op_array=0x4eb488) at /Users/porwig/Development/php-4.3.3RC3/Zend/zend_execute.c:1660 #750 0x001853f0 in execute (op_array=0x4e6cf8) at /Users/porwig/Development/php-4.3.3RC3/Zend/zend_execute.c:1660 #751 0x0016c8d4 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /Users/porwig/Development/php-4.3.3RC3/Zend/zend.c:885 #752 0x0011f298 in php_execute_script (primary_file=0xb740) at /Users/porwig/Development/php-4.3.3RC3/main/main.c:1720 #753 0x0018cb64 in main (argc=2, argv=0xbc90) at /Users/porwig/Development/php-4.3.3RC3/sapi/cli/php_cli.c:818 #754 0x1e44 in _start (argc=2, argv=0xbc90, envp=0xbc9c) at /SourceCache/Csu/Csu-45/crt.c:267 #755 0x1cc4 in start () (gdb) -- Edit this bug report at http://bugs.php.net/?id=25002&edit=1
#24831 [Ver]: Memory Leak
ID: 24831 User updated by: cunha17 at uol dot com dot br Reported By: cunha17 at uol dot com dot br Status: Verified Bug Type: Zend Engine 2 problem Operating System: Linux 2.4.20 (Redhat 9) PHP Version: 5.0.0b2-dev New Comment: With the latest CVS there is no memory leaks anymore, but I got core dumped at the end of script execution. Previous Comments: [2003-07-28 20:28:31] [EMAIL PROTECTED] I must have had --enable-debug missing in my last build, now I got the same leaks. [2003-07-27 14:57:31] cunha17 at uol dot com dot br Description: This small OO script gives some memory leaks. Reproduce code: --- class ReleaseInfo { const NAME_LONG = "PHPORB"; const NAME_SHORT= "orb"; const VERSION_MAJOR = 0; const VERSION_MINOR = 1; const VERSION_MINOR_CHANGE = 0; const VERSION = "" . VERSION_MAJOR . "." . VERSION_MINOR . "." . VERSION_MINOR_CHANGE; const SPEC_VERSION_MAJOR= 2; const SPEC_VERSION_MINOR= 4; const SPEC_VERSION_MINOR_CHANGE = 2; const SPEC_VERSION = "" . SPEC_VERSION_MAJOR . "." . SPEC_VERSION_MINOR . "." . SPEC_VERSION_MINOR_CHANGE; const RELEASE = NAME_LONG . " Version " . VERSION; const RELEASE_TAG = NAME_LONG . "_" . VERSION_MAJOR . "_" . VERSION_MINOR . "_" . VERSION_MINOR_CHANGE; public static function main($args) { echo NAME_LONG . ":"; echo "\t" . NAME_LONG . " " . VERSION; echo "\t" . RELEASE_TAG; echo "\tCORBA/IIOP " . SPEC_VERSION . " (http://www.omg.org/cgi-bin/doc?formal/01-02-01)"; } } Expected result: Nothing to the standard output and no memory leaks. Actual result: -- /usr/src/zend2/php5-200307262130/Zend/zend_operators.c(1087) : Freeing 0x4070AE7C (12 bytes), script=org/openorb/ReleaseInfo.php Last leak repeated 13 times Zend/zend_language_scanner.c(4497) : Freeing 0x4070AE40 (2 bytes), script=org/openorb/ReleaseInfo.php Last leak repeated 9 times Zend/zend_language_scanner.c(4350) : Freeing 0x4070ADB8 (14 bytes), script=org/openorb/ReleaseInfo.php Last leak repeated 11 times /usr/src/zend2/php5-200307262130/Zend/zend_compile.c(2524) : Freeing 0x4070AA80 (6 bytes), script=org/openorb/ReleaseInfo.php /usr/src/zend2/php5-200307262130/Zend/zend_variables.c(111) : Actual location (location was relayed) Last leak repeated 2 times -- Edit this bug report at http://bugs.php.net/?id=24831&edit=1
#23684 [Opn]: Final Classes and Const references to Objects
ID: 23684 User updated by: cunha17 at uol dot com dot br Reported By: cunha17 at uol dot com dot br Status: Open Bug Type: Feature/Change Request Operating System: Linux -PHP Version: 5CVS-2003-05-18 (dev) +PHP Version: 5CVS-2003-07-28 (dev) New Comment: >From CVS-2003-05-18 to CVS-2003-07-28: The final keyword was added to PHP5. The const keyword supports some basic expressions. I know that the const keyword is evaluated at compile time, is there another way to create a constant object? What I need to have is an object that is read only. Previous Comments: [2003-05-18 14:49:20] cunha17 at uol dot com dot br What a work in Zend2 !!! It is getting great, but what about final classes and object constants in class definition? I need to do something like this: class EnumException extends Exception{ } final class Car { //private const _ferrari = 0; const _porsche = 1; const _corvette = 2; //private const _last_value = 2; //public const ferrari = new Car(_ferrari); const porsche = new Car(_porsche); const corvette = new Car(_corvette); private $value; protected function __construct($value) { if (($value < 0) || ($value > _last_value)) { throw new EnumException(); } $this->value = $value; } public function value() { return $this->value; } } Everything works fine, except the "final" keyword and the "const" initialization with an object. I think final classes would be a good approach in assuring that a class will not be modified(inherited). Why can´t objects be assigned to constants ? Is there another way of doing this in Zend2 ? Thanx, Cristiano Duarte -- Edit this bug report at http://bugs.php.net/?id=23684&edit=1
#24831 [Csd->Opn]: Memory Leak
ID: 24831 User updated by: cunha17 at uol dot com dot br Reported By: cunha17 at uol dot com dot br -Status: Closed +Status: Open Bug Type: Zend Engine 2 problem Operating System: Linux 2.4.20 (Redhat 9) PHP Version: 5.0.0b1 (beta1) New Comment: I compiled the last CVS: php5-200307282330 And the leaks are the same. I'm using the CLI sapi to execute the PHP code. #/usr/local/bin/php org/phporb/ReleaseInfo.php /usr/src/zend2/php5-200307282330/Zend/zend_operators.c(1087) : Freeing 0x4070AB14 (12 bytes), script=org/phporb/ReleaseInfo.php Last leak repeated 13 times Zend/zend_language_scanner.c(4497) : Freeing 0x4070AAD8 (2 bytes), script=org/phporb/ReleaseInfo.php Last leak repeated 9 times /usr/src/zend2/php5-200307282330/Zend/zend_compile.c(2526) : Freeing 0x4070A820 (6 bytes), script=org/phporb/ReleaseInfo.php /usr/src/zend2/php5-200307282330/Zend/zend_variables.c(111) : Actual location (location was relayed) Last leak repeated 2 times Previous Comments: [2003-07-27 18:23:47] [EMAIL PROTECTED] Latest CVS does not have those leaks. [2003-07-27 14:57:31] cunha17 at uol dot com dot br Description: This small OO script gives some memory leaks. Reproduce code: --- class ReleaseInfo { const NAME_LONG = "PHPORB"; const NAME_SHORT= "orb"; const VERSION_MAJOR = 0; const VERSION_MINOR = 1; const VERSION_MINOR_CHANGE = 0; const VERSION = "" . VERSION_MAJOR . "." . VERSION_MINOR . "." . VERSION_MINOR_CHANGE; const SPEC_VERSION_MAJOR= 2; const SPEC_VERSION_MINOR= 4; const SPEC_VERSION_MINOR_CHANGE = 2; const SPEC_VERSION = "" . SPEC_VERSION_MAJOR . "." . SPEC_VERSION_MINOR . "." . SPEC_VERSION_MINOR_CHANGE; const RELEASE = NAME_LONG . " Version " . VERSION; const RELEASE_TAG = NAME_LONG . "_" . VERSION_MAJOR . "_" . VERSION_MINOR . "_" . VERSION_MINOR_CHANGE; public static function main($args) { echo NAME_LONG . ":"; echo "\t" . NAME_LONG . " " . VERSION; echo "\t" . RELEASE_TAG; echo "\tCORBA/IIOP " . SPEC_VERSION . " (http://www.omg.org/cgi-bin/doc?formal/01-02-01)"; } } Expected result: Nothing to the standard output and no memory leaks. Actual result: -- /usr/src/zend2/php5-200307262130/Zend/zend_operators.c(1087) : Freeing 0x4070AE7C (12 bytes), script=org/openorb/ReleaseInfo.php Last leak repeated 13 times Zend/zend_language_scanner.c(4497) : Freeing 0x4070AE40 (2 bytes), script=org/openorb/ReleaseInfo.php Last leak repeated 9 times Zend/zend_language_scanner.c(4350) : Freeing 0x4070ADB8 (14 bytes), script=org/openorb/ReleaseInfo.php Last leak repeated 11 times /usr/src/zend2/php5-200307262130/Zend/zend_compile.c(2524) : Freeing 0x4070AA80 (6 bytes), script=org/openorb/ReleaseInfo.php /usr/src/zend2/php5-200307262130/Zend/zend_variables.c(111) : Actual location (location was relayed) Last leak repeated 2 times -- Edit this bug report at http://bugs.php.net/?id=24831&edit=1
#24809 [Com]: Packaging PHP Applications for Easy Distribution
ID: 24809 Comment by: cunha17 at uol dot com dot br Reported By: lee at semel dot net Status: Wont fix Bug Type:Feature/Change Request PHP Version: Irrelevant New Comment: I don't think PEAR Install do what was proposed by Lee, IMHO. I think that the package won't have to be decompressed to be used and the PHP engine will use the files inside the package as they were decompressed on the filesystem. Correct me if I misunderstood something... Cristiano Duarte Previous Comments: [2003-07-27 14:19:03] [EMAIL PROTECTED] We already have PEAR for this. (pear install) [2003-07-25 16:28:46] lee at semel dot net Description: Since PHP is often used for distributing entire applications at once, it would be great to have a mechanism (similar to Java's WAR files) to make it easy to package, distribute, install, and configure them. I propose implementing a system for easily packaging PHP applications. A .PAR file (PHP ARchive) file is a zipfile containing the following: * All the images, includes, and php files that make up the PHP application. * a PHP.INI file configured specific to the application. PHP would ignore values from the master PHP.INI file and use the settings from the PHP.INI file inside the archive. * a WEB.XML (or WEB.INI) file defining default configuration parameters speicifc to the application. Configuration parameters should be able to be overridden by an external file, making them very easy to edit, and to provide an easy way to set up server-specific configurations when installing an application in multiple places. The application would be accessed through the browser at http://servername:port/nameofarchive/, or at another location specified by the administrator. Wioth this system, each application could have its own configuration, include path, and libraries, and installing an application becomes a matter of dropping the file into your document root. If your ISP doesn't let you change PHP.ini, simply installing the PAR file will set everything perfectly for you. No more having to worry if magic_quotes_gpc or register_globals is set correctly. No more having to worry if PEAR is installed. For more info on how Java does it: http://access1.sun.com/techarticles/simple.WAR.html -- Edit this bug report at http://bugs.php.net/?id=24809&edit=1
#24831 [NEW]: Memory Leak
From: cunha17 at uol dot com dot br Operating system: Linux 2.4.20 (Redhat 9) PHP version: 5.0.0b1 (beta1) PHP Bug Type: Zend Engine 2 problem Bug description: Memory Leak Description: This small OO script gives some memory leaks. Reproduce code: --- class ReleaseInfo { const NAME_LONG = "PHPORB"; const NAME_SHORT= "orb"; const VERSION_MAJOR = 0; const VERSION_MINOR = 1; const VERSION_MINOR_CHANGE = 0; const VERSION = "" . VERSION_MAJOR . "." . VERSION_MINOR . "." . VERSION_MINOR_CHANGE; const SPEC_VERSION_MAJOR= 2; const SPEC_VERSION_MINOR= 4; const SPEC_VERSION_MINOR_CHANGE = 2; const SPEC_VERSION = "" . SPEC_VERSION_MAJOR . "." . SPEC_VERSION_MINOR . "." . SPEC_VERSION_MINOR_CHANGE; const RELEASE = NAME_LONG . " Version " . VERSION; const RELEASE_TAG = NAME_LONG . "_" . VERSION_MAJOR . "_" . VERSION_MINOR . "_" . VERSION_MINOR_CHANGE; public static function main($args) { echo NAME_LONG . ":"; echo "\t" . NAME_LONG . " " . VERSION; echo "\t" . RELEASE_TAG; echo "\tCORBA/IIOP " . SPEC_VERSION . " (http://www.omg.org/cgi-bin/doc?formal/01-02-01)"; } } Expected result: Nothing to the standard output and no memory leaks. Actual result: -- /usr/src/zend2/php5-200307262130/Zend/zend_operators.c(1087) : Freeing 0x4070AE7C (12 bytes), script=org/openorb/ReleaseInfo.php Last leak repeated 13 times Zend/zend_language_scanner.c(4497) : Freeing 0x4070AE40 (2 bytes), script=org/openorb/ReleaseInfo.php Last leak repeated 9 times Zend/zend_language_scanner.c(4350) : Freeing 0x4070ADB8 (14 bytes), script=org/openorb/ReleaseInfo.php Last leak repeated 11 times /usr/src/zend2/php5-200307262130/Zend/zend_compile.c(2524) : Freeing 0x4070AA80 (6 bytes), script=org/openorb/ReleaseInfo.php /usr/src/zend2/php5-200307262130/Zend/zend_variables.c(111) : Actual location (location was relayed) Last leak repeated 2 times -- Edit bug report at http://bugs.php.net/?id=24831&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24831&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24831&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24831&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24831&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24831&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24831&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=24831&r=support Expected behavior: http://bugs.php.net/fix.php?id=24831&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=24831&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=24831&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24831&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24831&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24831&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24831&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=24831&r=gnused
#24821 [Com]: regex parsing errors (info please)
ID: 24821 Comment by: cunha17 at uol dot com dot br Reported By: yan at fitterer dot org Status: Open Bug Type: Regexps related Operating System: Linux RH 7.3 PHP Version: Irrelevant New Comment: I can tell you that the latest PHP5-dev has it working. Cristiano Duarte Previous Comments: [2003-07-26 14:41:54] yan at fitterer dot org Description: Error in matching literal { inside regexp Sorry I'm not putting a version on this. See below. Reproduce code: --- Expected result: This does work on 4.2.3 (and later I expect), but doesn't on 4.1.2. I'm trying to get it fixed by Redhat, bcse they still ship 4.1.2 with RH 7.3. Could somebody tell me when it was fixed (which version), and if there is an associated bug no? I searched, but to no avail. I suppose it was fixed as part of something else... Thanks Yan Actual result: -- Warning: Unmatched \{ in /usr/local/typo3/museum/phptest.php on line 2 Warning: Invalid content of \{\} in /usr/local/typo3/museum/phptest.php on line 3 -- Edit this bug report at http://bugs.php.net/?id=24821&edit=1
#15415 [Com]: [VOTE] case sensitive function/class names for PHP5
ID: 15415 Comment by: cunha17 at uol dot com dot br Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: Feature/Change Request Operating System: ANY PHP Version: PHP 5.0 New Comment: IMHO it would make things faster since there will be no strtolower needed, but I think it would break BC and, because of that, my vote is NO. Previous Comments: [2003-07-20 17:09:19] nightcat at poczta dot onet dot pl YES [2003-04-06 14:44:16] sn0t at hladat dot sk YES [2003-04-06 14:44:14] sn0t at hladat dot sk YES [2003-03-31 06:46:45] rich at kastle dot com NO [2003-03-30 16:40:59] moxley at moxleydata dot com YES 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/15415 -- Edit this bug report at http://bugs.php.net/?id=15415&edit=1
#24274 [Com]: New 'function' variable_exists(); patch included
ID: 24274 Comment by: cunha17 at uol dot com dot br Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Feature/Change Request Operating System: All PHP Version: 4CVS-2003-06-20 (stable) New Comment: I think it is a nice function. Are there any plans to commit it to CVS ? Previous Comments: [2003-06-20 17:28:37] torben at thebuttlesschaps dot com Hmm. A non-messed-up patch can be found here: http://www.thebuttlesschaps.com/variable_exists_patch.txt Torben [2003-06-20 17:08:17] [EMAIL PROTECTED] Description: PHP doesn't have a way to check whether a variable exists; just a way to check whether it has a value (isset()). This isn't wrong, but it would be useful to add a way to check for actual existence of a variable (for instance, checking for array keys without having to go through array_key_exists()). Here's a patch against CVS which implements variable_exists(). The only difference to isset() is that a variable is considered to exist even if it contains NULL. Index: zend_compile.h === RCS file: /repository/Zend/zend_compile.h,v retrieving revision 1.145 diff -u -r1.145 zend_compile.h --- zend_compile.h 31 Dec 2002 15:55:02 - 1.145 +++ zend_compile.h 20 Jun 2003 11:35:20 - @@ -558,6 +558,7 @@ #define ZEND_ISSET (1<<0) #define ZEND_ISEMPTY (1<<1) +#define ZEND_VARIABLE_EXISTS(1<<2) #define ZEND_CT(1<<0) #define ZEND_RT (1<<1) Index: zend_execute.c === RCS file: /repository/Zend/zend_execute.c,v retrieving revision 1.321 diff -u -r1.321 zend_execute.c --- zend_execute.c 31 Dec 2002 15:55:02 - 1.321 +++ zend_execute.c 20 Jun 2003 11:35:22 - @@ -2382,7 +2382,7 @@ isset = 1; } } - } else if (*var==EG(uninitialized_zval_ptr) || ((*var)->type == IS_NULL)) { + } else if (*var == EG(uninitialized_zval_ptr) || (((*var)->type == IS_NULL) && EX(opline)->op2.u.constant.value.lval != ZEND_VARIABLE_EXISTS)) { value = *var; isset = 0; } else { @@ -2391,6 +2391,7 @@ } switch (EX(opline)->op2.u.constant.value.lval) { + case ZEND_VARIABLE_EXISTS: case ZEND_ISSET: EX(Ts)[EX(opline)->result.u.var].tmp_var.value.lval = isset; break; Index: zend_language_parser.y === RCS file: /repository/Zend/zend_language_parser.y,v retrieving revision 1.23 diff -u -r1.23 zend_language_parser.y --- zend_language_parser.y 4 Aug 2002 06:39:44 - 1.23 +++ zend_language_parser.y 20 Jun 2003 11:35:22 - @@ -112,6 +112,7 @@ %token T_UNSET %token T_ISSET %token T_EMPTY +%token T_VARIABLE_EXISTS %token T_CLASS %token T_EXTENDS %token T_OBJECT_OPERATOR @@ -710,6 +711,7 @@ internal_functions_in_yacc: T_ISSET '(' isset_variables ')' { $$ = $3; } + | T_VARIABLE_EXISTS '(' variable_exists_variables ')' { $$ = $3; } | T_EMPTY '(' cvar ')'{ zend_do_isset_or_isempty(ZEND_ISEMPTY, &$$, &$3 TSRMLS_CC); } | T_INCLUDE expr { zend_do_include_or_eval(ZEND_INCLUDE, &$$, &$2 TSRMLS_CC); } | T_INCLUDE_ONCE expr { zend_do_include_or_eval(ZEND_INCLUDE_ONCE, &$$, &$2 TSRMLS_CC); } @@ -717,6 +719,11 @@ | T_REQUIRE expr { zend_do_include_or_eval(ZEND_REQUIRE, &$$, &$2 TSRMLS_CC); } | T_REQUIRE_ONCE expr { zend_do_include_or_eval(ZEND_REQUIRE_ONCE, &$$, &$2 TSRMLS_CC); } ; + +variable_exists_variables: + cvar{ zend_do_isset_or_isempty(ZEND_VARIABLE_EXISTS, &$$, &$1 TSRMLS_CC); } + | variable_exists_variables ',' { zend_do_boolean_and_begin(&$1, &$2 TSRMLS_CC); } cvar { znode tmp; zend_do_isset_or_isempty(ZEND_ISSET, &tmp, &
#24279 [NEW]: Crash when using __get,__set or __call and raising exceptions
From: cunha17 at uol dot com dot br Operating system: linux (RH9) PHP version: 5CVS-2003-06-21 (dev) PHP Bug Type: Zend Engine 2 problem Bug description: Crash when using __get,__set or __call and raising exceptions Description: When any exception is raised inside a __get, __set or __call it leads to a segmentation fault even if the exception is thrown inside a try/catch statement. Reproduce code: --- class test { function __get($propname) { throw new Exception("TEST"); } } $t = new test(); echo $t->ok; Expected result: An "Fatal error: Uncaught exception 'exception'! in Unknown on line 0" or somethig like that is the exception is not caught. Actual result: -- Segmentation fault (core dumped) -- Edit bug report at http://bugs.php.net/?id=24279&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24279&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24279&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24279&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24279&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24279&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=24279&r=support Expected behavior: http://bugs.php.net/fix.php?id=24279&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=24279&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=24279&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24279&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24279&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24279&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24279&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=24279&r=gnused
#23194 [Com]: Crash when using __get
ID: 23194 Comment by: cunha17 at uol dot com dot br Reported By: lphuberdeau at sympatico dot ca Status: No Feedback Bug Type: Zend Engine 2 problem Operating System: linux (RH9) PHP Version: 5CVS-2003-04-13 (dev) New Comment: I'm using PHP5-200306191730. When any exception is raised inside a __get, __set or __call it leads to a segmentation fault. Cristiano Duarte. Previous Comments: [2003-05-28 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over 2 weeks, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". [2003-05-11 08:25:14] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2003-04-13 22:59:45] lphuberdeau at sympatico dot ca Well, I don't know exacly what caused the bug, but I know I could reproduce it. Basically, Apache2(2.0.45) crashes when I run a certain script. I use PHP5 of April 13th at 19:30 right now. I was testing new features. Everything worked well (nice job guys) until I placed a throw( new Exception( "Variable not found" )); in function __get($name){}. -- class foo { function __get( $name ) { throw( new Exception( "Variable not found" )); } } $o = new foo; try { echo $o->bar; } catch( Exception $e ) { echo $e; } -- If you need more details, feel free to contact me. -- Louis-Philippe Huberdeau -- Edit this bug report at http://bugs.php.net/?id=23194&edit=1
#22060 [Fbk->Opn]: mssql.datetimeconvert=0 gets wrong month
ID: 22060 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: MSSQL related Operating System: Linux 2.4 PHP Version: 4.3.1-dev New Comment: I´m running MSDE with SP5 on a Win98SE machine. I´m running PHP/Apache on a Linux machine with freetds. The type of the 'birth' column is datetime. Previous Comments: [2003-02-09 02:53:18] [EMAIL PROTECTED] I need a bit more information to solve this. This can not be reproduced on my system. Are you using datetime or smalldatetime ? [2003-02-05 15:43:30] [EMAIL PROTECTED] same happened with php4-STABLE-200302052030. [2003-02-04 18:05:43] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2003-02-04 17:11:28] [EMAIL PROTECTED] >>When using this: $c = mssql_connect("172.16.0.1:1433", "hn", "hn"); mssql_select_db("hn"); $r = mssql_query("select * from hn.employee"); print_r(mssql_fetch_array($r)); >>I get this(as expected): Array ( [0] => M4398648MG [id] => M4398648MG [1] => FRED [nome] => FRED [2] => 105 roadhouse, av [addr] => 105 roadhouse, av [3] => NY [city] => NY [4] => NY [state] => NY [5] => 70272 [zip] => 70272 [6] => 280876 [id2] => 280876 [7] => FRED [nick] => FRED [8] => Mar 17 1973 12:00AM [birth] => Mar 17 1973 12:00AM ) >>When using this: ini_set('mssql.datetimeconvert',0); $c = mssql_connect("172.16.0.1:1433", "hn", "hn"); mssql_select_db("hn"); $r = mssql_query("select * from hn.employee"); print_r(mssql_fetch_array($r)); >>I get a wrong month number (02 instead of 03): Array ( [0] => M4398648MG [id] => M4398648MG [1] => FRED [nome] => FRED [2] => 105 roadhouse, av [addr] => 105 roadhouse, av [3] => NY [city] => NY [4] => NY [state] => NY [5] => 70272 [zip] => 70272 [6] => 280876 [id2] => 280876 [7] => FRED [nick] => FRED [8] => 1973-02-17 00:00:00 [birth] => 1973-02-17 00:00:00 ) -- Edit this bug report at http://bugs.php.net/?id=22060&edit=1
#22060 [Fbk->Opn]: mssql.datetimeconvert=0 gets wrong month
ID: 22060 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: MSSQL related Operating System: Linux 2.4 PHP Version: 4.3.0 New Comment: same happened with php4-STABLE-200302052030. Previous Comments: [2003-02-04 18:05:43] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip [2003-02-04 17:11:28] [EMAIL PROTECTED] >>When using this: $c = mssql_connect("172.16.0.1:1433", "hn", "hn"); mssql_select_db("hn"); $r = mssql_query("select * from hn.employee"); print_r(mssql_fetch_array($r)); >>I get this(as expected): Array ( [0] => M4398648MG [id] => M4398648MG [1] => FRED [nome] => FRED [2] => 105 roadhouse, av [addr] => 105 roadhouse, av [3] => NY [city] => NY [4] => NY [state] => NY [5] => 70272 [zip] => 70272 [6] => 280876 [id2] => 280876 [7] => FRED [nick] => FRED [8] => Mar 17 1973 12:00AM [birth] => Mar 17 1973 12:00AM ) >>When using this: ini_set('mssql.datetimeconvert',0); $c = mssql_connect("172.16.0.1:1433", "hn", "hn"); mssql_select_db("hn"); $r = mssql_query("select * from hn.employee"); print_r(mssql_fetch_array($r)); >>I get a wrong month number (02 instead of 03): Array ( [0] => M4398648MG [id] => M4398648MG [1] => FRED [nome] => FRED [2] => 105 roadhouse, av [addr] => 105 roadhouse, av [3] => NY [city] => NY [4] => NY [state] => NY [5] => 70272 [zip] => 70272 [6] => 280876 [id2] => 280876 [7] => FRED [nick] => FRED [8] => 1973-02-17 00:00:00 [birth] => 1973-02-17 00:00:00 ) -- Edit this bug report at http://bugs.php.net/?id=22060&edit=1
#22060 [NEW]: mssql.datetimeconvert=0 gets wrong month
From: [EMAIL PROTECTED] Operating system: Linux 2.4 PHP version: 4.3.0 PHP Bug Type: MSSQL related Bug description: mssql.datetimeconvert=0 gets wrong month >>When using this: $c = mssql_connect("172.16.0.1:1433", "hn", "hn"); mssql_select_db("hn"); $r = mssql_query("select * from hn.employee"); print_r(mssql_fetch_array($r)); >>I get this(as expected): Array ( [0] => M4398648MG [id] => M4398648MG [1] => FRED [nome] => FRED [2] => 105 roadhouse, av [addr] => 105 roadhouse, av [3] => NY [city] => NY [4] => NY [state] => NY [5] => 70272 [zip] => 70272 [6] => 280876 [id2] => 280876 [7] => FRED [nick] => FRED [8] => Mar 17 1973 12:00AM [birth] => Mar 17 1973 12:00AM ) >>When using this: ini_set('mssql.datetimeconvert',0); $c = mssql_connect("172.16.0.1:1433", "hn", "hn"); mssql_select_db("hn"); $r = mssql_query("select * from hn.employee"); print_r(mssql_fetch_array($r)); >>I get a wrong month number (02 instead of 03): Array ( [0] => M4398648MG [id] => M4398648MG [1] => FRED [nome] => FRED [2] => 105 roadhouse, av [addr] => 105 roadhouse, av [3] => NY [city] => NY [4] => NY [state] => NY [5] => 70272 [zip] => 70272 [6] => 280876 [id2] => 280876 [7] => FRED [nick] => FRED [8] => 1973-02-17 00:00:00 [birth] => 1973-02-17 00:00:00 ) -- Edit bug report at http://bugs.php.net/?id=22060&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22060&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22060&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22060&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22060&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22060&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=22060&r=support Expected behavior: http://bugs.php.net/fix.php?id=22060&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=22060&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=22060&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22060&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22060&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22060&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22060&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=22060&r=gnused
Bug #16690 Updated: Java support in PHP with Apache2 multithreaded server doesn´t work
ID: 16690 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Apache2 related Operating System: Linux 2.4 glibc 2.2.3 PHP Version: 4.2.0 New Comment: To get things working, I compiled PHP with these options: ./configure --with-bz2 --enable-ftp \ --with-gd --with-ttf --enable-gd-native-ttf --with-jpeg-dir \ --with-freetype-dir \ --with-png-dir --with-zlib-dir \ --with-tiff-dir \ --with-java --with-ldap \ --with-mcrypt --with-mhash \ --with-pdflib --without-mysql \ --with-pgsql --with-snmp --enable-shared \ --enable-calendar --with-dom --with-openssl \ --with-iconv=/usr/local/lib/libiconv.so \ --with-apxs2 --enable-experimental-zts and Apache2 with these: ./configure --enable-ssl \ --enable-module=so \ --enable-modules=all \ --enable-mods-shared=all \ --with-mpm=prefork Previous Comments: [2002-04-18 19:37:09] [EMAIL PROTECTED] I want Java support in PHP pages, and I had it with PHP 4.1, Apache 1.3 and J2SDK 1.3. When I tried to build PHP 4.2.0RC4 with J2SDK 1.4.0 and Apache 2.0.35 the first problems were some seg faults in PHP. I found out (using PHP as CGI to get error messages) that I "MUST" compile PHP with --enable-experimental-zts or otherwise it misses php_core_globals. After some undocumented php.ini configurations(available throght PHPBUILDER), I could finally get all three pieces working together, but only once. If I call a page more than once, PHP reports that it can´t create the Virtual Machine. I searched throght php.net and somebody posted a response that PHP creates one VM per thread. So, if my Apache2 is multithreaded, PHP is creating many VM per processes, i thought. That´s it. When I compiled Apache2 with "prefork" (not multithreaded), my Java-enabled PHP pages worked just fine. I´m reporting this bug, since PHP must work with Apache2 "worker" (multithreaded). -- Edit this bug report at http://bugs.php.net/?id=16690&edit=1
Bug #16690: Java support in PHP with Apache2 multithreaded server doesn´t work
From: [EMAIL PROTECTED] Operating system: Linux 2.4 glibc 2.2.3 PHP version: 4.2.0 PHP Bug Type: Apache2 related Bug description: Java support in PHP with Apache2 multithreaded server doesn´t work I want Java support in PHP pages, and I had it with PHP 4.1, Apache 1.3 and J2SDK 1.3. When I tried to build PHP 4.2.0RC4 with J2SDK 1.4.0 and Apache 2.0.35 the first problems were some seg faults in PHP. I found out (using PHP as CGI to get error messages) that I "MUST" compile PHP with --enable-experimental-zts or otherwise it misses php_core_globals. After some undocumented php.ini configurations(available throght PHPBUILDER), I could finally get all three pieces working together, but only once. If I call a page more than once, PHP reports that it can´t create the Virtual Machine. I searched throght php.net and somebody posted a response that PHP creates one VM per thread. So, if my Apache2 is multithreaded, PHP is creating many VM per processes, i thought. That´s it. When I compiled Apache2 with "prefork" (not multithreaded), my Java-enabled PHP pages worked just fine. I´m reporting this bug, since PHP must work with Apache2 "worker" (multithreaded). -- Edit bug report at http://bugs.php.net/?id=16690&edit=1 -- Fixed in CVS:http://bugs.php.net/fix.php?id=16690&r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=16690&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16690&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16690&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16690&r=support Expected behavior: http://bugs.php.net/fix.php?id=16690&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16690&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16690&r=submittedtwice