#28870 [Opn->Asn]: mysqli_bind_result doesn't work with cloned objects
ID: 28870 Updated by: [EMAIL PROTECTED] Reported By: rodolfo at rodsoft dot org -Status: Open +Status: Assigned -Bug Type: *Database Functions +Bug Type: Zend Engine 2 problem Operating System: linux 2.6.7 PHP Version: 5.0.0RC3 -Assigned To: georg +Assigned To: helly New Comment: The problem is that we use ZVAL_ADDREF for bind variables (otherwise we had to rebind before every execute/fetch, which would be a significant performance loss). clone makes a binary copy of this object (and copies also the reference). Not sure if it's a bug. Changed category and assigned it to helly :) Previous Comments: [2004-06-21 23:53:23] rodolfo at rodsoft dot org A possible 'hack' that I've found is to bind the result to another variable before cloning, and just after that restore the bind to the original variable. This way the result is the expected one. It seems that there's a problem of how mysqli_bind_result stores the variable information while it is being cloned. [2004-06-21 18:35:56] rodolfo at rodsoft dot org Description: If you pass to mysqli_bind_result a member variable of an object that will be cloned and modified multiple times, each modification happens in all cloned objects, as if they weren't cloned copies, but a single copy of the object. Reproduce code: --- select_db('test'); $stmt = $db->prepare('SELECT a FROM test'); $stmt->execute(); $result = new stdclass; // Comment the next line to have the 'right' behaviour $stmt->bind_result($result->a); for($i = 0; $i<10; ++$i) { $result->a = $i; $results[] = clone $result; } foreach($results as $result) echo $result->a,"\n"; $db->close(); ?> Expected result: 0 1 2 3 4 5 6 7 8 9 Actual result: -- 9 9 9 9 9 9 9 9 9 9 -- Edit this bug report at http://bugs.php.net/?id=28870&edit=1
#28870 [Asn]: mysqli_bind_result doesn't work with cloned objects
ID: 28870 Updated by: [EMAIL PROTECTED] Reported By: rodolfo at rodsoft dot org Status: Assigned Bug Type: Zend Engine 2 problem -Operating System: linux 2.6.7 +Operating System: * -PHP Version: 5.0.0RC3 +PHP Version: 5.0.0 -Assigned To: helly +Assigned To: georg New Comment: $result->a / all bound variables are references. Hence the result shown is correct. What we need is either disallowing clone or finding a way to unbind the variables in clone and showing an error message in case someone wants to execute a query with a cloned statement before rebinding its columns. Previous Comments: [2004-08-07 11:01:48] [EMAIL PROTECTED] The problem is that we use ZVAL_ADDREF for bind variables (otherwise we had to rebind before every execute/fetch, which would be a significant performance loss). clone makes a binary copy of this object (and copies also the reference). Not sure if it's a bug. Changed category and assigned it to helly :) [2004-06-21 23:53:23] rodolfo at rodsoft dot org A possible 'hack' that I've found is to bind the result to another variable before cloning, and just after that restore the bind to the original variable. This way the result is the expected one. It seems that there's a problem of how mysqli_bind_result stores the variable information while it is being cloned. [2004-06-21 18:35:56] rodolfo at rodsoft dot org Description: If you pass to mysqli_bind_result a member variable of an object that will be cloned and modified multiple times, each modification happens in all cloned objects, as if they weren't cloned copies, but a single copy of the object. Reproduce code: --- select_db('test'); $stmt = $db->prepare('SELECT a FROM test'); $stmt->execute(); $result = new stdclass; // Comment the next line to have the 'right' behaviour $stmt->bind_result($result->a); for($i = 0; $i<10; ++$i) { $result->a = $i; $results[] = clone $result; } foreach($results as $result) echo $result->a,"\n"; $db->close(); ?> Expected result: 0 1 2 3 4 5 6 7 8 9 Actual result: -- 9 9 9 9 9 9 9 9 9 9 -- Edit this bug report at http://bugs.php.net/?id=28870&edit=1
#28870 [Asn]: mysqli_bind_result doesn't work with cloned objects
ID: 28870 Updated by: [EMAIL PROTECTED] Reported By: rodolfo at rodsoft dot org Status: Assigned -Bug Type: Zend Engine 2 problem +Bug Type: MySQL related Operating System: * PHP Version: 5.0.0 Assigned To: georg New Comment: $result->a / all bound variables are references. Hence the result shown is correct. What we need is either disallowing clone or finding a way to unbind the variables in clone and showing an error message in case someone wants to execute a query with a cloned statement before rebinding its columns. Previous Comments: [2004-08-07 11:24:43] [EMAIL PROTECTED] $result->a / all bound variables are references. Hence the result shown is correct. What we need is either disallowing clone or finding a way to unbind the variables in clone and showing an error message in case someone wants to execute a query with a cloned statement before rebinding its columns. [2004-08-07 11:01:48] [EMAIL PROTECTED] The problem is that we use ZVAL_ADDREF for bind variables (otherwise we had to rebind before every execute/fetch, which would be a significant performance loss). clone makes a binary copy of this object (and copies also the reference). Not sure if it's a bug. Changed category and assigned it to helly :) [2004-06-21 23:53:23] rodolfo at rodsoft dot org A possible 'hack' that I've found is to bind the result to another variable before cloning, and just after that restore the bind to the original variable. This way the result is the expected one. It seems that there's a problem of how mysqli_bind_result stores the variable information while it is being cloned. [2004-06-21 18:35:56] rodolfo at rodsoft dot org Description: If you pass to mysqli_bind_result a member variable of an object that will be cloned and modified multiple times, each modification happens in all cloned objects, as if they weren't cloned copies, but a single copy of the object. Reproduce code: --- select_db('test'); $stmt = $db->prepare('SELECT a FROM test'); $stmt->execute(); $result = new stdclass; // Comment the next line to have the 'right' behaviour $stmt->bind_result($result->a); for($i = 0; $i<10; ++$i) { $result->a = $i; $results[] = clone $result; } foreach($results as $result) echo $result->a,"\n"; $db->close(); ?> Expected result: 0 1 2 3 4 5 6 7 8 9 Actual result: -- 9 9 9 9 9 9 9 9 9 9 -- Edit this bug report at http://bugs.php.net/?id=28870&edit=1
#24071 [Csd->Opn]: 4.3.2 fopen("filename", "a") not place file pointer to the end.
ID: 24071 Updated by: [EMAIL PROTECTED] Reported By: artem at w510 dot tm dot odessa dot ua -Status: Closed +Status: Open -Bug Type: Documentation problem +Bug Type: Filesystem function related Operating System: redhat PHP Version: 4.3.2 New Comment: >From code at php-src/main/streams/streams.c:1693 (revision 1.61) it seems that this is supposed to work (but doesn't). if (stream && stream->ops->seek && (stream->flags & PHP_STREAM_FLAG_NO_SEEK) == 0 && strchr(mode, 'a') && stream->position == 0) { off_t newpos = 0; /* if opened for append, we need to revise our idea of the initial file position */ if (0 == stream->ops->seek(stream, 0, SEEK_CUR, &newpos TSRMLS_CC)) { stream->position = newpos; } } If it will be fixed, reclasify this back to docprob so we can add a note that it works since version x.x.x. (Spotted by [EMAIL PROTECTED]) Previous Comments: [2004-08-07 10:56:50] [EMAIL PROTECTED] This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. "ftell() gives undefined results for append-only streams (opened with "a" flag)." [2003-06-06 18:33:38] artem at w510 dot tm dot odessa dot ua maybe, but i used this without any problem from version 4.0 (one of first) to store initial append position - that' about some years... and it's worked through updates up to 4.2.3 [2003-06-06 18:11:03] [EMAIL PROTECTED] 'a' mode forces the kernel to always write at the end of the file. ftell() will give undefined results for append-only streams, as will seeking. Writing to such a file should always be appended, regardless of the results from ftell(). Making this a documentation problem. [2003-06-06 17:46:09] artem at w510 dot tm dot odessa dot ua after installing 4.3.2 $fr = fopen("filename", "a"); $pointer = ftell($fr); points to 0! forced to add fseek($fr, 0, SEEK_END); $pointer = ftell($fr); to move to the file end -- Edit this bug report at http://bugs.php.net/?id=24071&edit=1
#28870 [Asn->WFx]: mysqli_bind_result doesn't work with cloned objects
ID: 28870 Updated by: [EMAIL PROTECTED] Reported By: rodolfo at rodsoft dot org -Status: Assigned +Status: Wont fix Bug Type: MySQL related Operating System: * PHP Version: 5.0.0 Assigned To: georg New Comment: see previous explanation. Previous Comments: [2004-08-07 11:26:07] [EMAIL PROTECTED] $result->a / all bound variables are references. Hence the result shown is correct. What we need is either disallowing clone or finding a way to unbind the variables in clone and showing an error message in case someone wants to execute a query with a cloned statement before rebinding its columns. [2004-08-07 11:24:43] [EMAIL PROTECTED] $result->a / all bound variables are references. Hence the result shown is correct. What we need is either disallowing clone or finding a way to unbind the variables in clone and showing an error message in case someone wants to execute a query with a cloned statement before rebinding its columns. [2004-08-07 11:01:48] [EMAIL PROTECTED] The problem is that we use ZVAL_ADDREF for bind variables (otherwise we had to rebind before every execute/fetch, which would be a significant performance loss). clone makes a binary copy of this object (and copies also the reference). Not sure if it's a bug. Changed category and assigned it to helly :) [2004-06-21 23:53:23] rodolfo at rodsoft dot org A possible 'hack' that I've found is to bind the result to another variable before cloning, and just after that restore the bind to the original variable. This way the result is the expected one. It seems that there's a problem of how mysqli_bind_result stores the variable information while it is being cloned. [2004-06-21 18:35:56] rodolfo at rodsoft dot org Description: If you pass to mysqli_bind_result a member variable of an object that will be cloned and modified multiple times, each modification happens in all cloned objects, as if they weren't cloned copies, but a single copy of the object. Reproduce code: --- select_db('test'); $stmt = $db->prepare('SELECT a FROM test'); $stmt->execute(); $result = new stdclass; // Comment the next line to have the 'right' behaviour $stmt->bind_result($result->a); for($i = 0; $i<10; ++$i) { $result->a = $i; $results[] = clone $result; } foreach($results as $result) echo $result->a,"\n"; $db->close(); ?> Expected result: 0 1 2 3 4 5 6 7 8 9 Actual result: -- 9 9 9 9 9 9 9 9 9 9 -- Edit this bug report at http://bugs.php.net/?id=28870&edit=1
#29253 [Opn->Ver]: array_diff with $GLOBALS argument fails apache.(zend optimizer running)
ID: 29253 Updated by: [EMAIL PROTECTED] Reported By: camka at email dot ee -Status: Open +Status: Verified Bug Type: Arrays related Operating System: Unix, Win2000 PHP Version: 4.3.8 New Comment: To my knowledge array_diff* do not unset anything. I confirm the behaviour under 5.1.0-dev (of 7.Aug.2004) as well as with 4.2.3 (so this problem exists also in the old implementation of the function). The problem appears when only $GLOBALS is used, and the latter is a variable (array) with specific behaviour. Unfortunately I wasn't able to reproduce similar problem with one of the other array functions. Previous Comments: [2004-07-20 14:40:32] camka at email dot ee last win snapshot when optimizer is disabled gives the following notice message and doesn't crash Notice: Undefined variable: zz in c:\w\test\crashme.php on line 7 NULL seems like array_diff parameters are being unset inside the function [2004-07-20 02:44:32] [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 [2004-07-19 09:58:31] camka at email dot ee Description: when using array_diff with one of the parameters is $GLOBALS seems like the whole variable scope is messed up. Reproduce code: --- Expected result: expect seeing 'afad' and empty array; Actual result: -- array(0) { } Arra the length of "Arra" string depends on the length of $gg length; if uncomment the last line - apache child fails [Mon Jul 19 10:26:00 2004] [notice] child pid 10946 exit signal Segmentation fault (11 -- Edit this bug report at http://bugs.php.net/?id=29253&edit=1
#29421 [Opn->Ver]: array_search confusions
ID: 29421 Updated by: [EMAIL PROTECTED] Reported By: redeye at erisx dot de -Status: Open +Status: Verified Bug Type: Arrays related Operating System: * PHP Version: 5.0.0 New Comment: This will be more or less "Won't Fix" since it relies on the internal zend function for type comparison and according to the type juggling rules of PHP this is valid but not straight forward for anyone (even for me). Previous Comments: [2004-07-28 08:26:44] redeye at erisx dot de Description: When using array_search with strict set to FALSE will allways return the first matching element of an array, which is absolutly correct, but will also match every (boolean) TRUE value of an array (which is bad). This way, you could either hope no value is set to (boolean) TRUE or are forced to enable strict, which is not allways desired. This behavoir should either be better documented ( as is the behavior of FALSE ( "" , 0 , -1 , FALSE ) or changed to only match against ( "1" , 1 , "TRUE" , TRUE ). Reproduce code: --- $array = array ( 'foo' , TRUE , 'bar' ) ; $search = array_search ( 'baz' , $array ) ; var_dump ( $search ) ; Expected result: bool(false) Actual result: -- int(1) -- Edit this bug report at http://bugs.php.net/?id=29421&edit=1
#29548 [Opn]: Apache2/PHP Module crashes
ID: 29548 Updated by: [EMAIL PROTECTED] Reported By: tom at ideaweb dot de Status: Open -Bug Type: *XML functions +Bug Type: XSLT related Operating System: Debian Testing PHP Version: 4.3.8 New Comment: Looks like a problem in the XSLT/Sablotron extension of PHP 4.3 (not my area ;) ) Previous Comments: [2004-08-06 15:18:12] tom at ideaweb dot de Description: hi, i have a small content management system, which transforms xml documents to evaluated php templates. with huge data the apache2.0.50 crashes with the following message in the error log: httpd: domprovider.h:269: virtual SXP_NodeType DOMProviderUniversal::getNodeType(void*): Assertion `!! (external)' failed. [Mon Aug 02 20:15:58 2004] [notice] child pid 20982 exit signal Aborted (6) httpd: domprovider.h:269: virtual SXP_NodeType DOMProviderUniversal::getNodeType(void*): Assertion `!! (external)' failed. [Mon Aug 02 20:16:08 2004] [notice] child pid 21091 exit signal Aborted (6) httpd: domprovider.h:269: virtual SXP_NodeType DOMProviderUniversal::getNodeType(void*): Assertion `!! (external)' failed. [Mon Aug 02 20:23:50 2004] [notice] child pid 21440 exit signal Aborted (6) httpd: domprovider.h:269: virtual SXP_NodeType DOMProviderUniversal::getNodeType(void*): Assertion `!! (external)' failed. [Mon Aug 02 20:50:11 2004] [notice] child pid 28053 exit signal Aborted (6) httpd: domprovider.h:269: virtual SXP_NodeType DOMProviderUniversal::getNodeType(void*): Assertion `!! (external)' failed. [Mon Aug 02 20:52:20 2004] [notice] child pid 28197 exit signal Aborted (6) if i change some content in cdata notes, the transformation over sabltron xsl works in some cases again. with small documents no problem. Reproduce code: --- sorry its to complex to post this in 20 line. if you have questions contact me. Expected result: no crashes at any kind programming failures... Actual result: -- root:/etc/firewall# /www/apache/current/bin/httpd -X Aborted the apache webserver quits only with "Aborted",the the same error message in the error log and without a core file. ??? -- Edit this bug report at http://bugs.php.net/?id=29548&edit=1
#29559 [Opn->Bgs]: Compile failure with oci8 and Oracle 10
ID: 29559 Updated by: [EMAIL PROTECTED] Reported By: zaa397e at tninet dot se -Status: Open +Status: Bogus Bug Type: Compile Failure Operating System: Slackware/Linux 2.4.22 PHP Version: Irrelevant New Comment: Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. That's right, it was already fixed about a half-year ago. Try latest release. Previous Comments: [2004-08-07 00:36:03] zaa397e at tninet dot se Description: I have an old version of php (4.3.3), but I hardly ever use it anyway. Anyhow I did use briefly it to connect with an Oracle 10.1 database, which required a few changes to use oci8 that I thought I could document before forgetting all about it. So, anyway, what I had to do to get oci8 to compile and at least work to the extent that I tried was: In file ext/oci8/oci8.c >>> line 4804 CALL_OCI_RETURN(connection->error, OCICollAppend( connection->session->pEnv, connection->pError, - (dword *)0, + (dvoid *)0, &null_ind, coll->coll)); >>> line 5110 connection->session->pEnv, connection->pError, ndx, - (dword *)0, + (dvoid *)0, &null_ind, coll->coll)); >>> line 5143 connection->session->pEnv, connection->pError, ndx, - (dword *)&dt, + (dvoid *)&dt, &new_ind, coll->coll)); >>> line 5171 connection->session->pEnv, connection->pError, ndx, - (dword *)ocistr, + (dvoid *)ocistr, &new_ind, coll->coll)); >>> line 5210 connection->session->pEnv, connection->pError, ndx, - (dword *)&num, + (dvoid *)&num, &new_ind, coll->coll)); Maybe you have fixed this a long time ago and just should update the documentation to say that it might already work with Oracle 10. You should definitely not apply any of these changes without considering older versions of Oracle (which I didn't feel I had to). Use it if it is of any value to you. Rest assured that I will never trouble you with another comment again. -- Edit this bug report at http://bugs.php.net/?id=29559&edit=1
#29560 [Opn->Fbk]: Listening on non-blocking socket leaks memory
ID: 29560 Updated by: [EMAIL PROTECTED] Reported By: info at tphnet dot com -Status: Open +Status: Feedback Bug Type: Sockets related Operating System: Windows XP SP1 PHP Version: 5.0.0 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Previous Comments: [2004-08-07 03:01:35] info at tphnet dot com Description: I've been trying to write a simple multi-client server application in PHP. Everything is working just fine, the only problem is that the server is leaking memory. Reproduce code: --- $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_bind($socket, 'localhost', 1234); socket_listen($socket); socket_set_nonblock($socket); while(true){ $new_connection = @socket_accept($socket); unset($new_connection); } Expected result: The above server will accept connections on localhot:1234 and will disconnect you directly after you connect. The socket is setup in non-blocking mode, so that with a couple of minor modifications it becomes possible to handle multiple clients at the same time. Actual result: -- The code does exactly what it is supposed to do, but its memory use increases very fast. It fills up my 512 megs in about a minute. The memory leak occours in the socket_accept() function. Removing this line will stop the memory leak from occouring. If you remove the socket_set_nonblock() function it also does not leak memory anymore. This seems kind of logical because the script will "hang" on the socket_accept() function instead of looping over it constantly. In the version of the script I'm actually using, a "usleep(10)" has been added in the while loop to make sure the script doesn't consume all available resources, but the memory leak still remains. Although it takes much longer to fill all memory because socket_accept() is called less frequent. Removing the "@" sign infront of the socket_accept() function causes the following two errors to be printed on the console for every call to socket_accpet(): Warning: socket_accept(): unable to accept incoming connection [0]: Een niet-blokkerende socketbewerking kan niet onmiddellijk worden voltooid. Warning: socket_accept(): unable to accept socket connection [0]: De bewerking is voltooid. The first error roughly translates to "A non-blocking socket action cannot be executed immediately" and the second to "The action has been completed". I'm not really an expert on sockets so I'm not sure if my script is just flawed or this is a real bug. I've used the above code in a somewhat more advanced form to create a small POP3 server. This server is functioning just fine, the only problem is that it is leaking memory. -- Edit this bug report at http://bugs.php.net/?id=29560&edit=1
#29560 [Fbk]: Listening on non-blocking socket leaks memory
ID: 29560 Updated by: [EMAIL PROTECTED] Reported By: info at tphnet dot com Status: Feedback Bug Type: Sockets related Operating System: Windows XP SP1 PHP Version: 5.0.0 New Comment: Urgh, ignore that (clicked wrong link). The sockets extension is unmaintained. Try stream_socket_create() and fiends instead. Previous Comments: [2004-08-07 14:50:11] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2004-08-07 03:01:35] info at tphnet dot com Description: I've been trying to write a simple multi-client server application in PHP. Everything is working just fine, the only problem is that the server is leaking memory. Reproduce code: --- $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_bind($socket, 'localhost', 1234); socket_listen($socket); socket_set_nonblock($socket); while(true){ $new_connection = @socket_accept($socket); unset($new_connection); } Expected result: The above server will accept connections on localhot:1234 and will disconnect you directly after you connect. The socket is setup in non-blocking mode, so that with a couple of minor modifications it becomes possible to handle multiple clients at the same time. Actual result: -- The code does exactly what it is supposed to do, but its memory use increases very fast. It fills up my 512 megs in about a minute. The memory leak occours in the socket_accept() function. Removing this line will stop the memory leak from occouring. If you remove the socket_set_nonblock() function it also does not leak memory anymore. This seems kind of logical because the script will "hang" on the socket_accept() function instead of looping over it constantly. In the version of the script I'm actually using, a "usleep(10)" has been added in the while loop to make sure the script doesn't consume all available resources, but the memory leak still remains. Although it takes much longer to fill all memory because socket_accept() is called less frequent. Removing the "@" sign infront of the socket_accept() function causes the following two errors to be printed on the console for every call to socket_accpet(): Warning: socket_accept(): unable to accept incoming connection [0]: Een niet-blokkerende socketbewerking kan niet onmiddellijk worden voltooid. Warning: socket_accept(): unable to accept socket connection [0]: De bewerking is voltooid. The first error roughly translates to "A non-blocking socket action cannot be executed immediately" and the second to "The action has been completed". I'm not really an expert on sockets so I'm not sure if my script is just flawed or this is a real bug. I've used the above code in a somewhat more advanced form to create a small POP3 server. This server is functioning just fine, the only problem is that it is leaking memory. -- Edit this bug report at http://bugs.php.net/?id=29560&edit=1
#29560 [Fbk->Opn]: Listening on non-blocking socket leaks memory
ID: 29560 User updated by: info at tphnet dot com Reported By: info at tphnet dot com -Status: Feedback +Status: Open Bug Type: Sockets related Operating System: Windows XP SP1 PHP Version: 5.0.0 New Comment: I changed to code to the following: There is no memory leak anymore and everything is working as expected. It appears the problem is solved. Previous Comments: [2004-08-07 15:07:44] [EMAIL PROTECTED] Urgh, ignore that (clicked wrong link). The sockets extension is unmaintained. Try stream_socket_create() and fiends instead. [2004-08-07 14:50:11] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2004-08-07 03:01:35] info at tphnet dot com Description: I've been trying to write a simple multi-client server application in PHP. Everything is working just fine, the only problem is that the server is leaking memory. Reproduce code: --- $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_bind($socket, 'localhost', 1234); socket_listen($socket); socket_set_nonblock($socket); while(true){ $new_connection = @socket_accept($socket); unset($new_connection); } Expected result: The above server will accept connections on localhot:1234 and will disconnect you directly after you connect. The socket is setup in non-blocking mode, so that with a couple of minor modifications it becomes possible to handle multiple clients at the same time. Actual result: -- The code does exactly what it is supposed to do, but its memory use increases very fast. It fills up my 512 megs in about a minute. The memory leak occours in the socket_accept() function. Removing this line will stop the memory leak from occouring. If you remove the socket_set_nonblock() function it also does not leak memory anymore. This seems kind of logical because the script will "hang" on the socket_accept() function instead of looping over it constantly. In the version of the script I'm actually using, a "usleep(10)" has been added in the while loop to make sure the script doesn't consume all available resources, but the memory leak still remains. Although it takes much longer to fill all memory because socket_accept() is called less frequent. Removing the "@" sign infront of the socket_accept() function causes the following two errors to be printed on the console for every call to socket_accpet(): Warning: socket_accept(): unable to accept incoming connection [0]: Een niet-blokkerende socketbewerking kan niet onmiddellijk worden voltooid. Warning: socket_accept(): unable to accept socket connection [0]: De bewerking is voltooid. The first error roughly translates to "A non-blocking socket action cannot be executed immediately" and the second to "The action has been completed". I'm not really an expert on sockets so I'm not sure if my script is just flawed or this is a real bug. I've used the above code in a somewhat more advanced form to create a small POP3 server. This server is functioning just fine, the only problem is that it is leaking memory. -- Edit this bug report at http://bugs.php.net/?id=29560&edit=1
#29560 [Opn]: Listening on non-blocking socket leaks memory
ID: 29560 User updated by: info at tphnet dot com Reported By: info at tphnet dot com Status: Open Bug Type: Sockets related Operating System: Windows XP SP1 PHP Version: 5.0.0 New Comment: I can confirm the memory leak that I described in my original bug report has disappeard. BUT, I found a new memory leak inside the stream_socket_accept() function. If you set the third argument peername to a variable, the function will leak a little bit of memory everytime it's called. The effect is the same as with the original bug in socket_accpet(). Just modify the example in my previous reply by changing $new_connection = @stream_socket_accept($socket, 0); into $new_connection = @stream_socket_accept($socket, 0, $peer); and see what happens. In my case (Windows XP, php 5.0.0 CLI) the script starts leaking memory. Previous Comments: [2004-08-07 17:55:35] info at tphnet dot com I changed to code to the following: There is no memory leak anymore and everything is working as expected. It appears the problem is solved. [2004-08-07 15:07:44] [EMAIL PROTECTED] Urgh, ignore that (clicked wrong link). The sockets extension is unmaintained. Try stream_socket_create() and fiends instead. [2004-08-07 14:50:11] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2004-08-07 03:01:35] info at tphnet dot com Description: I've been trying to write a simple multi-client server application in PHP. Everything is working just fine, the only problem is that the server is leaking memory. Reproduce code: --- $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_bind($socket, 'localhost', 1234); socket_listen($socket); socket_set_nonblock($socket); while(true){ $new_connection = @socket_accept($socket); unset($new_connection); } Expected result: The above server will accept connections on localhot:1234 and will disconnect you directly after you connect. The socket is setup in non-blocking mode, so that with a couple of minor modifications it becomes possible to handle multiple clients at the same time. Actual result: -- The code does exactly what it is supposed to do, but its memory use increases very fast. It fills up my 512 megs in about a minute. The memory leak occours in the socket_accept() function. Removing this line will stop the memory leak from occouring. If you remove the socket_set_nonblock() function it also does not leak memory anymore. This seems kind of logical because the script will "hang" on the socket_accept() function instead of looping over it constantly. In the version of the script I'm actually using, a "usleep(10)" has been added in the while loop to make sure the script doesn't consume all available resources, but the memory leak still remains. Although it takes much longer to fill all memory because socket_accept() is called less frequent. Removing the "@" sign infront of the socket_accept() function causes the following two errors to be printed on the console for every call to socket_accpet(): Warning: socket_accept(): unable to accept incoming connection [0]: Een niet-blokkerende socketbewerking kan niet onmiddellijk worden voltooid. Warning: socket_accept(): unable to accept socket connection [0]: De bewerking is voltooid. The first error roughly translates to "A non-blocking socket action cannot be executed immediately" and the second to "The action has been completed". I'm not really an expert on sockets so I'm not sure if my script is just flawed or this is a real bug. I've used the above code in a somewhat more advanced form to create a small POP3 server. This server is functioning just fine, the only problem is that it is leaking memory. -- Edit this bug report at http://bugs.php.net/?id=29560&edit=1
#29562 [NEW]: global variable not available when sourced by include()
From: darcy at 1000camels dot com Operating system: Linux, MacOSX PHP version: 4.3.8 PHP Bug Type: Scripting Engine problem Bug description: global variable not available when sourced by include() Description: This is a somewhat complicated bug to demonstrate. i have placed files online so that the behaviour can be demonstrated. Essentially, the bug is that when you include a php script using include() with a relative url (not absolute), global variables used within a function in the sourced code are not available. this seems to occur only when the original include() is within a class or function. if it is in open code, it works find. it's a complex bug and i'm not sure the best way to analyze. Reproduce code: --- http://1000camels.com/phpBug/ four files (and their source): test-open-code.php - works test-within-class.php - does not work test-within-function.php - does not work testMod.php - code which is being sourced Expected result: i expect the global variable to be available Actual result: -- the global variable (in my example $anObject and $aVariable) are not available. -- Edit bug report at http://bugs.php.net/?id=29562&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29562&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29562&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29562&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29562&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29562&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29562&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29562&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29562&r=support Expected behavior: http://bugs.php.net/fix.php?id=29562&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29562&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29562&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29562&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29562&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29562&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29562&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29562&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29562&r=float
#29563 [NEW]: locking problem
From: tom at bitworks dot de Operating system: Debian Linux Woody & Apache/1.3. PHP version: 4.3.8 PHP Bug Type: Filesystem function related Bug description: locking problem Description: There seam to be several logical implementation faults, concerning flock() and dio_open() 1.) Opening a file by the first process with $fh = dio_open($dateiname,O_RDWR + O_NONBLOCK ,0 ); does not trigger a failure opening the file twice by an other process with the same method You always get the ressource handle 2.) Opening the file twice, after having opened with upper method, by the flock(..., LOCK_NB) function, causes a waiststate for the flock() process. That problem should be solved. Remark: Mandatory locking on LINUX only works, if You mount the volume with option "mand" (-o mand) (missing Information in documentation) Programs like vi nevertheless are able to override the "mandatory locking" with the "x!" command. (only checked for a LINUX Debian Woody system) Expected result: Triggering a failure (return false) Actual result: -- Waiting for locking -- Edit bug report at http://bugs.php.net/?id=29563&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29563&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29563&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29563&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29563&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29563&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29563&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29563&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29563&r=support Expected behavior: http://bugs.php.net/fix.php?id=29563&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29563&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29563&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29563&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29563&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29563&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29563&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29563&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29563&r=float
#29564 [NEW]: Cannot load the MySQL extension
From: justlinux at walla dot com Operating system: Windows XP Proffesional PHP version: 5.0.0 PHP Bug Type: MySQL related Bug description: Cannot load the MySQL extension Description: My configuration: IIS 5.1 PHP 5.0.0 MySQL 4.0 Microsoft Windows XP Proffesional phpMyAdmin 2.5.7-pl1 What i did: I'd uncomment the line for the MySQL extension. Because that didn't work, I'd copy 'libmySQL.dll' (from my MySQL installation) to my PHP installation folder and changed the name in 'php.ini'. When that didn't work, I'd change everything back to the defaults. It did ocur when I'd try to load phpMyAdmin. I'm sorry i can't give you the address of the server, because it's a testing box and it's not connected to the Internet. Reproduce code: --- --- default: --- ;extension=php_mysql.dll --- 1st change: --- extension=php_mysql.dll --- 2nd change: --- extension=libmySQL.dll --- 3nd change: --- ;extension=php_mysql.dll Expected result: The default phpMyAdmin screen Actual result: -- A MsgBox that says that the MySQL extension can't be found, and then a screen that tells me that there is no MySQL extension available. -- Edit bug report at http://bugs.php.net/?id=29564&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29564&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29564&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29564&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29564&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29564&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29564&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29564&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29564&r=support Expected behavior: http://bugs.php.net/fix.php?id=29564&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29564&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29564&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29564&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29564&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29564&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29564&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29564&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29564&r=float
#29490 [Com]: 'Failed to instantiate .Net object' using PHP.NET docu example
ID: 29490 Comment by: christian at wenz dot org Reported By: mike at ziebeck dot net Status: Open Bug Type: COM related Operating System: Windows 2000 PHP Version: 5.0.0 New Comment: FWIW, I can reproduce it with Windowx XP Pro, German, SP1 + all available patches with PHP 5.1.0-dev, current snapshot as CGI and .NET Framework 1.1 IIS 5.1 Windowx XP Pro, German, SP1 + all available patches with PHP 5.1.0-dev, current snapshot as CGI and .NET Framework 1.1 Apache 1.3.31 Windowx XP Home, German, SP1 + all available patches with PHP 5.1.0-dev, current snapshot as CGI and .NET Framework 1.0SP1 Apache 2.0.50 Windowx XP Pro, German, SP1 + all available patches with PHP 5.1.0-dev, current snapshot as CGI and .NET Framework 1.0 IIS 5.1 I'll try to test it on more systems tomorrow. Previous Comments: [2004-08-05 09:25:19] mike at ziebeck dot net I've additionaly tryed to get the example with: PHP 5.1.0-dev (cli) (built: Aug 4 2004 08:29:44) running on a development machine. MS .NET Studio 2003 Enterprise Architect MS .NET Frame Work SDK 1.1 MS Platform SDK February 2003 same results :( [2004-08-05 08:14:14] matthias dot haldimann at epfl dot ch Though this might not help a lot, it might still be interesting to note that I continue to have the exact same problem, under Windowx XP, English, SP1 + all available patches with PHP 5.1.0-dev, Snapshot Aug 5 2004 04:15:53 and .NET Framework 1.1 Matthias [2004-08-04 18:23:07] mike at ziebeck dot net There's been a typo: c:\Programme\php\php5.php.ini is c:\Programme\php\php5.ini Sorry for that. mz. [2004-08-04 18:18:50] mike at ziebeck dot net Software Setup: Windows 2000 pro (german) clean install (Service Pack 4) .NET: MS DotNET FrameWork RTL 1.1 USER: Administrator unpack: php5-win32-200408040230.zip => c:\Programme\php\php5 copy: c:\Programme\php\php5.php.ini-dist c:\Programme\php\php5.php.ini copy: tst_DotNet.php c:\Programme\php\tst_DotNet.php >php -c c:\Programme\php\php5\php.ini -f tst_DotNet.php Fatal error: Uncaught exception 'com_exception' with message 'Failed to instantiate .Net object [IDispatch_Invoke] Ausnahmefehler aufgetreten.' in c:\Programme\php\php5\tst_DotNet.php:2 Stack trace: #0 {main} thrown in c:\Programme\php\php5\tst_DotNet.php on line 2 No files (*.ini, *.dll) have been (re)placed in windows system folders. Working directory: c:\Programme\php\php5 Kind Regards mz. [2004-08-04 15:03:10] [EMAIL PROTECTED] :-( Suffice to say that it does work here for me. Is there anything else you can try to troubleshoot ? Service packs/upgrades, permissions and so on. Without more information, we can't find the cause of 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/29490 -- Edit this bug report at http://bugs.php.net/?id=29490&edit=1
#29469 [Opn->Bgs]: Funktion mail() needs a long time to generate the Next output Page, like some
ID: 29469 Updated by: [EMAIL PROTECTED] Reported By: wowtyp at gmx dot de -Status: Open +Status: Bogus Bug Type: Performance problem Operating System: Suse 8.2 PHP Version: 4.3.8 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. PHP just passes the generated mail on to the sendmail binary on Unix. As the mail() code will wait for this sendmail subprocess exit code before returning it is actually a problem of your sendmail installation on that box, not a PHP problem Previous Comments: [2004-07-31 19:54:43] wowtyp at gmx dot de all is running with sendmail [2004-07-31 19:49:01] wowtyp at gmx dot de Description: Funktion mail() needs a long time to generate the Next output Page, like some Formmailers which are runnig without Probs on other Servers -- Edit this bug report at http://bugs.php.net/?id=29469&edit=1
#29370 [Com]: Crash apache.exe (php5ts.dll)
ID: 29370 Comment by: skippy at zuavra dot net Reported By: anthony dot debhian at only-for dot info Status: Open Bug Type: Reproducible crash Operating System: Windows XP PHP Version: 5.0.0 New Comment: Nothing special happens on Red Hat 9.0 with Apache 1.3.27, PHP 4.3.4. Just the normal complaint about foreach(). Previous Comments: [2004-07-26 10:16:17] John at wargan dot org For info: This bug does'nt work on apache 1.3.24 & php 4.2.5 under Redhat and slackware. It seems to only be avalaible on Windows...as often ;) [2004-07-26 10:16:17] John at wargan dot org For info: This bug does'nt work on apache 1.3.24 & php 4.2.5 under Redhat and slackware. It seems to only be avalaible on Windows...as often ;) John JEAN [2004-07-25 23:17:08] anthony dot debhian at only-for dot info Unhandled exception in Apache.exe (PHP5TS.DLL): 0xC005: Access Violation. Offset: 7344 The error report display C:\DOCUME~1\Anthony\LOCALS~1\Temp\WER689.tmp.dir00\Apache.exe.mdmp C:\DOCUME~1\Anthony\LOCALS~1\Temp\WER689.tmp.dir00\appcompat.txt No more info on the error report :-\ sorry [2004-07-25 21:37:55] grayw at mail dot montclair dot edu Can you provide the 'crash' output? Since this is for windows, is there anything relevant in the logs you can view from Event Viewer? In there you would see any messages relating to an kernel, application, or service crash? [2004-07-25 12:42:55] ahtin at hot dot ee i got the same obscure crash with php 5.0 + apache 2.0.48 on win98se with this code snippet: - db_fetch_row($s)) { $x['birthday'].=$this->parse_tpl("k_links",$s2); } ?> no errors, just apache crash 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/29370 -- Edit this bug report at http://bugs.php.net/?id=29370&edit=1
#29566 [NEW]: foreach/string handling strangeness (crash)
From: stefan at hotpaenz dot de Operating system: Linux 2.6.3 PHP version: 5CVS-2004-08-07 (dev) PHP Bug Type: Reproducible crash Bug description: foreach/string handling strangeness (crash) Description: Consider the following code. Of course it isn't useful, but nevertheless it shouldn't crash PHP. Perhaps this is related to bug 28487 (another crash, affecting real-world scripts) because the same function zend_switch_free_handler is involved. Perhaps this is the same bug as 28574, which was closed as the problem went away. The crash I am reporting now occurs with a current snapshot (200408071830). Reproduce code: --- size); (gdb) bt #0 _efree (ptr=0x75736f6e) at /root/php/200408071830/php5-5.0.0/Zend/zend_alloc.c:285 #1 0x082424f8 in _zval_ptr_dtor (zval_ptr=0xbfffd698) at /root/php/200408071830/php5-5.0.0/Zend/zend_execute_API.c:396 #2 0x0827288b in zend_switch_free_handler (execute_data=0xbfffd710, opline=0x872749c, op_array=0x8722f24, tsrm_ls=0x8431018) at /root/php/200408071830/php5-5.0.0/Zend/zend_execute.c:210 #3 0x0826ce85 in execute (op_array=0x8722f24, tsrm_ls=0x8431018) at /root/php/200408071830/php5-5.0.0/Zend/zend_execute.c:1400 #4 0x0824d971 in zend_execute_scripts (type=8, tsrm_ls=0x8431018, retval=0x0, file_count=3) at /root/php/200408071830/php5-5.0.0/Zend/zend.c:1068 #5 0x08210ab4 in php_execute_script (primary_file=0xbae0, tsrm_ls=0x8431018) at /root/php/200408071830/php5-5.0.0/main/main.c:1631 #6 0x08279bec in main (argc=2, argv=0xbba4) at /root/php/200408071830/php5-5.0.0/sapi/cgi/cgi_main.c:1568 -- Edit bug report at http://bugs.php.net/?id=29566&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29566&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29566&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29566&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29566&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29566&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29566&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29566&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29566&r=support Expected behavior: http://bugs.php.net/fix.php?id=29566&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29566&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29566&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29566&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29566&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29566&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29566&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29566&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29566&r=float
#29358 [Fbk->NoF]: PHP segfaults during shutdown because of custom stream wrapper
ID: 29358 Updated by: [EMAIL PROTECTED] Reported By: swalk at prp dot physik dot tu-darmstadt dot de -Status: Feedback +Status: No Feedback Bug Type: Reproducible crash Operating System: Linux PHP Version: 5CVS-2004-07-23 (dev) New Comment: No feedback was provided for this bug for over a week, 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: [2004-07-30 01:31:58] [EMAIL PROTECTED] Works fine here. It sounds like something else is causing the problem; please troubleshoot using valgrind, and/or eliminating extensions from your build. [2004-07-29 21:51:40] [EMAIL PROTECTED] Still the same. [EMAIL PROTECTED]:~/downloads/sources/testing/php5-200407291830$ sapi/cli/php -r 'class a {} stream_register_wrapper("a","a"); php_check_syntax("http://localhost/test.txt";);' Segmentation fault [2004-07-29 14:02:30] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2004-07-23 21:46:35] swalk at prp dot physik dot tu-darmstadt dot de Description: If i have any custom wrapper registered, and try to include or php_check_syntax() a file with a parse error in it, php segfaults during shutdown. Reproduce code: --- $ php -r 'class a {} stream_register_wrapper("a","a"); php_check_syntax("http://localhost/test.txt";);' Segmentation fault test.txt contains just: http://bugs.php.net/?id=29358&edit=1
#25876 [Com]: session_start(): Failed to initialize storage module
ID: 25876 Comment by: mail at ferryviuk dot nl Reported By: golden at riscom dot com Status: Closed Bug Type: Session related Operating System: freebsd 4.8 PHP Version: 4.3.3 New Comment: Got the "Failed to initialize session module" error as well. The session.save_handler reset to files worked when I also restarted the webserver! Seems logical but can easily be forgotten. Didn't see it in al these posts. Hell, I almost installed a new and fresh php4. hope it helps. Cheers FHV Previous Comments: [2004-07-07 12:15:12] jenokz at yahoo dot com Hi, Im using php4.3.7 on FreeBSD 4.10-STABLE. The problem is session saved to /tmp but without values on it. I've try recompile it and im still get this problem, session not works. PS: /tmp is writeable and avaiable space on it. [2004-07-04 16:22:56] paulridge at ukwsd dot com We are experiencing this also on 4.3.3; RH9. tmp folder is chmod 777. Our php is compiled as follows: './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--with-ming=../ming-0.2a' '--enable-magic-quotes' '--with-mysql=/usr' '--enable-discard-path' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib' [2004-06-18 00:20:06] searchadm at goschorn dot de forgot to tell ... permissions on /tmp set to 777 session__handling is set to file after apachectl restart it works again for some days and then the problem returned [2004-06-17 20:37:29] mitch at webcob dot com Having this problem again too. I WAS having this problem with FreeBSD 4.4 / Apache 1.3.27 / PHP 4.3.2. The problem started happening again a couple days ago... Seems to be a Heisenbug - ever time I add code to output debug info and restart apache, the problem seems to have disappeared or moved to a different website / vhost. Problem does not seem to happen on all vhosts at the same time... Just upgraded to PHP 4.3.7 The problem still persists. I have done all the recommended "fixes" - checking disk space, permissions, changing storage location, etc. Am currently working on a db based storage moduel to include on all sites experiencing the problem as in interrum fix. Please CC me on any updates. thanks. [2004-06-17 10:18:10] searchadm at goschorn dot de PHP Fatal error: session_start(): Failed to initialize storage module: user (path: /tmp) in ... PHP 4.3.7 (4.3.4 also) Apache 2.0.48 Suse Linux 8.2 after apachectl restart it works again for a while 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/25876 -- Edit this bug report at http://bugs.php.net/?id=25876&edit=1
#25876 [Com]: session_start(): Failed to initialize storage module
ID: 25876 Comment by: mail at ferryvink dot nl Reported By: golden at riscom dot com Status: Closed Bug Type: Session related Operating System: freebsd 4.8 PHP Version: 4.3.3 New Comment: Typo in the email address of my last post. ... Previous Comments: [2004-08-08 01:00:42] mail at ferryviuk dot nl Got the "Failed to initialize session module" error as well. The session.save_handler reset to files worked when I also restarted the webserver! Seems logical but can easily be forgotten. Didn't see it in al these posts. Hell, I almost installed a new and fresh php4. hope it helps. Cheers FHV [2004-07-07 12:15:12] jenokz at yahoo dot com Hi, Im using php4.3.7 on FreeBSD 4.10-STABLE. The problem is session saved to /tmp but without values on it. I've try recompile it and im still get this problem, session not works. PS: /tmp is writeable and avaiable space on it. [2004-07-04 16:22:56] paulridge at ukwsd dot com We are experiencing this also on 4.3.3; RH9. tmp folder is chmod 777. Our php is compiled as follows: './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--with-ming=../ming-0.2a' '--enable-magic-quotes' '--with-mysql=/usr' '--enable-discard-path' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib' [2004-06-18 00:20:06] searchadm at goschorn dot de forgot to tell ... permissions on /tmp set to 777 session__handling is set to file after apachectl restart it works again for some days and then the problem returned [2004-06-17 20:37:29] mitch at webcob dot com Having this problem again too. I WAS having this problem with FreeBSD 4.4 / Apache 1.3.27 / PHP 4.3.2. The problem started happening again a couple days ago... Seems to be a Heisenbug - ever time I add code to output debug info and restart apache, the problem seems to have disappeared or moved to a different website / vhost. Problem does not seem to happen on all vhosts at the same time... Just upgraded to PHP 4.3.7 The problem still persists. I have done all the recommended "fixes" - checking disk space, permissions, changing storage location, etc. Am currently working on a db based storage moduel to include on all sites experiencing the problem as in interrum fix. Please CC me on any updates. thanks. 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/25876 -- Edit this bug report at http://bugs.php.net/?id=25876&edit=1
#29490 [Opn->Csd]: 'Failed to instantiate .Net object' using PHP.NET docu example
ID: 29490 Updated by: [EMAIL PROTECTED] Reported By: mike at ziebeck dot net -Status: Open +Status: Closed Bug Type: COM related Operating System: Windows 2000 PHP Version: 5.0.0 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. Thanks to Michael Sisolak, this bug has been resolved. Try the next snapshot. Previous Comments: [2004-08-07 22:40:23] christian at wenz dot org FWIW, I can reproduce it with Windowx XP Pro, German, SP1 + all available patches with PHP 5.1.0-dev, current snapshot as CGI and .NET Framework 1.1 IIS 5.1 Windowx XP Pro, German, SP1 + all available patches with PHP 5.1.0-dev, current snapshot as CGI and .NET Framework 1.1 Apache 1.3.31 Windowx XP Home, German, SP1 + all available patches with PHP 5.1.0-dev, current snapshot as CGI and .NET Framework 1.0SP1 Apache 2.0.50 Windowx XP Pro, German, SP1 + all available patches with PHP 5.1.0-dev, current snapshot as CGI and .NET Framework 1.0 IIS 5.1 I'll try to test it on more systems tomorrow. [2004-08-05 09:25:19] mike at ziebeck dot net I've additionaly tryed to get the example with: PHP 5.1.0-dev (cli) (built: Aug 4 2004 08:29:44) running on a development machine. MS .NET Studio 2003 Enterprise Architect MS .NET Frame Work SDK 1.1 MS Platform SDK February 2003 same results :( [2004-08-05 08:14:14] matthias dot haldimann at epfl dot ch Though this might not help a lot, it might still be interesting to note that I continue to have the exact same problem, under Windowx XP, English, SP1 + all available patches with PHP 5.1.0-dev, Snapshot Aug 5 2004 04:15:53 and .NET Framework 1.1 Matthias [2004-08-04 18:23:07] mike at ziebeck dot net There's been a typo: c:\Programme\php\php5.php.ini is c:\Programme\php\php5.ini Sorry for that. mz. [2004-08-04 18:18:50] mike at ziebeck dot net Software Setup: Windows 2000 pro (german) clean install (Service Pack 4) .NET: MS DotNET FrameWork RTL 1.1 USER: Administrator unpack: php5-win32-200408040230.zip => c:\Programme\php\php5 copy: c:\Programme\php\php5.php.ini-dist c:\Programme\php\php5.php.ini copy: tst_DotNet.php c:\Programme\php\tst_DotNet.php >php -c c:\Programme\php\php5\php.ini -f tst_DotNet.php Fatal error: Uncaught exception 'com_exception' with message 'Failed to instantiate .Net object [IDispatch_Invoke] Ausnahmefehler aufgetreten.' in c:\Programme\php\php5\tst_DotNet.php:2 Stack trace: #0 {main} thrown in c:\Programme\php\php5\tst_DotNet.php on line 2 No files (*.ini, *.dll) have been (re)placed in windows system folders. Working directory: c:\Programme\php\php5 Kind Regards mz. 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/29490 -- Edit this bug report at http://bugs.php.net/?id=29490&edit=1
#29426 [Com]: Incomplete/inconsistent functionality
ID: 29426 Comment by: cyberlot at cyberlot dot net Reported By: php at peterrobins dot co dot uk Status: Open Bug Type: SimpleXML related Operating System: Linux 2.4 PHP Version: 5.0.0 New Comment: Confirming this bug exists, Have the same problem, I need to add to a simplexml object on the fly and can't Previous Comments: [2004-07-28 13:22:59] php at peterrobins dot co dot uk Description: According to the manual page, you can add a node with SimpleXML, but this does not seem to work, either as $xml->movie[0]->characters[0]->character[0]->age = '21'; nor as $xml->movie[0]->rating[2] = 'not bad'; Deletion works on attributes unset($xml->movie[0]->rating[1]['type']); but at node level, deletes all unset($xml->movie[0]->rating); This is inconsistent with reading where $xml->movie[0]->rating fetches the first node only. unset($xml->movie->rating); deletes all ratings for the 1st movie only. It does not appear possible to delete just 1 node unset($xml->movie[0]->rating[1]); Because objs are now refs not copies, can do this $rat = $xml->movie[0]->rating[0]; $rat['name'] = 'judge'; but not this $rat = 'new content'; nor this $rat->child[0] = 'new rating'; and if I try and do $rat->child = 'new rating'; I get 'Attempt to assign property of non-object' -- Edit this bug report at http://bugs.php.net/?id=29426&edit=1
#29227 [Opn]: mod_ssl + php5 will crash!
ID: 29227 User updated by: herps at raqtweak dot com Reported By: herps at raqtweak dot com Status: Open Bug Type: Apache related Operating System: RedHat 7.x PHP Version: 5.0.0 New Comment: Well, I posted as much information as I can, and what I get from http://bugs.php.net/how-to-report.php I did just fine... Can someone help?!!! Previous Comments: [2004-07-18 16:54:54] herps at raqtweak dot com Not sure what you need... I compile PHP 5.0.0, REGARDLESS OF THE COMPILE OPTIONS I USE, the following happens. Option #1 I restart Apache, in the httpd.conf LoadModule php5_module modules/php-5.0.0/libphp5.so LoadModule ssl_module modules/libssl.so Check this, [root conf]# /etc/rc.d/init.d/httpd restart ; ps ax | grep httpd Shutting down Web Service: httpd ok /etc/rc.d/init.d/httpd: line 3: 17200 Killed $LCD_SWRITE "$LINE1" "$LINE2" >/dev/null 2>&1 Setting up Web Service: httpd 800 ?S 0:00 /usr/sbin/httpd.admsrv -f /etc/admserv/conf/httpd.con 10940 ?S 0:00 /usr/sbin/httpd.admsrv -f /etc/admserv/conf/httpd.con 17234 pts/0R 0:00 /usr/sbin/httpd -DHAVE_I18N -DHAVE_CCE -DHAVE_INTERBA Then, 5 seconds later, I do another "ps ax | grep httpd" No result. httpd crashed. Now, I comment out # LoadModule ssl_module modules/libssl.so restart apache, and everything runs fine, forever [2004-07-17 20:39:51] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. [2004-07-17 17:48:54] herps at raqtweak dot com Description: Trying to upgrade PHP 4.3.7 to PHP 5.0.0. This machine is running Apache 1.3.29 with mod_ssl/2.8.16 OpenSSL/0.9.6m. Now, PHP5 will work fine, but as soon as I activate the mod_ssl module, Apache crashes immediately after I start it... When I disable mod_ssl, it works fine. I have tried numerous things, different kernels, different openssl versions (0.9.6, 0.9.6m, 0.9.7d), recompiled Apache, nothing! Same problem over and over... The backtrace I get: Reading symbols from /lib/libpthread.so.0...done. warning: Unable to set global thread event mask: generic error [New Thread 1024 (LWP 9814)] Error while reading shared library symbols: Cannot enable thread event reporting for Thread 1024 (LWP 9814): generic error Reading symbols from /lib/libnss_db.so.2...done. Loaded symbols for /lib/libnss_db.so.2 Reading symbols from /usr/lib/perl5/5.6.0/i386-linux/auto/Data/Dumper/Dumper.so...done. Loaded symbols for /usr/lib/perl5/5.6.0/i386-linux/auto/Data/Dumper/Dumper.so Reading symbols from /usr/lib/perl5/5.6.0/i386-linux/auto/IO/IO.so...done. Loaded symbols for /usr/lib/perl5/5.6.0/i386-linux/auto/IO/IO.so Reading symbols from /usr/lib/perl5/5.6.0/i386-linux/auto/Fcntl/Fcntl.so...done. Loaded symbols for /usr/lib/perl5/5.6.0/i386-linux/auto/Fcntl/Fcntl.so Reading symbols from /usr/lib/perl5/5.6.0/i386-linux/auto/Socket/Socket.so...done. Loaded symbols for /usr/lib/perl5/5.6.0/i386-linux/auto/Socket/Socket.so Reading symbols from /usr/lib/gconv/ISO8859-1.so...done. Loaded symbols for /usr/lib/gconv/ISO8859-1.so #0 0x4000b9f7 in _dl_signal_error () at eval.c:88 88 eval.c: No such file or directory. Expected result: Should run just fine, since 4.3.7 with the same config runs perfectly fine! Actual result: -- You see an httpd process spawn, then it crashes immediately... -- Edit this bug report at http://bugs.php.net/?id=29227&edit=1
#29560 [Opn->Fbk]: Listening on non-blocking socket leaks memory
ID: 29560 Updated by: [EMAIL PROTECTED] Reported By: info at tphnet dot com -Status: Open +Status: Feedback Bug Type: Sockets related Operating System: Windows XP SP1 PHP Version: 5.0.0 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Try a snapshot, as a couple of peername related bugs were fixed recently. Previous Comments: [2004-08-07 19:23:22] info at tphnet dot com I can confirm the memory leak that I described in my original bug report has disappeard. BUT, I found a new memory leak inside the stream_socket_accept() function. If you set the third argument peername to a variable, the function will leak a little bit of memory everytime it's called. The effect is the same as with the original bug in socket_accpet(). Just modify the example in my previous reply by changing $new_connection = @stream_socket_accept($socket, 0); into $new_connection = @stream_socket_accept($socket, 0, $peer); and see what happens. In my case (Windows XP, php 5.0.0 CLI) the script starts leaking memory. [2004-08-07 17:55:35] info at tphnet dot com I changed to code to the following: There is no memory leak anymore and everything is working as expected. It appears the problem is solved. [2004-08-07 15:07:44] [EMAIL PROTECTED] Urgh, ignore that (clicked wrong link). The sockets extension is unmaintained. Try stream_socket_create() and fiends instead. [2004-08-07 14:50:11] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2004-08-07 03:01:35] info at tphnet dot com Description: I've been trying to write a simple multi-client server application in PHP. Everything is working just fine, the only problem is that the server is leaking memory. Reproduce code: --- $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_bind($socket, 'localhost', 1234); socket_listen($socket); socket_set_nonblock($socket); while(true){ $new_connection = @socket_accept($socket); unset($new_connection); } Expected result: The above server will accept connections on localhot:1234 and will disconnect you directly after you connect. The socket is setup in non-blocking mode, so that with a couple of minor modifications it becomes possible to handle multiple clients at the same time. Actual result: -- The code does exactly what it is supposed to do, but its memory use increases very fast. It fills up my 512 megs in about a minute. The memory leak occours in the socket_accept() function. Removing this line will stop the memory leak from occouring. If you remove the socket_set_nonblock() function it also does not leak memory anymore. This seems kind of logical because the script will "hang" on the socket_accept() function instead of looping over it constantly. In the version of the script I'm actually using, a "usleep(10)" has been added in the while loop to make sure the script doesn't consume all available resources, but the memory leak still remains. Although it takes much longer to fill all memory because socket_accept() is called less frequent. Removing the "@" sign infront of the socket_accept() function causes the following two errors to be printed on the console for every call to socket_accpet(): Warning: socket_accept(): unable to accept incoming connection [0]: Een niet-blokkerende socketbewerking kan niet onmiddellijk worden voltooid. Warning: socket_accept(): unable to accept socket connection [0]: De bewerking is voltooid. The first error roughly translates to "A non-blocking socket action cannot be executed immediately" and the second to "The action has been completed". I'm not really an expert on sockets so I'm not sure if my script is just flawed or this is a real bug. I've used the above code in a somewhat more advanced form to create a small POP3 server. This server is functioning just fine, the only problem is that it is leaking memory. -- Edit this bug report at http://bugs.php.net/?id=29560&edit=1
#29567 [NEW]: PHP has encountered an Access Violation at 011573CD
From: David at hostedby dot homeip dot net Operating system: Windows server 2000 PHP version: 5.0.0 PHP Bug Type: Unknown/Other Function Bug description: PHP has encountered an Access Violation at 011573CD Description: This is possibly a mis-configured server, but I can not see anything wrong. The error appears on all pages that are using php. System:Windows NT HOSTEDBY 5.0 build 2195 Build Date Jul 13 2004 21:34:42 Configure Command: cscript /nologo configure.js "--enable- snapshot-build" "--with-gd=shared" Server API ISAPI Reproduce code: --- http://www.hostedby.homeip.net/phpinfo.php -- Edit bug report at http://bugs.php.net/?id=29567&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29567&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29567&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29567&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29567&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29567&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29567&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29567&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29567&r=support Expected behavior: http://bugs.php.net/fix.php?id=29567&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29567&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29567&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29567&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29567&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29567&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29567&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29567&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29567&r=float
#29512 [Com]: PHP error message.
ID: 29512 Comment by: www dot spam at whoah dot net Reported By: asfsm at uaa dot alaska dot edu Status: Closed Bug Type: Unknown/Other Function Operating System: Windows 2003 Standard Server PHP Version: 5.0.0 New Comment: Snapshot verified as a fix for my issue. Thanks to the developers for their ongoing efforts. Previous Comments: [2004-08-04 01:46:46] [EMAIL PROTECTED] 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. [2004-08-04 01:03:35] asfsm at uaa dot alaska dot edu I get the error in both IE and firefox. I am using the ISAPI module and php_gd2.dll. I do not have the php_mysql.dll loaded since I got an error trying to load that (and according to what I've read, MySQL support is now built-in?). [2004-08-04 00:58:10] www dot spam at whoah dot net I'm also experiencing this issue with an implementation of osCommerce 2.2ms2 on Win2k professional (IIS5, php5, ISAPI module, mysql 4.0.17). However it seems to be constant, not going away after the first page. I only noticed it when I went to check the site with firefox (IE had been ignoring it because, in this specific case, it was appearing before the tag). Extensions loaded are php_gd2.dll and php_mysql.dll. The message does not occurr on implementations of PHPBB2 on the same server. They are using MS Access though. [2004-08-03 23:27:26] asfsm at uaa dot alaska dot edu Description: All .php pages are rendered with "PHP has encountered an Acess Violation at 016E73CD". Usually in the first .php page. Not sure if it's running fine or not. It seems to be. I installed PHP and mySQL v4.0 on 2003 with IIS6.0 with the latest hotfixes (08/02/2004). Reproduce code: --- (with previous .html using a POST form) Test Index Expected result: You like Star Wars The Matrix Actual result: -- You like Star Wars The Matrix PHP has encountered an Access Violation at 016E73CD -- Edit this bug report at http://bugs.php.net/?id=29512&edit=1
#29227 [Opn]: mod_ssl + php5 will crash!
ID: 29227 User updated by: herps at raqtweak dot com Reported By: herps at raqtweak dot com Status: Open Bug Type: Apache related Operating System: RedHat 7.x PHP Version: 5.0.0 New Comment: Took me hours of debugging, but issue resolved. I was right, it is a conflict between PHP and mod_ssl. Previous Comments: [2004-08-08 01:46:18] herps at raqtweak dot com Well, I posted as much information as I can, and what I get from http://bugs.php.net/how-to-report.php I did just fine... Can someone help?!!! [2004-07-18 16:54:54] herps at raqtweak dot com Not sure what you need... I compile PHP 5.0.0, REGARDLESS OF THE COMPILE OPTIONS I USE, the following happens. Option #1 I restart Apache, in the httpd.conf LoadModule php5_module modules/php-5.0.0/libphp5.so LoadModule ssl_module modules/libssl.so Check this, [root conf]# /etc/rc.d/init.d/httpd restart ; ps ax | grep httpd Shutting down Web Service: httpd ok /etc/rc.d/init.d/httpd: line 3: 17200 Killed $LCD_SWRITE "$LINE1" "$LINE2" >/dev/null 2>&1 Setting up Web Service: httpd 800 ?S 0:00 /usr/sbin/httpd.admsrv -f /etc/admserv/conf/httpd.con 10940 ?S 0:00 /usr/sbin/httpd.admsrv -f /etc/admserv/conf/httpd.con 17234 pts/0R 0:00 /usr/sbin/httpd -DHAVE_I18N -DHAVE_CCE -DHAVE_INTERBA Then, 5 seconds later, I do another "ps ax | grep httpd" No result. httpd crashed. Now, I comment out # LoadModule ssl_module modules/libssl.so restart apache, and everything runs fine, forever [2004-07-17 20:39:51] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. [2004-07-17 17:48:54] herps at raqtweak dot com Description: Trying to upgrade PHP 4.3.7 to PHP 5.0.0. This machine is running Apache 1.3.29 with mod_ssl/2.8.16 OpenSSL/0.9.6m. Now, PHP5 will work fine, but as soon as I activate the mod_ssl module, Apache crashes immediately after I start it... When I disable mod_ssl, it works fine. I have tried numerous things, different kernels, different openssl versions (0.9.6, 0.9.6m, 0.9.7d), recompiled Apache, nothing! Same problem over and over... The backtrace I get: Reading symbols from /lib/libpthread.so.0...done. warning: Unable to set global thread event mask: generic error [New Thread 1024 (LWP 9814)] Error while reading shared library symbols: Cannot enable thread event reporting for Thread 1024 (LWP 9814): generic error Reading symbols from /lib/libnss_db.so.2...done. Loaded symbols for /lib/libnss_db.so.2 Reading symbols from /usr/lib/perl5/5.6.0/i386-linux/auto/Data/Dumper/Dumper.so...done. Loaded symbols for /usr/lib/perl5/5.6.0/i386-linux/auto/Data/Dumper/Dumper.so Reading symbols from /usr/lib/perl5/5.6.0/i386-linux/auto/IO/IO.so...done. Loaded symbols for /usr/lib/perl5/5.6.0/i386-linux/auto/IO/IO.so Reading symbols from /usr/lib/perl5/5.6.0/i386-linux/auto/Fcntl/Fcntl.so...done. Loaded symbols for /usr/lib/perl5/5.6.0/i386-linux/auto/Fcntl/Fcntl.so Reading symbols from /usr/lib/perl5/5.6.0/i386-linux/auto/Socket/Socket.so...done. Loaded symbols for /usr/lib/perl5/5.6.0/i386-linux/auto/Socket/Socket.so Reading symbols from /usr/lib/gconv/ISO8859-1.so...done. Loaded symbols for /usr/lib/gconv/ISO8859-1.so #0 0x4000b9f7 in _dl_signal_error () at eval.c:88 88 eval.c: No such file or directory. Expected result: Should run just fine, since 4.3.7 with the same config runs perfectly fine! Actual result: -- You see an httpd process spawn, then it crashes immediately... -- Edit this bug report at http://bugs.php.net/?id=29227&edit=1
#29227 [Opn->Csd]: mod_ssl + php5 will crash!
ID: 29227 User updated by: herps at raqtweak dot com Reported By: herps at raqtweak dot com -Status: Open +Status: Closed Bug Type: Apache related Operating System: RedHat 7.x PHP Version: 5.0.0 New Comment: Closing Previous Comments: [2004-08-08 03:37:59] herps at raqtweak dot com Took me hours of debugging, but issue resolved. I was right, it is a conflict between PHP and mod_ssl. [2004-08-08 01:46:18] herps at raqtweak dot com Well, I posted as much information as I can, and what I get from http://bugs.php.net/how-to-report.php I did just fine... Can someone help?!!! [2004-07-18 16:54:54] herps at raqtweak dot com Not sure what you need... I compile PHP 5.0.0, REGARDLESS OF THE COMPILE OPTIONS I USE, the following happens. Option #1 I restart Apache, in the httpd.conf LoadModule php5_module modules/php-5.0.0/libphp5.so LoadModule ssl_module modules/libssl.so Check this, [root conf]# /etc/rc.d/init.d/httpd restart ; ps ax | grep httpd Shutting down Web Service: httpd ok /etc/rc.d/init.d/httpd: line 3: 17200 Killed $LCD_SWRITE "$LINE1" "$LINE2" >/dev/null 2>&1 Setting up Web Service: httpd 800 ?S 0:00 /usr/sbin/httpd.admsrv -f /etc/admserv/conf/httpd.con 10940 ?S 0:00 /usr/sbin/httpd.admsrv -f /etc/admserv/conf/httpd.con 17234 pts/0R 0:00 /usr/sbin/httpd -DHAVE_I18N -DHAVE_CCE -DHAVE_INTERBA Then, 5 seconds later, I do another "ps ax | grep httpd" No result. httpd crashed. Now, I comment out # LoadModule ssl_module modules/libssl.so restart apache, and everything runs fine, forever [2004-07-17 20:39:51] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. [2004-07-17 17:48:54] herps at raqtweak dot com Description: Trying to upgrade PHP 4.3.7 to PHP 5.0.0. This machine is running Apache 1.3.29 with mod_ssl/2.8.16 OpenSSL/0.9.6m. Now, PHP5 will work fine, but as soon as I activate the mod_ssl module, Apache crashes immediately after I start it... When I disable mod_ssl, it works fine. I have tried numerous things, different kernels, different openssl versions (0.9.6, 0.9.6m, 0.9.7d), recompiled Apache, nothing! Same problem over and over... The backtrace I get: Reading symbols from /lib/libpthread.so.0...done. warning: Unable to set global thread event mask: generic error [New Thread 1024 (LWP 9814)] Error while reading shared library symbols: Cannot enable thread event reporting for Thread 1024 (LWP 9814): generic error Reading symbols from /lib/libnss_db.so.2...done. Loaded symbols for /lib/libnss_db.so.2 Reading symbols from /usr/lib/perl5/5.6.0/i386-linux/auto/Data/Dumper/Dumper.so...done. Loaded symbols for /usr/lib/perl5/5.6.0/i386-linux/auto/Data/Dumper/Dumper.so Reading symbols from /usr/lib/perl5/5.6.0/i386-linux/auto/IO/IO.so...done. Loaded symbols for /usr/lib/perl5/5.6.0/i386-linux/auto/IO/IO.so Reading symbols from /usr/lib/perl5/5.6.0/i386-linux/auto/Fcntl/Fcntl.so...done. Loaded symbols for /usr/lib/perl5/5.6.0/i386-linux/auto/Fcntl/Fcntl.so Reading symbols from /usr/lib/perl5/5.6.0/i386-linux/auto/Socket/Socket.so...done. Loaded symbols for /usr/lib/perl5/5.6.0/i386-linux/auto/Socket/Socket.so Reading symbols from /usr/lib/gconv/ISO8859-1.so...done. Loaded symbols for /usr/lib/gconv/ISO8859-1.so #0 0x4000b9f7 in _dl_signal_error () at eval.c:88 88 eval.c: No such file or directory. Expected result: Should run just fine, since 4.3.7 with the same config runs perfectly fine! Actual result: -- You see an httpd process spawn, then it crashes immediately... -- Edit this bug report at http://bugs.php.net/?id=29227&edit=1
#29568 [NEW]: GD causes an segmentation fault
From: bram at x-plose dot be Operating system: debian PHP version: 4.3.8 PHP Bug Type: GD related Bug description: GD causes an segmentation fault Description: When i open an php script that uses GD it shows an segmentation fault in error.log Server software: Apache/1.3.26 (deb package) (Unix) Debian GNU/Linux PHP/4.3.8 The script is comming from php.net so i dont supose there's an error in it. I included /usr/local/lib/php in php.ini and i added extension = gd.so './configure' '--with-jpeg-dir=../jpeg-6b/' '--with-pdflib' '--with-tiff-dir=../tiff-v3.6.1/' '--with-png-dir=../libpng-1.2.5/' '--with-zlib-dir=../zlib-1.1.4/' '--enable-static-pdflib' '--enable-gd-imgstrttf' '--with-gd' '--with-mysql' '--with-apxs' '--enable-fast-cgi-redirect' '--with-freetype-dir=/usr/local/freetype2/' '--with-iconv' '--with-gettext' Reproduce code: --- Actual result: -- I only get, Cant find server and in error.log i find [Sun Aug 8 04:12:51 2004] [notice] child pid 24310 exit signal Segmentation fault (11) [Sun Aug 8 04:12:51 2004] [notice] child pid 2085 exit signal Segmentation fault (11) -- Edit bug report at http://bugs.php.net/?id=29568&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29568&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29568&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29568&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29568&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29568&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29568&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29568&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29568&r=support Expected behavior: http://bugs.php.net/fix.php?id=29568&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29568&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29568&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29568&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29568&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29568&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29568&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29568&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29568&r=float
#29558 [Opn]: Memory leak when calling imageCreateFromJPEG and imagecreatetruecolor in loop
ID: 29558 User updated by: zsheran at yahoo dot com Reported By: zsheran at yahoo dot com Status: Open Bug Type: GD related Operating System: Redhat 9 PHP Version: 4.3.7 New Comment: Thanks smacvicar. I made the following change at the bottom of the function: replaced unset($source_picture); unset($target_picture); with imagedestroy($source_picture); imagedestroy($target_picture); The problem persists. It still leaks memory the same way it did before. I didn't know imagedestroy() had to be used instead of unset(); my fault. But now it looks even more like a bug to me... Previous Comments: [2004-08-07 04:43:35] smacvicar at gmail dot com http://uk.php.net/manual/en/function.imagedestroy.php [2004-08-07 00:14:14] zsheran at yahoo dot com Description: I call the function below from a loop about 17,000 times to resize JPGs which are about 20k each. Note that $source_file is a URL. I run the script from CLI. By the time the script finishes after ~270 minutes, the PHP process uses 340MB of RAM; it grows slowly and steadily to that size. I unset the variables at the end of the function but it makes no difference. Now 340MB is about the size of those 17,000 pics. For some reason, the fetched images are not freed from memory, probaly only upon finishing the script. But since it runs in a loop, it adds up at becomes eventually a problem. It works but it would be great if the memory leak could be fixed; I expect the number of images to grow to six digit numbers in the future. Thanks for your time. Reproduce code: --- function resize_picture ($source_file, $target_file) { $source_picture = imageCreateFromJPEG($source_file); if ($source_picture) { $picsize = @getimagesize($source_file); // get source image size $source_x = $picsize[0]; // source image width $source_y = $picsize[1]; // source image height #create image $target_picture $target_picture = imagecreatetruecolor(320, 240); #Resize $source_picture and copy it into $target_picture. imagecopyresampled($target_picture,$source_picture,0,0,0,0,320,240,$source_x,$source_y); #Create jpeg from $target_picture. Save as $target_file imagejpeg ($target_picture,"/path/$target_file",80); unset($source_picture); unset($target_picture); } } -- Edit this bug report at http://bugs.php.net/?id=29558&edit=1
#29569 [NEW]: stream_set_timeout does not allow you to disable timeout
From: rob at rem5 dot com Operating system: NIX 2.4.x PHP version: 5.0.0 PHP Bug Type: Feature/Change Request Bug description: stream_set_timeout does not allow you to disable timeout Description: when trying to keep a stream open using stream_set_timeout it will not allow the connection to stay open. I tried setting it to 0.. as well as 9. However it will not stay open more than 30 seconds. Reproduce code: --- #!/usr/local/php5/bin/php -qn \n"; } else { while ($conn = stream_socket_accept($socket)) { fwrite($conn, "Simple Echo Using stream_socket_server() in PHP"); $foo = fgets($conn); fwrite($conn, $foo); fclose($conn); } fclose($socket); } ?> Expected result: stream_socket_server() should stay open and accepting connections. Actual result: -- craps out after 30 secs -- Edit bug report at http://bugs.php.net/?id=29569&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29569&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29569&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29569&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29569&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29569&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29569&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29569&r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=29569&r=support Expected behavior: http://bugs.php.net/fix.php?id=29569&r=notwrong Not enough info:http://bugs.php.net/fix.php?id=29569&r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=29569&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29569&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29569&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29569&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29569&r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=29569&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29569&r=float
#29569 [Opn->Bgs]: stream_set_timeout does not allow you to disable timeout
ID: 29569 User updated by: rob at rem5 dot com Reported By: rob at rem5 dot com -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: NIX 2.4.x PHP Version: 5.0.0 New Comment: error with my script and my head. Previous Comments: [2004-08-08 06:00:47] rob at rem5 dot com Description: when trying to keep a stream open using stream_set_timeout it will not allow the connection to stay open. I tried setting it to 0.. as well as 9. However it will not stay open more than 30 seconds. Reproduce code: --- #!/usr/local/php5/bin/php -qn \n"; } else { while ($conn = stream_socket_accept($socket)) { fwrite($conn, "Simple Echo Using stream_socket_server() in PHP"); $foo = fgets($conn); fwrite($conn, $foo); fclose($conn); } fclose($socket); } ?> Expected result: stream_socket_server() should stay open and accepting connections. Actual result: -- craps out after 30 secs -- Edit this bug report at http://bugs.php.net/?id=29569&edit=1
#28141 [Com]: socket_read return type: false vs "", when PHP_NORMAL_READ
ID: 28141 Comment by: cyberlot at cyberlot dot net Reported By: php at richardneill dot org Status: Assigned Bug Type: Sockets related Operating System: Linux PHP Version: 5.0.0+ Assigned To: andrey New Comment: Not sure if this is related but in PHP_NORMAL_READ my script returns the text then returns the \n so I get 2 loops for every one string.. In php binary mode it works fine. Previous Comments: [2004-07-28 21:04:13] [EMAIL PROTECTED] Assigning to myself (to get notification if i forget), changing the version. [2004-07-26 10:37:34] php at hristov dot com I will take a look later today or these days. But for now, the code in the function is : if (type == PHP_NORMAL_READ) { retval = php_read(php_sock->bsd_socket, tmpbuf, length, 0); } else { retval = recv(php_sock->bsd_socket, tmpbuf, length, 0); } if (retval == -1) { PHP_SOCKET_ERROR(php_sock, "unable to read from socket", errno); efree(tmpbuf); RETURN_FALSE; } [2004-07-26 01:18:08] php at richardneill dot org re-setting to open as requested by automatic email. Sorry - I think I confused your system by commenting as another user rather than as the original submitter. [2004-07-26 01:00:05] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, 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". [2004-07-18 17:13:56] php2 at richardneill dot org I've still got the same thing happening in PHP5.0.0(final) I'm having some trouble with your example, so I'm using the attached instead. It's basically copied from the php-sockets manual, but slightly modified. The key point: according to the documentation, when (socket_read()===false), it means something has gone very wrong, i.e. a fatal error. However, in practice, all this means is that the other side has closed the connection. I'm running this code as ./testsock.php and the client is simply: netcat localhost The problem is that, if netcat is killed with Ctrl-C, then the server suffers a fatal error. I don't think that it should. I've tried it under both version php-cli-4.3.7-4mdk (the current devel version from Mandrake cooker) and php-5.0.0-cli which I just compiled. In both cases, the same thing happens. Regards Richard - #!/usr/local/bin/php 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/28141 -- Edit this bug report at http://bugs.php.net/?id=28141&edit=1