#45019 [WFx-Csd]: Segmentation fault with SELECT ? and UNION
ID: 45019 User updated by: pumuckel at metropolis dot de Reported By: pumuckel at metropolis dot de -Status: Wont fix +Status: Closed Bug Type: MySQLi related Operating System: Linux Gentoo PHP Version: 5.3CVS-2008-05-16 (snap) Assigned To: andrey New Comment: Hi Andrey, I personally can live with that - since we are using 5.3 mysqlnd successfully in production. I'm going to close this bug. Thank you anyway. Previous Comments: [2009-08-27 08:54:05] and...@php.net Can't be fixed, as libmysql is faulty. Metadata changes when using UNIONS, mysqlnd handles it, but libmysql doesn't well. If you have SELECT with UNION and different metadata - then use mysqlnd. [2008-07-15 12:13:21] pumuckel at metropolis dot de 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 [2008-07-14 19:16:54] u...@php.net This looks like a libmysql only issue. Pumuckel, if possible give mysqlnd a test with your code. [2008-07-14 18:17:47] u...@php.net 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
#49396 [NEW]: Need access to system errno
From: phpbugs at jan-o-sch dot net Operating system: Linux / Solaris PHP version: 5.2.10 PHP Bug Type: Feature/Change Request Bug description: Need access to system errno Description: All system level php functions only return boolean values, which makes generic error handling easy. However, for a more sophisticated error handling, access to errno is required. For example: I try to touch() a file and touch() returns false. The only hint I can get is using an error handler or calling error_get_last(), none of which provides me with an errno value. Yes, I do want to react differently to EPERM and EDQUOT. No, I do not want to parse touch(): Unable to create file /fail because Permission denied. Alternatively, having posix_* versions of all system functions would allow one to use posix_get_last_error(). -- Edit bug report at http://bugs.php.net/?id=49396edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49396r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49396r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49396r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49396r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49396r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49396r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49396r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49396r=needscript Try newer version: http://bugs.php.net/fix.php?id=49396r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49396r=support Expected behavior: http://bugs.php.net/fix.php?id=49396r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49396r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49396r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49396r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49396r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=49396r=dst IIS Stability: http://bugs.php.net/fix.php?id=49396r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49396r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49396r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49396r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49396r=mysqlcfg
#40846 [Com]: pcre.backtrack_limit too restrictive
ID: 40846 Comment by: tom at r dot je Reported By: crisp at xs4all dot nl Status: Open Bug Type: Feature/Change Request Operating System: all PHP Version: 5.2.1 New Comment: This is still an issue in 5.3. The low limit causes scripts which hit it to fail without a warning, notice or error, creating hard to track down bugs For example, something which works fine for one set of data stops working on another set because the data is just longer. This cannot be the expected behaviour, surely? At minimum there needs to be a warning. Ideally though, the limit needs to be put to the pcre defaults. Previous Comments: [2007-12-10 14:18:11] daan at react dot nl This issue is still a problem, plus this low setting is also the cause of segfaults. (see http://bugs.php.net/bug.php?id=43031) At the moment even this simple regexp segfaults 5.2.5: preg_match('/(.)*/', str_repeat('x', 6000)); I hope that is not intended behavior, as is suggested in the reply in bug report 43031. [2007-08-16 19:00:13] drnick at physics dot byu dot edu I just wanted to throw out that I completely agree with crisp. We recently updated PHP on our webserver to 5.2.3 and had issues with our template system on input sizes of a certain size (100K). The idea of allowing PHP to enforce limits on the PCRE library is fine, but having the default action (when recursion_limit and backtrack_limit are commented-out) be PHP overriding PCRE's internal limits is VERY problematic. Aside from being incredibly anti backwards-compatible, I believe PHP should not make arbitrary assumptions such as these. I believe PHP should be changed so that the default action is to make use of PCRE's internal limits, and if people want to enforce their own, they can make that decision via the options. Perhaps modify php.ini-recommended to explain the options and say why having external limits can be good. [2007-08-16 15:58:08] brandon at invisionpower dot com Installations of 5.2 are causing this issue for us with relatively simple regex. Users can submit an arbitrary amount of data (I work on a bulletin board software) that is parsed out for bbcode tags. Even simple expressions are causing problems. $txt = preg_replace_callback( #\[code\](.+?)\[/code\]#is, array( $this, 'regex_code_tag' ), $txt ); var_dump( preg_last_error() ); The callback function is not being hit at all and the output is int(2) (backtrack limit hit). Increasing backtrack limit to 1,000,000 resolves the issue, but with shared hosting plans it's unrealistic to expect hosts to make php.ini changes to allow this. I agree with crisp - the limit in PHP should bet set to the internal PCRE options, with the php.ini settings allowing you to reduce them if you wish. PHP should not arbitrarily reduce them. [2007-05-20 11:22:00] crisp at xs4all dot nl PHP 5.2.0 includes an update of the PCRE library (version 6.7), so some problems may not be totally due to the restrictive limits of the PCRE settings in PHP but could be a bug/regression in PCRE itself. PCRE has always been very poor in internal optimisation of expressions that contain look-aheads or look-behinds, especially when they are combined with some OR'ed subexpression. It's backtracking mechanism is quite simplistic and doesn't rule out execution paths that are sure not to result in a match - in fact, it doesn't have any sort of execution planner. [2007-05-20 11:09:08] tigr at mail15 dot com It is kinda strange: previous versions work pretty nice, swiftly executing all patterns. And in some situations (as I mentioned before) increasing recursion and backtrack limits just won't help. I suppose it's wrong behaviour. Also, note that examples are pretty short and simple. Increasing both limits to 1 000 000 does not help - just why? 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/40846 -- Edit this bug report at http://bugs.php.net/?id=40846edit=1
#49244 [Opn-Ver]: Floating point NaN cause garbage characters
ID: 49244 Updated by: sjo...@php.net Reported By: ronlentjes at yahoo dot com dot au -Status: Open +Status: Verified Bug Type: Scripting Engine problem Operating System: Linux Fedora 8 PHP Version: 5.3.0 Previous Comments: [2009-08-20 19:19:13] sjoerd-php at linuxonly dot nl The problem is with calling php_sprintf_appendstring. Its 9th parameter is not precision, it is length. Index: ext/standard/formatted_print.c === --- ext/standard/formatted_print.c (revision 287513) +++ ext/standard/formatted_print.c (working copy) @@ -232,14 +232,14 @@ if (zend_isnan(number)) { is_negative = (number0); php_sprintf_appendstring(buffer, pos, size, NaN, 3, 0, padding, -alignment, precision, is_negative, 0, always_sign); +alignment, 3, is_negative, 0, always_sign); return; } if (zend_isinf(number)) { is_negative = (number0); php_sprintf_appendstring(buffer, pos, size, INF, 3, 0, padding, -alignment, precision, is_negative, 0, always_sign); +alignment, 3, is_negative, 0, always_sign); return; } [2009-08-20 11:15:47] sjoerd-php at linuxonly dot nl Could reproduce with PHP 5.2.10. [2009-08-14 04:25:22] ronlentjes at yahoo dot com dot au Perhaps you test it differently than I do. I'll give you the easiest way to see it happen: put this in a file called test.php: --- ? $d = pow(-1.0, 0.3); printf (%f\n, $d); ? --- Output will be (bash, Fedora 8, Linux): # php test.php --- NaN*A --- Output for browser will be NaN??? or NaN???F or other variations of that. This is reporducable on versions 4.2.2 (crash), 5.2.4, 5.3.0 (as indicated previously). I just retried this now. Cheers, Ron Lentjes LC CLS. [2009-08-13 14:29:39] ras...@php.net I am unable to reproduce this in neither 5.2 nor 5.3, and Valgrind is clean on Debian. [2009-08-13 14:14:51] ronlentjes at yahoo dot com dot au Description: This has been an issue since 4.2.2 and still in 5.3.0. $d = pow (-1.0, 0.3); // or anything causing NaN echo $d\n; - NAN printf (%f\n, $d); (4.2.2) - crash (5.2.4) - NaNbig-boxlittle-boxE-with-backslash-on-top (5.3.0) - NaNhex EF BF BDhex EF BF BDhex EF BF BD (viewed in browser as NaN???) Two issues here: Inconsistent display of NAN for echo and NaN for printf. Output of bogus characters after the 3 letters NaN for printf. I think you are missing a '\0' null termination after the NaN characters which probably cause a runaway to crash 4.2.2 but is just 'hanging' in there for the newer versions. Cheers, Ron Lentjes LC CLS. Reproduce code: --- $d = pow (-1.0, 0.3); echo $d\n; printf (%f\n, $d); Expected result: NaN NaN Actual result: -- (4.2.2) NAN crash (5.2.4) NAN NaNbig-boxlittle-boxE-with-backslash-on-top (5.3.0) NAN NaNhex EF BF BDhex EF BF BDhex EF BF BD (viewed in browser as NaN???) -- Edit this bug report at http://bugs.php.net/?id=49244edit=1
#44076 [Opn-Asn]: mysql_result returns nothing with blob
ID: 44076 Updated by: and...@php.net Reported By: jeff76 at operamail dot com -Status: Open +Status: Assigned Bug Type: MySQL related Operating System: FreeBSD PHP Version: 6CVS-2008-02-08 (snap) -Assigned To: +Assigned To: mysql Previous Comments: [2008-03-25 19:22:17] and...@php.net Yes, this issue is known, it only manifests when unicode.semantics=one Here is an excerpt from the sources : /* XXX: What about unicode type ??? Please test :) */ switch(Z_TYPE_PP(field)) { case IS_STRING: { It has been tested, as you also did, and it doesn't work. The code should be ported to PHP6 Unicode but how to do it is out of my area of expertise of working with Unicode+Zend :( [2008-02-14 13:21:17] jeff76 at operamail dot com I did further testing, it seems the bugs shows up or not depending on the blob field content itself : - it works fine if the content is text (tried with both short strings as well as 100 Kb+ ISO-8859-1 text files) - it doesn't work with raw binary content (such as a JPEG file, however short or long) Also this is using MySQL 4.1 and InnoDB tables. [2008-02-12 21:13:52] fel...@php.net Works fine to me. PHP 6.0.0-dev (cli) (built: Feb 12 2008 18:56:58) [2008-02-08 08:12:57] jeff76 at operamail dot com Description: It seems using mysql_result to retrieve a blob doesn't work and returns nothing (NULL). Using a different function like mysql_fetch_assoc however does work properly, as does reverting to PHP 5 or retrieving a non-blob column. This is using Unicode semantics. Reproduce code: --- (...connect to DB) $res=mysql_query('SELECT blob_column FROM table WHERE condition'); $var=mysql_result($res, 0); print_r($var); echo(gettype($var)); Expected result: (random binary garbage) and a proper variable type (unicode or binary ?) Actual result: -- gettype returns NULL, and print_r echoes nothing. -- Edit this bug report at http://bugs.php.net/?id=44076edit=1
#49397 [NEW]: SoapClient Error
From: persiancity at gmail dot com Operating system: Windows PHP version: 5.3.0 PHP Bug Type: *General Issues Bug description: SoapClient Error Description: I get thos error on PHP5.3 on Windows when try to use SoapClient. There is not error for same code in PHP 5.2 and above. Reproduce code: --- $client = new SoapClient('http://efyek.com/ws/pws.php?wsdl'); Actual result: -- Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://efyek.com/ws/pws.php?wsdl' : Extra content at the end of the document in class.p24.php:39 Stack trace: #0 class.p24.php(39): SoapClient-SoapClient('http://efyek.co...') #1 indexall.php(38): p24Class-connect() #2 {main} thrown in class.p24.php on line 39 -- Edit bug report at http://bugs.php.net/?id=49397edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49397r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49397r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49397r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49397r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49397r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49397r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49397r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49397r=needscript Try newer version: http://bugs.php.net/fix.php?id=49397r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49397r=support Expected behavior: http://bugs.php.net/fix.php?id=49397r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49397r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49397r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49397r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49397r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=49397r=dst IIS Stability: http://bugs.php.net/fix.php?id=49397r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49397r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49397r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49397r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49397r=mysqlcfg
#48745 [Ver-Csd]: mysqlnd: mysql_num_fields returns wrong column count for mysql_list_fields
ID: 48745 Updated by: and...@php.net Reported By: theta...@php.net -Status: Verified +Status: Closed Bug Type: MySQL related Operating System: * PHP Version: 5.3.0 Assigned To: mysql New Comment: This bug has been fixed in SVN. 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. Uwe, the fix will appear in 5.3.1 Previous Comments: [2009-08-28 09:30:17] s...@php.net Automatic comment from SVN on behalf of andrey Revision: http://svn.php.net/viewvc/?view=revisionrevision=287834 Log: Fix for bug#48745 mysqlnd: mysql_num_fields returns wrong column count for mysql_list_fields [2009-07-02 07:19:33] theta...@php.net Thanks! I understand the problem and that it is deprecated. The important thing is: it should *not* SIGSEGV. So the best idea would be to simply disable the whole function, if it is not working with mysqlnd and you are not willing to support it (something like: deprecated functions work with libmysqlclient but not with mysqlnd. They should simply return false or throw an error or should removed at all). Because of the sigsegv it was hard to find out, where the error really occurred in this thousands of lines of foreign PHP code. But if Andrew is able to fix it, let's wait for it. compile ext/mysql against libmysql (like ever since) and try again in four weeks My problem was, that this does not work easily with PHP 32bit on Solaris x64 using /opt/csw libs (mysql_config only returns 64bit libs, includes strange not GCC compatible CFLAGS and so on). But this is another problem. It was also broken in 5.2 (but you were able to fix it), but with 5.3 it now produces hard compilation errors (and can only be fixed by replacing mysql_config with a dummy that returns correct CFLAGS and LIB paths). But Linux users can always compile against libmysql this. For Solaris users mysqlnd is the best for problem-less installation! The easiest workaround was to use mysqli in our case :) For me this bug is obsolete, I only want to keep it open because of the SIGSEGV. Uwe [2009-07-02 07:01:42] u...@php.net Thanks. As said, its fixable, I know the cause, I may know a hack to fix it but the call is deprecated. There are zillions of MySQL 4.0 users but we don't support MySQL 4.0 any more. There may be many list_fields users, but list_fields is deprecated. At some point you simply have to stop giving old, deprecated calls the highest priority. Apart from that, I don't want to hack with the packet decoders in the absence of Andrey if the workaround is as easy as: compile ext/mysql against libmysql (like ever since) and try again in four weeks. Ulf [2009-07-01 17:14:33] theta...@php.net As I noted before: This is not my code and there may be a lot of users installing software using the old mysql extension and also this function. For me the workaround was to enable the mysqli configuration option in Contenido. The only problem is, that it is not enabled per default in this CMS (although it says: PHP 5 only). Contenido uses a PHP-written database abstraction (from where I copied the functions in this bug report) and it was easy to exchange by the other one. It was also fixable by doing a dummy query select * from table limit 1 and looking into the field descriptions for the result set (this is how the abstraction layer fr mysqli does it in Contenido). So many thanks for looking at it, I will post a note in the Contenido mailing list about this problem and the workaround. [2009-07-01 16:54:38] u...@php.net The trouble goes back to an over optimized COM_LIST_FIELDS communication package and a guess that mysqlnd makes. mysqlnd makes a guess on the number of fields that the deprecated API call mysql_list_fields() may return. The guess is never adjusted to the actual number of fields returned by the Server. As a result mysql_num_fields(), when invoked with a result set handle returned by mysql_list_fields(), may return a faulty number of fields. If a users tries to loop over all fields using the number of fields returned by mysql_num_fields() as a stop condition, he may try to access fields that don't exist. The out-of-bound access is not detected because the internal security check also gets the wrong number of fields reported. Workaround: - don't use deprecated functions, don't use mysql_list_fields().. (there is a reason why we want to deprecate COM_LIST_FIELDS!) - use libmysql until its fixed I don't
#49397 [Opn-Fbk]: SoapClient Error
ID: 49397 Updated by: sjo...@php.net Reported By: persiancity at gmail dot com -Status: Open +Status: Feedback Bug Type: *General Issues Operating System: Windows PHP Version: 5.3.0 New Comment: Thank you for your bug report. The problem you describe looks similar to bug #49226. Does it work correctly if you save the WSDL to disk before loading it? Could you make a dump of the HTTP connection with a sniffer? Previous Comments: [2009-08-28 09:49:21] persiancity at gmail dot com Description: I get thos error on PHP5.3 on Windows when try to use SoapClient. There is not error for same code in PHP 5.2 and above. Reproduce code: --- $client = new SoapClient('http://efyek.com/ws/pws.php?wsdl'); Actual result: -- Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://efyek.com/ws/pws.php?wsdl' : Extra content at the end of the document in class.p24.php:39 Stack trace: #0 class.p24.php(39): SoapClient-SoapClient('http://efyek.co...') #1 indexall.php(38): p24Class-connect() #2 {main} thrown in class.p24.php on line 39 -- Edit this bug report at http://bugs.php.net/?id=49397edit=1
#49287 [Bgs]: MySQLi client compression broken (mysqlnd)
ID: 49287 User updated by: shooreek at gmail dot com Reported By: shooreek at gmail dot com Status: Bogus Bug Type: MySQLi related Operating System: WinXP SP3 PHP Version: 5.3.0 New Comment: Description: It seems like mysqli do not understand compression protocol. When you are using flag MYSQLI_CLIENT_COMPRESS in mysqli_real_connect - it connects, but can't properly handle server (compressed?) answer. MySQL server 5.0.67-community-nt-log with compression enabled: mysql show variables like '%have_comp%'; +---+---+ | Variable_name | Value | +---+---+ | have_compress | YES | +---+---+ 1 row in set (0.00 sec) I can connect to MySQL server using command line client with flag '-C' (use compression): C:\Documents and Settings\Umysql -C Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 Server version: 5.0.67-community-nt-log MySQL Community Edition (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql show status like '%compr%'; +---+---+ | Variable_name | Value | +---+---+ | Compression | ON| +---+---+ 1 row in set (0.00 sec) mysql I think that something is wrong with mysqli and flag MYSQLI_CLIENT_COMPRESS Reproduce code: --- $mysqli = mysqli_init(); if (!$mysqli) { die('mysqli_init failed'); } if (!$mysqli-real_connect('localhost', '', '', NULL, NULL, NULL, MYSQLI_CLIENT_COMPRESS)) { die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); } $mysqli-query(show status like '%compre%'); $mysqli-close(); Expected result: Normal query execution without any errors. Actual result: -- PHP Some times it crushes. Sometimes it do not. Error log: PHP Warning: mysqli::query(): MySQL server has gone away in C:\Documents and Settings\U\Desktop\compress_test.php on line 42 PHP Warning: mysqli::query(): Error reading result set's header in C:\Documents and Settings\U\Desktop\compress_test.php on line 42 MySQL Error log: 090818 17:36:04 [Warning] Aborted connection 8 to db: 'unconnected' user: 'U' host: 'localhost' (Got a packet bigger than 'max_allowed_packet' bytes) sometimes: 090818 17:31:13 [Warning] Aborted connection 61 to db: 'unconnected' user: 'U' host: 'localhost' (Got an error reading communication packets) === Correct documentation, please, if it is a feature request. Previous Comments: [2009-08-26 09:09:16] u...@php.net Duplicate of http://bugs.php.net/bug.php?id=47017 . Feature request. [2009-08-18 15:14:35] j...@php.net This is most likely mysqlnd issue since PHP 5.3 binaries for win32 use mysqlnd. [2009-08-18 13:57:43] shooreek at gmail dot com Description: It seems like mysqli do not understand compression protocol. When you are using flag MYSQLI_CLIENT_COMPRESS in mysqli_real_connect - it connects, but can't properly handle server (compressed?) answer. MySQL server 5.0.67-community-nt-log with compression enabled: mysql show variables like '%have_comp%'; +---+---+ | Variable_name | Value | +---+---+ | have_compress | YES | +---+---+ 1 row in set (0.00 sec) I can connect to MySQL server using command line client with flag '-C' (use compression): C:\Documents and Settings\Umysql -C Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 Server version: 5.0.67-community-nt-log MySQL Community Edition (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql show status like '%compr%'; +---+---+ | Variable_name | Value | +---+---+ | Compression | ON| +---+---+ 1 row in set (0.00 sec) mysql I think that something is wrong with mysqli and flag MYSQLI_CLIENT_COMPRESS Reproduce code: --- $mysqli = mysqli_init(); if (!$mysqli) { die('mysqli_init failed'); } if (!$mysqli-real_connect('localhost', '', '', NULL, NULL, NULL, MYSQLI_CLIENT_COMPRESS)) { die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); } $mysqli-query(show status like '%compre%'); $mysqli-close(); Expected result: Normal query execution without any errors. Actual result: -- PHP Some times it crushes. Sometimes it do not. Error log: PHP Warning: mysqli::query(): MySQL server has gone away in C:\Documents and Settings\U\Desktop\compress_test.php on line 42 PHP Warning: mysqli::query(): Error reading result set's header in C:\Documents and Settings\U\Desktop\compress_test.php on line 42 MySQL Error log: 090818 17:36:04
#49397 [Com]: SoapClient Error
ID: 49397 Comment by: persiancity at gmail dot com Reported By: persiancity at gmail dot com Status: Feedback Bug Type: *General Issues Operating System: Windows PHP Version: 5.3.0 New Comment: yes. this is working when I save it on disk and call it locally. sorry I have not installed sniffer program. Previous Comments: [2009-08-28 10:15:45] sjo...@php.net Thank you for your bug report. The problem you describe looks similar to bug #49226. Does it work correctly if you save the WSDL to disk before loading it? Could you make a dump of the HTTP connection with a sniffer? [2009-08-28 09:49:21] persiancity at gmail dot com Description: I get thos error on PHP5.3 on Windows when try to use SoapClient. There is not error for same code in PHP 5.2 and above. Reproduce code: --- $client = new SoapClient('http://efyek.com/ws/pws.php?wsdl'); Actual result: -- Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://efyek.com/ws/pws.php?wsdl' : Extra content at the end of the document in class.p24.php:39 Stack trace: #0 class.p24.php(39): SoapClient-SoapClient('http://efyek.co...') #1 indexall.php(38): p24Class-connect() #2 {main} thrown in class.p24.php on line 39 -- Edit this bug report at http://bugs.php.net/?id=49397edit=1
#49398 [NEW]: number_format returns invalid character with some charsets
From: mark dot j dot wade at googlemail dot com Operating system: PHP version: 5.2.10 PHP Bug Type: Strings related Bug description: number_format returns invalid character with some charsets Description: number_format will only accept a single character for the thousands separator and deliberately shortens longer input to one character. However, for some charsets (ru_RU.UTF8 was the one I discovered this on) the thousands separator as returned by localeconv is more than one character. Normally, this wouldn't be a problem, however, it seems when PHP tries to shorten this particular value to one character, it creates an invalid character and returns something like demonstrated in the reproduce code. Reproduce code: --- setlocale( L_ALL, 'ru_RU.UTF8' ); $locale = localeconv(); echo number_format( , 0, $locale['decimal_point'], $locale['thousands_sep'] ); Expected result: 9 999 Actual result: -- 9?999 -- Edit bug report at http://bugs.php.net/?id=49398edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49398r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49398r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49398r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49398r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49398r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49398r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49398r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49398r=needscript Try newer version: http://bugs.php.net/fix.php?id=49398r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49398r=support Expected behavior: http://bugs.php.net/fix.php?id=49398r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49398r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49398r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49398r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49398r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=49398r=dst IIS Stability: http://bugs.php.net/fix.php?id=49398r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49398r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49398r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49398r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49398r=mysqlcfg
#49398 [Opn-Fbk]: number_format returns invalid character with some charsets
ID: 49398 Updated by: paj...@php.net Reported By: mark dot j dot wade at googlemail dot com -Status: Open +Status: Feedback Bug Type:Strings related PHP Version: 5.2.10 New Comment: Which OS? Previous Comments: [2009-08-28 12:46:48] mark dot j dot wade at googlemail dot com Description: number_format will only accept a single character for the thousands separator and deliberately shortens longer input to one character. However, for some charsets (ru_RU.UTF8 was the one I discovered this on) the thousands separator as returned by localeconv is more than one character. Normally, this wouldn't be a problem, however, it seems when PHP tries to shorten this particular value to one character, it creates an invalid character and returns something like demonstrated in the reproduce code. Reproduce code: --- setlocale( L_ALL, 'ru_RU.UTF8' ); $locale = localeconv(); echo number_format( , 0, $locale['decimal_point'], $locale['thousands_sep'] ); Expected result: 9 999 Actual result: -- 9?999 -- Edit this bug report at http://bugs.php.net/?id=49398edit=1
#49398 [Fbk-Opn]: number_format returns invalid character with some charsets
ID: 49398 User updated by: mark dot j dot wade at googlemail dot com Reported By: mark dot j dot wade at googlemail dot com -Status: Feedback +Status: Open Bug Type:Strings related PHP Version: 5.2.10 New Comment: Linux Previous Comments: [2009-08-28 12:48:25] paj...@php.net Which OS? [2009-08-28 12:46:48] mark dot j dot wade at googlemail dot com Description: number_format will only accept a single character for the thousands separator and deliberately shortens longer input to one character. However, for some charsets (ru_RU.UTF8 was the one I discovered this on) the thousands separator as returned by localeconv is more than one character. Normally, this wouldn't be a problem, however, it seems when PHP tries to shorten this particular value to one character, it creates an invalid character and returns something like demonstrated in the reproduce code. Reproduce code: --- setlocale( L_ALL, 'ru_RU.UTF8' ); $locale = localeconv(); echo number_format( , 0, $locale['decimal_point'], $locale['thousands_sep'] ); Expected result: 9 999 Actual result: -- 9?999 -- Edit this bug report at http://bugs.php.net/?id=49398edit=1
#49399 [NEW]: mb_ereg_replace() '\b' fails with mbstrings
From: manfred at mabuweb dot com Operating system: linux PHP version: 5.2.10 PHP Bug Type: mbstring related Bug description: mb_ereg_replace() '\b' fails with mbstrings Description: mb_ereg_replace() and mb_eregi_replace() misinterpretate MBchars as word end. Reproduce code: --- $pattern = '\bas\b'; $string = 'Días'; echo $string.'br/'; echo mb_ereg_replace($pattern, '', $string); Expected result: Días Días Actual result: -- Días Dí -- Edit bug report at http://bugs.php.net/?id=49399edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49399r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49399r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49399r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49399r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49399r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49399r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49399r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49399r=needscript Try newer version: http://bugs.php.net/fix.php?id=49399r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49399r=support Expected behavior: http://bugs.php.net/fix.php?id=49399r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49399r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49399r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49399r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49399r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=49399r=dst IIS Stability: http://bugs.php.net/fix.php?id=49399r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49399r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49399r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49399r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49399r=mysqlcfg
#49400 [NEW]: New Functions for Getting and Setting the Default Connection Handle
From: rahlentertainment at gmail dot com Operating system: Ubuntu 9.04 PHP version: 5.2.10 PHP Bug Type: Feature/Change Request Bug description: New Functions for Getting and Setting the Default Connection Handle Description: When you open a database connection with mysql_connect(), the function returns a connection handle. Subsequent calls to mysql_query() assume the last connection if no connection handle is specified. Unfortunately, there doesn't seem to be any way to get this connection handle again, without calling mysql_connect() a second time with the original arguments. There should be a way to get the connection handle again, without calling mysql_connect(), using something like mysql_get_last_connection() or similar. Rational: Consider a large PHP application. The creators call mysql_connect() at the begining of their application, and, since they only use one database, they don't save the connection handle, and let PHP automatically use the last (and only) connection. Another developer comes along, and writes a plug-in for the main application. This plug-in requires a second database connection. When the plug-in calls mysql_connect() to connect to it's database, the rest of the original application breaks, because it's trying to use the plug-in's database connection, because it was the last one opened. Reproduce code: --- // Start of a plug-in. $OldDBH = mysql_get_last_connection(); // new function $NewDBH = mysql_connect(...); // some processing here... // Plug-in has finished it's work mysql_set_last_connection($OldDBH); // new function, tells php to use the specified connection handle as the default for subsequent mysql_query() calls which do not explicitly specify one. // Plugin returns control to main app // main app calls mysql_query() without specifying a dbh mysql_query(); // this works, because $OldDBH was set back as the default. -- Edit bug report at http://bugs.php.net/?id=49400edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49400r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49400r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49400r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49400r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49400r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49400r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49400r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49400r=needscript Try newer version: http://bugs.php.net/fix.php?id=49400r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49400r=support Expected behavior: http://bugs.php.net/fix.php?id=49400r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49400r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49400r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49400r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49400r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=49400r=dst IIS Stability: http://bugs.php.net/fix.php?id=49400r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49400r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49400r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49400r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49400r=mysqlcfg
#49192 [Com]: PHP crashes with exception (reproduced with AdoDB and Access)
ID: 49192 Comment by: FelixStrauss at gmx dot de Reported By: circus2 at freenet dot de Status: No Feedback Bug Type: Reproducible crash Operating System: Win XP SP3 (german) PHP Version: 5.3SVN-2009-08-07 (snap) New Comment: In addition: My system is Windows 7 PR Build 7100 Previous Comments: [2009-08-28 15:38:19] FelixStrauss at gmx dot de I can reproduce the problem with the following two lines: ?php $dbConnection = new Com('ADODB.Connection'); var_dump(gc_collect_cycles()); ? My system: Zend Extension Build API220090626,TS,VC9 PHP Extension Build API20090626,TS,VC9 [2009-08-15 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2009-08-07 17:08:17] paj...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. [2009-08-07 17:03:33] circus2 at freenet dot de Description: When running the sample code PHP 5.3 and PHP 5.3 latest snapshot crash with Win32 exception. It was reproducable on two different machines. But you need the MS Access Jet Engine to work with this sample code (means you probably need MS Access). With php 5.2.10 it runs like expected - no exceptions, no errors. Reproduce code: --- http://www.tahat.de/Error3.zip Expected result: nothing special here - just works with 5.2.10 Actual result: -- Win32 exception crashes php.exe Thread 0 - System ID 2984 Entry point php+2fa2 Create time 07.08.2009 18:25:36 Time spent in user mode 0 Days 0:0:0.380 Time spent in kernel mode 0 Days 0:0:0.140 Function Arg 1 Arg 2 Arg 3 Source php5ts!gc_remove_zval_from_buffer+365 00393128 0ac44ea0 0005 php5ts!gc_remove_zval_from_buffer+425 0ac44ea0 01247500 00393128 php5ts!gc_collect_cycles+6a 00393128 0001 0aa95fb0 php5ts!gc_zval_possible_root+e9 0ac44ea0 00393128 00393128 php5ts!zval_ptr_dtor+93 00c0fb90 00393128 01160548 php5ts!execute+39293 00393128 00c0fc1c php5ts!execute+298 01132778 00393100 00393128 php5ts!zend_execute_scripts+fe 0008 00393128 php5ts!php_execute_script+231 00397038 0138b8a0 0099 php5ts!zend_register_constant+a9 00c0fdf8 00393128 00404e60 php+1780 1000c24e 00396028 004017d4 php5ts!efree+9 00396028 004017d4 01131390 php5ts!efree+2e 01131390 00393128 003930c4 php+17d4 00c0fecc 00393128 0040742c php+24ab 006e 0001 msvcr90!_lock+177 2a644eb0 01ca1779 7ffd6000 kernel32!BaseProcessStart+23 00402fa2 PHP5TS!GC_REMOVE_ZVAL_FROM_BUFFER+365WARNING - DebugDiag was not able to locate debug symbols for php5ts.dll, so the information below may be incomplete. In php__PID__876__Date__08_07_2009__Time_06_25_58PM__40__Second_Chance_Exception_C005.dmp the assembly instruction at php5ts!gc_remove_zval_from_buffer+365 in C:\[..]\php\php5ts.dll from The PHP Group has caused an access violation exception (0xC005) when trying to read from memory location 0x0014 on thread 0 -- Edit this bug report at http://bugs.php.net/?id=49192edit=1
#49393 [Fbk-Csd]: Comment Block exiting prematurally
ID: 49393 User updated by: mudoch at gmail dot com Reported By: mudoch at gmail dot com -Status: Feedback +Status: Closed Bug Type: Scripting Engine problem Operating System: Win XPsp3 PHP Version: 5.3.0 New Comment: Thanks, sorry, totally missed that one. I even marked that for testing, Thought I had tested it Sorry, thanks for setting me straight. Previous Comments: [2009-08-28 01:17:17] carsten_sttgt at gmx dot de verses the action in 5.2.5 where the code was written and tested. In your 5.2.5 installation short_open_tags was enabled. In your current installation it's not. Regards, Carsten [2009-08-27 19:16:08] sjo...@php.net Thank you for your bug report. I was unable to reproduce the bug you described. Are you sure there is no ? somewhere in the comment? Did you supplied the right example code? Is there some non-ASCII character in your file? It may help us if you put the file up for download somewhere. [2009-08-27 19:00:02] mudoch at gmail dot com Description: The comment block /* ... */ will exit at the first in the block verses the action in 5.2.5 where the code was written and tested. Reproduce code: --- ? /* * * @author Karim Mribti * @license LGPL = 2.1 * @package barcode-mribti * @copyright 2001 Karim Mribti * @see image.php * @version $Id$ * * barcode site home page * Adapted from 0.0.7a on 2007-05-24 by Frédéric G. MARAND for Agorus S.A. * * May2009 Lawrence Sall - modified for a cleaner fit, adjust util.php for * desired defaults. * * */ include(home.php); ? Expected result: Page in home.php to be displayed Actual result: -- = 2.1 * @package barcode-mribti * @copyright 2001 Karim Mribti * @see image.php * @version $Id$ * * barcode site home page * Adapted from 0.0.7a on 2007-05-24 by Frédéric G. MARAND for Agorus S.A. * * May2009 Lawrence Sall - modified for a cleaner fit, adjust util.php for * desired defaults. * * */ include(home.php); ? -- Edit this bug report at http://bugs.php.net/?id=49393edit=1
#49394 [Csd]: Probable date_format regression due to #48058
ID: 49394 Updated by: srina...@php.net Reported By: hjones at hopone dot net Status: Closed Bug Type: Strings related Operating System: Solaris 9 (Sparc V9; 64-bit) PHP Version: 5.2.10 New Comment: the fix for this bug was delivered as part of fix for bug:48276 ( http://bugs.php.net/bug.php?id=48276). if you wish, you can use 5.2.11RC1 candidate build available from http://downloads.php.net/ilia/php-5.2.11RC1.tar.bz2 pl. note that these RC1 builds are meant for testing and not production. Previous Comments: [2009-08-27 21:27:10] der...@php.net This bug has been fixed in SVN. 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. This is already fixed in SVN, please try a snapshot. [2009-08-27 20:49:24] hjones at hopone dot net PHP was compiled with the following GCC: # gcc -v Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/specs Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls Thread model: posix gcc version 3.3.2 [2009-08-27 20:43:17] hjones at hopone dot net Description: Upgrading from 5.2.9 to 5.2.10 causes setcookie() to return the year '' instead of '2009' when used with time() as the cookie expiry. Replacing 5.2.10's ext/date/php_date.{c,h} with 5.2.9's copy and recompiling corrects this issue. I believe this is a regression caused by PHP bug #48058 Reproduce code: --- ?php setcookie(php_test_cookie, test_cookie_value, time() + 1444000); ? Expected result: Set-Cookie: php_test_cookie=test_cookie_value; expires=Sun, 13-Sep-2009 11:31:54 GMT Actual result: -- Set-Cookie: php_test_cookie=test_cookie_value; expires=Sun, 13-Sep- 11:31:54 GMT -- Edit this bug report at http://bugs.php.net/?id=49394edit=1
#49401 [NEW]: Semaphore files are being created in / by default
From: nathan at gossamer-threads dot com Operating system: Gentoo PHP version: 5.2.10 PHP Bug Type: Session related Bug description: Semaphore files are being created in / by default Description: As of 5.2.10 it seems that the semaphore files are being created in / instead of the usual /tmp. Uncommenting the default session.save_path of /tmp in the php.ini fixes it. Reproduce code: --- nat...@ndb3 ~ $ php --version PHP Warning: PHP Startup: mm_create(0, /session_mm_cgi-fcgi1005) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0 PHP 5.2.10 (cgi-fcgi) (built: Aug 28 2009 10:23:30) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies -- Edit bug report at http://bugs.php.net/?id=49401edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49401r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49401r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49401r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49401r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49401r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49401r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49401r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49401r=needscript Try newer version: http://bugs.php.net/fix.php?id=49401r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49401r=support Expected behavior: http://bugs.php.net/fix.php?id=49401r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49401r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49401r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49401r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49401r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=49401r=dst IIS Stability: http://bugs.php.net/fix.php?id=49401r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49401r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49401r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49401r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49401r=mysqlcfg
#49401 [Com]: Semaphore files are being created in / by default
ID: 49401 Comment by: nathan at gossamer-threads dot com Reported By: nathan at gossamer-threads dot com Status: Open Bug Type: Session related Operating System: Gentoo PHP Version: 5.2.10 New Comment: Configure command used: Configure Command = './configure' '--prefix=/usr/lib/php5' '--host=i686-pc-linux-gnu' '--mandir=/usr/lib/php5/man' '--infodir=/usr/lib/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--enable-cli' '--disable-cgi' '--with-config-file-path=/etc/php/cli-php5' '--with-config-file-scan-dir=/etc/php/cli-php5/ext-active' '--without-pear' '--disable-bcmath' '--with-bz2' '--disable-calendar' '--disable-ctype' '--with-curl' '--without-curlwrappers' '--disable-dbase' '--enable-exif' '--without-fbsql' '--without-fdftk' '--disable-filter' '--enable-ftp' '--without-gettext' '--without-gmp' '--disable-hash' '--without-informix' '--disable-ipv6' '--disable-json' '--without-kerberos' '--enable-mbstring' '--with-mcrypt' '--enable-memory-limit' '--with-mhash' '--without-ming' '--without-msql' '--without-mssql' '--with-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl' '--without-pcre-dir' '--disable-pdo' '--without-pgsql' '--without-pspell' '--without-recode' '--disable-reflection' '--disable-simplexml' '--enable-shmop' '--without-snmp' '--disable-soap' '--enable-sockets' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--disable-xmlreader' '--disable-xmlwriter' '--with-xmlrpc' '--with-xsl' '--disable-zip' '--with-zlib' '--disable-debug' '--enable-dba' '--without-cdb' '--with-db4' '--with-flatfile' '--with-gdbm' '--with-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--without-xpm-dir' '--with-gd' '--with-imap' '--with-imap-ssl' '--with-mysql=/usr/lib/mysql' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--without-mysqli' '--with-readline' '--without-libedit' '--with-mm' '--without-sqlite' Previous Comments: [2009-08-28 17:56:01] nathan at gossamer-threads dot com Description: As of 5.2.10 it seems that the semaphore files are being created in / instead of the usual /tmp. Uncommenting the default session.save_path of /tmp in the php.ini fixes it. Reproduce code: --- nat...@ndb3 ~ $ php --version PHP Warning: PHP Startup: mm_create(0, /session_mm_cgi-fcgi1005) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0 PHP 5.2.10 (cgi-fcgi) (built: Aug 28 2009 10:23:30) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies -- Edit this bug report at http://bugs.php.net/?id=49401edit=1
#29520 [NoF-Csd]: php mysql compile fail
ID: 29520 Updated by: danbr...@php.net Reported By: martinkuria at hotmail dot com -Status: No Feedback +Status: Closed Bug Type: Compile Failure Operating System: Solaris9 PHP Version: 5.0.0 New Comment: Looks like it's safe to close this out officially now. Previous Comments: [2009-02-15 07:26:34] gambitrex at hotmail dot com hey, the apt-get install libmysqlclient-dev worked for me too :D [2007-11-28 20:16:50] cizarr at gmail dot com yep, this one will solve the problem as anderan wrote: apt-get install libmysqlclient-dev thanks man! [2007-11-09 14:41:22] dan at k dot ro well on fedora core 6 is not working what a stupid bug this is! [2007-11-06 12:33:54] anderan at suponix dot com me help: apt-get install libmysqlclient-dev [2007-09-05 07:53:28] surface3 at tiscali dot it Hi Guys, i've got the same problem with php-5.2.3 and mysql 5.0.45. i've downloaded MySQL-devel-community-5.0.45-0 and i 've solved my problem with configure bye 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/29520 -- Edit this bug report at http://bugs.php.net/?id=29520edit=1
#49403 [NEW]: FILTER_VALIDATE_URL
From: botisdale at gmail dot com Operating system: win xp PHP version: 5.2.10 PHP Bug Type: Filter related Bug description: FILTER_VALIDATE_URL Description: It seems that the scheme is always required for FILTER_VALIDATE_URL, whether or not FILTER_FLAG_SCHEME_REQUIRED is used - making the second flag redundant. Is this the expected behavior of FILTER_VALIDATE_URL? Does it never evaluate 'example.com' to true? --- From manual page: function.filter-var --- Reproduce code: --- --- From manual page: function.filter-var --- #1: ?php var_dump(filter_var('example.com', FILTER_VALIDATE_URL)); ? #2: ?php var_dump(filter_var('example.com', FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED)); ? Expected result: I'd expect to see: #1: string(11) example.com #2: bool(false) Actual result: -- #1: bool(false) #2: bool(false) -- Edit bug report at http://bugs.php.net/?id=49403edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49403r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49403r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49403r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49403r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49403r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49403r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49403r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49403r=needscript Try newer version: http://bugs.php.net/fix.php?id=49403r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49403r=support Expected behavior: http://bugs.php.net/fix.php?id=49403r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49403r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49403r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49403r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49403r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=49403r=dst IIS Stability: http://bugs.php.net/fix.php?id=49403r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49403r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49403r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49403r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49403r=mysqlcfg
#49404 [NEW]: LDAP searh crashes PHP if key not matched
From: doctor_nett at yahoo dot com Operating system: linux PHP version: 5.3.0 PHP Bug Type: Reproducible crash Bug description: LDAP searh crashes PHP if key not matched Description: i am using php, with ldap to search records form active director on linux(webserver) it work fines if i type uid that exsist in active directory, but if i type some uid that does not exsist in the active directory php script crashes. note: sorry if i am posting this in wrong place, but the same code works fine on my windows xp(webserver) system with ADAM ADSI Reproduce code: --- $chrUid = mazhar.hassan; #works fine $chrUid = maz.hass; #crashes the system $sr=ldap_search($ds, $LDAP_DN, (uid=$chrUid)); Expected result: it should return nothing, as its doing on my XP system environment, so that i can display a message record not found Actual result: -- system crashes and have to restart. -- Edit bug report at http://bugs.php.net/?id=49404edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49404r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49404r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49404r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49404r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49404r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49404r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49404r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49404r=needscript Try newer version: http://bugs.php.net/fix.php?id=49404r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49404r=support Expected behavior: http://bugs.php.net/fix.php?id=49404r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49404r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49404r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49404r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49404r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=49404r=dst IIS Stability: http://bugs.php.net/fix.php?id=49404r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49404r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49404r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49404r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49404r=mysqlcfg
#49404 [Opn-Fbk]: LDAP searh crashes PHP if key not matched
ID: 49404 Updated by: fel...@php.net Reported By: doctor_nett at yahoo dot com -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: linux PHP Version: 5.3.0 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. Previous Comments: [2009-08-28 22:09:04] doctor_nett at yahoo dot com Description: i am using php, with ldap to search records form active director on linux(webserver) it work fines if i type uid that exsist in active directory, but if i type some uid that does not exsist in the active directory php script crashes. note: sorry if i am posting this in wrong place, but the same code works fine on my windows xp(webserver) system with ADAM ADSI Reproduce code: --- $chrUid = mazhar.hassan; #works fine $chrUid = maz.hass; #crashes the system $sr=ldap_search($ds, $LDAP_DN, (uid=$chrUid)); Expected result: it should return nothing, as its doing on my XP system environment, so that i can display a message record not found Actual result: -- system crashes and have to restart. -- Edit this bug report at http://bugs.php.net/?id=49404edit=1
#49405 [NEW]: PHP CLI (php -a) does not function correctly on include and related functions.
From: james dot zimmerman at trnxs dot net Operating system: Linux (Ubuntu 9.04) PHP version: 5.2.10 PHP Bug Type: CGI related Bug description: PHP CLI (php -a) does not function correctly on include and related functions. Description: Discovered first trying to utilize Zend_Http_Client from the interactive PHP command line. Any include call using CLI interactive mode will always report the boolean return value of the include operation, regardless of whether a return() statement is included or not in the included file. A more precise description would be that if you attempt to run Example #5 from the include() description page (http://us3.php.net/manual/en/function.include.php), it will echo two 11 and not the expected PHP1. This does not appear to affect simply running the file as an argument to the php command, ie $ php testreturns.php, only the interactive CLI mode (php -a). Reproduce code: --- Interactive shell php $foo = include 'return.php'; php $bar = include 'noreturn.php'; php echo $foo; 1 php echo $bar; 1 php exit Expected result: Should have echoed PHP when echoing the $foo variable. php echo $foo; PHP php echo $bar; 1 Actual result: -- php echo $foo; 1 php echo $bar; 1 -- Edit bug report at http://bugs.php.net/?id=49405edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49405r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49405r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49405r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49405r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49405r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49405r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49405r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49405r=needscript Try newer version: http://bugs.php.net/fix.php?id=49405r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49405r=support Expected behavior: http://bugs.php.net/fix.php?id=49405r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49405r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49405r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49405r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49405r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=49405r=dst IIS Stability: http://bugs.php.net/fix.php?id=49405r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49405r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49405r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49405r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49405r=mysqlcfg
#49376 [Opn-Bgs]: ReflectionClass::newInstanceArgs cannot instantiate a constructorless class
ID: 49376 Updated by: fel...@php.net Reported By: sebcsaba at freemail dot hu -Status: Open +Status: Bogus Bug Type: Reflection related Operating System: WinXP PHP Version: 5.3.0 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 Do not pass any param to method. Just use $rc-newInstanceArgs(); Previous Comments: [2009-08-26 16:12:00] sebcsaba at freemail dot hu Description: I've got a class without a constructor, and I want to instantiate it by ReflectionClass::newInstanceArgs with an empty array as arguments. This causes: ReflectionException: 'Class A does not have a constructor, so you cannot pass any constructor arguments'. If I define an empty default constructor, this works well. Reproduce code: --- class A {} $rc = new ReflectionClass('A'); $a = $rc-newInstanceArgs(array()); Expected result: Create a new instance of class A, using default constructor behaviour. -- Edit this bug report at http://bugs.php.net/?id=49376edit=1
#48754 [Com]: mysql_close() crash php when no handle specified
ID: 48754 Comment by: empacc100 at seznam dot cz Reported By: busia at tiscali dot it Status: Verified Bug Type: MySQL related Operating System: * PHP Version: 5.3.0 (as of 21-07-2008) Assigned To: mysql New Comment: WinXP SP3, PHP 5.3.0 VC9 TS, Apache 2.2.13 (apachelounge) + mod_fcgid 2.2b, MySQL 5.1.37 == same bug (php-cgi.exe crash) /* * php-cgi.exe OK */ $a=mysql_connect('127.0.0.1:3306', 'root', 'fdgdfgd')); mysql_close($a); /* * php-cgi.exe CRASH */ mysql_connect('127.0.0.1:3306', 'root', 'fdgdfgd')); mysql_close(); Previous Comments: [2009-08-26 05:13:12] jfb at zer7 dot com I get this as well. I had avoided upgrading my ancient PHP code (some of it was from PHP4); turns out it being that ancient also means it uses old patterns, like not using handles. :) Likely that newer code will not encounter this, so it'll be folks upgrading slowly and cautiously. [2009-07-16 14:34:19] guillermog at tricuspide dot com Still in the release, I really think lot's of people are having the same problem with their sctripts!! I filled a bug report hours ago to later accidentally find that it was a very simple problem. Once I found the problem I looked for mysql_close and version 5.3 to find this bug report. Uff finnally after the whole day!!! Regards, Guillermo [2009-07-14 01:50:03] sujoe_2006 at 163 dot com my development evioronment is windows xp sp2 apache 2.2 php 5.3.0 mysql 5.1.36 I write some code in test.php ?php $conn = mysql_connect('ip','user','password'); mysql_close(); ? then ,I Will be catched a error by apache 2.2,it is: ... 0x006e2072 in httpd.exe: 0xC005: Access violation when reading location 0x. ... but when check the mysql_close function like this for test.php ?php $conn = mysql_connect('ip','user','password'); mysql_close($conn); ? it will work no any error. so ,i want to know its reason of the mysql_close(),please mail to me Thanks! [2009-07-07 14:47:28] xektrum at gmail dot com Description: -- I can confirm this, I'm having the same issue with php 5.3 and apache2 when calling mysql_close without a mysql_link as parameter. Reproduce code: -- ?php mysql_connect('localhost','root','password'); mysql_close(); // win32 uncaught exception catched by MSVS ? Workaround/not crashing: -- ?php $link = mysql_connect('localhost','root','password'); mysql_close($link); ? Exception : -- Not handled Exception in 0x006e2072 in httpd.exe: 0xC005: Access violation when reading location 0x. Note : The Exception has been translated so it is not literal [2009-07-02 16:45:00] u...@php.net Really a great one. The bug exists since 21-07-2008. That is 11 months and 1 week ago. Sometimes I which users would try non-GA versions just in case test suites don't catch issues... This is when the bug was introduced: http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.213.2.6.2.16.2.22r2=1.213.2.6.2.16.2.23; mysql_link points to NULL and that's causing a crash. Possible workaround (as suggested by Johannes): nixn...@linux-en61:~/src/login/php5 cvs diff ext/mysql/tests/ cvs diff: Diffing . cvs diff: Diffing ext cvs diff: Diffing ext/mysql cvs diff: Diffing ext/mysql/tests nixn...@linux-en61:~/src/login/php5 cvs diff ext/mysql/ cvs diff: Diffing ext/mysql Index: ext/mysql/php_mysql.c === RCS file: /repository/php-src/ext/mysql/php_mysql.c,v retrieving revision 1.213.2.6.2.16.2.37 diff -r1.213.2.6.2.16.2.37 php_mysql.c 372a373,376 #ifdef MYSQL_USE_MYSQLND mysqlnd_end_psession(link-conn); #endif 987,995c991 #ifdef MYSQL_USE_MYSQLND { int tmp; if ((mysql = zend_list_find(Z_RESVAL_P(mysql_link), tmp)) tmp == le_plink) { mysqlnd_end_psession(mysql-conn); } } #endif if (mysql_link) { /* explicit resource number */ --- if (mysql_link) { cvs diff: Diffing ext/mysql/tests Someone may want to review that. 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/48754 -- Edit this bug report at http://bugs.php.net/?id=48754edit=1
#38138 [Com]: russian encoding detection support
ID: 38138 Comment by: jehy at valar dot ru Reported By: techto...@php.net Status: Open Bug Type:Feature/Change Request PHP Version: 4.4.2 New Comment: Already three years. Still no changes. That's why I hate freeware. Previous Comments: [2009-03-20 11:14:20] wips at mail dot ru Another version of encoding detector http://popoff.donetsk.ua/file/text/libs/a.charset.php which works with utf8 too. [2009-01-21 08:46:35] Roman dot Kyrylych at gmail dot com here's a russian encoding autodetector that can be used after mb_detect_encoding returned false: http://www.opennet.ru/base/dev/charset_autodetect.txt.html [2008-10-11 04:40:21] maybeoutput at gmail dot com Two years old bug and still can't detect encoding? [2008-10-04 23:07:03] dennis at nikolaenko dot ru I also bumped into this, just voting. [2006-07-20 07:04:21] techto...@php.net I would like to if anybody will explain how to port PHP functions into Unicode for dummies. It will also be nice to see an environment to monitor the changes (?trac) and control requirements. The last one is to help analyze deprecated, inconvenient and obscure API - logical bugs - to provide means to increase usability. Like unify inlcude_path delimiters on all platforms etc. It is just to save some time and make occasional development (which I am pretty restrained to) effective. 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/38138 -- Edit this bug report at http://bugs.php.net/?id=38138edit=1
#49398 [Opn-Bgs]: number_format returns invalid character with some charsets
ID: 49398 Updated by: j...@php.net Reported By: mark dot j dot wade at googlemail dot com -Status: Open +Status: Bogus Bug Type: Strings related Operating System: Linux PHP Version: 5.2.10 New Comment: Thank you for not searching before submitting another bogus bug. See also bug #44041 Previous Comments: [2009-08-28 12:46:48] mark dot j dot wade at googlemail dot com Description: number_format will only accept a single character for the thousands separator and deliberately shortens longer input to one character. However, for some charsets (ru_RU.UTF8 was the one I discovered this on) the thousands separator as returned by localeconv is more than one character. Normally, this wouldn't be a problem, however, it seems when PHP tries to shorten this particular value to one character, it creates an invalid character and returns something like demonstrated in the reproduce code. Reproduce code: --- setlocale( L_ALL, 'ru_RU.UTF8' ); $locale = localeconv(); echo number_format( , 0, $locale['decimal_point'], $locale['thousands_sep'] ); Expected result: 9 999 Actual result: -- 9?999 -- Edit this bug report at http://bugs.php.net/?id=49398edit=1
#49383 [Opn-Fbk]: Lots of empty fstat() calls slow performance
ID: 49383 Updated by: j...@php.net Reported By: olga at metacafe dot com -Status: Open +Status: Feedback Bug Type: Performance problem Operating System: Red Hat 3.4.6-10 PHP Version: 5.3.0 New Comment: Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2009-08-27 07:54:43] olga at metacafe dot com Description: Hi, We recently upgraded our web servers with PHP 5.3 and found out that there are lots of empty fstat system calls. fstat is called 3 times on each file open. This does not happen on PHP 5.2.9. PHP 5.2.9 shows better results in benchmarking vs. 5.3.0, and I suppose it's because of the fstat. We're running Red Hat 3.4.6, Apache 2.0.59, PHP 5.3.0 Reproduce code: --- Any code that loads PHP file. Expected result: Strace summary from 5.2.9 % time secondsusecs/call calls errors syscall 44.65 34.487815 159 217129 26 lstat 8.73 6.743625 170 39745 145 stat 8.23 6.355874 170 37466 18 open 8.21 6.345542 167 38091close 7.99 6.170706 165 37410fstat Strace summary from 5.3.0 % time secondsusecs/call calls errors syscall 22.64 28.292541 301 93945fstat 18.39 22.979631 312 73713 110 lstat 9.23 11.529433 311 37131munmap 9.14 11.417404 306 37277mmap 8.52 10.643572 306 34755 149 stat Actual result: -- Strace result. I replaced full path by [path] open([path]/Flash.php, O_RDONLY) = 21 fstat(21, {st_mode=S_IFREG|0777, st_size=23902, ...}) = 0 fstat(21, {st_mode=S_IFREG|0777, st_size=23902, ...}) = 0 fstat(21, {st_mode=S_IFREG|0777, st_size=23902, ...}) = 0 mmap(NULL, 23902, PROT_READ, MAP_SHARED, 21, 0) = 0x2a971a2000 stat([path]/Flash.php, {st_mode=S_IFREG|0777, st_size=23902, ...}) = 0 munmap(0x2a971a2000, 23902) = 0 close(21) = 0 lstat([path]/VTalkNotification.php, {st_mode=S_IFREG|0777, st_size=778, ...}) = 0 lstat([path]/VTalkNotification.php, {st_mode=S_IFREG|0777, st_size=778, ...}) = 0 open([path]/VTalkNotification.php, O_RDONLY) = 21 fstat(21, {st_mode=S_IFREG|0777, st_size=778, ...}) = 0 fstat(21, {st_mode=S_IFREG|0777, st_size=778, ...}) = 0 fstat(21, {st_mode=S_IFREG|0777, st_size=778, ...}) = 0 mmap(NULL, 778, PROT_READ, MAP_SHARED, 21, 0) = 0x2a971a2000 stat([path]/VTalkNotification.php, {st_mode=S_IFREG|0777, st_size=778, ...}) = 0 munmap(0x2a971a2000, 778) = 0 close(21) = 0 -- Edit this bug report at http://bugs.php.net/?id=49383edit=1
#49384 [Opn-Bgs]: preg_match incorreclty matching vertical tab character
ID: 49384 Updated by: j...@php.net Reported By: soham dot mehta at gmail dot com -Status: Open +Status: Bogus Bug Type: PCRE related Operating System: x86_64 GNU/Linux PHP Version: 5.2.10 New Comment: You should use double quotes instead. Now you're not matching vertical tab but \v. Previous Comments: [2009-08-27 09:53:50] soham dot mehta at gmail dot com Description: In preg_match (and preg_replace), vertical tab character matches characters other than itself. At the least, it matches ascii 10,11,12,13 and 133, when it should only match 11. (Vertical tab has been nixed from PCRE - is that the cause?) Reproduce code: --- $wrong = chr(133); //can use any of 10,12,13 or 133 $x = preg_match('/\v/', $wrong, $matches, PREG_OFFSET_CAPTURE); var_dump($matches); $right = chr(11); $x = preg_match('/\v/', $right, $matches, PREG_OFFSET_CAPTURE); var_dump($matches); Expected result: array empty array 0 = array 0 = string '' (length=1) 1 = int 0 Actual result: -- array 0 = array 0 = string '#65533;' (length=1) 1 = int 0 array 0 = array 0 = string '' (length=1) 1 = int 0 -- Edit this bug report at http://bugs.php.net/?id=49384edit=1
#49399 [Opn-Fbk]: mb_ereg_replace() '\b' fails with mbstrings
ID: 49399 Updated by: j...@php.net Reported By: manfred at mabuweb dot com -Status: Open +Status: Feedback Bug Type: mbstring related Operating System: linux PHP Version: 5.2.10 New Comment: Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Works fine for me.. Previous Comments: [2009-08-28 13:17:16] manfred at mabuweb dot com Description: mb_ereg_replace() and mb_eregi_replace() misinterpretate MBchars as word end. Reproduce code: --- $pattern = '\bas\b'; $string = 'Días'; echo $string.'br/'; echo mb_ereg_replace($pattern, '', $string); Expected result: Días Días Actual result: -- Días Dí -- Edit this bug report at http://bugs.php.net/?id=49399edit=1
#49401 [Opn-Fbk]: Semaphore files are being created in / by default
ID: 49401 Updated by: j...@php.net Reported By: nathan at gossamer-threads dot com -Status: Open +Status: Feedback Bug Type: Session related Operating System: Gentoo PHP Version: 5.2.10 New Comment: Compared to what PHP version..? Previous Comments: [2009-08-28 17:56:01] nathan at gossamer-threads dot com Description: As of 5.2.10 it seems that the semaphore files are being created in / instead of the usual /tmp. Uncommenting the default session.save_path of /tmp in the php.ini fixes it. Reproduce code: --- nat...@ndb3 ~ $ php --version PHP Warning: PHP Startup: mm_create(0, /session_mm_cgi-fcgi1005) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0 PHP 5.2.10 (cgi-fcgi) (built: Aug 28 2009 10:23:30) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies -- Edit this bug report at http://bugs.php.net/?id=49401edit=1
#49401 [Fbk-Bgs]: Semaphore files are being created in / by default
ID: 49401 Updated by: j...@php.net Reported By: nathan at gossamer-threads dot com -Status: Feedback +Status: Bogus Bug Type: Session related Operating System: Gentoo PHP Version: 5.2.10 New Comment: And I don't see any bug here anyway. If you don't define a path, it will just be . And then it's up to whatever your current working directory happens to be. With Apache it's always /. Previous Comments: [2009-08-29 00:36:07] j...@php.net Compared to what PHP version..? [2009-08-28 17:56:01] nathan at gossamer-threads dot com Description: As of 5.2.10 it seems that the semaphore files are being created in / instead of the usual /tmp. Uncommenting the default session.save_path of /tmp in the php.ini fixes it. Reproduce code: --- nat...@ndb3 ~ $ php --version PHP Warning: PHP Startup: mm_create(0, /session_mm_cgi-fcgi1005) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0 PHP 5.2.10 (cgi-fcgi) (built: Aug 28 2009 10:23:30) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies -- Edit this bug report at http://bugs.php.net/?id=49401edit=1
#38138 [Opn]: russian encoding detection support
ID: 38138 Updated by: techto...@php.net Reported By: techto...@php.net Status: Open Bug Type:Feature/Change Request PHP Version: 4.4.2 New Comment: It is not freeware - it's open source. That basically means that you have all the tools to do it yourself and contribute back for others. Or learn some other language. Previous Comments: [2009-08-28 23:54:53] jehy at valar dot ru Already three years. Still no changes. That's why I hate freeware. [2009-03-20 11:14:20] wips at mail dot ru Another version of encoding detector http://popoff.donetsk.ua/file/text/libs/a.charset.php which works with utf8 too. [2009-01-21 08:46:35] Roman dot Kyrylych at gmail dot com here's a russian encoding autodetector that can be used after mb_detect_encoding returned false: http://www.opennet.ru/base/dev/charset_autodetect.txt.html [2008-10-11 04:40:21] maybeoutput at gmail dot com Two years old bug and still can't detect encoding? [2008-10-04 23:07:03] dennis at nikolaenko dot ru I also bumped into this, just voting. 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/38138 -- Edit this bug report at http://bugs.php.net/?id=38138edit=1
#49390 [Opn-Bgs]: SEGV with zval_ptr_dtor
ID: 49390 Updated by: j...@php.net Reported By: aya at eh dot org -Status: Open +Status: Bogus -Bug Type: Reproducible crash +Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 5.3.0 New Comment: Please ask this kind of support questions on the internals@ mailing list. Previous Comments: [2009-08-27 16:47:36] aya at eh dot org Description: It seems that zval_ptr_dtor doesn't check if strings are heap-allocated. Reproduce code: --- // Change this to zero to get a SEGV int heapAllocate = 1; // Make a string zval zval* v; MAKE_STD_ZVAL(v); ZVAL_STRING(v, foo, heapAllocate); // SEGV happens here zval_ptr_dtor(v); Expected result: Nothing. Actual result: -- php-5.3.0/Zend/zend_execute_API.c(435) : Block 0x004014fa status: php-5.3.0/Zend/zend_variables.c(36) : Actual location (location was relayed) Invalid pointer: ((thread_id=0x74706972) != (expected=0x96F6B8A0)) -- Edit this bug report at http://bugs.php.net/?id=49390edit=1
#49388 [Ver-Bgs]: magic_quotes_gpc=on produces deprecated msg on CLI even if error_reporting=0
ID: 49388 Updated by: j...@php.net Reported By: romanf at trash dot net -Status: Verified +Status: Bogus Bug Type: Output Control Operating System: OpenSuse 11 PHP Version: 5.3.0 New Comment: Same as bug #49362 Previous Comments: [2009-08-27 16:14:39] sjo...@php.net Thank you for your bug report. I could reproduce your problem with the following command: php -d 'error_reporting=0' -d 'magic_quotes_gpc=on' -r '' It seems that PHP is not yet initialized when the warning is triggered. When it is not initialized it prints all warnings without taking error_reporting into account (module_initialized is 0 on main/main.c:920). [2009-08-27 14:14:49] romanf at trash dot net Description: I have a php.ini with error_reporting=0 magic_quotes_gpc=on If I run a test-script on the CLI, the deprecated warning is still shown on stderr. When run under a webserver (e.g. apache) no output is produced. Expected result: Deprecated warning should be suppressed on CLI as well if error_reporting=0. Actual result: -- Deprecated warning is NOT suppressed on CLI (and only on CLI) if magic_quotes_gpc=on regardless of error_reporting. -- Edit this bug report at http://bugs.php.net/?id=49388edit=1