#45497 [Fbk-Opn]: memory leak in select statement for varchar2 above 2000 characters
ID: 45497 User updated by: teju_baba at hotmail dot com Reported By: teju_baba at hotmail dot com -Status: Feedback +Status: Open Bug Type: OCI8 related Operating System: Solaris 10 PHP Version: 5.2.6 Assigned To: sixd New Comment: This is the create statement for the 2 tables. CREATE TABLE NAS.AGENCY ( AGENCY_ID NUMBER(9), AGENCY_NAME VARCHAR2(60) NOT NULL , AGENCY_TYPE VARCHAR2(1) NOT NULL , AGENCY_ABBR VARCHAR2(10), ADMIN_HIST VARCHAR2(2000) NOT NULL , DATE_UPDATED DATE NOT NULL , PRIMARY KEY (AGENCY_ID) VALIDATE ) TABLESPACE USERS PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 128K BUFFER_POOL DEFAULT) LOGGING; CREATE TABLE PIC.PC_CATALOGUE ( CATALOGUE_ID CHAR(10), ACCESSION_NO VARCHAR2(30), NEGATIVE_NO VARCHAR2(30), COLLECTION_TITLE VARCHAR2(1024), SUBJECT VARCHAR2(1024), CAPTION VARCHAR2(1024), MEDIUM VARCHAR2(3), SOURCE VARCHAR2(255), SOURCE_ADDRESS VARCHAR2(255), SOURCE_CONTACT_PERSON VARCHAR2(30), LOCATION VARCHAR2(10), SHELF_NO VARCHAR2(10), IMAGE_NO VARCHAR2(10), ACQUIRED_DATE DATE, ACCESSION_DATE DATE, RECORDING_DATE DATE, ACCESS_CODE VARCHAR2(3), PHOTOCD_ID VARCHAR2(50), PHOTOCD_NO VARCHAR2(50), ACCESSION_CONDITION VARCHAR2(50), REMARK VARCHAR2(255), OWNER VARCHAR2(30), STATUS CHAR(1), CHANGED_BY VARCHAR2(30), CHANGE_DATE DATE, SEARCH_FIELD VARCHAR2(4000), ACCESS_ID VARCHAR2(20), CREATE_DATE DATE, OLD_ACCESSION_NO NUMBER(10), IMAGE_LINK VARCHAR2(1024), EXTERNAL_SOURCE VARCHAR2(255), CAT_REMARKS VARCHAR2(4000), CONSTRAINT PC_CATALOGUE_PK PRIMARY KEY (CATALOGUE_ID) VALIDATE ) TABLESPACE USERS PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 409600K BUFFER_POOL DEFAULT) LOGGING; Environment Variables: MANPATH=:/usr/man:/usr/share/man:/opt/SUNWvts/man:/opt/SUNWexplo/man:/opt/SUNWsneep/man:/opt/CTEact/man TOMCAT_HOME=/otej/sunSparcSol10/tomcat/apache-tomcat-5.5.26 TERM=xterm SHELL=/bin/bash NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 TMPDIR=/var/tmp SSH_CLIENT=10.203.2.27 3622 22 OLDPWD=/ SSH_TTY=/dev/pts/2 USER=root LD_LIBRARY_PATH=:/otej/instantclient:/usr/openwin/lib OPENWINHOME=/usr/openwin WEBLOGIC_HOME=/usr/local/bea/weblogic81/server/bin MAIL=/var/mail//root PATH=/usr/sbin:/usr/bin:/usr/local/bin:/otej/j2sdk1.4.2_16/bin:/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/dt/bin:/usr/platform/SUNW,Sun-Fire-V245/sbin:/opt/sun/bin:/opt/SUNWvts/bin:/opt/SUNWexplo/bin:/opt/SUNWsneep/bin:/opt/CTEact/bin PWD=/otej/project/a2osync JAVA_HOME=/otej/j2sdk1.4.2_16 EDITOR=vi TZ=Singapore [EMAIL PROTECTED] # [EMAIL PROTECTED] SHLVL=1 HOME=/ LOGNAME=root SSH_CONNECTION=10.203.2.27 3622 10.203.2.72 22 _=/usr/bin/env * TNS_ADMIN is not set as i do not use tnsnames.ora setting it to /otej/instantclient does not help either Versions: Machine 1: (Web server with Oracle Instant Client) OS: Solaris 10 PHP: 5.2.6 OCI: 1.3.3 Oracle Instant Client: 10.1.0.3 Machine 2: (Oracle DB) OS: Linux (Redhat Enterprise 3) Oracle: 10g Enterprise Edition: 10.1.0.3 I'll try to send you the sample data soon. Previous Comments: [2008-07-13 17:24:00] [EMAIL PROTECTED] Can you email me CREATE TABLE and example (not real data) INSERT statements so I have the same values as you? Also let me know your NLS_LANG or other globalization settings, and exact DB version. [2008-07-13 07:54:27] teju_baba at hotmail dot com Here is another example: $query=select catalogue_id, accession_no, negative_no, collection_title, subject, caption, medium, source, source_address, source_contact_person, location, shelf_no, image_no, access_code, photocd_id, photocd_no, accession_condition, remark, owner, status, changed_by, search_field, access_id, old_accession_no, image_link, external_source, cat_remarks from PC_CATALOGUE where CATALOGUE_ID='289713'; Actual Result overflows on search_field and results in garbage for the following fields: Array ( [CATALOGUE_ID] = 289713 [ACCESSION_NO] = 0 [NEGATIVE_NO] = S128961 [COLLECTION_TITLE] = [SUBJECT] = CONSTITUENCIES (VISIT, MEET PEOPLE SESSION, ETC) [CAPTION] = COMMUNICATIONS AND LABOUR MINISTER ONG TENG CHEONG TOURING AYER RAJAH CONSTITUENCY [GROUP DESCRIPTION BY EVENT FROM TRANSFERRING AGENCY] [MEDIUM] = PCD [SOURCE] = MINISTRY OF INFORMATION AND THE ARTS (MITA) [SOURCE_ADDRESS] = [SOURCE_CONTACT_PERSON] = [LOCATION] = [SHELF_NO] = [IMAGE_NO] = 0044 [ACCESS_CODE] = B [PHOTOCD_ID] = 8262-3202-1062 [PHOTOCD_NO] = 19980006698 [ACCESSION_CONDITION] = [REMARK] = [OWNER] = CD IMAGING [STATUS] = 0 [CHANGED_BY] = CD IMAGING [SEARCH_FIELD] = C [ACCESS_ID] = MMUNICATIONS AND LAB [OLD_ACCESSION_NO] = -103019221621693332183419282117282223693512 [IMAGE_LINK] = EVENT FROM TRANSFERRING AGENCY] CONSTITUENCIES (VISIT, MEET PEOPLE [EXTERNAL_SOURCE] = SESSION, ETC) MINISTRY OF INFORM [CAT_REMARKS] =)
#45046 [Asn-Fbk]: Missing php5servlet.dll in PECL Collection package
ID: 45046 Updated by: [EMAIL PROTECTED] Reported By: steve at thebroughs dot com -Status: Assigned +Status: Feedback -Bug Type: *General Issues +Bug Type: Servlet related Operating System: Windows PHP Version: 5.2.6 Assigned To: pajoye New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: [2008-07-15 00:04:45] [EMAIL PROTECTED] Pierre, fix. [2008-05-22 09:22:33] [EMAIL PROTECTED] It wasn't in the 5.2.5 zip either, it was in this pecl-5.2.5-Win32-1.zip instead. For some reason the same PECL collection for 5.2.6 does not contain it. [2008-05-20 07:08:50] steve at thebroughs dot com Description: I'm trying to install PHP into a TOMCAT server and have read a number of articles that refer to php5servlet.dll. This file is available in V5.2.5 but is not included the latest release. Is this file missing, or has it been replaced with another DLL? -- Edit this bug report at http://bugs.php.net/?id=45046edit=1
#45516 [Opn]: PGSQL seems to crash apache.
ID: 45516 Updated by: [EMAIL PROTECTED] Reported By: twilightthorn dot kh at gmail dot com Status: Open Bug Type: PostgreSQL related Operating System: Vista Business PHP Version: 5.2.6 New Comment: Can you try using the 5.2.5's pgsql extension? Our extension not the one from wamp. The extension should work with 5.2.6 as well. Previous Comments: [2008-07-15 03:46:25] twilightthorn dot kh at gmail dot com Also, the reason I'm not currently using PHP5.2.6, all the workarounds submitted to fix the bug of not being able to use PGSQL in that version have not worked for me. If some one would be so kind as to give me and actual, detailed, workaround for using PGSQL in PHP5.2.6 on Vista Business, I would be very grateful. [2008-07-15 03:37:36] twilightthorn dot kh at gmail dot com Description: As far as I can tell any successful call to a database, local or on an external server, will crash apache. I'm using a WAMP2.0c setup using PHP5.2.5 on vista and it did work fine until I added the PHP Postgre extension. I do know that the extension is up-to-date, and have in fact even tried to replace it with the one used in PHP5.2.6, it also fails and crashes the server. Without the extension loaded, PHP/apache will output all errors and any other processing messages before the PG_Connect() call, upon which processing halts. The system event log refers to ntdll.dll on this crash, but I don't really know why. This does sound an aweful lot like an Apache bug, but it only occurs when PHP's Postgre extension is loaded and the pg_connect(); function is called. Best regards, and thanks. Thomas. Reproduce code: --- ?php //... $link = pg_connect(host=localhost port=5432 dbname=public user=postgres password=PASS) or op_err('Con'); //... ? Expected result: A successful database call and web-page out put. Actual result: -- I get a pop-up message telling me HTTPD.EXE has stopped working. This is the information logged in the system by its failure: -- Faulting application httpd.exe, version 2.2.8.0, time stamp 0x47904924, faulting module ntdll.dll, version 6.0.6000.16386, time stamp 0x4549bdc9, exception code 0xc0fd, fault offset 0x00061635, process id 0x1174, application start time 0x01c8e628c7166890. -- There are no other entries in my PHP or Apache error logs. -- Edit this bug report at http://bugs.php.net/?id=45516edit=1
#44955 [Csd-Asn]: socket array keys not working as expected
ID: 44955 Updated by: [EMAIL PROTECTED] Reported By: fidojones at fidojones dot com -Status: Closed +Status: Assigned Bug Type: Sockets related Operating System: Linux PHP Version: 5.2.6 Assigned To: felipe New Comment: Changes in behavior in minor versions are bugs. Previous Comments: [2008-07-14 21:45:44] fidojones at fidojones dot com Aparently socket_select acts completely diferent as past versions. Nanoweb server has been fixed to work with this versions: old version in nanoweb before 5.2.6: $ns=socket_select($lnset, $write=NULL, $except=NULL, 1); if ($ns) { if ($lnset[0]==$children_sck) { new version in nanoweb from 5.2.6: $ns=socket_select($lnset, $write=NULL, $except=NULL, 1); if ($ns) foreach ($lnset as $lnact) { if ($lnact==$children_sck) { So I think it's not a bug, but acts different as older versions. [2008-07-14 21:29:57] [EMAIL PROTECTED] Felipe, you break - you fix. Or revert the patch you applied that obviously causes the problem. [2008-05-09 18:12:36] fidojones at fidojones dot com I'm using the socket.c file in ext/socket/ from php 5.2.5 in php 5.2.6 and all is working fine. And the only diff in socket.c is the patch http://bugs.php.net/bug.php?id=44197 ,so explain me if not related with this patch, why is working perfect? if I only overwrite the socket.c file... You should test the script and say me if you see the execution diference and I encourage to try http://nanoweb.si.kz/ that has been working with all php versions from 4 to 5.2.5 and only fails with php 5.2.6. [2008-05-09 17:50:12] [EMAIL PROTECTED] The problem isn't related with the patch... It just fixed a problem in socket_select(). Your script doesn't use it. [2008-05-09 16:27:02] [EMAIL PROTECTED] Assigned to Felipe who broke this. 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/44955 -- Edit this bug report at http://bugs.php.net/?id=44955edit=1
#45517 [NEW]: PHP doesn't use the Widechar/Unicode Win32 APIs for file/dir access
From: louis at steelbytes dot com Operating system: Win2003/XP/Vista PHP version: 5.2.6 PHP Bug Type: *Directory/Filesystem functions Bug description: PHP doesn't use the Widechar/Unicode Win32 APIs for file/dir access Description: PHP doesn't use the Widechar/Unicode Win32 APIs for file/dir access Reproduce code: --- create a file or folder which has chars in it's name that are outside the code page of the iis/appache user acount. eg, try sticking greek and russian and chinese chars in one file name. now try and read/write/dirlist that file. is this a real problem? yes. although the above example is a bit contrived this is a problem for me. I guess I will have to write my own php extension to do file handling as I'm not betting this will be fixed until php6? Expected result: for php on NT family to use the Widechar/Unicode funcs. ie, CreateFileW(...) instead of CreateFileA(...) Actual result: -- n/a -- Edit bug report at http://bugs.php.net/?id=45517edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45517r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45517r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45517r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45517r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45517r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45517r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45517r=needscript Try newer version:http://bugs.php.net/fix.php?id=45517r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45517r=support Expected behavior:http://bugs.php.net/fix.php?id=45517r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45517r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45517r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45517r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45517r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45517r=dst IIS Stability:http://bugs.php.net/fix.php?id=45517r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45517r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45517r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45517r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45517r=mysqlcfg
#45178 [Asn]: garbage collector and cyclic references
ID: 45178 Updated by: [EMAIL PROTECTED] Reported By: thomas dot jarosch at intra2net dot com Status: Assigned Bug Type: Reproducible crash Operating System: Linux PHP Version: 5.3CVS-2008-06-04 (snap) Assigned To: dmitry New Comment: At first, you have a serious issue in your code. static variables MUST NOT be asigned by reference, because they are already references. As result the singleton pattern just doesn't work. BTW the bug is really exists. The simplified test case follows(changing = new into = new fixes memory corruption). ?php class Horde_History { function raiseError() { return debug_backtrace(); } function Horde_History() { $this-error = $this-raiseError(); echo Memory usage: . memory_get_usage() . \n; } } for ($i=0;$i10;$i++) { $a = new Horde_History(); } ? Previous Comments: [2008-06-05 09:13:20] thomas dot jarosch at intra2net dot com Actually, the reproduce code from #33595 also leaks memory. The statement about Horde is not 100% correct as only some singleton functions are affected. I mixed it up with another reference problem I fixed a while ago. Nontheless memory is leaked :-) [2008-06-04 16:57:45] thomas dot jarosch at intra2net dot com Description: Hello together, I'm currently trying to find a heap corruption while using Horde and noticed a rather odd behavior. The supplied code is the standard way Horde does it singletons. We always used the syntax of $object = new class to make it work with PHP4 and PHP5. If I change that to $object = new class, everything works as expected. I've found bug #32845 and noticed what we are doing seems wrong, so Horde needs fixing. The problem gets worse if the class object contains a variable of the type PEAR_Error, which contains cyclic references. Not only does the constructor get called every time, the object leaks memory like hell, even with PHP 5.3. I've searched through the bugtracker and thought the garbage collector now handles cyclic references, but maybe this is a side-effect of something else going wrong. Is the memory consumption by design? Thanks in advance for any comment, Thomas Reproduce code: --- ?php require_once PEAR.php; class Horde_History { var $error; function singleton() { static $history; if (!isset($history)) { $history = new Horde_History(); } return $history; } function Horde_History() { $this-error = PEAR::raiseError(error); echo Memory usage: . memory_get_usage() . \n; } } for (;;) { $a = Horde_History::singleton(); } Expected result: Constant memory usage. Actual result: -- Increasing memory usage. -- Edit this bug report at http://bugs.php.net/?id=45178edit=1
#45516 [Com]: PGSQL seems to crash apache.
ID: 45516 Comment by: twilightthorn dot kh at gmail dot com Reported By: twilightthorn dot kh at gmail dot com Status: Open Bug Type: PostgreSQL related Operating System: Vista Business PHP Version: 5.2.6 New Comment: Still no go... :( System logs the same error, Apache is still crashing. To be sure it wasn't JUST Apache, I've tested my server by placing some massive load on it. Apache did not crash after well over 4 minutes of work, work that kept my CPU clocked at 100% for the duration. The PGSQL, and PDO_PGSQL extensions both initialized for this test. I'm coming to think that maybe the problem isn't with the PGSQL extensions, but with my ntdll.dll. After all, these same extensions work on other platforms, and have been found to work on Vista* OS's before, right? I've found that there is a later version of ntdll.dll on for my system, and would love to try using the newer one. But all the same I don't wish to lose my computer... Any other advise that you could offer? Previous Comments: [2008-07-15 06:36:49] [EMAIL PROTECTED] Can you try using the 5.2.5's pgsql extension? Our extension not the one from wamp. The extension should work with 5.2.6 as well. [2008-07-15 03:46:25] twilightthorn dot kh at gmail dot com Also, the reason I'm not currently using PHP5.2.6, all the workarounds submitted to fix the bug of not being able to use PGSQL in that version have not worked for me. If some one would be so kind as to give me and actual, detailed, workaround for using PGSQL in PHP5.2.6 on Vista Business, I would be very grateful. [2008-07-15 03:37:36] twilightthorn dot kh at gmail dot com Description: As far as I can tell any successful call to a database, local or on an external server, will crash apache. I'm using a WAMP2.0c setup using PHP5.2.5 on vista and it did work fine until I added the PHP Postgre extension. I do know that the extension is up-to-date, and have in fact even tried to replace it with the one used in PHP5.2.6, it also fails and crashes the server. Without the extension loaded, PHP/apache will output all errors and any other processing messages before the PG_Connect() call, upon which processing halts. The system event log refers to ntdll.dll on this crash, but I don't really know why. This does sound an aweful lot like an Apache bug, but it only occurs when PHP's Postgre extension is loaded and the pg_connect(); function is called. Best regards, and thanks. Thomas. Reproduce code: --- ?php //... $link = pg_connect(host=localhost port=5432 dbname=public user=postgres password=PASS) or op_err('Con'); //... ? Expected result: A successful database call and web-page out put. Actual result: -- I get a pop-up message telling me HTTPD.EXE has stopped working. This is the information logged in the system by its failure: -- Faulting application httpd.exe, version 2.2.8.0, time stamp 0x47904924, faulting module ntdll.dll, version 6.0.6000.16386, time stamp 0x4549bdc9, exception code 0xc0fd, fault offset 0x00061635, process id 0x1174, application start time 0x01c8e628c7166890. -- There are no other entries in my PHP or Apache error logs. -- Edit this bug report at http://bugs.php.net/?id=45516edit=1
#45516 [Opn-Fbk]: PGSQL seems to crash apache.
ID: 45516 Updated by: [EMAIL PROTECTED] Reported By: twilightthorn dot kh at gmail dot com -Status: Open +Status: Feedback Bug Type: PostgreSQL related Operating System: Vista Business PHP Version: 5.2.6 -Assigned To: +Assigned To: pajoye New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. Thank you for helping us make PHP better. Can you try it in CLI as well? (in the cmd line php.exe yourscript.php) Previous Comments: [2008-07-15 09:01:59] twilightthorn dot kh at gmail dot com Still no go... :( System logs the same error, Apache is still crashing. To be sure it wasn't JUST Apache, I've tested my server by placing some massive load on it. Apache did not crash after well over 4 minutes of work, work that kept my CPU clocked at 100% for the duration. The PGSQL, and PDO_PGSQL extensions both initialized for this test. I'm coming to think that maybe the problem isn't with the PGSQL extensions, but with my ntdll.dll. After all, these same extensions work on other platforms, and have been found to work on Vista* OS's before, right? I've found that there is a later version of ntdll.dll on for my system, and would love to try using the newer one. But all the same I don't wish to lose my computer... Any other advise that you could offer? [2008-07-15 06:36:49] [EMAIL PROTECTED] Can you try using the 5.2.5's pgsql extension? Our extension not the one from wamp. The extension should work with 5.2.6 as well. [2008-07-15 03:46:25] twilightthorn dot kh at gmail dot com Also, the reason I'm not currently using PHP5.2.6, all the workarounds submitted to fix the bug of not being able to use PGSQL in that version have not worked for me. If some one would be so kind as to give me and actual, detailed, workaround for using PGSQL in PHP5.2.6 on Vista Business, I would be very grateful. [2008-07-15 03:37:36] twilightthorn dot kh at gmail dot com Description: As far as I can tell any successful call to a database, local or on an external server, will crash apache. I'm using a WAMP2.0c setup using PHP5.2.5 on vista and it did work fine until I added the PHP Postgre extension. I do know that the extension is up-to-date, and have in fact even tried to replace it with the one used in PHP5.2.6, it also fails and crashes the server. Without the extension loaded, PHP/apache will output all errors and any other processing messages before the PG_Connect() call, upon which processing halts. The system event log refers to ntdll.dll on this crash, but I don't really know why. This does sound an aweful lot like an Apache bug, but it only occurs when PHP's Postgre extension is loaded and the pg_connect(); function is called. Best regards, and thanks. Thomas. Reproduce code: --- ?php //... $link = pg_connect(host=localhost port=5432 dbname=public user=postgres password=PASS) or op_err('Con'); //... ? Expected result: A successful database call and web-page out put. Actual result: -- I get a pop-up message telling me HTTPD.EXE has stopped working. This is the information logged in the system by its failure: -- Faulting application httpd.exe, version 2.2.8.0, time stamp 0x47904924, faulting module ntdll.dll, version 6.0.6000.16386, time stamp 0x4549bdc9, exception code 0xc0fd, fault offset 0x00061635, process id 0x1174, application start time 0x01c8e628c7166890. -- There are no other entries in my PHP or Apache error logs. -- Edit this bug report at http://bugs.php.net/?id=45516edit=1
#45430 [Ctl]: crypt () not thread-safe when crypt_r is not available!
ID: 45430 Updated by: [EMAIL PROTECTED] Reported By: alex at all-dynamics dot de Status: Critical Bug Type: *Encryption and hash functions Operating System: Win32 PHP Version: 5.2.6 -Assigned To: +Assigned To: pajoye New Comment: Taking the hand on it for the windows part. As part of the win32 improvement effort, I already wrote a patch to drop our win32's md5_crypt implementation and add support for other algorithms (just like crypt_r + DES). Previous Comments: [2008-07-15 02:28:46] [EMAIL PROTECTED] See also: http://blog.php-security.org/archives/82-Suhosin-0.9.20-and-crypt-Thread-Safety-Vulnerability.html [2008-07-04 08:50:38] alex at all-dynamics dot de Description: crypt () seems not to be thread-safe when using a threaded webserver (Windows, ISAPI). Maybe this has something to do with win32/md5crypt.c / md5_crypt: static char passwd[120] (static buffer which is returned to the calling function). Reproduce code: --- Run this code with two or more simultaneous requests on a threaded server: set_time_limit (0); $passwd1 = testtesttest; $passwd2 = passwordpassword; for ($i = 0; $i 3000; $i++) { $crypted = crypt ($passwd1); if ($crypted != crypt ($passwd1, $crypted)) die (no match); $crypted = crypt ($passwd2); if ($crypted != crypt ($passwd2, $crypted)) die (no match); } echo ok; Expected result: ok on all requests Actual result: -- one request may end with no match, the other request will display ok -- Edit this bug report at http://bugs.php.net/?id=45430edit=1
#35961 [Asn-Csd]: executing programs with spaces in program name and parameters fails.
ID: 35961 Updated by: [EMAIL PROTECTED] Reported By: rquadling at gmail dot com -Status: Assigned +Status: Closed Bug Type: CGI related Operating System: Windows XP SP2 PHP Version: 5.1.1 Assigned To: scottmac Previous Comments: [2008-07-13 18:44:37] [EMAIL PROTECTED] Scott, please confirm it has been reverted in 5.2 :) [2008-06-06 09:35:38] [EMAIL PROTECTED] This was fixed. HEAD : http://cvs.php.net/viewvc.cgi/TSRM/tsrm_win32.c?r1=1.34r2=1.35 5.2x : http://cvs.php.net/viewvc.cgi/TSRM/tsrm_win32.c?r1=1.27.2.1.2.8r2=1.27.2.1.2.9 5.3x : http://cvs.php.net/viewvc.cgi/TSRM/tsrm_win32.c?r1=1.27.2.1.2.7.2.1r2=1.27.2.1.2.7.2.2 Can the 5.2x commit be reversed? This caused a minor issue with phd for 5.2. Whilst it is easily fixed it is a BC mid version (5.2.6 vs 5.2.7-dev). Having it at 5.3+ allows the BC to be documented as part of the changes to 5.3. Thank you. Richard Quadling. [2008-05-30 10:14:08] [EMAIL PROTECTED] [11:11] PierreRichardQ, assign these bugs to me and I will dispatch them if necessary [2006-01-10 14:00:14] rquadling at gmail dot com Well, doesn't that just suck! [2006-01-10 13:49:41] [EMAIL PROTECTED] Not PHP problem. See bug #25361. 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/35961 -- Edit this bug report at http://bugs.php.net/?id=35961edit=1
#35961 [Csd]: executing programs with spaces in program name and parameters fails.
ID: 35961 Updated by: [EMAIL PROTECTED] Reported By: rquadling at gmail dot com Status: Closed Bug Type: CGI related Operating System: Windows XP SP2 PHP Version: 5.1.1 Assigned To: scottmac New Comment: for the record here, it was reverted from 5.2 Previous Comments: [2008-07-13 18:44:37] [EMAIL PROTECTED] Scott, please confirm it has been reverted in 5.2 :) [2008-06-06 09:35:38] [EMAIL PROTECTED] This was fixed. HEAD : http://cvs.php.net/viewvc.cgi/TSRM/tsrm_win32.c?r1=1.34r2=1.35 5.2x : http://cvs.php.net/viewvc.cgi/TSRM/tsrm_win32.c?r1=1.27.2.1.2.8r2=1.27.2.1.2.9 5.3x : http://cvs.php.net/viewvc.cgi/TSRM/tsrm_win32.c?r1=1.27.2.1.2.7.2.1r2=1.27.2.1.2.7.2.2 Can the 5.2x commit be reversed? This caused a minor issue with phd for 5.2. Whilst it is easily fixed it is a BC mid version (5.2.6 vs 5.2.7-dev). Having it at 5.3+ allows the BC to be documented as part of the changes to 5.3. Thank you. Richard Quadling. [2008-05-30 10:14:08] [EMAIL PROTECTED] [11:11] PierreRichardQ, assign these bugs to me and I will dispatch them if necessary [2006-01-10 14:00:14] rquadling at gmail dot com Well, doesn't that just suck! [2006-01-10 13:49:41] [EMAIL PROTECTED] Not PHP problem. See bug #25361. 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/35961 -- Edit this bug report at http://bugs.php.net/?id=35961edit=1
#45479 [Opn-Csd]: wrong result when using preg_replace with /u and ungreedy *?
ID: 45479 Updated by: [EMAIL PROTECTED] Reported By: michael dot virnstein at brodos dot de -Status: Open +Status: Closed Bug Type: PCRE related Operating System: Linux PHP Version: 5.2.6 New Comment: Bug was in PCRE (http://bugs.exim.org/show_bug.cgi?id=732) and not in PHP. Anyway the fix will be bundled with the next PCRE release. Previous Comments: [2008-07-10 16:53:13] michael dot virnstein at brodos dot de Description: When i use preg_replace with the /u utf-8 modifier and an ungreedy search e.g. with *?, the result is different to a call without /u. Reproduce code: --- ?php echo without /u:. preg_replace('/^[^d]*?(d)?$/', '\\1', 'abc'); echo br; echo with /u: .preg_replace('/^[^d]*?(d)?$/u', '\\1', 'abc'); ? Expected result: without /u: with /u: Actual result: -- without /u: with /u: abc -- Edit this bug report at http://bugs.php.net/?id=45479edit=1
#45516 [Fbk-Opn]: PGSQL seems to crash apache.
ID: 45516 User updated by: twilightthorn dot kh at gmail dot com Reported By: twilightthorn dot kh at gmail dot com -Status: Feedback +Status: Open Bug Type: PostgreSQL related Operating System: Vista Business PHP Version: 5.2.6 Assigned To: pajoye New Comment: Trying to run the file through the command line makes the CLI crash as well. The system logged this for CLI's crash: --- Faulting application php.exe, version 5.2.6.6, time stamp 0x481b8f60, faulting module ntdll.dll, version 6.0.6000.16386, time stamp 0x4549bdc9, exception code 0xc0fd, fault offset 0x000447f2, process id 0x1398, application start time 0x01c8e660c8bcb334. --- As for your Back-trace, I hope this covers it. :) --- Thread 0 - System ID 4972 Entry point php+2fc2 Create time 7/15/2008 3:06:11 AM Time spent in user mode 0 Days 0:0:1.497 Time spent in kernel mode 0 Days 0:0:13.88 Function Arg 1 Arg 2 Arg 3 Source ntdll!_SEH_prolog4+1a 00413398 004133c0 ntdll!RtlAllocateHeap+17c 0014 021a ntdll!RtlpDosPathNameToRelativeNtPathName_Ustr+97 0001 00413330 004133cc ntdll!RtlpDosPathNameToRelativeNtPathName_U+61 0001 7ffdec00 004133cc ntdll!RtlDosPathNameToRelativeNtPathName_U+18 7ffdec00 004133cc 004133c0 kernel32!FindFirstFileExW+a0 7ffdec00 00413684 kernel32!FindFirstFileA+44 0229b770 00413a28 022bd789 php5ts!virtual_file_ex+6d3 052ae270 003a2638 php5ts!php_stat+1c5 00414e58 003a ntdll!RtlpLowFragHeapAllocFromContext+a6f 0018 01970b40 1019ba22 php5ts!ts_resource_ex+15 0226a380 0004 php5ts!ecalloc+13 0196eb18 003a2638 003a2638 php5ts!execute+b48 NTDLL!_SEH_PROLOG4+1AIn php__PID__4724__Date__07_15_2008__Time_03_06_41AM__649__Second_Chance_Exception_C0FD.dmp the assembly instruction at ntdll!_SEH_prolog4+1a in C:\Windows\System32\ntdll.dll from Microsoft Corporation has caused a stack overflow exception (0xC0FD) when trying to write to memory location 0x00412fdc on thread 0 Module Information Image Name: C:\Windows\System32\ntdll.dll Symbol Type: PDB Base address: 0x7770 Time Stamp: Thu Nov 02 02:43:37 2006 Checksum: 0x00128171 Comments: COM DLL: False Company Name: Microsoft Corporation ISAPIExtension: False File Description: NT Layer DLL ISAPIFilter: False File Version: 6.0.6000.16386 (vista_rtm.061101-2205) Managed DLL: False Internal Name: ntdll.dll VB DLL: False Legal Copyright: © Microsoft Corporation. All rights reserved. Loaded Image Name: ntdll.dll Legal Trademarks: Mapped Image Name: Original filename: ntdll.dll Module name: ntdll Private Build: Single Threaded: False Product Name: Microsoft® Windows® Operating System Module Size: 1.12 MBytes Product Version: 6.0.6000.16386 Symbol File Name: c:\symcache\ntdll.pdb\C0A498F0036E4D4FB5CBF69005B0F9242\ntdll.pdb Special Build: Really, thanks for the dedication on this. I'd like to see more people as devoted as you are to fixing problems. Best regards, Thomas Previous Comments: [2008-07-15 09:07:36] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. Thank you for helping us make PHP better. Can you try it in CLI as well? (in the cmd line php.exe yourscript.php) [2008-07-15 09:01:59] twilightthorn dot kh at gmail dot com Still no go... :( System logs the same error, Apache is still crashing. To be sure it wasn't JUST Apache, I've tested my server by placing some massive load on it. Apache did not crash after well over 4 minutes of work, work that kept my CPU clocked at 100% for the duration. The PGSQL, and PDO_PGSQL extensions both initialized for this test. I'm coming to think that maybe the problem isn't with the PGSQL extensions, but with my ntdll.dll. After all, these same extensions work on other platforms, and have been found to work on Vista* OS's before, right? I've found that there is a later version of ntdll.dll on for my system, and would love to try using the newer one. But all the same I don't wish to lose my computer... Any other advise that you could offer?
#43983 [Opn-Bgs]: Weird referencing with stdClass objects
ID: 43983 Updated by: [EMAIL PROTECTED] Reported By: rubens21 at gmail dot com -Status: Open +Status: Bogus Bug Type:Scripting Engine problem PHP Version: 5.2.5 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 Previous Comments: [2008-04-07 19:02:45] ben at mailinator dot com How is this weird? $test is an object. You store a reference to $test, and then you modify $test. Since you only stored a reference to the original object, of course you will see the new value when you print out the reference. This changed between PHP4 and PHP5. PHP4 stores a copy rather than a reference. If you are looking for the PHP4 behavior, you can use the clone keyword. e.g. $Objeto-valorDeTeste[] = clone $test; [2008-02-24 20:17:54] rubens21 at gmail dot com I'm sorry, 'The same' = 'The same problem' CODE: $test = new stdClass(); $Objeto = new stdClass(); $test-valor = The first value; $Objeto-valorDeTeste[] = $test; $test-valor = The second value; echo pre; print_r($Objeto-valorDeTeste); echo br /; var_dump($Objeto-valorDeTeste); echo /pre; Array ( [0] = stdClass Object ( [valor] = The second value ) ) array(1) { [0]= object(stdClass)#1 (1) { [valor]= string(16) The second value } } [2008-02-24 19:44:21] [EMAIL PROTECTED] That's impossible, the output of var_dump() differs a LOT from print_r(). So can you please really test it? [2008-02-23 17:04:12] rubens21 at gmail dot com What does it output when you replace print_r() with var_dump() ? R: The same [2008-02-01 22:28:15] [EMAIL PROTECTED] What does it output when you replace print_r() with var_dump() ? 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/43983 -- Edit this bug report at http://bugs.php.net/?id=43983edit=1
#44955 [Asn-Csd]: socket array keys not working as expected
ID: 44955 Updated by: [EMAIL PROTECTED] Reported By: fidojones at fidojones dot com -Status: Assigned +Status: Closed Bug Type: Sockets related Operating System: Linux PHP Version: 5.2.6 Assigned To: felipe New Comment: Ok, sorry! Thanks fidojones for the feedbacks. Previous Comments: [2008-07-15 06:44:57] [EMAIL PROTECTED] Changes in behavior in minor versions are bugs. [2008-07-14 21:45:44] fidojones at fidojones dot com Aparently socket_select acts completely diferent as past versions. Nanoweb server has been fixed to work with this versions: old version in nanoweb before 5.2.6: $ns=socket_select($lnset, $write=NULL, $except=NULL, 1); if ($ns) { if ($lnset[0]==$children_sck) { new version in nanoweb from 5.2.6: $ns=socket_select($lnset, $write=NULL, $except=NULL, 1); if ($ns) foreach ($lnset as $lnact) { if ($lnact==$children_sck) { So I think it's not a bug, but acts different as older versions. [2008-07-14 21:29:57] [EMAIL PROTECTED] Felipe, you break - you fix. Or revert the patch you applied that obviously causes the problem. [2008-05-09 18:12:36] fidojones at fidojones dot com I'm using the socket.c file in ext/socket/ from php 5.2.5 in php 5.2.6 and all is working fine. And the only diff in socket.c is the patch http://bugs.php.net/bug.php?id=44197 ,so explain me if not related with this patch, why is working perfect? if I only overwrite the socket.c file... You should test the script and say me if you see the execution diference and I encourage to try http://nanoweb.si.kz/ that has been working with all php versions from 4 to 5.2.5 and only fails with php 5.2.6. [2008-05-09 17:50:12] [EMAIL PROTECTED] The problem isn't related with the patch... It just fixed a problem in socket_select(). Your script doesn't use it. 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/44955 -- Edit this bug report at http://bugs.php.net/?id=44955edit=1
#45178 [Asn]: garbage collector and cyclic references
ID: 45178 Updated by: [EMAIL PROTECTED] Reported By: thomas dot jarosch at intra2net dot com Status: Assigned Bug Type: Reproducible crash Operating System: Linux PHP Version: 5.3CVS-2008-06-04 (snap) Assigned To: dmitry New Comment: The simplest case for this memory corruption. ?php class Foo { function Foo() { $this-error = array($this,$this); } } $a = new Foo(); Previous Comments: [2008-07-15 07:37:50] [EMAIL PROTECTED] At first, you have a serious issue in your code. static variables MUST NOT be asigned by reference, because they are already references. As result the singleton pattern just doesn't work. BTW the bug is really exists. The simplified test case follows(changing = new into = new fixes memory corruption). ?php class Horde_History { function raiseError() { return debug_backtrace(); } function Horde_History() { $this-error = $this-raiseError(); echo Memory usage: . memory_get_usage() . \n; } } for ($i=0;$i10;$i++) { $a = new Horde_History(); } ? [2008-06-05 09:13:20] thomas dot jarosch at intra2net dot com Actually, the reproduce code from #33595 also leaks memory. The statement about Horde is not 100% correct as only some singleton functions are affected. I mixed it up with another reference problem I fixed a while ago. Nontheless memory is leaked :-) [2008-06-04 16:57:45] thomas dot jarosch at intra2net dot com Description: Hello together, I'm currently trying to find a heap corruption while using Horde and noticed a rather odd behavior. The supplied code is the standard way Horde does it singletons. We always used the syntax of $object = new class to make it work with PHP4 and PHP5. If I change that to $object = new class, everything works as expected. I've found bug #32845 and noticed what we are doing seems wrong, so Horde needs fixing. The problem gets worse if the class object contains a variable of the type PEAR_Error, which contains cyclic references. Not only does the constructor get called every time, the object leaks memory like hell, even with PHP 5.3. I've searched through the bugtracker and thought the garbage collector now handles cyclic references, but maybe this is a side-effect of something else going wrong. Is the memory consumption by design? Thanks in advance for any comment, Thomas Reproduce code: --- ?php require_once PEAR.php; class Horde_History { var $error; function singleton() { static $history; if (!isset($history)) { $history = new Horde_History(); } return $history; } function Horde_History() { $this-error = PEAR::raiseError(error); echo Memory usage: . memory_get_usage() . \n; } } for (;;) { $a = Horde_History::singleton(); } Expected result: Constant memory usage. Actual result: -- Increasing memory usage. -- Edit this bug report at http://bugs.php.net/?id=45178edit=1
#45483 [Com]: Add an era designater to DateTime methods when formatting or parsing dates
ID: 45483 Comment by: tj at systisoft dot com Reported By: tj at systisoft dot com Status: Assigned Bug Type: Feature/Change Request Operating System: All PHP Version: 5.3CVS-2008-07-11 (CVS) Assigned To: derick New Comment: There should also be a possibility to format a year without the sign, because if you format with 'Y' you will get something like: -2000 BC This can either be done by an new format char for unsigned year or that the 'Y' format is omitting the sign when a format char for the era designator is present. Previous Comments: [2008-07-11 10:18:11] tj at systisoft dot com Description: It is currently not possible to specify an era designator in a format when parsing or formatting dates with DateTime::createFromFormat or DateTime::format. An era designater would be BC or AD as in 1/1/0200 BC or 1/1/2004 AD. I don't know which format char would be good since 'G' which is used in some other format patterns as era designator seems to be already taken. Reproduce code: --- N/A Expected result: N/A Actual result: -- N/A -- Edit this bug report at http://bugs.php.net/?id=45483edit=1
#14908 [Com]: Unable to create Java Virtual Machine
ID: 14908 Comment by: chandini882000 at yahoo dot com Reported By: fusion at factmusic dot com Status: No Feedback Bug Type: Java related Operating System: W2K PHP Version: 4.1.1 New Comment: Even i am facing the same problem.I am trying to call java from php.For this i am using PECL extension..and i also downloaded php java bridge.But the following test code: $system = new Java('java.lang.System'); // demonstrate property access echo Java version= . $system-getProperty('java.version') . br/; When i execute this i got the following error: Fatal error: java() [a href='function.java'function.java/a]: Unable to create Java Virtual Machine In php.ini i added the following thing: [java] java.home=F:\Program Files\Java\jdk1.6.0_03 java.class.path=C:\xampp\php\ext\JavaBridge.jar java.library.path=C:\wamp\php\ext java.library=F:\Program Files\Java\jdk1.6.0_03\jre\bin\server\jvm.dll Then my system started give an error that Apache HTTP Server has encountered a problem and needs to close. We are sorry for the inconvenience...And can anyone help me out to solve this problem? Chandini Previous Comments: [2007-08-15 13:55:59] patelbhupi at yahoo dot com hello, i need to know how to configure php with java, Thanks in advance [2002-03-26 11:31:22] ben at gostrategic dot com I am receiving the following error using Win2k / Apache1.3.22 / PHP4.1.2 / JDK1.2.2 -- Unable to initalize Java Virtual Machine -- immediately after loading a script that uses Java. I can remedy the problem by restarting Apache, which is obviously not feasible. [2002-03-25 01:00:50] fusion at factmusic dot com No, I have never been able to get this to work. Maybe someone else can? [2002-03-25 00:00:03] php-bugs at lists dot php dot net No feedback was provided for this bug for over a month, 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. [2002-03-05 03:52:31] lilyprasad at hotmail dot com With reference to the Bug:14908 from [EMAIL PROTECTED] dated 7Jan, i would like to put following question as i am also facing the same problem: Were you able to solve your problem! We are also trying to install PHP4.1.1 with java spport having jdk version 1.2.2, linux 7.1, apache 1.3.19. I also get the same error while testing a test php4 file having : ?php $obj = new Java (java.lang.system) ; ? The error is Fatal error: Unable to create Java Virtual Machine in /var/www/html/test/test.php4. [Java] java.class.path = /var/www/php/php-4.1.1/ext/java/php_java.jar java.home = /var/www/php/php-4.1.1/ext/java/jdk1.2.2:/var/www/php/php-4.1.1/ext/ java/jdk1.2.2/bin:/var/www/php/php-4.1.1/ext/java/jdk1.2.2/jre/bin:/var/www/php/ php-4.1.1/ext/java/jdk1.2.2/jre/lib ;java.library.path = /var/www/php/php-4.1.1/ext/java/jdk1.2.2/jre/lib/i386 ;java.library = libjava.so java.library.path = /var/www/php/php-4.1.1/ext/java/jdk1.2.2/jre/lib/i386/classi c java.library = libjvm.so extension_dir = /usr/local/lib/php/extensions/no-debug-non-zts-20010901 extension = libphp_java.so This is our present setting in the php.ini file. Kindly help us. With Regards, Lily 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/14908 -- Edit this bug report at http://bugs.php.net/?id=14908edit=1
#14908 [NoF-Fbk]: Unable to create Java Virtual Machine
ID: 14908 Updated by: [EMAIL PROTECTED] Reported By: fusion at factmusic dot com -Status: No Feedback +Status: Feedback Bug Type: Java related Operating System: W2K PHP Version: 4.1.1 New Comment: If you use the PECL extension, report the bug there. Please note that php 4.x will not get any non critical fix (security) until its very last release. Which PHP version do you use? Previous Comments: [2008-07-15 11:59:46] chandini882000 at yahoo dot com Even i am facing the same problem.I am trying to call java from php.For this i am using PECL extension..and i also downloaded php java bridge.But the following test code: $system = new Java('java.lang.System'); // demonstrate property access echo Java version= . $system-getProperty('java.version') . br/; When i execute this i got the following error: Fatal error: java() [a href='function.java'function.java/a]: Unable to create Java Virtual Machine In php.ini i added the following thing: [java] java.home=F:\Program Files\Java\jdk1.6.0_03 java.class.path=C:\xampp\php\ext\JavaBridge.jar java.library.path=C:\wamp\php\ext java.library=F:\Program Files\Java\jdk1.6.0_03\jre\bin\server\jvm.dll Then my system started give an error that Apache HTTP Server has encountered a problem and needs to close. We are sorry for the inconvenience...And can anyone help me out to solve this problem? Chandini [2007-08-15 13:55:59] patelbhupi at yahoo dot com hello, i need to know how to configure php with java, Thanks in advance [2002-03-26 11:31:22] ben at gostrategic dot com I am receiving the following error using Win2k / Apache1.3.22 / PHP4.1.2 / JDK1.2.2 -- Unable to initalize Java Virtual Machine -- immediately after loading a script that uses Java. I can remedy the problem by restarting Apache, which is obviously not feasible. [2002-03-25 01:00:50] fusion at factmusic dot com No, I have never been able to get this to work. Maybe someone else can? [2002-03-25 00:00:03] php-bugs at lists dot php dot net No feedback was provided for this bug for over a month, 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. 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/14908 -- Edit this bug report at http://bugs.php.net/?id=14908edit=1
#45019 [Ver]: Segmentation fault with SELECT ? and UNION
ID: 45019 User updated by: pumuckel at metropolis dot de Reported By: pumuckel at metropolis dot de Status: Verified Bug Type: MySQLi related Operating System: Linux Gentoo PHP Version: 5.3CVS-2008-05-16 (snap) Assigned To: andrey New Comment: Client API version: mysqlnd 5.0.4-dev - 080501 - $Revision: 1.3.2.15 With this version and this script we do not get segmentation fault. But I have another script where you won't get expected results: [...] $foo = 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ; $foo2 = foo238964283467254725472725347254757652734522374628346246; $stmt = $db-prepare(SELECT ? UNION SELECT ?); $stmt-bind_param(ss, $foo, $foo2); $stmt-bind_result($bar); $stmt-execute(); $stmt-fetch(); // first to fetch foo echo(F1: $bar vs $foo (should be equal)\n); $stmt-fetch(); // second to fetch $foo echo(F2: $bar vs $foo2 (should be equal)\n); $stmt-free_result(); [...] Mike Previous Comments: [2008-07-14 19:16:54] [EMAIL PROTECTED] This looks like a libmysql only issue. Pumuckel, if possible give mysqlnd a test with your code. [2008-07-14 18:17:47] [EMAIL PROTECTED] Verified - there are issues with UNION. I'll play with it. Andrey, wait for my test code. [2008-05-16 08:11:43] pumuckel at metropolis dot de Description: We experienced some strange behaviour when using INSERT INTO ... select ? ... union select ? ... Some bound variables have been inserted, but were truncated somewhere within the strings. We have created a simple test script which only selects and returns the contents we bound. With SELECT ? UNION SELECT ? and 2 bound variables we can see, that the contents of the variables are not the same when reading back from db. With the code below we even managed to get a segmentation fault. Reproduce code: --- ?php $db = new mysqli($hostname, $username, $password, $dbname); $foo = 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ; $foo2 = 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ; $stmt = $db-prepare(SELECT CAST('x' as CHAR) X UNION SELECT CAST(? AS CHAR(20)) UNION SELECT CAST(? as CHAR(50))); $stmt-bind_param(ss, $foo, $foo2); $stmt-bind_result($bar); $stmt-execute(); $stmt-fetch(); // first to fetch foo echo(F1: $bar vs $foo (.strlen($bar). vs. .strlen($foo).)\n); $stmt-fetch(); // second to fetch $foo echo(F2: $bar vs $foo (.strlen($bar). vs. .strlen($foo).)\n); $stmt-fetch(); // second to fetch casted $foo echo(F3: $bar vs $foo2 (.strlen($bar). vs. .strlen($foo2).)\n); $stmt-free_result(); ? Expected result: Returned variable $bar should contain contents of 'x', $foo, $foo2: F1: x vs 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ (1 vs. 36) F2: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ vs 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ (36 vs. 36) F3: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ vs 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ (36 vs. 36) Actual result: -- F1: x vs 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ (1 vs. 36) F2: 0123 vs 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ (4 vs. 36) Segmentation fault With gdb: F1: x vs 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ (1 vs. 36) F2: 0123 vs 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ (4 vs. 36) Program received signal SIGSEGV, Segmentation fault. mysqli_stmt_fetch_libmysql (ht=0, return_value=0x86f9288, return_value_ptr=0x0, this_ptr=0x86f8fb8, return_value_used=0) at /usr/local/src/php5.3-200805151430/ext/mysqli/mysqli_api.c:837 837 if (Z_TYPE_P(stmt-result.vars[i]) == IS_STRING) { (gdb) where #0 mysqli_stmt_fetch_libmysql (ht=0, return_value=0x86f9288, return_value_ptr=0x0, this_ptr=0x86f8fb8, return_value_used=0) at /usr/local/src/php5.3-200805151430/ext/mysqli/mysqli_api.c:837 #1 0x082e92bd in zend_do_fcall_common_helper_SPEC (execute_data=0x8729f38) at /usr/local/src/php5.3-200805151430/Zend/zend_vm_execute.h:194 #2 0x082daa77 in execute (op_array=0x86f843c) at /usr/local/src/php5.3-200805151430/Zend/zend_vm_execute.h:96 #3 0x082ba797 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php5.3-200805151430/Zend/zend.c:1195 #4 0x0826ad8c in php_execute_script (primary_file=0xbfd034f4) at /usr/local/src/php5.3-200805151430/main/main.c:2077 #5 0x083437f6 in main (argc=2, argv=0xbfd03684) at /usr/local/src/php5.3-200805151430/sapi/cli/php_cli.c:1139 -- Edit this bug report at http://bugs.php.net/?id=45019edit=1
#45518 [NEW]: NULL matching zero, empty array, false
From: stephen dot cuppett at sas dot com Operating system: Windows XP/2003 PHP version: 5.2.6 PHP Bug Type: Variables related Bug description: NULL matching zero, empty array, false Description: I noticed a behavior with PHP 5.2.x that I found disturbing. PHP is matching variables initialized to zero, an empty array and false with NULL. From the documentation here: http://us2.php.net/NULL The only thing that should match NULL are ones that meet these criteria: A variable is considered to be null if: - it has been assigned the constant NULL. - it has not been set to any value yet. - it has been unset(). The function empty() should return true in the above cases (and does), but a comparison operator of == should not. FYI, is_null() returns false and the === operator works as expected too. Reproduce code: --- ?php $empty_array = array(); if ($empty_array == NULL) echo Empty array, same as NULL\n; else echo Empty array, diff from NULL\n; $zero = 0; if ($zero == NULL) echo Zero, same as NULL\n; else echo Zero, different from NULL\n; ? Expected result: Empty array, diff from NULL Zero, different from NULL Actual result: -- Empty array, same as NULL Zero, same as NULL -- Edit bug report at http://bugs.php.net/?id=45518edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45518r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45518r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45518r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45518r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45518r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45518r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45518r=needscript Try newer version:http://bugs.php.net/fix.php?id=45518r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45518r=support Expected behavior:http://bugs.php.net/fix.php?id=45518r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45518r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45518r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45518r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45518r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45518r=dst IIS Stability:http://bugs.php.net/fix.php?id=45518r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45518r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45518r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45518r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45518r=mysqlcfg
#45518 [Opn-Bgs]: NULL matching zero, empty array, false
ID: 45518 User updated by: stephen dot cuppett at sas dot com Reported By: stephen dot cuppett at sas dot com -Status: Open +Status: Bogus Bug Type: Variables related Operating System: Windows XP/2003 PHP Version: 5.2.6 New Comment: NM, I see the loose comparisons table in the appendix. Previous Comments: [2008-07-15 12:19:28] stephen dot cuppett at sas dot com Description: I noticed a behavior with PHP 5.2.x that I found disturbing. PHP is matching variables initialized to zero, an empty array and false with NULL. From the documentation here: http://us2.php.net/NULL The only thing that should match NULL are ones that meet these criteria: A variable is considered to be null if: - it has been assigned the constant NULL. - it has not been set to any value yet. - it has been unset(). The function empty() should return true in the above cases (and does), but a comparison operator of == should not. FYI, is_null() returns false and the === operator works as expected too. Reproduce code: --- ?php $empty_array = array(); if ($empty_array == NULL) echo Empty array, same as NULL\n; else echo Empty array, diff from NULL\n; $zero = 0; if ($zero == NULL) echo Zero, same as NULL\n; else echo Zero, different from NULL\n; ? Expected result: Empty array, diff from NULL Zero, different from NULL Actual result: -- Empty array, same as NULL Zero, same as NULL -- Edit this bug report at http://bugs.php.net/?id=45518edit=1
#45519 [NEW]: GetImageSize returns error 404 when no DNS AAAA answer
From: yann dot jouanin at intelunix dot fr Operating system: Gentoo 2007.1 PHP version: 5.2.6 PHP Bug Type: GetImageSize related Bug description: GetImageSize returns error 404 when no DNS answer Description: With --enable-ipv6 on php, when using getimagesize with a url as argument the sequence is the following : DNS request : : ipv6 request AA : alias and A : name When there isn't any answer for the request, getimagesize return Error 404. With the ipv6 support disable, everything is ok. Reproduce code: --- $answer = getimagesize(http://ecx.images-amazon.com/images/I/51o-TDjsaZL._SL110_PIsitb-sm-arrow,TopRight,13,-17_OU01_.jpg;); Expected result: Should give the size Actual result: -- Returns error 404 -- Edit bug report at http://bugs.php.net/?id=45519edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45519r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45519r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45519r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45519r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45519r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45519r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45519r=needscript Try newer version:http://bugs.php.net/fix.php?id=45519r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45519r=support Expected behavior:http://bugs.php.net/fix.php?id=45519r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45519r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45519r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45519r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45519r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45519r=dst IIS Stability:http://bugs.php.net/fix.php?id=45519r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45519r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45519r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45519r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45519r=mysqlcfg
#45447 [Opn]: filesystem time functions
ID: 45447 User updated by: Bryan dot Gallant at hma dot com Reported By: Bryan dot Gallant at hma dot com Status: Open Bug Type: Filesystem function related Operating System: Windows Server 2008 PHP Version: 5.2.6 New Comment: Any update on this? Previous Comments: [2008-07-08 00:12:21] Bryan dot Gallant at hma dot com Sorry, it's the full path in a string. [2008-07-07 23:57:46] Bryan dot Gallant at hma dot com So far I've tried all manner of office documents, tifs, jpegs, text files, etc. [2008-07-07 21:50:54] [EMAIL PROTECTED] And $file is..? [2008-07-07 19:10:34] Bryan dot Gallant at hma dot com Description: All Time related Statistics for Files return -1. W2K8/IIS7 Reproduce code: --- print_r(stat($file)); Expected result: Unix timestamp on atime,mtime,ctime Actual result: -- Array ( [0] = 0 [1] = 0 [2] = 33188 [3] = 1 [4] = 0 [5] = 0 [6] = -1 [7] = 0 [8] = -1 [9] = -1 [10] = -1 [11] = -1 [12] = -1 [dev] = 0 [ino] = 0 [mode] = 33188 [nlink] = 1 [uid] = 0 [gid] = 0 [rdev] = -1 [size] = 0 [atime] = -1 [mtime] = -1 [ctime] = -1 [blksize] = -1 [blocks] = -1 ) -- Edit this bug report at http://bugs.php.net/?id=45447edit=1
#44197 [Csd]: socket array keys lost on socket_select
ID: 44197 Updated by: [EMAIL PROTECTED] Reported By: darrel dot opry at gmail dot com Status: Closed Bug Type: Sockets related Operating System: Linux PHP Version: 5.2.5 New Comment: Note: This fix is in PHP 5.3.0 and upwards as it changes the behaviour.. Previous Comments: [2008-02-21 02:35:21] [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. [2008-02-21 00:18:37] darrel dot opry at gmail dot com Description: When you pass a keyed array of sockets into socket_select the keys are lost. Reproduce code: --- $clients = array(); $listener = socket_create_listen(); $clients[uniqid()] = socket_accept($listener); $read = $clients; print_r($read); socket_select($read, $w = NULL, $e = NULL, NULL); print_r($read); socket_shutdown($listener); socket_close($listener); Expected result: to test: telnet localhost enter text, hit enter. I expect the second print_r($read) to have the same key as the first print_r($read). Actual result: -- Array ( [47bcc1d71874d] = Resource id #5 ) Array ( [0] = Resource id #5 ) -- Edit this bug report at http://bugs.php.net/?id=44197edit=1
#45514 [Opn-Fbk]: socket_select + timeout returns immediately on non-blocking connect
ID: 45514 Updated by: [EMAIL PROTECTED] Reported By: rbarnes at aethon dot com -Status: Open +Status: Feedback Bug Type: Sockets related Operating System: Ubuntu 7.10 / Linux 2.6.22-14 PHP Version: 5.2.6 New Comment: Try using stream_select() and the other stream_* functions instead: http://www.php.net/manual/en/ref.stream.php Previous Comments: [2008-07-14 21:58:01] rbarnes at aethon dot com Description: I'm trying to implement a non-blocking connect similar to the one in Steven's Unix Network Programming on pg 450. I create the socket, set it to non-blocking and call connect which of course returns immediately with a SOCKET_EINPROGRESS error ( as expected ). Then I call socket_select with a timeout greater than 0 and socket_select returns immediately, even though the socket's state is still SOCKET_EINPROGRESS. errno 115: Operation now in progress Reproduce code: --- function ConnectSocket($remote, $port) { $sock = NULL; if (!($sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) return NULL; socket_set_nonblock($sock); if ([EMAIL PROTECTED]($sock, $remote, $port+0)) { if (socket_select($rin = array($sock), $win = $rin, $ein = NULL, 30.0) 1) return NULL; if (socket_recv($sock, $buf, 0, 0) === false) { print socket_strerror(socket_last_error()) . \n; return NULL; } } socket_set_block($sock); return $sock; } ConnectSocket('206.190.60.37', 80); Expected result: socket_select should block until either the connection completes or the timeout is exceeded. Actual result: -- socket_select returns immediately. SOCKET_EINPROGRESS Operation now in progress -- Edit this bug report at http://bugs.php.net/?id=45514edit=1
#45130 [Opn]: Contradictory error message (failed to open stream: Success)
ID: 45130 Updated by: [EMAIL PROTECTED] Reported By: php at tmcode dot com Status: Open Bug Type: Streams related Operating System: Linux PHP Version: 5.2.6 New Comment: The problem is that the underlying wrapper code emits more than one error (warning) in this case: Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /home/jani/t.php on line 10 Warning: file_get_contents(): Failed to enable crypto in /home/jani/t.php on line 10 Warning: file_get_contents(https://google.com): failed to open stream: Success in /home/jani/t.php on line 10 Of course those last 2 are kinda useless. Previous Comments: [2008-05-29 22:12:37] php at tmcode dot com Description: Similar to bug #39850. The last warning returned by file_get_contents, fopen, etc when a SSL error is encountered contains the word Success. Reproduce code: --- // verify_peer=true with https://google.com // to force a hostname mismatch error $options = array( 'ssl' = array( 'verify_peer' = true, 'allow_self_signed' = false ) ); $context = stream_context_create($options); $res=file_get_contents('https://google.com',null, $context); $error = error_get_last(); echo $error['message']; Expected result: $error['message'] to include something other than the word success Actual result: -- file_get_contents(https://google.com): failed to open stream: Success -- Edit this bug report at http://bugs.php.net/?id=45130edit=1
#45487 [Bgs]: imap_getsubscribed clobbers attributes
ID: 45487 User updated by: sblackstone at gmail dot com Reported By: sblackstone at gmail dot com Status: Bogus Bug Type: IMAP related Operating System: OSX Leopard PHP Version: 5.2.6 New Comment: Thanks for looking at this.. I did a little more research and tracked it all the way through the client libraries. According to RFC 3501 The returned untagged LSUB response MAY contain different mailbox flags from a LIST untagged response. If this should happen, the flags in the untagged LIST are considered more authoritative. And in fact, the case of my server it does not reply with attributes when using LSUB while it does with LIST. The documentation for this on php.net currently reads Identical to imap_getmailboxes(), except that it only returns mailboxes that the user is subscribed to. This leaves the impressions that this function just returns a subset of the output of the full list and hides this RFC nuance. Since the RFC specifically states that the attributes in LIST are authoritative and thoose in LSUB are not, my suggestion is that we make a second call to LIST (which by the RFC MUST be an extremely fast call) and populate the attributes of the LSUB return with the attributes from the LIST call. This would make the function consistent with its documentation. Barring that, I would suggest that the documentation be revised so that it does not use language like identical which leads to developer confusion. Previous Comments: [2008-07-15 02:11:57] [EMAIL PROTECTED] From sources: add_property_long(mboxob, attributes, cur-attributes); As you can see, PHP only adds whatever the UW imap c-client has set the attributes to. Not PHP bug - bogus. [2008-07-11 15:26:40] sblackstone at gmail dot com Description: The documentation for imap_getsubscribed notes the following: Identical to imap_getmailboxes(), except that it only returns mailboxes that the user is subscribed to. However getsubscribed clobbers the attributes value and returns 0. Reproduce code: --- ? $imap = imap_open({localhost:143/notls},username,password); $results_bad = imap_getSubscribed($imap, {localhost:143/notls}, *); // Note: I just picked an arbitrary mailbox in the results items below // You need to pick a value that has children or just print the whole // array. print_r($results_bad[1]); $results_good = imap_getmailboxes($imap, {localhost:143/notls}, *); print_r($results_good[1]); ? Expected result: stdClass Object ( [name] = {localhost:143/notls}SOMEMAILBOX [attributes] = 64 [delimiter] = . ) Actual result: -- stdClass Object ( [name] = {localhost:143/notls}SOMEMAILBOX [attributes] = 0 [delimiter] = . ) -- Edit this bug report at http://bugs.php.net/?id=45487edit=1
#45423 [Asn-Csd]: fastcgi parent process doesn't invoke php_module_shutdown before shutdown
ID: 45423 Updated by: [EMAIL PROTECTED] Reported By: basant dot kukreja at sun dot com -Status: Assigned +Status: Closed Bug Type: CGI related Operating System: * PHP Version: 5.2.6 Assigned To: dmitry 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: [2008-07-15 02:03:51] [EMAIL PROTECTED] Dmitry, this patch looks okay to me..can I have a second opinion from you? :) [2008-07-03 02:18:45] basant dot kukreja at sun dot com Suggested fix : Php fastcgi parent process install signals and inside signal handler it calls exit. I think it is not wise to call complicated stuff like php_module_shutdown inside signal handler so in my suggested fix, I set the variable exitsignal to 1. When parent will come out of wait call, it should first invoke cleanup functions and then call exit. --- sapi/cgi/cgi_main.c_orig2008-04-09 02:16:40.0 -0700 +++ sapi/cgi/cgi_main.c 2008-07-02 18:56:44.96857 -0700 @@ -103,6 +103,12 @@ */ static int parent = 1; +/* Did parent received exit signals SIG_TERM/SIG_INT/SIG_QUIT */ +static int exitsignal = 0; + +/* Is Parent waiting for children to exit */ +static int parentwaiting = 0; + /** * Process group */ @@ -1151,9 +1157,13 @@ /* Kill all the processes in our process group */ kill(-pgroup, SIGTERM); #endif - /* We should exit at this point, but MacOSX doesn't seem to */ - exit(0); + if (parent parentwaiting) { + exitsignal = 1; + } + else { + exit(0); + } } #endif @@ -1557,8 +1567,15 @@ #ifdef DEBUG_FASTCGI fprintf(stderr, Wait for kids, pid %d\n, getpid()); #endif + parentwaiting = 1; while (wait(status) 0) { } + if (exitsignal) { + SG(server_context) = NULL; + php_module_shutdown(TSRMLS_C); + sapi_shutdown(); + exit(0); + } running--; } } [2008-07-03 02:16:34] basant dot kukreja at sun dot com Description: php fastcgi parent process calls sapi_startup but it doesn't call php_module_shutdown before exiting. The result of this is : 1) php behavior is different when running inside apache and inside fastcgi. When running inside apache, parent apache process calls php_module_shutdown. 2) Since php fastcgi parent doesn't call php_module_shutodown, it doesn't give modules like apc to do proper cleanup chance. Note that apc creates semaphores and it needs to know if parent process is shutting down to cleanup semaphores. Here is the APC bug link : http://pecl.php.net/bugs/bug.php?id=5280 -- Edit this bug report at http://bugs.php.net/?id=45423edit=1
#45520 [NEW]: Large memory leak when creating tree-like data structures
From: herkimer112 at yahoo dot dk Operating system: WinXP PHP version: 5.2.6 PHP Bug Type: Performance problem Bug description: Large memory leak when creating tree-like data structures Description: When creating tree-like data structures, where each member is a node with a parent and children[] member, the memory is not released when the tree is overwritten. Example: rootNode has children node1 and node2 node1 and node2 have parent rootNode Reproduce code: --- class myNode_class { public $myChildren = array(); public $myParent = null; function addChild($node,$key) { $this-myChildren[$key] = $node; $node-myParent = $this; } } function buildTree() { $tree = new myNode_class($treeName); for ($i=1;$i100;$i++) { $tree-addChild(new myNode_class(),$i); } } function memleaktest() { for ($j=1;$j=10;$j++) { buildTree(); echo 'Memory usage iteration '.$j.' '.memory_get_usage().br; } } memleaktest(); Expected result: Memory usage iteration 1 97824 Memory usage iteration 2 97824 Memory usage iteration 3 97824 etc. Actual result: -- Memory usage iteration 1 97824 Memory usage iteration 2 128056 Memory usage iteration 3 158208 Memory usage iteration 4 188360 Memory usage iteration 5 218512 Memory usage iteration 6 248664 Memory usage iteration 7 278816 Memory usage iteration 8 308968 Memory usage iteration 9 339120 Memory usage iteration 10 369272 -- Edit bug report at http://bugs.php.net/?id=45520edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45520r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45520r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45520r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45520r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45520r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45520r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45520r=needscript Try newer version:http://bugs.php.net/fix.php?id=45520r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45520r=support Expected behavior:http://bugs.php.net/fix.php?id=45520r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45520r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45520r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45520r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45520r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45520r=dst IIS Stability:http://bugs.php.net/fix.php?id=45520r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45520r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45520r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45520r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45520r=mysqlcfg
#45151 [Asn-Csd]: Crash with URI/file..php (filename contains 2 dots)
ID: 45151 Updated by: [EMAIL PROTECTED] Reported By: giedrius at su dot lt -Status: Assigned +Status: Closed Bug Type: CGI related Operating System: Linux 2.6 PHP Version: 5.2.6 Assigned To: dmitry 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: [2008-07-11 16:27:40] [EMAIL PROTECTED] Dmitry, can you check this out please? [2008-06-02 19:22:10] giedrius at su dot lt Fixed by replacing .. to ../ in sapi/cgi/cgi_main.c for directory protection in url [2008-06-02 19:20:35] giedrius at su dot lt Description: PHP SEGfaults when opening file..php PHP(FastCGI SAPI) is invoked via suphp running php-cgi binary manually does NOT trigger segfault For the moment managed to fix this by replacing .. directory protection to ../ Expected result: parse the file Actual result: -- segfaults -- Edit this bug report at http://bugs.php.net/?id=45151edit=1
#45521 [NEW]: SoapClient is not working with wsi compliant web services
From: sanderovich at avaya dot com Operating system: PHP version: 5.2.6 PHP Bug Type: SOAP related Bug description: SoapClient is not working with wsi compliant web services Description: Hello All, I am trying to use soap php's soap client(version 5.2.6) with axis 1.4. The axis's wsdl is WSI compliant and doc\literal\wrapped. The problem is that the soap client does not create the soap body correctly, e.g it uses SOAP-ENC structures(both on wsdl and on non-wsdl modes). For example, the following php structure: stdClass Object ( [pagingFilteringSortingParameters] = stdClass Object ( [startItemIndex] = 0 [endItemIndex] = 34 [filterList] = Array ( [0] = filterList Object ( [fieldName] = IPAddress [fieldValue] = 149 [filterType] = likeFilterType ) [1] = filterList Object ( [fieldName] = gatewayType [fieldValue] = i40 [filterType] = likeFilterType ) ) ) ) is translated into the following soap body: SOAP-ENV:Body ns1:getBranchPartialList pagingFilteringSortingParameters startItemIndex 0 /startItemIndex endItemIndex 34 /endItemIndex filterList SOAP-ENC:Struct fieldName IPAddress /fieldName fieldValue 149 /fieldValue filterType likeFilterType /filterType /SOAP-ENC:Struct SOAP-ENC:Struct fieldName gatewayType /fieldName fieldValue i40 /fieldValue filterType likeFilterType /filterType /SOAP-ENC:Struct /filterList /pagingFilteringSortingParameters /ns1:getBranchPartialList /SOAP-ENV:Body Instead of the following structure: SOAP-ENV:Body ns1:getBranchPartialList xmlns:ns1=http://xml.avaya.com/im/decm/guiws/07062006; pagingFilteringSortingParameters startItemIndex 0 /startItemIndex endItemIndex 34 /endItemIndex filterList fieldName IPAddress /fieldName fieldValue 149 /fieldValue filterType likeFilterType /filterType /filterList filterList fieldName gatewayType /fieldName fieldValue i40 /fieldValue filterType likeFilterType /filterType /filterList sorterList fieldName branchName /fieldName descending true /descending /sorterList /pagingFilteringSortingParameters /ns1:getBranchPartialList What i suggest is to add a flag to the soapClient\SoapServer feature flag that will use the array name instead of SOAP-ENC:Struct. The same rule should apply for arrays. If anyone wishes to reproduce this problem, please send an email to [EMAIL PROTECTED] and i will send the source codes. Thanks, Oren -- Edit bug report at http://bugs.php.net/?id=45521edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45521r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45521r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45521r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45521r=fixedcvs Fixed in
#45066 [Fbk-Opn]: Cannot compile a working php with mysql and mysqli
ID: 45066 User updated by: dirk at bean-it dot nl Reported By: dirk at bean-it dot nl -Status: Feedback +Status: Open Bug Type: MySQL related Operating System: Linux x86 PHP Version: 5.2.6 New Comment: Hi, Thank you for your replies. First off all, some answers: OS: Debian 4.0 (etch) Kernel: Linux 2.6.18-6-amd64 #1 SMP 2008 x86_64 GNU/Linux (Stock Debian kernel) CPU: 2 x Intel(R) Xeon(R) CPU 5130 @ 2.00GHz Mysql version: mysql Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (x86_64) (Stock Debian Mysql 5.0) Apache version: apache2-mpm-prefork 2.2.3-4+etch4 Running: # rm config.cache # ./configure --disable-all --with-apxs2=/usr/bin/apxs2 make clean make # sapi/cli/php -v Gives me a working php, no problem. Running: # rm config.cache # ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysqli --enable-mysqlnd make clean make # sapi/cli/php -v Gives me a working php, no problem. Used php-mysqlnd-5.0.1-beta. Running: # rm config.cache # ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysqli --enable-mysqlnd --with-mysql=/usr make clean make # sapi/cli/php -v Gives me a working php, no problem. Just to be very sure, I've tried to build php again, using a fresh source tree and this cmd line: ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config Which still gives me the non-responsive PHP. Kind regards, Dirk Previous Comments: [2008-07-14 21:04:18] [EMAIL PROTECTED] Also it might be good to know if you can reproduce this without enabling any mysql stuff at all. Try this configure line: # rm config.cache # ./configure --disable-all --with-apxs2 make clean make # sapi/cli/php -v That should work? What Apache MPM have you enabled btw? Note: Please give us also the basic info Uwe asked above.. [2008-07-14 19:42:55] [EMAIL PROTECTED] No idea, but I'd like to know what Linux x86 means. What's the OS, what's the CPU, what MySQL version. Does the problem exist with mysqlnd? [2008-07-07 08:49:43] dirk at bean-it dot nl Ok, i've tried to make a backtrace. Since the program just hangs and doesn't crash, I've did it this way: cd php-5.2.6/ gdb sapi/cli/php (gdb) run -i wait until it hangs, then hit ctl-c to exit the program (gdb) bt Output Program received signal SIGINT, Interrupt. [Switching to Thread 47510530549152 (LWP 2089)] 0x2b35e7b87eeb in __lll_mutex_lock_wait () from /lib/libpthread.so.0 (gdb) backtrace #0 0x2b35e7b87eeb in __lll_mutex_lock_wait () from /lib/libpthread.so.0 #1 0x0016 in ?? () #2 0x4871d7d2 in ?? () #3 0x2b35e7b8598c in pthread_cond_destroy@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #4 0x in ?? () Hope this gives a clou... If I should do something else, please let me know! [2008-06-10 14:54:27] dirk at bean-it dot nl Just had the same problem on an 686... really puzzling, because the machine is virtually the same as a machine without the problem. Same distro, same mysql libs...? This is the last past of a strace output of sapi/cli/php -i. It hangs forever after this. munmap(0x2b233bd99000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b233bd99000 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0 futex(0x2b233c5ef5e0, FUTEX_WAIT, 2, NULL [2008-05-22 15:05:55] dirk at bean-it dot nl Description: When I try to compile PHP 5.2.6 with the following options: --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config On a x86 machine, I get a not working php. Make test doesn't return anything, make install will work, but just typing php -v at the command line hangs forever. On a i386 machine, same OS (debian etch), same mysql libs, same all, no problem. This problem started in php-5.2.4, 5.2.3 is the last php that will result in a succesfull working php after compilation on x86. The problem does not exist when not using --with-apxs2 Reproduce code: --- ./configure --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config Expected result: A working php... Actual result: -- A non-responsive php :-( -- Edit this bug report at http://bugs.php.net/?id=45066edit=1
#45066 [Opn]: Cannot compile a working php with mysql and mysqli
ID: 45066 User updated by: dirk at bean-it dot nl Reported By: dirk at bean-it dot nl Status: Open Bug Type: MySQL related Operating System: Linux x86 PHP Version: 5.2.6 New Comment: Just out of curiosity, I've tried to compile the 5.2 and 5.3 snapshots using: ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config They both hang like 5.2.6. Cheers, Dirk Previous Comments: [2008-07-15 14:58:42] dirk at bean-it dot nl Hi, Thank you for your replies. First off all, some answers: OS: Debian 4.0 (etch) Kernel: Linux 2.6.18-6-amd64 #1 SMP 2008 x86_64 GNU/Linux (Stock Debian kernel) CPU: 2 x Intel(R) Xeon(R) CPU 5130 @ 2.00GHz Mysql version: mysql Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (x86_64) (Stock Debian Mysql 5.0) Apache version: apache2-mpm-prefork 2.2.3-4+etch4 Running: # rm config.cache # ./configure --disable-all --with-apxs2=/usr/bin/apxs2 make clean make # sapi/cli/php -v Gives me a working php, no problem. Running: # rm config.cache # ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysqli --enable-mysqlnd make clean make # sapi/cli/php -v Gives me a working php, no problem. Used php-mysqlnd-5.0.1-beta. Running: # rm config.cache # ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysqli --enable-mysqlnd --with-mysql=/usr make clean make # sapi/cli/php -v Gives me a working php, no problem. Just to be very sure, I've tried to build php again, using a fresh source tree and this cmd line: ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config Which still gives me the non-responsive PHP. Kind regards, Dirk [2008-07-14 21:04:18] [EMAIL PROTECTED] Also it might be good to know if you can reproduce this without enabling any mysql stuff at all. Try this configure line: # rm config.cache # ./configure --disable-all --with-apxs2 make clean make # sapi/cli/php -v That should work? What Apache MPM have you enabled btw? Note: Please give us also the basic info Uwe asked above.. [2008-07-14 19:42:55] [EMAIL PROTECTED] No idea, but I'd like to know what Linux x86 means. What's the OS, what's the CPU, what MySQL version. Does the problem exist with mysqlnd? [2008-07-07 08:49:43] dirk at bean-it dot nl Ok, i've tried to make a backtrace. Since the program just hangs and doesn't crash, I've did it this way: cd php-5.2.6/ gdb sapi/cli/php (gdb) run -i wait until it hangs, then hit ctl-c to exit the program (gdb) bt Output Program received signal SIGINT, Interrupt. [Switching to Thread 47510530549152 (LWP 2089)] 0x2b35e7b87eeb in __lll_mutex_lock_wait () from /lib/libpthread.so.0 (gdb) backtrace #0 0x2b35e7b87eeb in __lll_mutex_lock_wait () from /lib/libpthread.so.0 #1 0x0016 in ?? () #2 0x4871d7d2 in ?? () #3 0x2b35e7b8598c in pthread_cond_destroy@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #4 0x in ?? () Hope this gives a clou... If I should do something else, please let me know! [2008-06-10 14:54:27] dirk at bean-it dot nl Just had the same problem on an 686... really puzzling, because the machine is virtually the same as a machine without the problem. Same distro, same mysql libs...? This is the last past of a strace output of sapi/cli/php -i. It hangs forever after this. munmap(0x2b233bd99000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b233bd99000 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0 futex(0x2b233c5ef5e0, FUTEX_WAIT, 2, NULL 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/45066 -- Edit this bug report at http://bugs.php.net/?id=45066edit=1
#45514 [Fbk-Opn]: socket_select + timeout returns immediately on non-blocking connect
ID: 45514 User updated by: rbarnes at aethon dot com Reported By: rbarnes at aethon dot com -Status: Feedback +Status: Open Bug Type: Sockets related Operating System: Ubuntu 7.10 / Linux 2.6.22-14 PHP Version: 5.2.6 New Comment: Thanks for the tip, but the point of the bug report is that socket_select doesn't work properly. The fact that I could theoretically rewrite all of the networking code in my API to use the stream_* functions doesn't change the fact that socket_select is broken. I also already know of other ways to implement non-blocking connect with the socket_* functions, but as I said that also doesn't change the fact that this juk is bugging me. Yalla, fix it or mark the Berkley Sockets API deprecated ;-) Previous Comments: [2008-07-15 13:06:10] [EMAIL PROTECTED] Try using stream_select() and the other stream_* functions instead: http://www.php.net/manual/en/ref.stream.php [2008-07-14 21:58:01] rbarnes at aethon dot com Description: I'm trying to implement a non-blocking connect similar to the one in Steven's Unix Network Programming on pg 450. I create the socket, set it to non-blocking and call connect which of course returns immediately with a SOCKET_EINPROGRESS error ( as expected ). Then I call socket_select with a timeout greater than 0 and socket_select returns immediately, even though the socket's state is still SOCKET_EINPROGRESS. errno 115: Operation now in progress Reproduce code: --- function ConnectSocket($remote, $port) { $sock = NULL; if (!($sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) return NULL; socket_set_nonblock($sock); if ([EMAIL PROTECTED]($sock, $remote, $port+0)) { if (socket_select($rin = array($sock), $win = $rin, $ein = NULL, 30.0) 1) return NULL; if (socket_recv($sock, $buf, 0, 0) === false) { print socket_strerror(socket_last_error()) . \n; return NULL; } } socket_set_block($sock); return $sock; } ConnectSocket('206.190.60.37', 80); Expected result: socket_select should block until either the connection completes or the timeout is exceeded. Actual result: -- socket_select returns immediately. SOCKET_EINPROGRESS Operation now in progress -- Edit this bug report at http://bugs.php.net/?id=45514edit=1
#44555 [Com]: mysql.connect_timeout ignored
ID: 44555 Comment by: tstarling at wikimedia dot org Reported By: tstarling at wikimedia dot org Status: Feedback Bug Type: MySQL related Operating System: Windows XP PHP Version: 5.2.5 Assigned To: uw New Comment: No of course the host 1.2.3.4 doesn't exist, it's an IP address in the unused 1.0.0.0/8 block reserved by ARIN, that's the point. If I instead use a hostname for a host which responds to DNS rapidly, but drops ignores SYN packets on the port in question (such as www.google.com), the result is the same. Are you asking me this question because you've tried it and can't reproduce it? If so, maybe I can help to isolate the configuration. Previous Comments: [2008-07-14 16:57:08] [EMAIL PROTECTED] Does the host 1.2.3.4 exist? If not, you're probably running into the default DNS lookup timeout of your system - bogus, not a bug. Try changing your system settings, http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/regentry/96406.mspx?mfr=true [2008-03-28 09:03:03] tstarling at wikimedia dot org Description: mysql.connect_timeout is ignored, a fixed timeout of 20s is used. Observed on PHP 5.2.5 WinXP, not observed on PHP 5.1.4 Linux. Reproduce code: --- print mysql_get_client_info() .\n; ini_set('mysql.connect_timeout',1); $t = -microtime(true); mysql_connect('1.2.3.4'); $t += microtime(true); print $t\n; ini_set('mysql.connect_timeout',100); $t = -microtime(true); mysql_connect('1.2.3.4'); $t += microtime(true); print $t\n; Expected result: 5.0.45 1.00128006935 99.9788169861 Actual result: -- 5.0.45 20.999632 21.0206007957 -- Edit this bug report at http://bugs.php.net/?id=44555edit=1
#45522 [NEW]: FCGI_GET_VALUES request does not returns supplied values
From: arnaud dot lb at gmail dot com Operating system: PHP version: 5.3CVS-2008-07-15 (CVS) PHP Bug Type: CGI related Bug description: FCGI_GET_VALUES request does not returns supplied values Description: FastCGI specifies that a FastCGI application may return the values supplied by a FCGI_GET_VALUES request. Actually the FastCGI SAPI returns all standard values (FCGI_MAX_CONNS, FCGI_MAX_REQS, FCGI_MPXS_CONNS), *except* those supplied. Also, it seems that the returns values does not reflect the actual configuration (e.g. FCGI_MAX_CONNS and FCGI_MAX_REQS are always 1). Reproduce code: --- Requesting the FCGI_MAX_CONN value using a FCGI_GET_VALUES record in the FastCGI protocol. Expected result: Requesting the FCGI_MAX_CONN returns FCGI_MAX_CONN value. Actual result: -- Requesting the FCGI_MAX_CONN returns FCGI_MAX_REQS and FCGI_MPXS_CONNS values but not FCGI_MAX_CONN. -- Edit bug report at http://bugs.php.net/?id=45522edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45522r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45522r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45522r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45522r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45522r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45522r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45522r=needscript Try newer version:http://bugs.php.net/fix.php?id=45522r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45522r=support Expected behavior:http://bugs.php.net/fix.php?id=45522r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45522r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45522r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45522r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45522r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45522r=dst IIS Stability:http://bugs.php.net/fix.php?id=45522r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45522r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45522r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45522r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45522r=mysqlcfg
#44270 [Asn]: $mysqli-info is NULL, not an empty string, for not supported situations
ID: 44270 Updated by: [EMAIL PROTECTED] Reported By: stein at visibone dot com Status: Assigned Bug Type: MySQLi related Operating System: Win2K PHP Version: 5.2.5 Assigned To: andrey New Comment: Bug - I'll modify mysqi_info.phpt to cover this detail. Previous Comments: [2008-03-04 15:11:21] uwendel at mysql dot com Interesting question and good point. In real life only few people might notice the difference and cast the return value to string, but good question... Please don't commit the change. I wonder if there are more such tiny differences. For example, I wonder if my mysqli_info.phpt test is correct. Let me check in more detail first before we change anything. Ulf [2008-03-04 13:45:07] [EMAIL PROTECTED] Hi Johannes/Ulf Whereas the documentation says empty string for each string property, i guess that could be modified the macro responsible for that. http://felipe.ath.cx/diff/bug44270.diff What do you think? :) [2008-02-27 17:55:22] stein at visibone dot com Description: $mysqli-info is NULL instead of empty string for not supported situations (i.e. queries other than multi-row INSERT, LOAD, ALTER, UPDATE) The procedural mysqli_info() does return the empty string, as documented. Reproduce code: --- Query: 'INSERT INTO t (id) VALUES (1),(2),(3)' mysqli_info(): 'Records: 3 Duplicates: 0 Warnings: 0' $mysqli-info: 'Records: 3 Duplicates: 0 Warnings: 0' Query: 'INSERT INTO t (id) VALUES (9)' mysqli_info(): '' $mysqli-info: NULL Expected result: (see above) Actual result: -- the object oriented property $mysqli-info should be the empty string after not supported situations, e.g. a single-row insert. -- Edit this bug report at http://bugs.php.net/?id=44270edit=1
#44270 [Asn]: $mysqli-info is NULL, not an empty string, for not supported situations
ID: 44270 Updated by: [EMAIL PROTECTED] Reported By: stein at visibone dot com Status: Assigned Bug Type: MySQLi related Operating System: Win2K PHP Version: 5.2.5 Assigned To: andrey New Comment: ... and of course: free to fix for whoever comes first Previous Comments: [2008-07-15 16:05:27] [EMAIL PROTECTED] Bug - I'll modify mysqi_info.phpt to cover this detail. [2008-03-04 15:11:21] uwendel at mysql dot com Interesting question and good point. In real life only few people might notice the difference and cast the return value to string, but good question... Please don't commit the change. I wonder if there are more such tiny differences. For example, I wonder if my mysqli_info.phpt test is correct. Let me check in more detail first before we change anything. Ulf [2008-03-04 13:45:07] [EMAIL PROTECTED] Hi Johannes/Ulf Whereas the documentation says empty string for each string property, i guess that could be modified the macro responsible for that. http://felipe.ath.cx/diff/bug44270.diff What do you think? :) [2008-02-27 17:55:22] stein at visibone dot com Description: $mysqli-info is NULL instead of empty string for not supported situations (i.e. queries other than multi-row INSERT, LOAD, ALTER, UPDATE) The procedural mysqli_info() does return the empty string, as documented. Reproduce code: --- Query: 'INSERT INTO t (id) VALUES (1),(2),(3)' mysqli_info(): 'Records: 3 Duplicates: 0 Warnings: 0' $mysqli-info: 'Records: 3 Duplicates: 0 Warnings: 0' Query: 'INSERT INTO t (id) VALUES (9)' mysqli_info(): '' $mysqli-info: NULL Expected result: (see above) Actual result: -- the object oriented property $mysqli-info should be the empty string after not supported situations, e.g. a single-row insert. -- Edit this bug report at http://bugs.php.net/?id=44270edit=1
#45130 [Opn-Csd]: Contradictory error message (failed to open stream: Success)
ID: 45130 Updated by: [EMAIL PROTECTED] Reported By: php at tmcode dot com -Status: Open +Status: Closed Bug Type: Streams related Operating System: Linux PHP Version: 5.2.6 New Comment: The error is now fixed, you will get this now: string(78) file_get_contents(https://google.com): failed to open stream: operation failed Previous Comments: [2008-07-15 13:07:19] [EMAIL PROTECTED] The problem is that the underlying wrapper code emits more than one error (warning) in this case: Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /home/jani/t.php on line 10 Warning: file_get_contents(): Failed to enable crypto in /home/jani/t.php on line 10 Warning: file_get_contents(https://google.com): failed to open stream: Success in /home/jani/t.php on line 10 Of course those last 2 are kinda useless. [2008-05-29 22:12:37] php at tmcode dot com Description: Similar to bug #39850. The last warning returned by file_get_contents, fopen, etc when a SSL error is encountered contains the word Success. Reproduce code: --- // verify_peer=true with https://google.com // to force a hostname mismatch error $options = array( 'ssl' = array( 'verify_peer' = true, 'allow_self_signed' = false ) ); $context = stream_context_create($options); $res=file_get_contents('https://google.com',null, $context); $error = error_get_last(); echo $error['message']; Expected result: $error['message'] to include something other than the word success Actual result: -- file_get_contents(https://google.com): failed to open stream: Success -- Edit this bug report at http://bugs.php.net/?id=45130edit=1
#44555 [Fbk-Opn]: mysql.connect_timeout ignored
ID: 44555 User updated by: tstarling at wikimedia dot org Reported By: tstarling at wikimedia dot org -Status: Feedback +Status: Open Bug Type: MySQL related Operating System: Windows XP PHP Version: 5.2.5 Assigned To: uw New Comment: s/ARIN/IANA Previous Comments: [2008-07-15 15:27:20] tstarling at wikimedia dot org No of course the host 1.2.3.4 doesn't exist, it's an IP address in the unused 1.0.0.0/8 block reserved by ARIN, that's the point. If I instead use a hostname for a host which responds to DNS rapidly, but drops ignores SYN packets on the port in question (such as www.google.com), the result is the same. Are you asking me this question because you've tried it and can't reproduce it? If so, maybe I can help to isolate the configuration. [2008-07-14 16:57:08] [EMAIL PROTECTED] Does the host 1.2.3.4 exist? If not, you're probably running into the default DNS lookup timeout of your system - bogus, not a bug. Try changing your system settings, http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/regentry/96406.mspx?mfr=true [2008-03-28 09:03:03] tstarling at wikimedia dot org Description: mysql.connect_timeout is ignored, a fixed timeout of 20s is used. Observed on PHP 5.2.5 WinXP, not observed on PHP 5.1.4 Linux. Reproduce code: --- print mysql_get_client_info() .\n; ini_set('mysql.connect_timeout',1); $t = -microtime(true); mysql_connect('1.2.3.4'); $t += microtime(true); print $t\n; ini_set('mysql.connect_timeout',100); $t = -microtime(true); mysql_connect('1.2.3.4'); $t += microtime(true); print $t\n; Expected result: 5.0.45 1.00128006935 99.9788169861 Actual result: -- 5.0.45 20.999632 21.0206007957 -- Edit this bug report at http://bugs.php.net/?id=44555edit=1
#45520 [Com]: Large memory leak when creating tree-like data structures
ID: 45520 Comment by: crrodriguez at suse dot de Reported By: herkimer112 at yahoo dot dk Status: Open Bug Type: Performance problem Operating System: WinXP PHP Version: 5.2.6 New Comment: There is no memory leak, memory is freed at script shutdown /by, looks like the expected by-design behaviour. Previous Comments: [2008-07-15 13:27:40] herkimer112 at yahoo dot dk Description: When creating tree-like data structures, where each member is a node with a parent and children[] member, the memory is not released when the tree is overwritten. Example: rootNode has children node1 and node2 node1 and node2 have parent rootNode Reproduce code: --- class myNode_class { public $myChildren = array(); public $myParent = null; function addChild($node,$key) { $this-myChildren[$key] = $node; $node-myParent = $this; } } function buildTree() { $tree = new myNode_class($treeName); for ($i=1;$i100;$i++) { $tree-addChild(new myNode_class(),$i); } } function memleaktest() { for ($j=1;$j=10;$j++) { buildTree(); echo 'Memory usage iteration '.$j.' '.memory_get_usage().br; } } memleaktest(); Expected result: Memory usage iteration 1 97824 Memory usage iteration 2 97824 Memory usage iteration 3 97824 etc. Actual result: -- Memory usage iteration 1 97824 Memory usage iteration 2 128056 Memory usage iteration 3 158208 Memory usage iteration 4 188360 Memory usage iteration 5 218512 Memory usage iteration 6 248664 Memory usage iteration 7 278816 Memory usage iteration 8 308968 Memory usage iteration 9 339120 Memory usage iteration 10 369272 -- Edit this bug report at http://bugs.php.net/?id=45520edit=1
#45191 [Bgs]: error_log ignores date.timezone php.ini val when setting logging timestamps
ID: 45191 User updated by: info at organicdata dot co dot za Reported By: info at organicdata dot co dot za Status: Bogus Bug Type: Date/time related Operating System: Centos el5 PHP Version: 5.2CVS-2008-06-05 (snap) New Comment: Thanks very much for the feedback - I understand that my bug interpretation may have been wrong. My concern is really a result of a combination of the following: 1. the PHP recommendations I've seen is that you don't rely on system time zone and set the time zone explicitly in PHP 2. I want to have a single central logging file containing all system errors 3. The custom error handling routine I use does not catch all errors that PHP can throw, some are only captured by the internal error handler used by setting log_errors=On Because of 3, the only way I can achieve 2 that I can see is to set the output file in my custom error handler to be the same as the value set in the inifile parameter error_log. This means that the errors I trap are then inserted into the same file as the ones I am unable to trap due to the limitation of 3 and they occur in a sensible sequence. As per your reply however, the only way for me to ensure that the errors written to the file by my custom error handler have meaningful timestamps relative to the ones written as a result of the log_errors=On parameter means that i have to set my PHP explicit timezone to the same as that of the server. ...which means that I'm setting the value on the server and again in PHP and that if there is some change in the server timezone for whatever reason at a later stage, my log file will become a mess of inconsistent timestamps (depending on whether the error written to the file was as a result of my custom error handling routine or whether handled by the internal error logging. ...which in turn from my perspective means that it is in fact dangerous to explicitly set the PHP internal timezone and actually safer to allow everything to rely only on the system timezone - at least this way I can guarantee consistency in the timestamps of the errors written to the log file well that's the way I see it anyway - not sure whether I'm missing something big here thanks again for the feedback Previous Comments: [2008-07-14 10:06:39] [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 This is normal. The error log is not *written* by PHP, but by syslog. Syslog doesn't care about PHP's internal timezone, and thus formats the log message according to the system timezone. Just change the system timezone if it's incorrect. [2008-06-05 23:50:30] info at organicdata dot co dot za Description: I've noticed that changing the default PHP timezone using either php.ini date.timezone or date_default_timezone_set appears to have no effect on the timestamp used for each entry PHP writes to the file set by php.ini value error_log (when php.ini log_errors = On) It seems to use the system timestamp regardless. I've done some searching on the web but found nothing and am afraid I'm not sure whether a bug or by design but it seems strange enough to submit here Reproduce code: --- php.ini --- log_errors = On error_log = myerrors.log mycode.php -- error_reporting(E_STRICT); date_default_timezone_set(UTC); SOMEBADCONSTANT date_default_timezone_set(Africa/Johannesburg); ANOTHERBADCONSTANT resulting myerrors.log -- [06-Jun-2008 00:41:34] PHP Notice: Use of undefined constant SOMEBADCONSTANT - assumed 'SOMEBADCONSTANT' in /prj/mycode.php on line 3 [06-Jun-2008 00:41:34] PHP Notice: Use of undefined constant ANOTHERBADCONSTANT - assumed 'ANOTHERBADCONSTANT' in /prj/mycode.php on line 5 Expected result: As Africa/Johannesburg is 2 hours ahead of UTC, I would have expected the second myerrors.log entry to read [06-Jun-2008 02:41:34] PHP Notice: Use of undefined constant ANOTHERBADCONSTANT - assumed 'ANOTHERBADCONSTANT' in /prj/mycode.php on line 5 And even if the comment is that date_default_timezone_set has no effect, I saw the same when changing date.timezone in php.ini The error logging appears to ignore it completely and simply use the system time -- Edit this bug report at http://bugs.php.net/?id=45191edit=1
#45520 [Opn-Bgs]: Large memory leak when creating tree-like data structures
ID: 45520 Updated by: [EMAIL PROTECTED] Reported By: herkimer112 at yahoo dot dk -Status: Open +Status: Bogus Bug Type: Performance problem Operating System: WinXP PHP Version: 5.2.6 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 Previous Comments: [2008-07-15 16:27:26] crrodriguez at suse dot de There is no memory leak, memory is freed at script shutdown /by, looks like the expected by-design behaviour. [2008-07-15 13:27:40] herkimer112 at yahoo dot dk Description: When creating tree-like data structures, where each member is a node with a parent and children[] member, the memory is not released when the tree is overwritten. Example: rootNode has children node1 and node2 node1 and node2 have parent rootNode Reproduce code: --- class myNode_class { public $myChildren = array(); public $myParent = null; function addChild($node,$key) { $this-myChildren[$key] = $node; $node-myParent = $this; } } function buildTree() { $tree = new myNode_class($treeName); for ($i=1;$i100;$i++) { $tree-addChild(new myNode_class(),$i); } } function memleaktest() { for ($j=1;$j=10;$j++) { buildTree(); echo 'Memory usage iteration '.$j.' '.memory_get_usage().br; } } memleaktest(); Expected result: Memory usage iteration 1 97824 Memory usage iteration 2 97824 Memory usage iteration 3 97824 etc. Actual result: -- Memory usage iteration 1 97824 Memory usage iteration 2 128056 Memory usage iteration 3 158208 Memory usage iteration 4 188360 Memory usage iteration 5 218512 Memory usage iteration 6 248664 Memory usage iteration 7 278816 Memory usage iteration 8 308968 Memory usage iteration 9 339120 Memory usage iteration 10 369272 -- Edit this bug report at http://bugs.php.net/?id=45520edit=1
#45514 [Opn-Fbk]: socket_select + timeout returns immediately on non-blocking connect
ID: 45514 Updated by: [EMAIL PROTECTED] Reported By: rbarnes at aethon dot com -Status: Open +Status: Feedback Bug Type: Sockets related Operating System: Ubuntu 7.10 / Linux 2.6.22-14 PHP Version: 5.2.6 New Comment: Well, in one other report about basically same issue the comments were along the lines of ext/sockets being deprecated and the stream_* stuff being the suggested way to get working solution. Don't hold your breath waiting for anything getting fixed in ext/sockets, there's no maintainer for that. Previous Comments: [2008-07-15 15:20:43] rbarnes at aethon dot com Thanks for the tip, but the point of the bug report is that socket_select doesn't work properly. The fact that I could theoretically rewrite all of the networking code in my API to use the stream_* functions doesn't change the fact that socket_select is broken. I also already know of other ways to implement non-blocking connect with the socket_* functions, but as I said that also doesn't change the fact that this juk is bugging me. Yalla, fix it or mark the Berkley Sockets API deprecated ;-) [2008-07-15 13:06:10] [EMAIL PROTECTED] Try using stream_select() and the other stream_* functions instead: http://www.php.net/manual/en/ref.stream.php [2008-07-14 21:58:01] rbarnes at aethon dot com Description: I'm trying to implement a non-blocking connect similar to the one in Steven's Unix Network Programming on pg 450. I create the socket, set it to non-blocking and call connect which of course returns immediately with a SOCKET_EINPROGRESS error ( as expected ). Then I call socket_select with a timeout greater than 0 and socket_select returns immediately, even though the socket's state is still SOCKET_EINPROGRESS. errno 115: Operation now in progress Reproduce code: --- function ConnectSocket($remote, $port) { $sock = NULL; if (!($sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) return NULL; socket_set_nonblock($sock); if ([EMAIL PROTECTED]($sock, $remote, $port+0)) { if (socket_select($rin = array($sock), $win = $rin, $ein = NULL, 30.0) 1) return NULL; if (socket_recv($sock, $buf, 0, 0) === false) { print socket_strerror(socket_last_error()) . \n; return NULL; } } socket_set_block($sock); return $sock; } ConnectSocket('206.190.60.37', 80); Expected result: socket_select should block until either the connection completes or the timeout is exceeded. Actual result: -- socket_select returns immediately. SOCKET_EINPROGRESS Operation now in progress -- Edit this bug report at http://bugs.php.net/?id=45514edit=1
#43452 [Com]: strtotime returns wrong date when requested day is same as first day of the mon
ID: 43452 Comment by: m dot ford at leedsmet dot ac dot uk Reported By: sean dot thorne at gmail dot com Status: Open Bug Type: Date/time related Operating System: Mac OS X 10.4.11 PHP Version: 5.2CVS-2007-11-29 (CVS) New Comment: Derick, please take another look at this. I've examined it in some depth, and tend to agree there's a bug here. However, if you read the GNU Date Input Formats syntax, linked from http://php.net/manual/function.strtotime.php, very closely, you find it says: a day of the week will forward the date (only if necessary) to reach that day of the week in the future ... and ... a number may precede a day of the week item to move forward supplementary weeks. The crucial word here is supplementary. Taken together, these specifications suggest that, somewhat counter-intuitively: Monday month year should represent the first Monday of the month, no matter what date it falls on, and 1 Monday month year should be the Monday *after* that (i.e. the 2nd Monday!!), and so on. Other wording in the GNU Date Day of week items section would tend to confirm this interpretation. I therefore submit that the bug actually manifests when the first occurrence of the requested weekday falls on any date *other* than the first of the month! :( However you interpret it, it's nonetheless clear that the relationship of 1 weekday to weekday should be fixed -- either according to the GNU specification to occur 1 week later, or more intuitively to mean the same thing. It's definitely NOT right that 1 Monday (for example) means something different from Monday *only* when Monday is the 1st of the month...!! Previous Comments: [2008-06-17 17:21:57] soapergem at gmail dot com I also confirmed this. This is pretty serious, too! There are an infinite number of examples in which you can reproduce it; here are a few: // expect 06-15-2008, get 06-22-2008 $date = strtotime('3 Sunday June 2008'); echo date('m-d-Y', $date); // expect 07-08-2008, get 07-15-2008 $date = strtotime('2 Tuesday July 2008'); echo date('m-d-Y', $date); // expect 08-22-2008, get 08-29-2008 $date = strtotime('4 Friday August 2008'); echo date('m-d-Y', $date); // expect 09-29-2008, get 10-06-2008 $date = strtotime('5 Monday September 2008'); echo date('m-d-Y', $date); // expect 10-01-2008, get 10-08-2008 $date = strtotime('1 Wednesday October 2008'); echo date('m-d-Y', $date); Developers please take note: THIS IS A SERIOUS BUG! (and it's been around for a long time) [2008-04-02 14:06:23] billyt at claritytech dot com We also wrote our own function that handles it. Although, it's purely by random chance that we discovered the problem. It's not something we would specifically have tested for. I wonder how many other people are using it in production with no idea that it's a problem. [2008-03-30 22:39:34] sean dot thorne at gmail dot com I ended up writing a compensator for the problem, because it appears that the PHP Dev crew has better things to do then clean up the code base... I kept it simple and grabbed what day was the the first of the month and then found where Thursday would be in comparison and knew the third thursday was just 3 times whatever the date of the first thursday. [2008-03-30 22:21:21] billyt at claritytech dot com This is still a problem with 5.2.6RC4-dev!!! This is causing us serious issues ... any ideas??? [2007-11-29 15:39:52] sean dot thorne at gmail dot com Description: When asking strtotime for the 3rd thursday in a month and the first day of that month is thursday, it ignores the first thursday. It then begins to count after that first Thursday and returns the fourth Thursday. Reproduce code: --- $day = strtotime(3 Thursday Nov 2007); echo date(m-d-Y, $day); Expected result: 11-15-2007 Actual result: -- 11-22-2007 -- Edit this bug report at http://bugs.php.net/?id=43452edit=1
#44792 [Opn-Asn]: Serializing objects with protected members introduces null charcters
ID: 44792 Updated by: [EMAIL PROTECTED] Reported By: alex at fav dot or dot it -Status: Open +Status: Assigned -Bug Type: Strings related +Bug Type: Scripting Engine problem Operating System: * PHP Version: 5.2.5 -Assigned To: +Assigned To: helly New Comment: Marcus, yet another PPP issue. Previous Comments: [2008-04-21 11:14:12] alex at fav dot or dot it Description: The output from the serialization of objects that contain protected (and possibly private also) members contains null characters. These characters are unnecessary and can cause problems when inserting the serialized data into databases. An asterisk is placed before the variable name in the serialized string, which I assume is to mark it as protected. This asterisk is surrounded by null characters. This appears to be the same as the closed #29865 (closed 10/2005), but in version 5.2.5 and the latest snapshot, the bug still exists. Reproduce code: --- php -r 'class Foo { protected $bar = 1; } $v = new Foo; echo serialize($v);' | hexdump Expected result: The output should not contain null characters (shown as '00') around the asterisk. Actual result: -- 000 3a4f 3a33 4622 6f6f 3a22 3a31 737b 363a 010 223a 2a00 6200 7261 3b22 3a69 3b31 007d 01f -- Edit this bug report at http://bugs.php.net/?id=44792edit=1
#43452 [Opn-Asn]: strtotime returns wrong date when requested day is same as first day of the mon
ID: 43452 Updated by: [EMAIL PROTECTED] Reported By: sean dot thorne at gmail dot com -Status: Open +Status: Assigned Bug Type: Date/time related Operating System: Mac OS X 10.4.11 PHP Version: 5.2CVS-2007-11-29 (CVS) -Assigned To: +Assigned To: derick New Comment: Assigning this to myself, but be aware that we do not necessarily implement this GNU date stuff -- we've never done this either. I'll check it though. Previous Comments: [2008-07-15 17:19:38] m dot ford at leedsmet dot ac dot uk Derick, please take another look at this. I've examined it in some depth, and tend to agree there's a bug here. However, if you read the GNU Date Input Formats syntax, linked from http://php.net/manual/function.strtotime.php, very closely, you find it says: a day of the week will forward the date (only if necessary) to reach that day of the week in the future ... and ... a number may precede a day of the week item to move forward supplementary weeks. The crucial word here is supplementary. Taken together, these specifications suggest that, somewhat counter-intuitively: Monday month year should represent the first Monday of the month, no matter what date it falls on, and 1 Monday month year should be the Monday *after* that (i.e. the 2nd Monday!!), and so on. Other wording in the GNU Date Day of week items section would tend to confirm this interpretation. I therefore submit that the bug actually manifests when the first occurrence of the requested weekday falls on any date *other* than the first of the month! :( However you interpret it, it's nonetheless clear that the relationship of 1 weekday to weekday should be fixed -- either according to the GNU specification to occur 1 week later, or more intuitively to mean the same thing. It's definitely NOT right that 1 Monday (for example) means something different from Monday *only* when Monday is the 1st of the month...!! [2008-06-17 17:21:57] soapergem at gmail dot com I also confirmed this. This is pretty serious, too! There are an infinite number of examples in which you can reproduce it; here are a few: // expect 06-15-2008, get 06-22-2008 $date = strtotime('3 Sunday June 2008'); echo date('m-d-Y', $date); // expect 07-08-2008, get 07-15-2008 $date = strtotime('2 Tuesday July 2008'); echo date('m-d-Y', $date); // expect 08-22-2008, get 08-29-2008 $date = strtotime('4 Friday August 2008'); echo date('m-d-Y', $date); // expect 09-29-2008, get 10-06-2008 $date = strtotime('5 Monday September 2008'); echo date('m-d-Y', $date); // expect 10-01-2008, get 10-08-2008 $date = strtotime('1 Wednesday October 2008'); echo date('m-d-Y', $date); Developers please take note: THIS IS A SERIOUS BUG! (and it's been around for a long time) [2008-04-02 14:06:23] billyt at claritytech dot com We also wrote our own function that handles it. Although, it's purely by random chance that we discovered the problem. It's not something we would specifically have tested for. I wonder how many other people are using it in production with no idea that it's a problem. [2008-03-30 22:39:34] sean dot thorne at gmail dot com I ended up writing a compensator for the problem, because it appears that the PHP Dev crew has better things to do then clean up the code base... I kept it simple and grabbed what day was the the first of the month and then found where Thursday would be in comparison and knew the third thursday was just 3 times whatever the date of the first thursday. [2008-03-30 22:21:21] billyt at claritytech dot com This is still a problem with 5.2.6RC4-dev!!! This is causing us serious issues ... any ideas??? 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/43452 -- Edit this bug report at http://bugs.php.net/?id=43452edit=1
#45514 [Fbk-Opn]: socket_select + timeout returns immediately on non-blocking connect
ID: 45514 User updated by: rbarnes at aethon dot com Reported By: rbarnes at aethon dot com -Status: Feedback +Status: Open Bug Type: Sockets related Operating System: Ubuntu 7.10 / Linux 2.6.22-14 PHP Version: 5.2.6 New Comment: Interesting. I'll probably be moving back to Israel in a few months and I might be interested in getting involved in the sockets code as it's an area of interest for me. Are you guys looking for someone and if so how would that work? Previous Comments: [2008-07-15 17:16:36] [EMAIL PROTECTED] Well, in one other report about basically same issue the comments were along the lines of ext/sockets being deprecated and the stream_* stuff being the suggested way to get working solution. Don't hold your breath waiting for anything getting fixed in ext/sockets, there's no maintainer for that. [2008-07-15 15:20:43] rbarnes at aethon dot com Thanks for the tip, but the point of the bug report is that socket_select doesn't work properly. The fact that I could theoretically rewrite all of the networking code in my API to use the stream_* functions doesn't change the fact that socket_select is broken. I also already know of other ways to implement non-blocking connect with the socket_* functions, but as I said that also doesn't change the fact that this juk is bugging me. Yalla, fix it or mark the Berkley Sockets API deprecated ;-) [2008-07-15 13:06:10] [EMAIL PROTECTED] Try using stream_select() and the other stream_* functions instead: http://www.php.net/manual/en/ref.stream.php [2008-07-14 21:58:01] rbarnes at aethon dot com Description: I'm trying to implement a non-blocking connect similar to the one in Steven's Unix Network Programming on pg 450. I create the socket, set it to non-blocking and call connect which of course returns immediately with a SOCKET_EINPROGRESS error ( as expected ). Then I call socket_select with a timeout greater than 0 and socket_select returns immediately, even though the socket's state is still SOCKET_EINPROGRESS. errno 115: Operation now in progress Reproduce code: --- function ConnectSocket($remote, $port) { $sock = NULL; if (!($sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) return NULL; socket_set_nonblock($sock); if ([EMAIL PROTECTED]($sock, $remote, $port+0)) { if (socket_select($rin = array($sock), $win = $rin, $ein = NULL, 30.0) 1) return NULL; if (socket_recv($sock, $buf, 0, 0) === false) { print socket_strerror(socket_last_error()) . \n; return NULL; } } socket_set_block($sock); return $sock; } ConnectSocket('206.190.60.37', 80); Expected result: socket_select should block until either the connection completes or the timeout is exceeded. Actual result: -- socket_select returns immediately. SOCKET_EINPROGRESS Operation now in progress -- Edit this bug report at http://bugs.php.net/?id=45514edit=1
#45448 [Fbk-Opn]: PHP Cuts off documents after some point
ID: 45448 User updated by: jowie dot 1337+phpnet at gmail dot com Reported By: jowie dot 1337+phpnet at gmail dot com -Status: Feedback +Status: Open Bug Type: Apache2 related Operating System: Windows XP Service Pack 1 PHP Version: 5.2.6 New Comment: Using the same httpd.conf as in my post from [14 Jul 5:57pm UTC] (besides the addition of an access log), my log file shows the following: [Tue Jul 15 20:53:04 2008] [notice] Apache/2.2.9 (Win32) PHP/5.2.6 configured -- resuming normal operations [Tue Jul 15 20:53:04 2008] [notice] Server built: Jun 13 2008 04:04:59 [Tue Jul 15 20:53:04 2008] [notice] Parent: Created child process 2692 [Tue Jul 15 20:53:04 2008] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child [Tue Jul 15 20:53:04 2008] [notice] Child 2692: Child process is running [Tue Jul 15 20:53:04 2008] [info] Parent: Duplicating socket 200 and sending it to child process 2692 [Tue Jul 15 20:53:04 2008] [debug] mpm_winnt.c(408): Child 2692: Retrieved our scoreboard from the parent. [Tue Jul 15 20:53:04 2008] [debug] mpm_winnt.c(605): Parent: Sent 1 listeners to child 2692 [Tue Jul 15 20:53:04 2008] [debug] mpm_winnt.c(564): Child 2692: retrieved 1 listeners from parent [Tue Jul 15 20:53:04 2008] [notice] Child 2692: Acquired the start mutex. [Tue Jul 15 20:53:04 2008] [notice] Child 2692: Starting 64 worker threads. [Tue Jul 15 20:53:04 2008] [notice] Child 2692: Starting thread to listen on port 80. == I visit test.php once, document is cut off == == Access log shows: == xxx.xxx.xxx.xxx - - [15/Jul/2008:20:53:08] GET /test.php HTTP/1.1 200 14385 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 == I stop the apache service == [Tue Jul 15 20:53:15 2008] [notice] Parent: Received shutdown signal -- Shutting down the server. [Tue Jul 15 20:53:15 2008] [notice] Child 2692: Exit event signaled. Child process is ending. [Tue Jul 15 20:53:16 2008] [info] Child 2692: Accept thread exiting. [Tue Jul 15 20:53:16 2008] [notice] Child 2692: Released the start mutex [Tue Jul 15 20:53:16 2008] [info] Child 2692: 64 threads blocked on the completion port [Tue Jul 15 20:53:17 2008] [notice] Child 2692: All worker threads have exited. [Tue Jul 15 20:53:17 2008] [notice] Child 2692: Child process is exiting [Tue Jul 15 20:53:17 2008] [notice] Parent: Child process exited successfully. [Tue Jul 15 20:53:17 2008] [info] removed PID file C:/Program Files/Apache2.2/logs/httpd.pid (pid=3064) PHP log file is empty. apache.exe does not crash, I verified this by running httpd.exe from the command line instead of a service Previous Comments: [2008-07-14 20:53:37] [EMAIL PROTECTED] Are you sure there's actually something crashing there? Nothing in Apache logs or wherever those are in Windows..? [2008-07-14 19:42:51] jowie dot 1337+phpnet at gmail dot com It may be worth noting that everything is fine when I run a php script of the console using php.exe test.php. [2008-07-14 19:39:03] jowie dot 1337+phpnet at gmail dot com Bug still occurs. I used the same httpd.conf as in my previous post ([14 Jul 5:57pm UTC]) phpinfo() tells me Loaded Configuration File: (none) [2008-07-14 18:22:24] [EMAIL PROTECTED] Try without any php.ini file anywhere in your system (check phpinfo() that nothing is loaded!) [2008-07-14 17:57:06] jowie dot 1337+phpnet at gmail dot com I just tried it without ANY module loaded EXCEPT mod_mime, the bug still appeared. Nothing abnormal in error.log This is the httpd.conf I used for this test: ServerRoot C:/Program Files/Apache2.2 Listen 80 ServerAdmin [EMAIL PROTECTED] ServerName removed.removed DocumentRoot D:/Test Directory D:/Test Options None AllowOverride None /Directory ErrorLog logs/error.log LogLevel debug LoadModule mime_module modules/mod_mime.so DefaultType text/plain AddType application/x-httpd-php .php PHPIniDir C:/Program Files/PHP 5/ LoadModule php5_module C:/Program Files/PHP 5/php5apache2_2.dll 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/45448 -- Edit this bug report at http://bugs.php.net/?id=45448edit=1
#45405 [Com]: snmp extension memory leak
ID: 45405 Comment by: rodrigocc at gmail dot com Reported By: Federico Cuello fedux at lugmen dot org dot ar Status: Open Bug Type: SNMP related Operating System: Linux PHP Version: 5.2.6 New Comment: The patch published by Federico Cuello produces: *** glibc detected *** /usr/sbin/apache2: double free or corruption (!prev): 0x08644d70 *** === Backtrace: = /lib/libc.so.6[0xb7c95cf0] /lib/libc.so.6(cfree+0x89)[0xb7c97379] /usr/lib/libnetsnmp.so.15(snmp_free_pdu+0xfd)[0xb710231d] (that's not the entire backtrace, but enough to suspect from the snmp extension :) Looking this chunk of the patch (modified the tabs to look better. But its awful anyway :) for (vars = response-variables; vars; vars = vars-next_variable) { if (st = SNMP_CMD_WALK st != SNMP_CMD_SET vars-name_length rootlen || memcmp(root, vars-name, rootlen * sizeof(oid { + snmp_free_pdu(response); continue; /* not part of this subtree */ So, if the for does more than one iteration, response is beeing freed more than one time (the for does not change response). So I think that adding that free is not correct. Looking at the code, that for is inside an if statement. When that if statement ends, the response it's beeing freed. So there's no need to free it before. The other frees added are before a return statement, that seems correct, and before goto retry. The first instruction executed in retry is status = snmp_synch_response(ss, pdu, response);. So if we dont free response before calling that, we lost the reference and we have a leak. We have done some basic tests to the code with this patch and seems to be OK (test the reproduce-code published by Federico with valgrind and using php apache module for a web-interface that uses php-snmp extension) Federico's patch modified (just removed that free inside the for) results in this (sorry, i didn't find a way to upload a file. If there's any, please let me know ): --- ext/snmp/snmp.c.orig2008-07-15 10:49:14.0 -0300 +++ ext/snmp/snmp.c 2008-07-15 15:01:48.0 -0300 @@ -417,13 +417,13 @@ while (keepwalking) { keepwalking = 0; if ((st == SNMP_CMD_GET) || (st == SNMP_CMD_GETNEXT)) { - pdu = snmp_pdu_create((st == SNMP_CMD_GET) ? SNMP_MSG_GET : SNMP_MSG_GETNEXT); name_length = MAX_OID_LEN; if (!snmp_parse_oid(objid, name, name_length)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid object identifier: %s, objid); snmp_close(ss); RETURN_FALSE; } + pdu = snmp_pdu_create((st == SNMP_CMD_GET) ? SNMP_MSG_GET : SNMP_MSG_GETNEXT); snmp_add_null_var(pdu, name, name_length); } else if (st == SNMP_CMD_SET) { pdu = snmp_pdu_create(SNMP_MSG_SET); @@ -434,6 +434,7 @@ sprint_objid(buf, name, name_length); #endif php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not add variable: %s %c %s, buf, type, value); + snmp_free_pdu(pdu); snmp_close(ss); RETURN_FALSE; } @@ -467,11 +468,13 @@ *return_value = *snmpval; zval_copy_ctor(return_value); zval_ptr_dtor(snmpval); + snmp_free_pdu(response); snmp_close(ss); return; } else if (st == SNMP_CMD_GETNEXT) { *return_value = *snmpval; zval_copy_ctor(return_value); + snmp_free_pdu(response); snmp_close(ss); return; } else if (st == SNMP_CMD_WALK) { @@ -510,23 +513,28 @@ } if (st == SNMP_CMD_GET) { if ((pdu = snmp_fix_pdu(response, SNMP_MSG_GET)) != NULL) { + snmp_free_pdu(response); goto retry; } } else if (st == SNMP_CMD_SET) { if ((pdu = snmp_fix_pdu(response, SNMP_MSG_SET)) != NULL) { +
#45066 [Opn-Fbk]: Cannot compile a working php with mysql and mysqli
ID: 45066 Updated by: [EMAIL PROTECTED] Reported By: dirk at bean-it dot nl -Status: Open +Status: Feedback Bug Type: MySQL related Operating System: Debian 4.0 / x86_64 PHP Version: 5.2.6 New Comment: Can you try with valgrind: # USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -i Previous Comments: [2008-07-15 15:08:08] dirk at bean-it dot nl Just out of curiosity, I've tried to compile the 5.2 and 5.3 snapshots using: ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config They both hang like 5.2.6. Cheers, Dirk [2008-07-15 14:58:42] dirk at bean-it dot nl Hi, Thank you for your replies. First off all, some answers: OS: Debian 4.0 (etch) Kernel: Linux 2.6.18-6-amd64 #1 SMP 2008 x86_64 GNU/Linux (Stock Debian kernel) CPU: 2 x Intel(R) Xeon(R) CPU 5130 @ 2.00GHz Mysql version: mysql Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (x86_64) (Stock Debian Mysql 5.0) Apache version: apache2-mpm-prefork 2.2.3-4+etch4 Running: # rm config.cache # ./configure --disable-all --with-apxs2=/usr/bin/apxs2 make clean make # sapi/cli/php -v Gives me a working php, no problem. Running: # rm config.cache # ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysqli --enable-mysqlnd make clean make # sapi/cli/php -v Gives me a working php, no problem. Used php-mysqlnd-5.0.1-beta. Running: # rm config.cache # ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysqli --enable-mysqlnd --with-mysql=/usr make clean make # sapi/cli/php -v Gives me a working php, no problem. Just to be very sure, I've tried to build php again, using a fresh source tree and this cmd line: ./configure --disable-all --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config Which still gives me the non-responsive PHP. Kind regards, Dirk [2008-07-14 21:04:18] [EMAIL PROTECTED] Also it might be good to know if you can reproduce this without enabling any mysql stuff at all. Try this configure line: # rm config.cache # ./configure --disable-all --with-apxs2 make clean make # sapi/cli/php -v That should work? What Apache MPM have you enabled btw? Note: Please give us also the basic info Uwe asked above.. [2008-07-14 19:42:55] [EMAIL PROTECTED] No idea, but I'd like to know what Linux x86 means. What's the OS, what's the CPU, what MySQL version. Does the problem exist with mysqlnd? [2008-07-07 08:49:43] dirk at bean-it dot nl Ok, i've tried to make a backtrace. Since the program just hangs and doesn't crash, I've did it this way: cd php-5.2.6/ gdb sapi/cli/php (gdb) run -i wait until it hangs, then hit ctl-c to exit the program (gdb) bt Output Program received signal SIGINT, Interrupt. [Switching to Thread 47510530549152 (LWP 2089)] 0x2b35e7b87eeb in __lll_mutex_lock_wait () from /lib/libpthread.so.0 (gdb) backtrace #0 0x2b35e7b87eeb in __lll_mutex_lock_wait () from /lib/libpthread.so.0 #1 0x0016 in ?? () #2 0x4871d7d2 in ?? () #3 0x2b35e7b8598c in pthread_cond_destroy@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #4 0x in ?? () Hope this gives a clou... If I should do something else, please let me know! 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/45066 -- Edit this bug report at http://bugs.php.net/?id=45066edit=1
#45514 [Opn-Fbk]: socket_select + timeout returns immediately on non-blocking connect
ID: 45514 Updated by: [EMAIL PROTECTED] Reported By: rbarnes at aethon dot com -Status: Open +Status: Feedback Bug Type: Sockets related Operating System: Ubuntu 7.10 / Linux 2.6.22-14 PHP Version: 5.2.6 New Comment: Well, first you write some patch, send it to [EMAIL PROTECTED] for review and if considered good - you're in. :) Previous Comments: [2008-07-15 17:49:50] rbarnes at aethon dot com Interesting. I'll probably be moving back to Israel in a few months and I might be interested in getting involved in the sockets code as it's an area of interest for me. Are you guys looking for someone and if so how would that work? [2008-07-15 17:16:36] [EMAIL PROTECTED] Well, in one other report about basically same issue the comments were along the lines of ext/sockets being deprecated and the stream_* stuff being the suggested way to get working solution. Don't hold your breath waiting for anything getting fixed in ext/sockets, there's no maintainer for that. [2008-07-15 15:20:43] rbarnes at aethon dot com Thanks for the tip, but the point of the bug report is that socket_select doesn't work properly. The fact that I could theoretically rewrite all of the networking code in my API to use the stream_* functions doesn't change the fact that socket_select is broken. I also already know of other ways to implement non-blocking connect with the socket_* functions, but as I said that also doesn't change the fact that this juk is bugging me. Yalla, fix it or mark the Berkley Sockets API deprecated ;-) [2008-07-15 13:06:10] [EMAIL PROTECTED] Try using stream_select() and the other stream_* functions instead: http://www.php.net/manual/en/ref.stream.php [2008-07-14 21:58:01] rbarnes at aethon dot com Description: I'm trying to implement a non-blocking connect similar to the one in Steven's Unix Network Programming on pg 450. I create the socket, set it to non-blocking and call connect which of course returns immediately with a SOCKET_EINPROGRESS error ( as expected ). Then I call socket_select with a timeout greater than 0 and socket_select returns immediately, even though the socket's state is still SOCKET_EINPROGRESS. errno 115: Operation now in progress Reproduce code: --- function ConnectSocket($remote, $port) { $sock = NULL; if (!($sock = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) return NULL; socket_set_nonblock($sock); if ([EMAIL PROTECTED]($sock, $remote, $port+0)) { if (socket_select($rin = array($sock), $win = $rin, $ein = NULL, 30.0) 1) return NULL; if (socket_recv($sock, $buf, 0, 0) === false) { print socket_strerror(socket_last_error()) . \n; return NULL; } } socket_set_block($sock); return $sock; } ConnectSocket('206.190.60.37', 80); Expected result: socket_select should block until either the connection completes or the timeout is exceeded. Actual result: -- socket_select returns immediately. SOCKET_EINPROGRESS Operation now in progress -- Edit this bug report at http://bugs.php.net/?id=45514edit=1
#45254 [Opn-Fbk]: PHP does not time out when accepting for connections while working as FastCGI
ID: 45254 Updated by: [EMAIL PROTECTED] Reported By: yurtesen at ispro dot net -Status: Open +Status: Feedback Bug Type: CGI related Operating System: FreeBSD 6.3 PHP Version: 5.2.6 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Previous Comments: [2008-07-13 21:52:37] s dot tretter at szene1 dot at sorry, some more information about my software setup: using apache 2.2.6, but preforked. fastcgi 2.4.6, php 5.2.6 but problem exist with all php version i ever used. my compile options for php: './configure' \ '--enable-fastcgi' \ '--enable-force-cgi-redirect' \ '--with-pcre-regex' \ '--without-sqlite' \ '--with-mysqli' \ '--with-gd' \ '--with-ttf' \ '--enable-exif' \ '--with-mcrypt' \ '--enable-mbstring' \ '--enable-spl' \ '--prefix=/usr/local/php5' \ '--with-zlib' \ '--enable-gd-native-ttf' \ '--enable-sockets' \ '--enable-soap' \ '--with-apxs2=/usr/local/apache2/bin/apxs' \ $@ [2008-07-13 21:47:27] s dot tretter at szene1 dot at same problem, php just hangs and doesn't exit. the only possible solution to kill all php processes is killall -9 php-cgi a simple killall (without -9) doesn't help. no idea what is causing the php process to hang but it doesn't help to increase or decrease the PHP_FCGI_CHILDREN and PHP_FCGI_MAX_REQUESTS variables. no solution found until yet, and I also have to restart apache every day and this is very annoying on a server farm with more than 30 web servers. googled a lot of time, some people say there is a relation between an accepting socket and an loosy internet connection .. in case of a post request the php process could hang if there is no real syn packet or similar... for other bug reports or people with similar problems just ask google for fastcgi php hang ng sorry for my bad english ;) [2008-06-15 16:14:13] ruanchunping at gmail dot com I use lighttpd1.4.19 + php-cgi (5.2.6) @ FreeBSD 7.0 amd64 I found that ,the *POST* request sometimes hangs for ever, the lighttpd status report: handle-req 59339(time) handle-req 58478 handle-req 57985 .. there are over 100 php-cgi processes in this status pre day. i have to restart lighttpd every day. these POST request are posting blog or uploading photos. [2008-06-12 22:44:19] yurtesen at ispro dot net Description: When apache worker mpm and fastcgi and php-cgi are used together, the php-cgi processes sometimes hang and do not exit ever. I tried to backtrace the running process using 'gdb -q -p' [Switching to LWP 100164] 0x28affbe9 in accept () from /lib/libc.so.6 (gdb) backtrace #0 0x28affbe9 in accept () from /lib/libc.so.6 #1 0x28a4193a in accept () from /lib/libpthread.so.2 #2 0x082da06f in fcgi_accept_request () #3 0x082dc345 in main () (gdb) It looks like once PHP enters to function to accept request, it never exits unless instructed to do so. These processes wait idle for hours and when I find them I have to kill them manually. Reproduce code: --- Setup apache worker mpm, fastcgi, and php to work together. Load it up with requests and restart/reload server or cancel the requests in the middle (I dont exactly know what is causing this but these are the most probable suspects in my opinion). Sometimes apache process quits without transfering any data to PHP (perhaps browser canceled, server reload/restart etc.) PHP processes stay waiting... The problem does not exist when apache prefork mpm is used... Expected result: I expect that PHP would die after max_input_time passses... Actual result: -- PHP hangs and waits until killed manually... -- Edit this bug report at http://bugs.php.net/?id=45254edit=1
#45448 [Opn-Bgs]: PHP Cuts off documents after some point
ID: 45448 Updated by: [EMAIL PROTECTED] Reported By: jowie dot 1337+phpnet at gmail dot com -Status: Open +Status: Bogus Bug Type: Apache2 related Operating System: Windows XP Service Pack 1 PHP Version: 5.2.6 New Comment: And the test.php file has no code? No ?php ? tags? For some reason I'm starting to think you're just screwing with us and this is completely bogus thing..I can't reproduce anything like this with the default install of latest Apache 2 and PHP installed on a fresh system - conclusion: There's something wrong with your machine. If you can reproduce this reliably with some other machine and provide reliable proof about it, reopen. Until that - BOGUS. Previous Comments: [2008-07-15 19:20:05] jowie dot 1337+phpnet at gmail dot com Using the same httpd.conf as in my post from [14 Jul 5:57pm UTC] (besides the addition of an access log), my log file shows the following: [Tue Jul 15 20:53:04 2008] [notice] Apache/2.2.9 (Win32) PHP/5.2.6 configured -- resuming normal operations [Tue Jul 15 20:53:04 2008] [notice] Server built: Jun 13 2008 04:04:59 [Tue Jul 15 20:53:04 2008] [notice] Parent: Created child process 2692 [Tue Jul 15 20:53:04 2008] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child [Tue Jul 15 20:53:04 2008] [notice] Child 2692: Child process is running [Tue Jul 15 20:53:04 2008] [info] Parent: Duplicating socket 200 and sending it to child process 2692 [Tue Jul 15 20:53:04 2008] [debug] mpm_winnt.c(408): Child 2692: Retrieved our scoreboard from the parent. [Tue Jul 15 20:53:04 2008] [debug] mpm_winnt.c(605): Parent: Sent 1 listeners to child 2692 [Tue Jul 15 20:53:04 2008] [debug] mpm_winnt.c(564): Child 2692: retrieved 1 listeners from parent [Tue Jul 15 20:53:04 2008] [notice] Child 2692: Acquired the start mutex. [Tue Jul 15 20:53:04 2008] [notice] Child 2692: Starting 64 worker threads. [Tue Jul 15 20:53:04 2008] [notice] Child 2692: Starting thread to listen on port 80. == I visit test.php once, document is cut off == == Access log shows: == xxx.xxx.xxx.xxx - - [15/Jul/2008:20:53:08] GET /test.php HTTP/1.1 200 14385 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 == I stop the apache service == [Tue Jul 15 20:53:15 2008] [notice] Parent: Received shutdown signal -- Shutting down the server. [Tue Jul 15 20:53:15 2008] [notice] Child 2692: Exit event signaled. Child process is ending. [Tue Jul 15 20:53:16 2008] [info] Child 2692: Accept thread exiting. [Tue Jul 15 20:53:16 2008] [notice] Child 2692: Released the start mutex [Tue Jul 15 20:53:16 2008] [info] Child 2692: 64 threads blocked on the completion port [Tue Jul 15 20:53:17 2008] [notice] Child 2692: All worker threads have exited. [Tue Jul 15 20:53:17 2008] [notice] Child 2692: Child process is exiting [Tue Jul 15 20:53:17 2008] [notice] Parent: Child process exited successfully. [Tue Jul 15 20:53:17 2008] [info] removed PID file C:/Program Files/Apache2.2/logs/httpd.pid (pid=3064) PHP log file is empty. apache.exe does not crash, I verified this by running httpd.exe from the command line instead of a service [2008-07-14 20:53:37] [EMAIL PROTECTED] Are you sure there's actually something crashing there? Nothing in Apache logs or wherever those are in Windows..? [2008-07-14 19:42:51] jowie dot 1337+phpnet at gmail dot com It may be worth noting that everything is fine when I run a php script of the console using php.exe test.php. [2008-07-14 19:39:03] jowie dot 1337+phpnet at gmail dot com Bug still occurs. I used the same httpd.conf as in my previous post ([14 Jul 5:57pm UTC]) phpinfo() tells me Loaded Configuration File: (none) [2008-07-14 18:22:24] [EMAIL PROTECTED] Try without any php.ini file anywhere in your system (check phpinfo() that nothing is loaded!) 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/45448 -- Edit this bug report at http://bugs.php.net/?id=45448edit=1
#45119 [Opn-Fbk]: Ldap_error always 49
ID: 45119 Updated by: [EMAIL PROTECTED] Reported By: guilherme dot silva at constat dot com dot br -Status: Open +Status: Feedback Bug Type: LDAP related Operating System: Fedora Core 6 and Windows 2003 PHP Version: 5.2.6 New Comment: 1) What was the configure line you used to compile PHP? 2) DOes this happen using PHP CLI? 3) What OpenLDAP libraries are you compiling PHP with? (version!) Previous Comments: [2008-05-28 17:39:34] guilherme dot silva at constat dot com dot br Description: ldap_errono always return the same code 49 after ldap_bind Reproduce code: --- $adConection = ldap_connect(ADSERVER); if ([EMAIL PROTECTED]($adConection,$user,$passwd)){ // 19 - Account locked out (too many invalid login attempts) // 32 - User does not exist // 49 - Wrong password // 53 - Account inactive (manually locked) echo ldap_errno($adConexao); die(); return false; Expected result: The code above should return the respectives code of error. When i use a wrong password should return 49, when my account is locked out should returns 19, when the password is wrong should return 32 and when acount is inactive should return 53. Actual result: -- Always return the error code 49, Invalid Credentials -- Edit this bug report at http://bugs.php.net/?id=45119edit=1
#45117 [Opn-Fbk]: strval gives :.0E-7 for 1e-6
ID: 45117 Updated by: [EMAIL PROTECTED] Reported By: rudolphi at chemie dot uni-kl dot de -Status: Open +Status: Feedback Bug Type: Scripting Engine problem Operating System: Ubuntu 8.04 (32bit) PHP Version: 5.2.6 New Comment: I can not reproduce this, check this out: # uname -a Linux linux5 2.6.20-1.2944.fc6 #1 SMP Tue Apr 10 17:46:00 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux # php -n -r '$float=1e-6; var_dump($float, strval($float));' float(1.0E-6) string(6) 1.0E-6 # php -v $ php -v PHP 5.2.7-dev (cli) (built: Jul 15 2008 04:32:33) .. Can you post the same here? Previous Comments: [2008-05-28 13:24:21] rudolphi at chemie dot uni-kl dot de Description: When converting a number in exponential format with negative exponent of n=6,7,... strval (or implicit conversion to string) gives :.0E-(n+1) if there is no fractional part present. The error can be found both in the precompiled PHP 5.2.4 and self-compiled 5.2.6, but it cannot be reproduced under Windows or under PHP 5.2.3 Ubuntu 7.10 (64bit). Seems to be closely related to OS (?). Reproduce code: --- $float=1e-6; echo strval($float); Expected result: 1e-6 or 1.0e-6 Actual result: -- :.0E-7 -- Edit this bug report at http://bugs.php.net/?id=45117edit=1
#43053 [Ver-Ctl]: [PATCH] Regression: some numbers shown in scientific notation
ID: 43053 Updated by: [EMAIL PROTECTED] Reported By: owner at dragon-hearts dot net -Status: Verified +Status: Critical Bug Type: Scripting Engine problem Operating System: Centos4 PHP Version: 5CVS-2007-10-25 Previous Comments: [2008-07-02 04:43:28] int-e at gmx dot de In the hope that this speeds up fixing the bug, here's a version of above patch that applies cleanly against php 5.2.6. The formatting of the code in question is different in the subversion trunk, but it's the same otherwise. At least that's how it was two months ago. http://int-e.home.tlink.de/php/php-5.2.6-printf.patch (use patch -p1 to apply) [2008-06-30 14:38:33] admin at shadowops dot net This bug is not limited to the Round() and related commands. I have been hit by it and it has caused many issues with MYSQL and values entered into the DB. 120 in debug mode prints as 1.2E+6 this is why in the DB it simply +1 insted of 120 [2008-05-05 17:55:52] sweiss at stylesight dot com You guys *have* to make changes like this more explicitly stated... It took forever to even realize the problem we were having lay with PHP and not the Javascript it was printing it out to - I definitely read the changelog and definitely did not pick up on the fact that all my numbers were going to suddenly come out in this totally useless format now. *Seriously Frustrating* - Couldn't this have just been an ini option for the people that wanted it? [2008-04-18 13:07:41] rbro at hotmail dot com Thanks for your help - that definitely seems to fix the problem. I manually applied your changes since I wanted to test it against the PHP 5.2.5 source, but I'm getting consistent output now when working with floats. [2008-04-18 01:34:28] int-e at gmx dot de Here's a patch that fixes the problem. http://int-e.home.tlink.de/php/php-printf.patch There are three changes here: 1) get rid of a hack in zend_dtoa() that sometimes kept trailing zeros (which caused the inconsistent behaviour between printing 120 and 130) 2) change php_gcvt() to switch to E format for large numbers if the number wouldn't fit into precision digits. 3) update a few tests to reflect the change to the precision semantics. I believe that in each of these cases, the test was flawed. Note that a precision of 14 (the default) means that 15 digit numbers should be printed in E notation, at least that's how I read the sprintf documentation. 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/43053 -- Edit this bug report at http://bugs.php.net/?id=43053edit=1
#45117 [Fbk-Opn]: strval gives :.0E-7 for 1e-6
ID: 45117 User updated by: rudolphi at chemie dot uni-kl dot de Reported By: rudolphi at chemie dot uni-kl dot de -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: Ubuntu 8.04 (32bit) PHP Version: 5.2.6 New Comment: $ uname -a Linux rudolphi 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008 i686 GNU/Linux $ php -n -r '$float=1e-6; var_dump($float, strval($float));' float(:.0E-7) string(6) :.0E-7 $ php -v PHP 5.2.6 (cli) (built: May 29 2008 10:18:45) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies Previous Comments: [2008-07-15 21:11:20] [EMAIL PROTECTED] I can not reproduce this, check this out: # uname -a Linux linux5 2.6.20-1.2944.fc6 #1 SMP Tue Apr 10 17:46:00 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux # php -n -r '$float=1e-6; var_dump($float, strval($float));' float(1.0E-6) string(6) 1.0E-6 # php -v $ php -v PHP 5.2.7-dev (cli) (built: Jul 15 2008 04:32:33) .. Can you post the same here? [2008-05-28 13:24:21] rudolphi at chemie dot uni-kl dot de Description: When converting a number in exponential format with negative exponent of n=6,7,... strval (or implicit conversion to string) gives :.0E-(n+1) if there is no fractional part present. The error can be found both in the precompiled PHP 5.2.4 and self-compiled 5.2.6, but it cannot be reproduced under Windows or under PHP 5.2.3 Ubuntu 7.10 (64bit). Seems to be closely related to OS (?). Reproduce code: --- $float=1e-6; echo strval($float); Expected result: 1e-6 or 1.0e-6 Actual result: -- :.0E-7 -- Edit this bug report at http://bugs.php.net/?id=45117edit=1
#45448 [Bgs]: PHP Cuts off documents after some point
ID: 45448 User updated by: jowie dot 1337+phpnet at gmail dot com Reported By: jowie dot 1337+phpnet at gmail dot com Status: Bogus Bug Type: Apache2 related Operating System: Windows XP Service Pack 1 PHP Version: 5.2.6 New Comment: My test file contains no php code, the only thing it contains is plain text generated by www.lipsum.com. It happens with _every_ php file where the output is over a specific size, having the extension .php is enough to trigger this. I am not screwing with you, I am spending time trying to provide you with information so it could hopefully be resolved. And seriously, how and why would I make this up. The server this is running on has just been formatted and reinstalled. If it is the server, it has to be something hardware related that screws up with the windows+apache+php combo. I will be happy to provide the specifications of the machine if I can locate them. I have no idea how to reproduce it on another machine, all I know that it happens 100% of the time on the machine in question. It also provides a lot of other services, which experience no such problems at all. And why is the output always around 8800 bytes? Previous Comments: [2008-07-15 21:03:58] [EMAIL PROTECTED] And the test.php file has no code? No ?php ? tags? For some reason I'm starting to think you're just screwing with us and this is completely bogus thing..I can't reproduce anything like this with the default install of latest Apache 2 and PHP installed on a fresh system - conclusion: There's something wrong with your machine. If you can reproduce this reliably with some other machine and provide reliable proof about it, reopen. Until that - BOGUS. [2008-07-15 19:20:05] jowie dot 1337+phpnet at gmail dot com Using the same httpd.conf as in my post from [14 Jul 5:57pm UTC] (besides the addition of an access log), my log file shows the following: [Tue Jul 15 20:53:04 2008] [notice] Apache/2.2.9 (Win32) PHP/5.2.6 configured -- resuming normal operations [Tue Jul 15 20:53:04 2008] [notice] Server built: Jun 13 2008 04:04:59 [Tue Jul 15 20:53:04 2008] [notice] Parent: Created child process 2692 [Tue Jul 15 20:53:04 2008] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child [Tue Jul 15 20:53:04 2008] [notice] Child 2692: Child process is running [Tue Jul 15 20:53:04 2008] [info] Parent: Duplicating socket 200 and sending it to child process 2692 [Tue Jul 15 20:53:04 2008] [debug] mpm_winnt.c(408): Child 2692: Retrieved our scoreboard from the parent. [Tue Jul 15 20:53:04 2008] [debug] mpm_winnt.c(605): Parent: Sent 1 listeners to child 2692 [Tue Jul 15 20:53:04 2008] [debug] mpm_winnt.c(564): Child 2692: retrieved 1 listeners from parent [Tue Jul 15 20:53:04 2008] [notice] Child 2692: Acquired the start mutex. [Tue Jul 15 20:53:04 2008] [notice] Child 2692: Starting 64 worker threads. [Tue Jul 15 20:53:04 2008] [notice] Child 2692: Starting thread to listen on port 80. == I visit test.php once, document is cut off == == Access log shows: == xxx.xxx.xxx.xxx - - [15/Jul/2008:20:53:08] GET /test.php HTTP/1.1 200 14385 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 == I stop the apache service == [Tue Jul 15 20:53:15 2008] [notice] Parent: Received shutdown signal -- Shutting down the server. [Tue Jul 15 20:53:15 2008] [notice] Child 2692: Exit event signaled. Child process is ending. [Tue Jul 15 20:53:16 2008] [info] Child 2692: Accept thread exiting. [Tue Jul 15 20:53:16 2008] [notice] Child 2692: Released the start mutex [Tue Jul 15 20:53:16 2008] [info] Child 2692: 64 threads blocked on the completion port [Tue Jul 15 20:53:17 2008] [notice] Child 2692: All worker threads have exited. [Tue Jul 15 20:53:17 2008] [notice] Child 2692: Child process is exiting [Tue Jul 15 20:53:17 2008] [notice] Parent: Child process exited successfully. [Tue Jul 15 20:53:17 2008] [info] removed PID file C:/Program Files/Apache2.2/logs/httpd.pid (pid=3064) PHP log file is empty. apache.exe does not crash, I verified this by running httpd.exe from the command line instead of a service [2008-07-14 20:53:37] [EMAIL PROTECTED] Are you sure there's actually something crashing there? Nothing in Apache logs or wherever those are in Windows..? [2008-07-14 19:42:51] jowie dot 1337+phpnet at gmail dot com It may be worth noting that everything is fine when I run a php script of the console using php.exe test.php. [2008-07-14 19:39:03] jowie dot 1337+phpnet at gmail dot com Bug still occurs. I used the same httpd.conf as in my previous post ([14 Jul 5:57pm
#45523 [NEW]: max_execution_time not working as documented
From: webmaster at asylum-et dot com Operating system: Any PHP version: 5.2.6 PHP Bug Type: *General Issues Bug description: max_execution_time not working as documented Description: I have found an old bug that I have found twice and has been closed twice claiming it is fixed. Bugs #37306 and #37408. This has not been fixed. I have found this issue in bug threads dating back as far as 2006. I have PHP 5.2.5.5 / WinXP SP2 / Apache 2.2.4.0 and PHP is NOT in safe mode. I get the error message Fatal error: Maximum execution time of 0 seconds exceeded ... Reproduce code: --- The max_execution_time was set to 0 to allow infinite time since 120 was not enough and had been the previous setting. Come to find out 120 was ample but this bug showed its face. According to the PHP.net documentation, The maximum execution time, in seconds. If set to zero, no time limit is imposed. Previous note in the other report was closed due to no one being able to recreate this error. I have installed this version of PHP 4 times with the exact same result so it should be rather simple to recreate since I have 4 times already. Hopefully this receives an honest attempt at resolving the bug. I would give more info but there is nothing else except that I see the error when trying to upload files of only 6 MB. Expected result: max_execution_time = 0 to work as documented Actual result: -- Scripts fail unless setting max_input_time = 0 as well -- Edit bug report at http://bugs.php.net/?id=45523edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45523r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45523r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45523r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45523r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45523r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45523r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45523r=needscript Try newer version:http://bugs.php.net/fix.php?id=45523r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45523r=support Expected behavior:http://bugs.php.net/fix.php?id=45523r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45523r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45523r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45523r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45523r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45523r=dst IIS Stability:http://bugs.php.net/fix.php?id=45523r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45523r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45523r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45523r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45523r=mysqlcfg
#45227 [Opn-Bgs]: Monotonous
ID: 45227 Updated by: [EMAIL PROTECTED] Reported By: costors at yahoo dot com -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: Systemax PHP Version: 5.2.6 New Comment: Yea right Previous Comments: [2008-06-10 11:42:00] costors at yahoo dot com Description: J.C. Monahan WCVB Needham,MA. weatherwoman, global warmer. Reproduce code: --- Keven Trudeau author of book 'Debt Cures they do not want you to know about' he's in the acting group that's pushing high temperatures by using cell phones viciously to get their $3 million studio in South Weymouth,MA. made.Others, Paul Pierce Boston Celtics basketball player ,girlfriend actress Cameron Diaz. Expected result: The city is actually Weymouth,MA. I expect this monotonous high paying job expectancy to be resolved. Emmenent domain, force by drug dealers, actors committing neighborhood murder, using homes to make movies, taken by force are members of the Sibianese Liberation Army. Actual result: -- Meal ticket expectations over with. -- Edit this bug report at http://bugs.php.net/?id=45227edit=1
#43538 [Opn]: count on non-array should return false, not 1
ID: 43538 Updated by: [EMAIL PROTECTED] Reported By: warren at transfusionmedia dot com Status: Open Bug Type: Feature/Change Request Operating System: Win XP SP2 PHP Version: 5.2.5 New Comment: Seems odd why its coded to return 1 imo, heres a patch against latest PHP_5_3 cvs that changes this to return false: http://www.phpfi.com/332583 Previous Comments: [2007-12-08 20:30:47] warren at transfusionmedia dot com Description: When doing count($var) where $var is not an array, the return = 1. The problem is when you're doing a check in your code: if (count($var) 0){ //do something } This will evaluate as true if $var is not an array. This is a problem if you are doing this: if (count($var) 0){ sort($var); // anything that requires $var to be an array } If there is anything in that if statement that requires $var to be an array, there will be a fatal error. I know you can also add an is_array check in there, but that is non-obvious and shouldn't be necessary. Really, if $var is not an array, count($var) should return false or null, or at least a -1 Reproduce code: --- $var = foo; if (count($var) 0){ sort($var); } else { echo The value of var is not greater than zero; } Expected result: The value of var is not greater than zero Actual result: -- Warning: sort() expects parameter 1 to be array, string given -- Edit this bug report at http://bugs.php.net/?id=43538edit=1
#45524 [NEW]: Multiple SOAP functions with the same parameter list do not get called correctl
From: kill3r4hir3 at hotmail dot com Operating system: CentOS 5.2 PHP version: 5.2.6 PHP Bug Type: SOAP related Bug description: Multiple SOAP functions with the same parameter list do not get called correctl Description: Defining SOAP functions with the same parameter list causes the first function to be called no matter which function you call. The example code shows a SOAP service defining TestFunctionA and TestFunctionB both taking a parameter named $param. No matter which one you call the function defined first (TestFunctionA) will always be called. This will also happen if you have more than one SOAP function that does not take any parameters. Whichever function is defined first will always be called. Reproduce code: --- SOAP Server PHP: http://pastebin.com/f13f78410 SOAP Client PHP: http://pastebin.com/f707798bb WSDL: http://pastebin.com/fcd761de Expected result: The expected result is that when you call TestFunctionB you would get a return value of TestFunctionB: $param. Actual result: -- The actual result of calling TestFunctionB is that soap is calling TestFunctionA and returning the value of TestFunctionA: $param. -- Edit bug report at http://bugs.php.net/?id=45524edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45524r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45524r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45524r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45524r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45524r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45524r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45524r=needscript Try newer version:http://bugs.php.net/fix.php?id=45524r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45524r=support Expected behavior:http://bugs.php.net/fix.php?id=45524r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45524r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45524r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45524r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45524r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45524r=dst IIS Stability:http://bugs.php.net/fix.php?id=45524r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45524r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45524r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45524r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45524r=mysqlcfg
#45525 [NEW]: Object Closure as
From: david at grudl dot com Operating system: windows xp PHP version: 5.3CVS-2008-07-16 (snap) PHP Bug Type: Feature/Change Request Bug description: Object Closure as Description: Lambda functions and closures are AWESOME! But they are not still supported as ob_start() argument. Reproduce code: --- function redirect($file) { $handle = fopen($file, 'w'); ob_start(function($buffer) use ($handle) { fwrite($handle, $buffer); }); } redirect('output.html'); echo 'Hello World!'; Expected result: Should work Actual result: -- Fatal error: ob_start(): No method name given: use ob_start(array($object,'method')) to specify instance $object and the name of a method of class Closure to use as output buffer. -- Edit bug report at http://bugs.php.net/?id=45525edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45525r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45525r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45525r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45525r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45525r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45525r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45525r=needscript Try newer version:http://bugs.php.net/fix.php?id=45525r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45525r=support Expected behavior:http://bugs.php.net/fix.php?id=45525r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45525r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45525r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45525r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45525r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45525r=dst IIS Stability:http://bugs.php.net/fix.php?id=45525r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45525r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45525r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45525r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45525r=mysqlcfg