#25547 [Ver]: error_handler and array index with function call
ID: 25547 Updated by: [EMAIL PROTECTED] Reported By: cschneid at cschneid dot com Status: Verified Bug Type: Zend Engine 2 problem Operating System: * -PHP Version: 5CVS,4CVS +PHP Version: 4CVS New Comment: The bug is fixed in PHP5 CVS (zend.c,v 1.260). Previous Comments: [2003-10-16 04:09:39] [EMAIL PROTECTED] You now have a memory leak. I tried something similar too. But we decided to look for a better solution where we don't gc the variable we still need. [2003-10-15 08:19:08] cschneid at cschneid dot com The problem seems to be that dim-value is overwritten, copying the value solves this. I don't have enough insight in Zend to know if this is a memory leak and the values should be freed at some point or if this is ok. Hope this helps: diff -u -u -r1.316.2.21 zend_execute.c --- Zend/zend_execute.c 30 Jul 2003 16:33:54 - 1.316.2.21 +++ Zend/zend_execute.c 15 Oct 2003 12:17:10 - @@ -626,7 +626,7 @@ offset_key_length = 0; goto fetch_string_dim; case IS_STRING: - offset_key = dim-value.str.val; + offset_key = estrndup(dim-value.str.val, dim-value.str.len); offset_key_length = dim-value.str.len; fetch_string_dim: [2003-09-15 13:37:55] cschneid at cschneid dot com Description: Error handler seems to destroy array indices if called due to a undefined array index generated by a function. Reproduce code: --- function handler($errno, $errstr, $errfile, $errline) { $test = aaa; } set_error_handler('handler'); $output[trim(bbb)]++; print_r($output); Expected result: Array ( [bbb] = 1 ) Actual result: -- Array ( [aaa] = 1 ) -- Edit this bug report at http://bugs.php.net/?id=25547edit=1
#26683 [Com]: Apache Service Start Failure.
ID: 26683 Comment by: scottfurry at telusplanet dot net Reported By: pawnup at yahoo dot com Status: Open Bug Type: *Web Server problem Operating System: WinXP Home PHP Version: 5.0.0b2 (beta2) New Comment: I confirm this bug... Previous:PHP4.3.4 UpgradePHP5.0beta3 Apache 2.0.48 Had modified PHP.ini to show both LoadModule php4_... and LoadModule php5_... with the 5beta3 version of php4apache2.dll-- No Joy :( As per pawnup 's observation (many thanks and kudos) I copied the previous php4apache2.dll and modified the php.ini to show the file's revision (i.e. LoadModule php4_... Also copied all dll's in php folder to %\systemroot\% And is phpinfo() not to reflect that its php5 installed? cheers Previous Comments: [2003-12-23 14:19:02] grzesiek at atlas dot cz try LoadModule php5_module c:/php/sapi/php4apache2.dll [2003-12-20 18:28:20] pawnup at yahoo dot com Description: I was previously using php4.3.1 with apache 2.0.45 http server. I upgraded Apache to 2.0.48 today and also upgraded PHP to 5.0.beta2. I found that the apache service was unable to start. The system event log showed error on line 177 of the httpd.conf file of apache. Actually, that line is LoadModule php4_module c:/php/sapi/php4apache2.dll The problem seems to be in the php4apache2.dll file that came with php5.0beta2. Workaround: If I replace this dll with the older version that came with php4.3.1 it works fine !. Although, this was a simple shortcut, this error needs to be investigated further. -- Edit this bug report at http://bugs.php.net/?id=26683edit=1
#26751 [NEW]: PHP can't find the MySQL socket on a case sensitive file system
From: fabrice at meninsilicium dot com Operating system: MacOS 10.3.2 PHP version: 4.3.4 PHP Bug Type: PHP options/info functions Bug description: PHP can't find the MySQL socket on a case sensitive file system Description: PHP search for the MySQL socket at /Private/tmp/ mysql.sock. With HFS+ (case insensitive), that works. But with a case insensitive file system not. To reproduce : 1) build PHP on a case insensitive file system (HFS+). 2) install an execute on a case sensitive file system (HFS+ case sensitive) Correction : for i in \ /var/run/mysqld/mysqld.sock \ /var/tmp/mysql.sock \ /var/run/mysql/mysql.sock \ /var/lib/mysql/mysql.sock \ /var/mysql/mysql.sock \ /usr/local/mysql/var/mysql.sock \ /Private/tmp/mysql.sock \ /tmp/mysql.sock \ ; do if test -r $i; then MYSQL_SOCK=$i break 2 fi done file configure, line 52819 : /Private/tmp/mysql.sock \ changed to : /private/tmp/mysql.sock \ ^ for i in \ /var/run/mysqld/mysqld.sock \ /var/tmp/mysql.sock \ /var/run/mysql/mysql.sock \ /var/lib/mysql/mysql.sock \ /var/mysql/mysql.sock \ /usr/local/mysql/var/mysql.sock \ /private/tmp/mysql.sock \ /tmp/mysql.sock \ ; do if test -r $i; then MYSQL_SOCK=$i break 2 fi done -- Edit bug report at http://bugs.php.net/?id=26751edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26751r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26751r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26751r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26751r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26751r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26751r=needscript Try newer version: http://bugs.php.net/fix.php?id=26751r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26751r=support Expected behavior: http://bugs.php.net/fix.php?id=26751r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26751r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26751r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26751r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26751r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26751r=dst IIS Stability: http://bugs.php.net/fix.php?id=26751r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26751r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26751r=float
#26751 [Opn-Csd]: PHP can't find the MySQL socket on a case sensitive file system
ID: 26751 Updated by: [EMAIL PROTECTED] Reported By: fabrice at meninsilicium dot com -Status: Open +Status: Closed Bug Type: PHP options/info functions Operating System: MacOS 10.3.2 PHP Version: 4.3.4 New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2003-12-31 06:13:49] fabrice at meninsilicium dot com Description: PHP search for the MySQL socket at /Private/tmp/ mysql.sock. With HFS+ (case insensitive), that works. But with a case insensitive file system not. To reproduce : 1) build PHP on a case insensitive file system (HFS+). 2) install an execute on a case sensitive file system (HFS+ case sensitive) Correction : for i in \ /var/run/mysqld/mysqld.sock \ /var/tmp/mysql.sock \ /var/run/mysql/mysql.sock \ /var/lib/mysql/mysql.sock \ /var/mysql/mysql.sock \ /usr/local/mysql/var/mysql.sock \ /Private/tmp/mysql.sock \ /tmp/mysql.sock \ ; do if test -r $i; then MYSQL_SOCK=$i break 2 fi done file configure, line 52819 : /Private/tmp/mysql.sock \ changed to : /private/tmp/mysql.sock \ ^ for i in \ /var/run/mysqld/mysqld.sock \ /var/tmp/mysql.sock \ /var/run/mysql/mysql.sock \ /var/lib/mysql/mysql.sock \ /var/mysql/mysql.sock \ /usr/local/mysql/var/mysql.sock \ /private/tmp/mysql.sock \ /tmp/mysql.sock \ ; do if test -r $i; then MYSQL_SOCK=$i break 2 fi done -- Edit this bug report at http://bugs.php.net/?id=26751edit=1
#26752 [NEW]: fgets can't take variable as buffer length argument
From: jeroen dot pulles at redslider dot net Operating system: Windows 2000 PHP version: 5.0.0b3 (beta3) PHP Bug Type: Filesystem function related Bug description: fgets can't take variable as buffer length argument Description: fgets expects a literal for the buffer size argument. It hangs until the max_execution_time timeouts, when you give it a variable. Reproduce code: --- $url = 'http://www.google.com/'; if (($handle = fopen($url, 'r')) === false) { die('Couldnt open url '.$url.'.'); } while (feof($handle) === false) { $text = fgets($handle, $kBufferSize); // doesn't work //$text = fgets($handle, 512); // works echo($text); } fclose($handle); Expected result: The google homepage (i.e. the given url) Actual result: -- Timeout on max_execution_time. -- Edit bug report at http://bugs.php.net/?id=26752edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26752r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26752r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26752r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26752r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26752r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26752r=needscript Try newer version: http://bugs.php.net/fix.php?id=26752r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26752r=support Expected behavior: http://bugs.php.net/fix.php?id=26752r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26752r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26752r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26752r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26752r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26752r=dst IIS Stability: http://bugs.php.net/fix.php?id=26752r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26752r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26752r=float
#26752 [Opn]: fgets can't take variable as buffer length argument
ID: 26752 User updated by: jeroen dot pulles at redslider dot net Reported By: jeroen dot pulles at redslider dot net Status: Open Bug Type: Filesystem function related Operating System: Windows 2000 PHP Version: 5.0.0b3 (beta3) New Comment: The reproduce code (obviously) lacks the $kBufferSize declaration. $kBufferSize = 512; or something similar Previous Comments: [2003-12-31 06:32:16] jeroen dot pulles at redslider dot net Description: fgets expects a literal for the buffer size argument. It hangs until the max_execution_time timeouts, when you give it a variable. Reproduce code: --- $url = 'http://www.google.com/'; if (($handle = fopen($url, 'r')) === false) { die('Couldnt open url '.$url.'.'); } while (feof($handle) === false) { $text = fgets($handle, $kBufferSize); // doesn't work //$text = fgets($handle, 512); // works echo($text); } fclose($handle); Expected result: The google homepage (i.e. the given url) Actual result: -- Timeout on max_execution_time. -- Edit this bug report at http://bugs.php.net/?id=26752edit=1
#26753 [NEW]: zend_fetch_list_dtor_id() doesn't check NULL strings
From: Markus dot Lidel at shadowconnect dot com Operating system: Linux PHP version: Irrelevant PHP Bug Type: Reproducible crash Bug description: zend_fetch_list_dtor_id() doesn't check NULL strings Description: If you use the zend_fetch_list_dtor_id function, and you have for example loaded the crack extension (which registers a destructor using the function register_list_destructors()), php crashes. The source of the problem is this line: if (strcmp(type_name, lde-type_name) == 0) { The register_list_destructors() set lde-type_name to NULL. If you replace the code with if (lde-type_name (strcmp(type_name, lde-type_name) == 0)) { the function works fine. Reproduce code: --- int id = zend_fetch_list_dtor_id function(foo); -- Edit bug report at http://bugs.php.net/?id=26753edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26753r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26753r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26753r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26753r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26753r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26753r=needscript Try newer version: http://bugs.php.net/fix.php?id=26753r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26753r=support Expected behavior: http://bugs.php.net/fix.php?id=26753r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26753r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26753r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26753r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26753r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26753r=dst IIS Stability: http://bugs.php.net/fix.php?id=26753r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26753r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26753r=float
#26753 [Opn]: zend_fetch_list_dtor_id() doesn't check NULL strings
ID: 26753 User updated by: Markus dot Lidel at shadowconnect dot com Reported By: Markus dot Lidel at shadowconnect dot com Status: Open Bug Type: Reproducible crash Operating System: Linux PHP Version: Irrelevant New Comment: BTW, found the bug in php4-200312311230 and in php5-200312311230. Previous Comments: [2003-12-31 08:07:45] Markus dot Lidel at shadowconnect dot com Description: If you use the zend_fetch_list_dtor_id function, and you have for example loaded the crack extension (which registers a destructor using the function register_list_destructors()), php crashes. The source of the problem is this line: if (strcmp(type_name, lde-type_name) == 0) { The register_list_destructors() set lde-type_name to NULL. If you replace the code with if (lde-type_name (strcmp(type_name, lde-type_name) == 0)) { the function works fine. Reproduce code: --- int id = zend_fetch_list_dtor_id function(foo); -- Edit this bug report at http://bugs.php.net/?id=26753edit=1
#26666 [Opn]: crash in zend_mm_alloc
ID: 2 User updated by: jan at horde dot org Reported By: jan at horde dot org Status: Open Bug Type: Zend Engine 2 problem Operating System: Linux PHP Version: 5CVS-2003-12-19 (dev) New Comment: I managed to create a medium sized test case, unfortunately the bug disappeared as soon as I tried to strip it further down. Get www.horde.org/~jan/prop_test.tar.gz, unpack it and run ob_vars.php with a current HEAD cli. It segfaults with the last statement, but this seems to only a followup bug. If you look at the test script, the output and the MIME_Message::buildMessage() method, you will easily see wha t is going wrong. The strange thing is that in production, these UNKNOWN:0 properties happen to only two properties of the object, always the same two and no obvious pattern that I see for those. Previous Comments: [2003-12-21 08:01:43] jan at horde dot org This is the output from valgrind: VG_(get_memory_from_mmap): newSuperblock's request for 1515872256 bytes failed. VG_(get_memory_from_mmap): 102113062 bytes already allocated. No wonder that it crashes. The question is, why does this only happen in HEAD and why does the memory_limit doesn't prevent this. I can't really say when this started because I don't use PHP5 regularly. But it definitely *did* happen before the recent crash bugs/fixes. [2003-12-19 08:07:57] [EMAIL PROTECTED] And did this start happening recently or was this old problem? [2003-12-19 08:07:20] [EMAIL PROTECTED] Does valgrind have anything to say about it..? [2003-12-19 05:49:47] jan at horde dot org Description: When I try to call a really complex script, PHP crashes with this backtrace: #0 0x40237422 in grow_heap () from /lib/libc.so.6 #1 0x40238a52 in sYSMALLOc () from /lib/libc.so.6 #2 0x4023918c in malloc () from /lib/libc.so.6 #3 0x406f40f8 in zend_mm_add_memory_block (heap=0x409010f8, block_size=1515870884) at /home/jan/cvs/php5/Zend/zend_mm.c:223 #4 0x406f43a1 in zend_mm_alloc (heap=0x409010f8, size=1515870856) at /home/jan/cvs/php5/Zend/zend_mm.c:321 #5 0x406f43c8 in zend_mm_alloc (heap=0x409010f8, size=1515870856) at /home/jan/cvs/php5/Zend/zend_mm.c:325 #6 0x406f43c8 in zend_mm_alloc (heap=0x409010f8, size=1515870856) at /home/jan/cvs/php5/Zend/zend_mm.c:325 #7 0x406f43c8 in zend_mm_alloc (heap=0x409010f8, size=1515870856) at /home/jan/cvs/php5/Zend/zend_mm.c:325 #8 0x406f43c8 in zend_mm_alloc (heap=0x409010f8, size=1515870856) at /home/jan/cvs/php5/Zend/zend_mm.c:325 #9 0x406f43c8 in zend_mm_alloc (heap=0x409010f8, size=1515870856) at /home/jan/cvs/php5/Zend/zend_mm.c:325 #10 0x406f43c8 in zend_mm_alloc (heap=0x409010f8, size=1515870856) at /home/jan/cvs/php5/Zend/zend_mm.c:325 This continues endlessly, I stopped around frame #1000, so I don't know where it actually was called from. No, I don't have a simple script to reproduce this, but perhaps someone already has an idea from looking at this bt. -- Edit this bug report at http://bugs.php.net/?id=2edit=1
#26755 [NEW]: implicit_flush not used in CLI, ob controlled by output_buffering
From: [EMAIL PROTECTED] Operating system: linux PHP version: 4CVS-2003-12-31 (stable) PHP Bug Type: Output Control Bug description: implicit_flush not used in CLI, ob controlled by output_buffering Description: In CLI implicit_flush is default to 1, however when using the reproducing code implicit_flush is not used but the value of output_buffering is taken into account. If output_buffering is 0 in php.ini then everything is fine but if in php.ini the value is 4096 (or probably some value that is 0) the output is buffered no matter it's in CLI mode. Evenmore, flush()-ing also has no effect as can be seen in the actual output. This behaviour exists both in PHP_4_3 and in HEAD. Reproduce code: --- php -r 'echo printf(phpversion=%s\noutput_buffering=%s\nimplicit_flush=%s\n, phpversion(),ini_get(output_buffering), ini_get(implicit_flush));flush();$a=fubar\n; echo $a; fubar_func();' Expected result: As can be seen on execution 1 and 2 of the actual result PHP dies after a fatal error of calling undefined function and after that the output which is output before the call is feed to the console. Execution 3 and 4 show the behaviour which is expected to be normal but is only valid when output_buffering is 0 (implicit_flush as it can be seen is not taken into account). Actual result: -- Exection 1: PHP Fatal error: Call to undefined function fubar_func() in Command line code on line 1 phpversion=5.0.0RC1-dev output_buffering=4096 implicit_flush=1 fubar Execution 2: phpversion=5.0.0RC1-dev output_buffering=0 implicit_flush=1 fubar PHP Fatal error: Call to undefined function fubar_func() in Command line code on line 1 Execution 3: PHP Fatal error: Call to undefined function: fubar_func() in Command line code on line 1 phpversion=4.3.5-dev output_buffering=4096 implicit_flush=1 fubar Execution 4: phpversion=4.3.5-dev output_buffering=0 implicit_flush=1 fubar PHP Fatal error: Call to undefined function: fubar_func() in Command line code on line 1 -- Edit bug report at http://bugs.php.net/?id=26755edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26755r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26755r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26755r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26755r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26755r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26755r=needscript Try newer version: http://bugs.php.net/fix.php?id=26755r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26755r=support Expected behavior: http://bugs.php.net/fix.php?id=26755r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26755r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26755r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26755r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26755r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26755r=dst IIS Stability: http://bugs.php.net/fix.php?id=26755r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26755r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26755r=float
#26756 [NEW]: object references get lost
From: tilman dot giese at gmx dot de Operating system: Linux PHP version: 4.3.4 PHP Bug Type: Variables related Bug description: object references get lost Description: The problem is not that easy to explain. If you have two objects referencing each other, one of the references gets somehow lost. Look at the actual result, especially at the missing ampersands of object(test3)! Although I only use references in the script (sorry about it be longer than 20 lines) it seems that I get copies of the objects. Reproduce code: --- class Test1 { var $a; function Test1() { $this-a = new Test2(); } function getTest2() { return $this-a; } } class Test2 { var $b; var $counter = 1; function Test2() { $this-b = new Test3($this); } function getTest3() { return $this-b; } } class Test3 { var $p; function Test3($parent) { $parent-counter++; $this-p = $parent; } function getCounter() { return $this-p-counter; } } $obj = new Test1(); $obj2 = $obj-getTest2(); echo $obj2-counter; $obj2-counter++; $obj3 = $obj2-getTest3(); echo $obj3-getCounter(); var_dump($obj); Expected result: 23 object(test1)(1) { [a]= object(test2)(2) { [b]= object(test3)(1) { [p]= object(test2)(2) { [b]= object(test3)(1) { [p]= object(test2)(2) { [b]= object(test3)(1) { [p]= *RECURSION* } [counter]= int(3) } } [counter]= int(3) } } [counter]= int(3) } } Actual result: -- 22 object(test1)(1) { [a]= object(test2)(2) { [b]= object(test3)(1) { [p]= object(test2)(2) { [b]= object(test3)(1) { [p]= object(test2)(2) { [b]= object(test3)(1) { [p]= *RECURSION* } [counter]= int(2) } } [counter]= int(2) } } [counter]= int(3) } } -- Edit bug report at http://bugs.php.net/?id=26756edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26756r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26756r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26756r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26756r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26756r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26756r=needscript Try newer version: http://bugs.php.net/fix.php?id=26756r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26756r=support Expected behavior: http://bugs.php.net/fix.php?id=26756r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26756r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26756r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26756r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26756r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26756r=dst IIS Stability: http://bugs.php.net/fix.php?id=26756r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26756r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26756r=float
#24687 [Asn-Csd]: Fatal error: Only variables or references can be returned by reference
ID: 24687 Updated by: [EMAIL PROTECTED] Reported By: nologic at pchome dot com dot tw -Status: Assigned +Status: Closed Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5CVS Assigned To: zeev New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: [2003-11-28 23:38:39] [EMAIL PROTECTED] Zeev, please, either fix this or set the status to 'wont fix'. [2003-11-27 14:53:01] zhundiak at comcast dot net This bug pretty much rules out backwards compatibility with most php4 OOP programs. It's quite silly to say that returning a reference by calling another function that returns a reference is bad programing practice. And by the way, C++ has no problem with returning pointers. Just to be clear: function getHomeTeam() { return $this-getTeam(TEAM_TYPE_HOME); } Really should work. [2003-11-19 21:26:10] kain at kuht dot it and this? Fatal error: Only variables or references can be returned by reference in /usr/lib/php/DB/common.php on line 766 function query($query, $params = array()) { if (sizeof($params) 0) { $sth = $this-prepare($query); if (DB::isError($sth)) { return $sth; } $ret = $this-execute($sth, $params); $this-freePrepared($sth); return $ret; } else { $result = $this-simpleQuery($query); if (DB::isError($result) || $result === DB_OK) { return $result; } else { --766 return new DB_result($this, $result); } } } running on Apache/2.0.48 (Trustix Secure Linux/Linux) PHP/5.0.0b2 [2003-11-17 02:35:55] mag at alcormizar dot cjb dot net I agree with Zeev on this one, this shouldn't be fixed. People will need to learn to write good code one day or the other, and returning a reference like that is VERY bad practice (try to do that in C++!). Even returning a reference to a local variable like this example should produce an error : class foo { function bar() { $whatever = 5; return $whatever; } } because $whatever should not exist anymore after function bar return (according to correct scope rules), thus this reference is not referencing anything anymore... Instead of always asking to fix bad programming practice people should learn the correct way to do it. This is my opinion. [2003-08-16 04:14:19] jan at horde dot org Any idea yet if this will be fixed/addressed or should we start converting scripts to not use referenced return type or build variables that get returned? 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/24687 -- Edit this bug report at http://bugs.php.net/?id=24687edit=1
#26350 [Ver-Bgs]: Inherited methods can't access private fields
ID: 26350 Updated by: [EMAIL PROTECTED] Reported By: forseti at oak dot rpg dot pl -Status: Verified +Status: Bogus Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5CVS-2003-11-29 New Comment: 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 Hi, This is the way it should be. A method can only see private members/methods of its own class and not any derived classes. Andi Previous Comments: [2003-11-21 09:29:13] forseti at oak dot rpg dot pl Description: When a method is inherited from a base class it seems that it retains its context. When it's called from derived class object, it turns out that method cannot access private fields of it's own (derived class) object. What's strange, the inherited method can access protected fields easily. As if 'protected' opened access not only for derived classes but for base classes too. This is a key issue if one wants to code the accessor only once, in base class so that any derived class could use it and provide read-only access to any field. Reproduce code: --- ?php class ParentClass { protected $a = 'ParentClassbr'; public function get($arg) { return $this-$arg; } } class ChildClass extends ParentClass{ protected $b = 'ChildClass - Protectedbr'; private $c = 'ChildClass - Privatebr'; } $test = new ChildClass; echo $test-get('a'); echo $test-get('c'); //fatal error echo $test-get('b'); //strange - it's ok ? Expected result: ParentClass ChildClass - Protected ChildClass - Private Anyway, 'protected' field should be accessible only in derived classes and where declared. Actual result: -- ParentClass ChildClass - Protected Fatal error: Cannot access private property childclass::$c -- Edit this bug report at http://bugs.php.net/?id=26350edit=1
#26005 [Com]: Random cannot change the session's ini settings errors
ID: 26005 Comment by: mtimdog at comcast dot net Reported By: parsnip11 at hotmail dot com Status: No Feedback Bug Type: Session related Operating System: windows 2000 iis 5 PHP Version: 4CVS-2003-10-31 New Comment: I recently upgraded to 4.3.4 on my laptop (using apache) and am getting this error as well. to produce this code I have a simple redirect statement meta http-equiv=refresh content=1;index.php that redirects from index.html to index.php. On the index.php page (oscommerce site), it makes/resets the session variable or whatever oscommerce does. Previous Comments: [2003-12-13 19:32:54] mrjack at online dot fr I have a similar problem on a linux box running version 4.3.4 and apache 2.0.48. I get this in my apache logs : PHP Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 1919973221 And after this i must restart the web server ... [2003-12-08 14:29:29] jsnajdr at kerio dot com I am experiencing this bug too and I think I found its cause. It can occur when PHP is used in a multithreaded program - I embed PHP interpreter in my own multithreaded server using a custom SAPI module, original submitter of this bug uses ISAPI module, which is also multithreaded. The 'Session is active' warning is generated by the PHP_INI_MH(OnUpdateSaveHandler) function that checks PS(session_status), i.e. the session module globals structure. This handler is also called when calling TSRMLS_FETCH() (which is a define for ts_resource_ex() call) before executing a PHP script. See this call stack from gdb: #0 OnUpdateSaveHandler (entry=0xb303890, new_value=0x8700f48 files, new_value_length=5, mh_arg1=0x0, mh_arg2=0x0, mh_arg3=0x0, stage=1, tsrm_ls=0xb2dce18) at /root/src/php-4.3.4/ext/session/session.c:93 #1 0x0865414c in zend_ini_refresh_cache (p=0xb303890, stage=1, tsrm_ls=0xb2dce18) at /root/src/php-4.3.4/Zend/zend_ini.c:177 #2 0x0865006f in zend_hash_apply_with_argument (ht=0xb300ac8, apply_func=0x8654124 zend_ini_refresh_cache, argument=0x1, tsrm_ls=0xb2dce18) at /root/src/php-4.3.4/Zend/zend_hash.c:717 #3 0x0865417d in zend_ini_refresh_caches (stage=1, tsrm_ls=0xb2dce18) at /root/src/php-4.3.4/Zend/zend_ini.c:185 #4 0x08653f88 in zend_copy_ini_directives (tsrm_ls=0xb2dce18) at /root/src/php-4.3.4/Zend/zend_ini.c:104 #5 0x0864b574 in zend_new_thread_end_handler (thread_id=4423709, tsrm_ls=0xb2dce18) at /root/src/php-4.3.4/Zend/zend.c:374 #6 0x0862724f in allocate_new_resource (thread_resources_ptr=0xabac72c, thread_id=4423709) at /root/src/php-4.3.4/TSRM/TSRM.c:282 #7 0x08627305 in ts_resource_ex (id=0, th_id=0x0) at /root/src/php-4.3.4/TSRM/TSRM.c:341 But this handler reads unitialized memory in the new thread's ps_globals - the TSRM resource has NULL constructor and TSRMLS_FETCH is called before php_request_startup(), where all the modules are activated and where the PHP_RINIT_FUNCTION(session) is called to construct the structure. Solution: the ps_globals resource must have a non-null constructor registered in ts_allocate_resource() call in ext/session/session.c [2003-11-25 15:33:21] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to Open. Thank you. [2003-11-21 21:19:07] [EMAIL PROTECTED] No, it's absolutely useless to us. If possible, try disabling ALL extensions in your php.ini. [2003-11-20 15:50:34] parsnip11 at hotmail dot com I just got the error again. I wish I could post the code that makes this happen but I really dont know what it is. I've been running fine for two weeks and it just happened again. I get the following message: PHP has encountered an Access Violation at 01210969 I realize it's hard for you troubleshoot this issue if I cant give you exact code but short of submitting my entire application I can't isolate what's happening. All I know is it started happening after a php upgrade. The code has not changed. Does the above access violation provide any clues as to what the problem could be? 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/26005 -- Edit this bug report at http://bugs.php.net/?id=26005edit=1
#26757 [NEW]: session.save_path should default to $TEMP
From: unknown at simplemachines dot org Operating system: Windows PHP version: Irrelevant PHP Bug Type: PHP options/info functions Bug description: session.save_path should default to $TEMP Description: I would like to request that, much like upload_tmp_dir, PHP be changed so that session.save_path defaults to the system's default temp directory. The reason for this is simple; countless times, people on Windows machines have problems with sessions because they do not set the path in php.ini. (even with how documented it is.) I mean - I am a developer for forum software, and more than half of the reported installation problems are caused by this one issue alone. Thus, with this change, php.ini-dist and php.ini-recommended could have no path set by default, and it would work fine on both operating systems without any changes. I realize this is basically a dupe of bug 25574, but in that case, the reporter misread the manual. I am asking that it be changed to work. http://bugs.php.net/bug.php?id=25574 Thank you, Unknown W. Brackets -- Edit bug report at http://bugs.php.net/?id=26757edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26757r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26757r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26757r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26757r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26757r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26757r=needscript Try newer version: http://bugs.php.net/fix.php?id=26757r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26757r=support Expected behavior: http://bugs.php.net/fix.php?id=26757r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26757r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26757r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26757r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26757r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26757r=dst IIS Stability: http://bugs.php.net/fix.php?id=26757r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26757r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26757r=float
#26263 [Com]: Apache doesn't start up wiht LoadModule phpX_module .. in config
ID: 26263 Comment by: root at md5 dot com dot ar Reported By: peoyli at bredband dot net Status: Open Bug Type: Apache2 related Operating System: OpenBSD 3.4 PHP Version: Irrelevant New Comment: I have the same problem, with my php compiled with --with-mysql but adding in the /etc/rc.conf this shlib_dirs=/usr/local/mysql/lib/mysql, apache start up normarly. Previous Comments: [2003-11-18 18:11:55] peoyli at bredband dot net I'm using just one of the sample php.ini's (php.ini-recommended). No enabled extensions there, what I can see. [2003-11-18 17:13:06] [EMAIL PROTECTED] Are you loading any modules and/or extensions via php.ini? [2003-11-18 02:00:56] peoyli at bredband dot net PHP5 + MySQL 4.1 core dumps when calling mysql related functions (mysql_connect ...). I will try the internal support for mysql 4.0.16 or older. [2003-11-16 15:52:47] peoyli at bredband dot net One other note: I DID get it running using the internal mysql support (no path given to --with-mysql) after some hassle. I also now have PHP 5 running together with mysql 4.1.0 alpha. The problem seems to have something to do with mysql 4.0.16 (haven't tried earlier versions), although, as I mentioned before, there is not problem with mysql 4.0.16 by itself. [2003-11-16 15:48:40] peoyli at bredband dot net no output using 'apachectl configtest'. Seems like httpd crasches as soon as the LoadModule line is appended to the configuration. 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/26263 -- Edit this bug report at http://bugs.php.net/?id=26263edit=1
#26758 [NEW]: FastCGI exits immediately with status 255
From: tcarter at noggin dot com dot au Operating system: Linux PHP version: 5.0.0b3 (beta3) PHP Bug Type: CGI related Bug description: FastCGI exits immediately with status 255 Description: When launched from mod_fastcgi as a dynamic application the FastCGI binary exits with status 255 without serving any requests. The problem is present in the latest CVS, but not present in v4.3.4. The problem does not occur when running the FastCGI binary with a bindpath (-b) option. The problem seems to be that php_handle_aborted_connection() is called from the parent process in sapi_cgi_bin_flush() and zend_bailout() then exits because there is no bailout address set. Webserver is: Apache 2.0.47 (Fedora Core 1) mod_fastcgi 2.4.2 PHP Configuration is just: ./configure --enable-fastcgi The following seems to fix the problem, but I'm not sure it is the right way to fix it: --- cgi_main.c.bak 2004-01-01 12:38:22.0 +1100 +++ cgi_main.c 2004-01-01 12:39:34.0 +1100 @@ -271,7 +271,7 @@ #if PHP_FASTCGI if (!FCGX_IsCGI()) { FCGX_Request *request = (FCGX_Request *)server_context; - if(!request || FCGX_FFlush( request-out ) == -1 ) { + if( !parent (!request || FCGX_FFlush( request-out ) == -1) ) { php_handle_aborted_connection(); } return; Expected result: PHP should serve requests and not exit immediately Actual result: -- [Thu Jan 01 12:22:54 2004] [warn] FastCGI: scheduled the start of the last (dynamic) server /var/www/fastcgi-bin/php-5 process: reached dynamicMaxClassProcs (1) [Thu Jan 01 12:22:54 2004] [warn] FastCGI: (dynamic) server /var/www/fastcgi-bin/php-5 started (pid 17770) [Thu Jan 01 12:22:54 2004] [warn] FastCGI: (dynamic) server /var/www/fastcgi-bin/php-5 (pid 17770) terminated by calling exit with status '255' -- Edit bug report at http://bugs.php.net/?id=26758edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26758r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26758r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26758r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26758r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26758r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26758r=needscript Try newer version: http://bugs.php.net/fix.php?id=26758r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=26758r=support Expected behavior: http://bugs.php.net/fix.php?id=26758r=notwrong Not enough info:http://bugs.php.net/fix.php?id=26758r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=26758r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26758r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26758r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26758r=dst IIS Stability: http://bugs.php.net/fix.php?id=26758r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=26758r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26758r=float
#26734 [Bgs]: (or) and (||) not the same
ID: 26734 Updated by: [EMAIL PROTECTED] Reported By: red at ixney dot net Status: Bogus Bug Type: Scripting Engine problem Operating System: Irrelevant PHP Version: 4.3.4 New Comment: boolean and logical operators are the same thing (probably you thought of bitwise operators like |). The difference between || and or is the precedence. http://www.php.net/manual/en/language.operators.logical.php http://www.php.net/manual/en/language.operators.php#language.operators.precedence Previous Comments: [2003-12-28 22:14:16] [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 || is boolean or 'or' is logical or they are not the same [2003-12-28 21:37:58] [EMAIL PROTECTED] Nothing to do with Mysql, but more like a parser problem ?php $handle1 = fopen(test.php, r) or die(fopen failed); $handle2 = fopen(test.php, r) || die(fopen failed); var_dump($handle1, $handle2); // yields resource(stream) / bool(true) ? Apparently || casts the resource to bool (true) and assigns it to the variable. IMHO the || should either produce a parse error in this context or behave like 'or'. [2003-12-28 18:11:51] red at ixney dot net Description: I always thought '||' and 'or' was the same. Combined with a mysql_query() however, they are not. These lines are the same: mysql_query($var) or die(help!); mysql_query($var) || die(help!); where $var is a DROP, INSERT or CREATE query, but they are *not* the same if $var is a SELECT query; the returned value will not be a 'Resource ID' in the latter line. Reproduce code: --- mysql_query(DROP TABLE IF EXISTS foobar) || die('Cannot drop table'); mysql_query(CREATE TABLE IF NOT EXISTS foobar (foo INT NOT NULL AUTO_INCREMENT, bar TINYINT(1), PRIMARY KEY (foo))) || die('Cannot make table'); // Let's insert some random stuff mysql_query(INSERT INTO foobar (bar) VALUES (0)) || die('Cannot add values 1'); mysql_query(INSERT INTO foobar (bar) VALUES (1)) || die('Cannot add values 2'); mysql_query(INSERT INTO foobar (bar) VALUES (0)) or die('Cannot add values 3'); mysql_query(INSERT INTO foobar (bar) VALUES (1)) or die('Cannot add values 4'); $handle1 = mysql_query(SELECT * FROM foobar WHERE 1) || die('Cannot select'); $handle2 = mysql_query(SELECT * FROM foobar WHERE 1) or die('Cannot select'); echo '$handle1 is '.$handle1.'brbr'; echo '$handle2 is '.$handle2.'brbr'; Expected result: $handle1 is Resource id #2 $handle2 is Resource id #3 Actual result: -- $handle1 is 1 $handle2 is Resource id #3 -- Edit this bug report at http://bugs.php.net/?id=26734edit=1
#26734 [Bgs]: (or) and (||) not the same
ID: 26734 Updated by: [EMAIL PROTECTED] Reported By: red at ixney dot net Status: Bogus Bug Type: Scripting Engine problem Operating System: Irrelevant PHP Version: 4.3.4 New Comment: Yeap - I was reading the engine source - as that is what they are called there.. correct - the real difference is the precidence as documented pretty well in the manual (and comments) Previous Comments: [2003-12-31 21:10:40] [EMAIL PROTECTED] boolean and logical operators are the same thing (probably you thought of bitwise operators like |). The difference between || and or is the precedence. http://www.php.net/manual/en/language.operators.logical.php http://www.php.net/manual/en/language.operators.php#language.operators.precedence [2003-12-28 22:14:16] [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 || is boolean or 'or' is logical or they are not the same [2003-12-28 21:37:58] [EMAIL PROTECTED] Nothing to do with Mysql, but more like a parser problem ?php $handle1 = fopen(test.php, r) or die(fopen failed); $handle2 = fopen(test.php, r) || die(fopen failed); var_dump($handle1, $handle2); // yields resource(stream) / bool(true) ? Apparently || casts the resource to bool (true) and assigns it to the variable. IMHO the || should either produce a parse error in this context or behave like 'or'. [2003-12-28 18:11:51] red at ixney dot net Description: I always thought '||' and 'or' was the same. Combined with a mysql_query() however, they are not. These lines are the same: mysql_query($var) or die(help!); mysql_query($var) || die(help!); where $var is a DROP, INSERT or CREATE query, but they are *not* the same if $var is a SELECT query; the returned value will not be a 'Resource ID' in the latter line. Reproduce code: --- mysql_query(DROP TABLE IF EXISTS foobar) || die('Cannot drop table'); mysql_query(CREATE TABLE IF NOT EXISTS foobar (foo INT NOT NULL AUTO_INCREMENT, bar TINYINT(1), PRIMARY KEY (foo))) || die('Cannot make table'); // Let's insert some random stuff mysql_query(INSERT INTO foobar (bar) VALUES (0)) || die('Cannot add values 1'); mysql_query(INSERT INTO foobar (bar) VALUES (1)) || die('Cannot add values 2'); mysql_query(INSERT INTO foobar (bar) VALUES (0)) or die('Cannot add values 3'); mysql_query(INSERT INTO foobar (bar) VALUES (1)) or die('Cannot add values 4'); $handle1 = mysql_query(SELECT * FROM foobar WHERE 1) || die('Cannot select'); $handle2 = mysql_query(SELECT * FROM foobar WHERE 1) or die('Cannot select'); echo '$handle1 is '.$handle1.'brbr'; echo '$handle2 is '.$handle2.'brbr'; Expected result: $handle1 is Resource id #2 $handle2 is Resource id #3 Actual result: -- $handle1 is 1 $handle2 is Resource id #3 -- Edit this bug report at http://bugs.php.net/?id=26734edit=1
#8471 [Com]: Crash on infinite recursive calls.
ID: 8471 Comment by: swright at everestgt dot com Reported By: vgo at nrd dot lt Status: Wont fix Bug Type: Reproducible crash Operating System: Windows 2000 PHP Version: 4.0.4 New Comment: Is there a limit on the number of recursive loops one can have? I did a sample test script that looped only 1 times and it crashs after ~753 loops. It crashes PHP.exe (win2k) running it at command line or under apache. I do not always get an error. One I did get was FATAL: erealloc(): Unable to allocate 15 bytes. Thanks, Stan [EMAIL PROTECTED] - ?php function recursive1( $z ) { if ( $z 1 ) { return(10); } else { print p recursing $z /p; $z++; return( recursive1( $z ) ); } } $x = 1 ; print recursive1($x) ; ? Previous Comments: [2002-08-23 06:56:18] [EMAIL PROTECTED] never ever.. [2000-12-29 19:17:40] [EMAIL PROTECTED] Chanching to suspended on Jani's request [2000-12-29 18:58:53] [EMAIL PROTECTED] PHP does not do infinite recursions, and there is no way to protect or check for this without making things much slower. [2000-12-29 01:56:11] vgo at nrd dot lt General configuration: WEB server Apache 1.3.14 php 4.0.4 running as the module for Apache. The infinite recursive call causes Unknown softaware exception (0xc0fd) in Apache.exe Example: function checkIfLoggedIn() { checkIfLoggedIn(); } -- Edit this bug report at http://bugs.php.net/?id=8471edit=1
#26478 [Fbk-NoF]: Segfault under load with scripts that call MySQL
ID: 26478 Updated by: [EMAIL PROTECTED] Reported By: fillmore at nrcan dot gc dot ca -Status: Feedback +Status: No Feedback Bug Type: MySQL related Operating System: Solaris 8 (SPARC) PHP Version: 4.3.4 New Comment: 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. Previous Comments: [2003-12-16 14:57:27] [EMAIL PROTECTED] Please check your mysql settings.. (my.cnf for starters) [2003-12-16 14:47:20] fillmore at nrcan dot gc dot ca I installed MySQL client libraries 4.0.15 and rebuilt PHP with --with-mysql=/usr/local/mysql, and now the PHP script is failing with: Warning: mysql_connect(): Can't connect to MySQL server on 'aaa.bbb.xx.yy' (2) in /home1/fast1/WWW-data/cfs-scf/national/what-quoi/Solutions/index_e.php on line 7 (IP address is obscured as aaa.bbb.xx.yy) It works OK with the builtin MySQL support (with light load). [2003-12-09 06:14:16] [EMAIL PROTECTED] Please try compiling PHP with the external mysql client library, using --with-mysql=/mysql/install/prefix [2003-12-07 16:08:23] fillmore at nrcan dot gc dot ca I finally captured a core file, and with the gdb command info threads got this output for thread 25: 49 Thread 25 (LWP 17) _db_return_ (_line_=949, _sfunc_=0xfd3ee01c, _sfile_=0xfd3ee018, _slevel_=0xfd3ee014) at /home8/src/php/php-4.3.4/ext/mysql/libmysql/dbug.c:826 I can't get a full backtrace using bt, maybe because the SunONE modules don't have debug symbols? I'm not very familiar with gdb - how do you run bt for a specified thread? I tried thread 25 followed by bt, but it traced libthread.so: (gdb) thread 25 [Switching to thread 25 (Thread 1)] #0 0xfeb2826c in cond_wait () from /usr/lib/libthread.so.1 (gdb) bt #0 0xfeb2826c in cond_wait () from /usr/lib/libthread.so.1 #1 0xfeb28118 in pthread_cond_wait () from /usr/lib/libthread.so.1 #2 0xfed61a94 in PR_WaitCondVar () from /export/home/local/sunone/bin/https/lib/libnspr4.so #3 0xff298084 in __0fJWebServerDRunvT () from /export/home/local/sunone/bin/https/lib/libns-httpd40.so #4 0x10c44 in main () [2003-12-04 17:09:16] fillmore at nrcan dot gc dot ca There is no core file produced for process that crashes (not sure why), so I used truss to stop the process when it gets a FLTACCESS fault (bus or alignment error), then used pstack to do a stack trace of all the lightweight processes (threads), and here is the one for _db_return_: - lwp# 17 / thread# 27 fe4fa5c0 _db_return_ (b4, fd2bde9c, fd2bde98, fd2bde94, fd2bde98, fd2bde94) + 1 98 fe4eff98 vio_read (4, 105cb18, 4, 434c, fd2bdf38, 434c) + 144 fe4ef8f4 my_real_read (105c698, 434c, 950, 948, fe67ffa0, 2) + e4 fe4efc10 my_net_read (105c698, 8, 1, 0, 1bb9c, fea973e4) + 8 fe4ea5b8 net_safe_read (105c698, fe6176c0, 6cc, fd2be0ac, fd2be0a8, fd2be0a4) + 50 fe4ed2cc mysql_read_query_result (105c698, fd2be134, fd2be130, fd2be12c, 1, fd2 be12c) + 50 fe4ed5a4 mysql_real_query (105c698, 10754a8, 93, 105c560, 0, 2) + f8 fe4e6e9c php_mysql_do_query_general (d95398, 105c698, 2, 0, 4000, 105c5a8) + 46 4 fe4e70e0 php_mysql_do_query (1, 105c5a8, 0, 1, d7d178, 1) + d0 fe4e7108 zif_mysql_query (1, 105c5a8, 0, 1, d7d178, fe4e70f0) + 18 fe5ff208 execute (10611d8, d7d178, fd2be8e0, 3c00, d828c8, db79a8) + 63cc fe5e7de4 zend_execute_scripts (fe69f0a4, d7d178, 0, 3, fe69f404, fd2c1274) + 12 4 fe5abdcc php_execute_script (0, d7d178, 8000, a92340, d828cc, 65) + 334 fe609370 php4_execute (5de4c8, a4fd98, a4fde0, 4000, 0, 4000) + 4b4 ff239244 __0FNfunc_exec_strP6KFuncStructP6GpblockP6HSessionP6HRequest (6b7c8, 5 de4c8, a4fd98, a4fde0, 633, 0) + 1f0 ff23a434 INTobject_execute (5dfec8, a4fd98, a4fde0, a418c8, a4fce8, ff308000) + 56c ff23e0b4 INTservact_service (a4fd98, a4fde0, 0, 0, 0, ff308400) + 444 ff23e608 INTservact_handle_processed (a4fd98, a4fde0, 1, 5d2420, fffc, 0) + 140 ff27308c __0fLHttpRequestUUnacceleratedRespondPCcPc (a4fce8, a91478, ff317fd8, a4fde0, a4fd98, ff317c00) + 4e8 ff27268c __0fLHttpRequestNHandleRequestP6Gnetbuf (a4fce8, a91490, a91478, 2000, a8f460, ff317c00) + 590 ff270e3c __0fNDaemonSessionDrunv (a418c8, ff317800, ff317800, ff2720fc, e80 0, 0) + 40c ff11407c ThreadMain (a418c8, ff114054, feb4e000, 8, a502c8, 0) + 28 fed67698 _pt_root (a502c8, fed81074, 1, 5, 1, fe401000) + a4 feb3b744 _thread_start (a502c8, 0, 0, 0, 0, 0) + 40
#22394 [Com]: No libphp4.so module for Apache 2.0.44
ID: 22394 Comment by: msiemc at rogers dot com Reported By: apiotr at itm dot pcz dot czest dot pl Status: No Feedback Bug Type: Apache2 related Operating System: UnixWare 7.1.1 PHP Version: 4.3.2-dev New Comment: i have same problem on my Slackware 9, i have Apache 2.0.48 and trying to install PHP 4.3.4 ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-openssl --with-zlib --with-bz2 --enable-ftp --with-mime-magic --with-mysql=/usr/local/mysql --enable-sockets compiling goes smooth, but make install doesn't: Installing PHP CLI binary:/usr/local/bin/ Installing PHP CLI man page: /usr/local/man/man1/ Installing PHP SAPI module: apache2handler /usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp4.la /usr/local/apache2/modules /usr/local/apache2/build/libtool --mode=install cp libphp4.la /usr/local/apache2/modules/ cp .libs/libphp4.lai /usr/local/apache2/modules/libphp4.la cp .libs/libphp4.a /usr/local/apache2/modules/libphp4.a ranlib /usr/local/apache2/modules/libphp4.a chmod 644 /usr/local/apache2/modules/libphp4.a libtool: install: warning: remember to run `libtool --finish /root/php-4.3.4/libs' Warning! dlname not found in /usr/local/apache2/modules/libphp4.la. Assuming installing a .so rather than a libtool archive. chmod 755 /usr/local/apache2/modules/libphp4.so chmod: /usr/local/apache2/modules/libphp4.so: No such file or directory apxs:Error: Command failed with rc=65536 . make: *** [install-sapi] Error 1 Any ideas? I tried latest CVS and latest STABLE, but they didnt work either. Previous Comments: [2003-12-30 16:22:36] eldy at users dot sourceforge dot net I got the same problem, this is how i solved it: When running the ./configure, the libtool script built contained the line deplibs_check_method=unknown instead of deplibs_check_method=pass_all Since i use a linux os and on linux the check for lib dependencies is not required, the value should be pass_all. I don't know why the script ./configure put the wrong value because after removing the config.cache file and runing again the ./configure, the libtools script was edited correctly... and make compiled correctly the libphp4.so [2003-12-10 14:29:13] x-itec at freenet dot de I have no .so library, too. Using Suse 8.1 PI.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_execute.lo ext/readline/readline.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo main/internal_functions_cli.lo -lcrypt -lsablot -lexpat -lexpat -lexpat -lcrypt -lhistory -lreadline -lncurses -lpq -lmysqlclient -lming -lm -lmhash -lmcrypt -lltdl -liconv -lgmp -lt1 -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lxml2 -lxslt -lz -lcurl -lbz2 -lz -lssl -lcrypto -lresolv -lm -ldl -lnsl -lcurl -lz -lssl -lcrypto -ldl -lz -lxml2 -lz -liconv -lm -lcrypt -lcrypt -o sapi/cli/php Build complete. (It is safe to ignore warnings about tempnam and tmpnam). # make install Installing PHP CLI binary:/usr/local/bin/ Installing PHP CLI man page: /usr/local/man/man1/ Installing PHP SAPI module: apache2handler /usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' libphp4.la /usr/local/apache/modules /usr/local/apache/build/libtool --mode=install cp libphp4.la /usr/local/apache/modules/ cp .libs/libphp4.lai /usr/local/apache/modules/libphp4.la cp .libs/libphp4.a /usr/local/apache/modules/libphp4.a ranlib /usr/local/apache/modules/libphp4.a chmod 644 /usr/local/apache/modules/libphp4.a libtool: install: warning: remember to run `libtool --finish /home/bk/dl/php-4.3.4/libs' Warning! dlname not found in /usr/local/apache/modules/libphp4.la. Assuming installing a .so rather than a libtool archive. chmod 755 /usr/local/apache/modules/libphp4.so chmod: failed to get attributes of `/usr/local/apache/modules/libphp4.so': No such file or directory apxs:Error: Command failed with rc=65536 . make: *** [install-sapi] Error 1 [2003-09-15 09:55:35] codedv at sccode dot com I experience this exact problem too. I am on the verge of given up compiling PHP completely. My configure line is: $./configure --with-apxs2=/usr/local/apache2/bin/apxs I am attempting to compile PHP 4.3.3 on Redhat Linux 9. Before make install falls over it creates two files in my /usr/local/apache2/modules directory: libphp4.la libphp4.a However no trace of libphp4.so anywhere on my system. [2003-06-11 19:11:10] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing