[PHP-BUG] Bug #62632 [NEW]: Incorrect image generated
From: marc at phpmyadmin dot net Operating system: Linux PHP version: 5.4.5 Package: GD related Bug Type: Bug Bug description:Incorrect image generated Description: The test script (master.html calling image.php) works fine with PHP 5.3.13 but fails to produce an image with PHP 5.4.4 or 5.4.5. './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-libdir=lib64' '--disable-debug' '--enable-calendar' '--with-gd=shared' '--with-freetype-dir' '--with-mysql=shared,mysqlnd' '--with-mysqli=shared,mysqlnd' '--with-regex=php' '--with-png-dir=/usr/lib' '--with-zlib=shared' '--with-iconv=shared' '--enable-ftp' '--with-mcrypt=shared' '--with-bz2=shared' '--enable-zip' '--with-jpeg-dir=/usr/lib' '--enable-mbstring' '--without-sqlite' '--enable-dom' '--enable-json' '--with-pdo-mysql=mysqlnd' '--with-pear' '--enable-bcmath' '--with-curl=shared' '--with-ldap=shared,/usr' '--with-gettext=shared' '--with-snmp=shared' '--enable-soap' '--enable-sockets' Test script: --- master.html: html head/head body img border=0 alt=the photo should be here src=image.php / /body /html image.php: ?php $contents = file_get_contents('marc.jpg'); header('Content-Type: image/JPEG'); header('Content-Transfer-Encoding: binary'); $srcImage = imagecreatefromstring($contents); ImageJPEG($srcImage, '', 75); ? Expected result: A photo is displayed. Actual result: -- The alt tag of the photo is displayed. -- Edit bug report at https://bugs.php.net/bug.php?id=62632edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62632r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62632r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62632r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62632r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62632r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62632r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62632r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62632r=needscript Try newer version: https://bugs.php.net/fix.php?id=62632r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62632r=support Expected behavior: https://bugs.php.net/fix.php?id=62632r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62632r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62632r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62632r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62632r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62632r=dst IIS Stability: https://bugs.php.net/fix.php?id=62632r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62632r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62632r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62632r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62632r=mysqlcfg
Bug #62632 [Com]: Incorrect image generated
Edit report at https://bugs.php.net/bug.php?id=62632edit=1 ID: 62632 Comment by: a...@php.net Reported by:marc at phpmyadmin dot net Summary:Incorrect image generated Status: Open Type: Bug Package:GD related Operating System: Linux PHP Version:5.4.5 Block user comment: N Private report: N New Comment: $contents = file_get_contents('marc.jpg'); A link to marc.jpg would be useful. Previous Comments: [2012-07-22 15:17:53] marc at phpmyadmin dot net Description: The test script (master.html calling image.php) works fine with PHP 5.3.13 but fails to produce an image with PHP 5.4.4 or 5.4.5. './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-libdir=lib64' '--disable-debug' '--enable-calendar' '--with-gd=shared' '--with-freetype-dir' '--with-mysql=shared,mysqlnd' '--with-mysqli=shared,mysqlnd' '--with-regex=php' '--with-png-dir=/usr/lib' '--with-zlib=shared' '--with-iconv=shared' '--enable-ftp' '--with-mcrypt=shared' '--with-bz2=shared' '--enable-zip' '--with-jpeg-dir=/usr/lib' '--enable-mbstring' '--without-sqlite' '--enable-dom' '--enable-json' '--with-pdo-mysql=mysqlnd' '--with-pear' '--enable-bcmath' '--with-curl=shared' '--with-ldap=shared,/usr' '--with-gettext=shared' '--with-snmp=shared' '--enable-soap' '--enable-sockets' Test script: --- master.html: html head/head body img border=0 alt=the photo should be here src=image.php / /body /html image.php: ?php $contents = file_get_contents('marc.jpg'); header('Content-Type: image/JPEG'); header('Content-Transfer-Encoding: binary'); $srcImage = imagecreatefromstring($contents); ImageJPEG($srcImage, '', 75); ? Expected result: A photo is displayed. Actual result: -- The alt tag of the photo is displayed. -- Edit this bug report at https://bugs.php.net/bug.php?id=62632edit=1
Bug #62612 [Opn-Asn]: readline extension compilation fails with sapi/cli/cli.h: No such file
Edit report at https://bugs.php.net/bug.php?id=62612edit=1 ID: 62612 Updated by: johan...@php.net Reported by:pgodel at gmail dot com Summary:readline extension compilation fails with sapi/cli/cli.h: No such file -Status: Open +Status: Assigned Type: Bug Package:Compile Failure Operating System: Centos 6 Ubuntu 12.04 PHP Version:5.4.4 -Assigned To: +Assigned To:johannes Block user comment: N Private report: N New Comment: We don't fully support building bundled extensions stand-alone. I'll look into this case though. Previous Comments: [2012-07-21 04:37:56] larue...@php.net okey , is that -L flags right? I mean, did you mv the php install directory after you installed it? [2012-07-20 22:18:32] pgodel at gmail dot com Usage: /usr/local/php54/bin/php-config [OPTION] Options: --prefix[/usr/local/php54] --includes [-I/usr/local/php54/include/php - I/usr/local/php54/include/php/main -I/usr/local/php54/include/php/TSRM - I/usr/local/php54/include/php/Zend -I/usr/local/php54/include/php/ext - I/usr/local/php54/include/php/ext/date/lib] --ldflags [ -L/usr/lib/x86_64-linux-gnu] --libs [-lcrypt -lexslt -lresolv -lcrypt -lrt -lmcrypt -lltdl - lstdc++ -lt1 -lfreetype -lpng -lz -ljpeg -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl - lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lxml2 - lssl -lcrypto -ldl -lm -licui18n -licuuc -licudata -ldl -lm -licuio -lxml2 - lcrypt -lxml2 -lxml2 -lxml2 -lxml2 -lxslt -lxml2 -lcrypt ] --extension-dir [/usr/local/php54/lib/php/extensions/no-debug-non-zts- 20100525] --include-dir [/usr/local/php54/include/php] --man-dir [/usr/local/php54/php/man] --php-binary[/usr/local/php54/bin/php] --php-sapis [ apache2handler cli cgi] --configure-options [--with-apxs2=/usr/bin/apxs2 --prefix=/usr/local/php54 -- with-config-file-scan-dir=/etc/php54/conf.d --enable-bcmath --enable-ctype -- enable-mbstring --enable-ftp --enable-intl --enable-sockets --enable-sysvmsg -- enable-pcntl --with-bz2 --with-curl --with-gettext --with-gd --enable-gd-native- ttf --enable-exif --with-freetype-dir=/usr --with-jpeg-dir=/usr --with- t1lib=/usr --with-mcrypt --with-openssl --with-kerberos --with-iconv --with-xsl --with-xmlrpc --with-zlib --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo- mysql=mysqlnd] --version [5.4.5] --vernum[50405] [2012-07-20 15:57:59] larue...@php.net what does your /PATH_TO_PHP_BIN/php-config output? [2012-07-20 13:48:14] pgodel at gmail dot com This is the main PHP configure line: ./configure --with-apxs2=/usr/bin/apxs2 \ --prefix=/usr/local/php54 \ --with-config-file-scan-dir=/etc/php54/conf.d \ --enable-bcmath --enable-ctype --enable-exif --enable-mbstring -- enable-ftp --enable-intl --enable-sockets --enable-sysvmsg --enable-pcntl -- with-bz2 --with-curl --with-gettext --with-gd --enable-gd-native-ttf --enable- exif --with-freetype-dir=/usr --with-jpeg-dir=/usr --with-t1lib=/usr --with- mcrypt --with-openssl --with-kerberos --with-iconv --with-xsl --with-xmlrpc -- with-zlib --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \ And the when compiling the readline extension I just run: ./configure # from ext/readline [2012-07-20 04:28:47] larue...@php.net can you paste your config steps out? thanks The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=62612 -- Edit this bug report at https://bugs.php.net/bug.php?id=62612edit=1
Bug #62562 [Ana]: preg_replace mangles UTF8 string - Windows only
Edit report at https://bugs.php.net/bug.php?id=62562edit=1 ID: 62562 User updated by:magog dot the dot ogre at gmail dot com Reported by:magog dot the dot ogre at gmail dot com Summary:preg_replace mangles UTF8 string - Windows only Status: Analyzed Type: Bug Package:*Regular Expressions Operating System: Windows x86 PHP Version:5.3.14 Block user comment: N Private report: N New Comment: Just curious: why was this marked as solved? Previous Comments: [2012-07-16 15:38:10] a...@php.net Btw. the PCRE version reported by PHP is 8.12, but the current is 8.30. May be a simple upgrade could solve this. [2012-07-16 15:19:54] a...@php.net I've tested your PHP snippet on win7, but it's probably the same on any win. The behaviour is as you describe. But there is another point. The string to be matched is hardcoded into the script as UTF-8, if you open that file in the ASCII mode, you'll see each byte, see here (saved to a file as teh BT ruinates all the view) http://belsky.info/phpz/bugz/62562/62562_3.txt Switch the encoding to UTF-8 in your browser and then to a non-multibyte one. Another way to do that - open the file under linux with vim -c 'set encoding=latin1' 62562_3.txt In both cases one can see, that one byte is interpreted as a space. Combined with no UTF-8 modifier the behaviour is expected, further more windows seems do do it right :) I've also debugged this under VS and it's definitely something coming back from the PCRE itself. Here http://lxr.php.net/xref/PHP_5_4/ext/pcre/php_pcre.c#621 is count 0, so matched is incremented and returned some when. Nevertheless it could be a locale thing forcing PCRE to do UTF-8, but I actually don't see any locale dependent places in PCRE. Trying to boot linux with C locale might repro this there as well, I have no such mashines though. [2012-07-16 01:39:06] magog dot the dot ogre at gmail dot com Yeah, it works SunOS and Ubuntu for me too. Well if/when you get access to a Windows distro or another developer who has one comes along, then I guess you can work on this bug. :) [2012-07-15 22:43:01] ras...@php.net Well, I have looked at the code. We take the raw binary string and pass it straight to PCRE both on Windows and UNIX. So something along the way isn't the same. But I am not a Windows guy, so I can't help you on the Windows side of things. It works fine on my Linux box here. [2012-07-15 22:32:03] magog dot the dot ogre at gmail dot com OK then, after doing some more plugging around, it appears that it still might be a PHP issue. Correct me if I'm wrong, but here are my finding: Create a php file with only the following content: ?php echo preg_match(/\s+/, ááá¤áá áááªáá)?1:0; Running this on Windows will return 1, running on Unix returns 0. Now I've run this on PCRE, and PCRE has returned that there was no match. Thus, it may be a PHP issue. Here is the output: ***Contents of test.txt /\s+/ ááá¤áá áááªáá ááá¤áá áááªáá ***Output via Cygwin, running the Windows native pcretest.exe (redacted)@(redacted)-PC /cygdrive/c/Program Files (x86)/pcre-7.0-bin/bin $ ./pcretest.exe test.txt PCRE version 7.0 18-Dec-2006 /\s+/ ááá¤áá áááªáá No match ááá¤áá áááªáá 0: (I included the second example above with a space purposefully added, just to show that the tool is functioning properly and will catch the space when it's properly there). 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 https://bugs.php.net/bug.php?id=62562 -- Edit this bug report at https://bugs.php.net/bug.php?id=62562edit=1
Bug #62562 [Ana]: preg_replace mangles UTF8 string - Windows only
Edit report at https://bugs.php.net/bug.php?id=62562edit=1 ID: 62562 Updated by: paj...@php.net Reported by:magog dot the dot ogre at gmail dot com Summary:preg_replace mangles UTF8 string - Windows only Status: Analyzed Type: Bug Package:*Regular Expressions Operating System: Windows x86 PHP Version:5.3.14 Block user comment: N Private report: N New Comment: It is set as analyzed, not resolved. Can you try to compile PHP using the bundle PCRE instead of the system one please? Previous Comments: [2012-07-22 20:28:38] magog dot the dot ogre at gmail dot com Just curious: why was this marked as solved? [2012-07-16 15:38:10] a...@php.net Btw. the PCRE version reported by PHP is 8.12, but the current is 8.30. May be a simple upgrade could solve this. [2012-07-16 15:19:54] a...@php.net I've tested your PHP snippet on win7, but it's probably the same on any win. The behaviour is as you describe. But there is another point. The string to be matched is hardcoded into the script as UTF-8, if you open that file in the ASCII mode, you'll see each byte, see here (saved to a file as teh BT ruinates all the view) http://belsky.info/phpz/bugz/62562/62562_3.txt Switch the encoding to UTF-8 in your browser and then to a non-multibyte one. Another way to do that - open the file under linux with vim -c 'set encoding=latin1' 62562_3.txt In both cases one can see, that one byte is interpreted as a space. Combined with no UTF-8 modifier the behaviour is expected, further more windows seems do do it right :) I've also debugged this under VS and it's definitely something coming back from the PCRE itself. Here http://lxr.php.net/xref/PHP_5_4/ext/pcre/php_pcre.c#621 is count 0, so matched is incremented and returned some when. Nevertheless it could be a locale thing forcing PCRE to do UTF-8, but I actually don't see any locale dependent places in PCRE. Trying to boot linux with C locale might repro this there as well, I have no such mashines though. [2012-07-16 01:39:06] magog dot the dot ogre at gmail dot com Yeah, it works SunOS and Ubuntu for me too. Well if/when you get access to a Windows distro or another developer who has one comes along, then I guess you can work on this bug. :) [2012-07-15 22:43:01] ras...@php.net Well, I have looked at the code. We take the raw binary string and pass it straight to PCRE both on Windows and UNIX. So something along the way isn't the same. But I am not a Windows guy, so I can't help you on the Windows side of things. It works fine on my Linux box here. 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 https://bugs.php.net/bug.php?id=62562 -- Edit this bug report at https://bugs.php.net/bug.php?id=62562edit=1
Bug #62632 [Opn]: Incorrect image generated
Edit report at https://bugs.php.net/bug.php?id=62632edit=1 ID: 62632 User updated by:marc at phpmyadmin dot net Reported by:marc at phpmyadmin dot net Summary:Incorrect image generated Status: Open Type: Bug Package:GD related Operating System: Linux PHP Version:5.4.5 Block user comment: N Private report: N New Comment: Here is the image I used: http://www.infomarc.info/MarcDelisle-140x185.jpg Previous Comments: [2012-07-22 19:18:32] a...@php.net $contents = file_get_contents('marc.jpg'); A link to marc.jpg would be useful. [2012-07-22 15:17:53] marc at phpmyadmin dot net Description: The test script (master.html calling image.php) works fine with PHP 5.3.13 but fails to produce an image with PHP 5.4.4 or 5.4.5. './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-libdir=lib64' '--disable-debug' '--enable-calendar' '--with-gd=shared' '--with-freetype-dir' '--with-mysql=shared,mysqlnd' '--with-mysqli=shared,mysqlnd' '--with-regex=php' '--with-png-dir=/usr/lib' '--with-zlib=shared' '--with-iconv=shared' '--enable-ftp' '--with-mcrypt=shared' '--with-bz2=shared' '--enable-zip' '--with-jpeg-dir=/usr/lib' '--enable-mbstring' '--without-sqlite' '--enable-dom' '--enable-json' '--with-pdo-mysql=mysqlnd' '--with-pear' '--enable-bcmath' '--with-curl=shared' '--with-ldap=shared,/usr' '--with-gettext=shared' '--with-snmp=shared' '--enable-soap' '--enable-sockets' Test script: --- master.html: html head/head body img border=0 alt=the photo should be here src=image.php / /body /html image.php: ?php $contents = file_get_contents('marc.jpg'); header('Content-Type: image/JPEG'); header('Content-Transfer-Encoding: binary'); $srcImage = imagecreatefromstring($contents); ImageJPEG($srcImage, '', 75); ? Expected result: A photo is displayed. Actual result: -- The alt tag of the photo is displayed. -- Edit this bug report at https://bugs.php.net/bug.php?id=62632edit=1
[PHP-BUG] Bug #62633 [NEW]: strcasecmp does not warn user if both params are not strings
From: iam4webwork at hotmail dot com Operating system: PHP version: Irrelevant Package: Scripting Engine problem Bug Type: Bug Bug description:strcasecmp does not warn user if both params are not strings Description: When I provide strcasecmp with two parameters where one is TRUE and the other is a string, php does not generate a warning to say that the first parameter needs to be a string and silently converts TRUE to 1 and executes. Test script: --- ?php var_dump(strcasecmp(TRUE, bob)); // -49 Expected result: I expected a parser error message. Actual result: -- -49 -- Edit bug report at https://bugs.php.net/bug.php?id=62633edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62633r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62633r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62633r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62633r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62633r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62633r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62633r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62633r=needscript Try newer version: https://bugs.php.net/fix.php?id=62633r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62633r=support Expected behavior: https://bugs.php.net/fix.php?id=62633r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62633r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62633r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62633r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62633r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62633r=dst IIS Stability: https://bugs.php.net/fix.php?id=62633r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62633r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62633r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62633r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62633r=mysqlcfg
Bug #62633 [Opn]: strcasecmp does not warn user if both params are not strings
Edit report at https://bugs.php.net/bug.php?id=62633edit=1 ID: 62633 User updated by:iam4webwork at hotmail dot com Reported by:iam4webwork at hotmail dot com Summary:strcasecmp does not warn user if both params are not strings Status: Open Type: Bug Package:Scripting Engine problem PHP Version:Irrelevant Block user comment: N Private report: N New Comment: I believe that somewhere the underlying C source code is converting the PHP TRUE, i.e. 1 to 1 Previous Comments: [2012-07-22 21:19:42] iam4webwork at hotmail dot com Description: When I provide strcasecmp with two parameters where one is TRUE and the other is a string, php does not generate a warning to say that the first parameter needs to be a string and silently converts TRUE to 1 and executes. Test script: --- ?php var_dump(strcasecmp(TRUE, bob)); // -49 Expected result: I expected a parser error message. Actual result: -- -49 -- Edit this bug report at https://bugs.php.net/bug.php?id=62633edit=1
Bug #62612 [Asn-Csd]: readline extension compilation fails with sapi/cli/cli.h: No such file
Edit report at https://bugs.php.net/bug.php?id=62612edit=1 ID: 62612 Updated by: johan...@php.net Reported by:pgodel at gmail dot com Summary:readline extension compilation fails with sapi/cli/cli.h: No such file -Status: Assigned +Status: Closed Type: Bug Package:Compile Failure Operating System: Centos 6 Ubuntu 12.04 PHP Version:5.4.4 Assigned To:johannes Block user comment: N Private report: N 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/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. cli.h is fine to be installed, I feared we might have to refactore it beforehand but that's not the case. A stand-alone compiled readline ext should have it available now. Previous Comments: [2012-07-22 21:29:46] johan...@php.net Automatic comment on behalf of johannes Revision: http://git.php.net/?p=php-src.git;a=commit;h=860b3ffe75a95f18ff3bf570c49c5004cb70cab1 Log: Fix Bug #62612 readline extension compilation fails [2012-07-22 19:35:54] johan...@php.net We don't fully support building bundled extensions stand-alone. I'll look into this case though. [2012-07-21 04:37:56] larue...@php.net okey , is that -L flags right? I mean, did you mv the php install directory after you installed it? [2012-07-20 22:18:32] pgodel at gmail dot com Usage: /usr/local/php54/bin/php-config [OPTION] Options: --prefix[/usr/local/php54] --includes [-I/usr/local/php54/include/php - I/usr/local/php54/include/php/main -I/usr/local/php54/include/php/TSRM - I/usr/local/php54/include/php/Zend -I/usr/local/php54/include/php/ext - I/usr/local/php54/include/php/ext/date/lib] --ldflags [ -L/usr/lib/x86_64-linux-gnu] --libs [-lcrypt -lexslt -lresolv -lcrypt -lrt -lmcrypt -lltdl - lstdc++ -lt1 -lfreetype -lpng -lz -ljpeg -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl - lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lxml2 - lssl -lcrypto -ldl -lm -licui18n -licuuc -licudata -ldl -lm -licuio -lxml2 - lcrypt -lxml2 -lxml2 -lxml2 -lxml2 -lxslt -lxml2 -lcrypt ] --extension-dir [/usr/local/php54/lib/php/extensions/no-debug-non-zts- 20100525] --include-dir [/usr/local/php54/include/php] --man-dir [/usr/local/php54/php/man] --php-binary[/usr/local/php54/bin/php] --php-sapis [ apache2handler cli cgi] --configure-options [--with-apxs2=/usr/bin/apxs2 --prefix=/usr/local/php54 -- with-config-file-scan-dir=/etc/php54/conf.d --enable-bcmath --enable-ctype -- enable-mbstring --enable-ftp --enable-intl --enable-sockets --enable-sysvmsg -- enable-pcntl --with-bz2 --with-curl --with-gettext --with-gd --enable-gd-native- ttf --enable-exif --with-freetype-dir=/usr --with-jpeg-dir=/usr --with- t1lib=/usr --with-mcrypt --with-openssl --with-kerberos --with-iconv --with-xsl --with-xmlrpc --with-zlib --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo- mysql=mysqlnd] --version [5.4.5] --vernum[50405] [2012-07-20 15:57:59] larue...@php.net what does your /PATH_TO_PHP_BIN/php-config output? 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 https://bugs.php.net/bug.php?id=62612 -- Edit this bug report at https://bugs.php.net/bug.php?id=62612edit=1
[PHP-BUG] Bug #62634 [NEW]: Incorrect serialization with circular references
From: phplists at stanvassilev dot com Operating system: Any PHP version: 5.4.5 Package: Scripting Engine problem Bug Type: Bug Bug description:Incorrect serialization with circular references Description: The documentation says references and circular references should serialize properly. I've found that serialize would first copy the referenced variable, before detecting the reference. This not only doubles the serialized output, but produced incorrect copy when unserialized. Test script: --- $original = array('hello'); $original[] = $original; echo serialize($original); // Output (notice the duplication): // a:2:{i:0;s:5:hello;i:1;a:2:{i:0;s:5:hello;i:1;R:3;}} $duplicate = unserialize(serialize($x)); // Now I modify both the original and the duplicate in an identical way. // But I get different results, because the duplicate points to a copy of // itself, instead of pointing to itself. $original[0] = 'world'; $duplicate[0] = 'world'; var_dump($original); // Produces (notice it says world both times, i.e. it points to itself): // array(2) { [0]= string(5) world [1]= array(2) { [0]= string(5) world [1]= *RECURSION* } } var_dump($duplicate); // Produces (notice the second time it says hello i.e. it's a copy): // array(2) { [0]= string(5) world [1]= array(2) { [0]= string(5) hello [1]= *RECURSION* } } Expected result: There should be NO copies of hello left: array(2) { [0]= string(5) world [1]= array(2) { [0]= string(5) world [1]= *RECURSION* } } There should be NO duplication in the serialized output: a:2:{i:0;s:5:hello;i:1;???;} (Fill-in the ??? appropriately :) ) Actual result: -- A copy of hello is left: array(2) { [0]= string(5) world [1]= array(2) { [0]= string(5) hello [1]= *RECURSION* } } There is duplication in the serialized output: a:2:{i:0;s:5:hello;i:1;a:2:{i:0;s:5:hello;i:1;R:3;}} -- Edit bug report at https://bugs.php.net/bug.php?id=62634edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62634r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62634r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62634r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62634r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62634r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62634r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62634r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62634r=needscript Try newer version: https://bugs.php.net/fix.php?id=62634r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62634r=support Expected behavior: https://bugs.php.net/fix.php?id=62634r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62634r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62634r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62634r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62634r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62634r=dst IIS Stability: https://bugs.php.net/fix.php?id=62634r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62634r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62634r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62634r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62634r=mysqlcfg
Bug #62634 [Opn]: Incorrect serialization with circular references
Edit report at https://bugs.php.net/bug.php?id=62634edit=1 ID: 62634 User updated by:phplists at stanvassilev dot com Reported by:phplists at stanvassilev dot com Summary:Incorrect serialization with circular references Status: Open Type: Bug Package:Scripting Engine problem Operating System: Any PHP Version:5.4.5 Block user comment: N Private report: N New Comment: There's a small error in my code example, please replace this line: $duplicate = unserialize(serialize($x)); With this line: $duplicate = unserialize(serialize($original)); Previous Comments: [2012-07-22 21:54:54] phplists at stanvassilev dot com Description: The documentation says references and circular references should serialize properly. I've found that serialize would first copy the referenced variable, before detecting the reference. This not only doubles the serialized output, but produced incorrect copy when unserialized. Test script: --- $original = array('hello'); $original[] = $original; echo serialize($original); // Output (notice the duplication): // a:2:{i:0;s:5:hello;i:1;a:2:{i:0;s:5:hello;i:1;R:3;}} $duplicate = unserialize(serialize($x)); // Now I modify both the original and the duplicate in an identical way. // But I get different results, because the duplicate points to a copy of // itself, instead of pointing to itself. $original[0] = 'world'; $duplicate[0] = 'world'; var_dump($original); // Produces (notice it says world both times, i.e. it points to itself): // array(2) { [0]= string(5) world [1]= array(2) { [0]= string(5) world [1]= *RECURSION* } } var_dump($duplicate); // Produces (notice the second time it says hello i.e. it's a copy): // array(2) { [0]= string(5) world [1]= array(2) { [0]= string(5) hello [1]= *RECURSION* } } Expected result: There should be NO copies of hello left: array(2) { [0]= string(5) world [1]= array(2) { [0]= string(5) world [1]= *RECURSION* } } There should be NO duplication in the serialized output: a:2:{i:0;s:5:hello;i:1;???;} (Fill-in the ??? appropriately :) ) Actual result: -- A copy of hello is left: array(2) { [0]= string(5) world [1]= array(2) { [0]= string(5) hello [1]= *RECURSION* } } There is duplication in the serialized output: a:2:{i:0;s:5:hello;i:1;a:2:{i:0;s:5:hello;i:1;R:3;}} -- Edit this bug report at https://bugs.php.net/bug.php?id=62634edit=1
Bug #54037 [Opn-Csd]: [PATCH] Adds the ability to pass options to loadHTML
Edit report at https://bugs.php.net/bug.php?id=54037edit=1 ID: 54037 Updated by: tyr...@php.net Reported by:fxmulder at gmail dot com Summary:[PATCH] Adds the ability to pass options to loadHTML -Status: Open +Status: Closed Type: Bug Package:DOM XML related PHP Version:trunk-SVN-2011-02-17 (SVN) -Assigned To: +Assigned To:tyrael Block user comment: N Private report: N 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/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. I've opened a separate bug for the documentation issue: https://bugs.php.net/bug.php?id=62635 Previous Comments: [2011-08-12 21:07:45] fxmulder at gmail dot com I've included a patch for proposed documentation changes for the new options [2011-07-11 11:30:30] chr...@php.net Committed to trunk and PHP_5_4 branch [2011-03-29 22:27:40] fxmulder at gmail dot com That works for me, this still good to be committed to the trunk? [2011-03-03 08:12:00] chr...@php.net The following patch has been added/updated: Patch Name: patch-for-adding-loadhtml-options.patch Revision: 1299136320 URL: http://bugs.php.net/patch-display.php?bug=54037patch=patch-for-adding-loadhtml-options.patchrevision=1299136320 [2011-03-03 08:11:04] chr...@php.net After talking with Rob, we removed LIBXML_RECOVER again. People don't like seeing that wildly used, there were and are always a lot of discussions, if that's a good thing at all. So we just remove the constant again for now. I'll attach the new patch. If noone complains, I will commit it soon 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 https://bugs.php.net/bug.php?id=54037 -- Edit this bug report at https://bugs.php.net/bug.php?id=54037edit=1
Bug #62633 [Opn-Nab]: strcasecmp does not warn user if both params are not strings
Edit report at https://bugs.php.net/bug.php?id=62633edit=1 ID: 62633 Updated by: ahar...@php.net Reported by:iam4webwork at hotmail dot com Summary:strcasecmp does not warn user if both params are not strings -Status: Open +Status: Not a bug Type: Bug Package:Scripting Engine problem PHP Version:Irrelevant Block user comment: N Private report: N New Comment: PHP is a weakly typed language by design: if a scalar can be coerced into the type that a function expects, it will be. Expected behaviour â not a bug. Previous Comments: [2012-07-22 21:23:23] iam4webwork at hotmail dot com I believe that somewhere the underlying C source code is converting the PHP TRUE, i.e. 1 to 1 [2012-07-22 21:19:42] iam4webwork at hotmail dot com Description: When I provide strcasecmp with two parameters where one is TRUE and the other is a string, php does not generate a warning to say that the first parameter needs to be a string and silently converts TRUE to 1 and executes. Test script: --- ?php var_dump(strcasecmp(TRUE, bob)); // -49 Expected result: I expected a parser error message. Actual result: -- -49 -- Edit this bug report at https://bugs.php.net/bug.php?id=62633edit=1
Bug #62636 [Opn-Fbk]: PHP treated as HTML
Edit report at https://bugs.php.net/bug.php?id=62636edit=1 ID: 62636 Updated by: ahar...@php.net Reported by:brandonskypimenta at gmail dot com Summary:PHP treated as HTML -Status: Open +Status: Feedback Type: Bug -Package:Performance problem +Package:Scripting Engine problem Operating System: Mac OS X PHP Version:Irrelevant Block user comment: N Private report: N New Comment: 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. We actually need a self contained, small reproducable test script, not an unrelated piece of code. :) That said, this sounds very, very unlikely to be a PHP bug based on the description. Previous Comments: [2012-07-23 01:48:48] brandonskypimenta at gmail dot com Description: When running a script that is external (including it into another PHP file) opening that file will result in that external PHP being rendered as HTML text on the screen. Test script: --- (This is not a test script. It is an attempt to make a MediaWiki extension.) $wgExtensionCredits['validextensionclass'][] = array( 'path' = __FILE__, 'name' = 'Vote Pages', 'url' = 'https://www.mediawiki.org/wiki/Extension:VotePage', 'description' = 'Allows unregistered and registered users to vote pages', 'version' = 1.0, ); $rate = 'iframe frameborder=0 src=rate.html height=91' return $rate; Expected result: The external PHP script should have ran. Actual result: -- It displays the code and any HTML that has been used in the external PHP file will be displayed instead. -- Edit this bug report at https://bugs.php.net/bug.php?id=62636edit=1
Bug #62636 [Fbk-Csd]: PHP treated as HTML
Edit report at https://bugs.php.net/bug.php?id=62636edit=1 ID: 62636 User updated by:brandonskypimenta at gmail dot com Reported by:brandonskypimenta at gmail dot com Summary:PHP treated as HTML -Status: Feedback +Status: Closed Type: Bug Package:Scripting Engine problem Operating System: Mac OS X PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Oops! I forgot to add ?php at the beginning and ? at the end. Sorry, not a bug. Previous Comments: [2012-07-23 01:56:28] ahar...@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. We actually need a self contained, small reproducable test script, not an unrelated piece of code. :) That said, this sounds very, very unlikely to be a PHP bug based on the description. [2012-07-23 01:48:48] brandonskypimenta at gmail dot com Description: When running a script that is external (including it into another PHP file) opening that file will result in that external PHP being rendered as HTML text on the screen. Test script: --- (This is not a test script. It is an attempt to make a MediaWiki extension.) $wgExtensionCredits['validextensionclass'][] = array( 'path' = __FILE__, 'name' = 'Vote Pages', 'url' = 'https://www.mediawiki.org/wiki/Extension:VotePage', 'description' = 'Allows unregistered and registered users to vote pages', 'version' = 1.0, ); $rate = 'iframe frameborder=0 src=rate.html height=91' return $rate; Expected result: The external PHP script should have ran. Actual result: -- It displays the code and any HTML that has been used in the external PHP file will be displayed instead. -- Edit this bug report at https://bugs.php.net/bug.php?id=62636edit=1
Bug #62636 [Csd-Nab]: PHP treated as HTML
Edit report at https://bugs.php.net/bug.php?id=62636edit=1 ID: 62636 Updated by: ahar...@php.net Reported by:brandonskypimenta at gmail dot com Summary:PHP treated as HTML -Status: Closed +Status: Not a bug Type: Bug Package:Scripting Engine problem Operating System: Mac OS X PHP Version:Irrelevant Block user comment: N Private report: N Previous Comments: [2012-07-23 02:12:02] brandonskypimenta at gmail dot com Oops! I forgot to add ?php at the beginning and ? at the end. Sorry, not a bug. [2012-07-23 01:56:28] ahar...@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. We actually need a self contained, small reproducable test script, not an unrelated piece of code. :) That said, this sounds very, very unlikely to be a PHP bug based on the description. [2012-07-23 01:48:48] brandonskypimenta at gmail dot com Description: When running a script that is external (including it into another PHP file) opening that file will result in that external PHP being rendered as HTML text on the screen. Test script: --- (This is not a test script. It is an attempt to make a MediaWiki extension.) $wgExtensionCredits['validextensionclass'][] = array( 'path' = __FILE__, 'name' = 'Vote Pages', 'url' = 'https://www.mediawiki.org/wiki/Extension:VotePage', 'description' = 'Allows unregistered and registered users to vote pages', 'version' = 1.0, ); $rate = 'iframe frameborder=0 src=rate.html height=91' return $rate; Expected result: The external PHP script should have ran. Actual result: -- It displays the code and any HTML that has been used in the external PHP file will be displayed instead. -- Edit this bug report at https://bugs.php.net/bug.php?id=62636edit=1
[PHP-BUG] Bug #62636 [NEW]: PHP treated as HTML
From: brandonskypimenta at gmail dot com Operating system: Mac OS X PHP version: Irrelevant Package: Performance problem Bug Type: Bug Bug description:PHP treated as HTML Description: When running a script that is external (including it into another PHP file) opening that file will result in that external PHP being rendered as HTML text on the screen. Test script: --- (This is not a test script. It is an attempt to make a MediaWiki extension.) $wgExtensionCredits['validextensionclass'][] = array( 'path' = __FILE__, 'name' = 'Vote Pages', 'url' = 'https://www.mediawiki.org/wiki/Extension:VotePage', 'description' = 'Allows unregistered and registered users to vote pages', 'version' = 1.0, ); $rate = 'iframe frameborder=0 src=rate.html height=91' return $rate; Expected result: The external PHP script should have ran. Actual result: -- It displays the code and any HTML that has been used in the external PHP file will be displayed instead. -- Edit bug report at https://bugs.php.net/bug.php?id=62636edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62636r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62636r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62636r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62636r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62636r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62636r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62636r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62636r=needscript Try newer version: https://bugs.php.net/fix.php?id=62636r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62636r=support Expected behavior: https://bugs.php.net/fix.php?id=62636r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62636r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62636r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62636r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62636r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62636r=dst IIS Stability: https://bugs.php.net/fix.php?id=62636r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62636r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62636r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62636r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62636r=mysqlcfg
Bug #62637 [Opn-Nab]: Cannot use return command with variables
Edit report at https://bugs.php.net/bug.php?id=62637edit=1 ID: 62637 Updated by: ahar...@php.net Reported by:brandonskypimenta at gmail dot com Summary:Cannot use return command with variables -Status: Open +Status: Not a bug Type: Bug Package:Scripting Engine problem Operating System: Mac OS X PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. The return keyword returns a value; it doesn't print it. You should use echo or print for that. Previous Comments: [2012-07-23 02:32:57] brandonskypimenta at gmail dot com Description: When using return command under PHP 5.3.0, the command will not work. Using return $string or return($string) will not work. Test script: --- ?php error_reporting( E_ALL ); ini_set( 'display_errors', 1 ); $hello = 'Hello World!'; return $hello; ? Expected result: The text should have appeared on the page. Actual result: -- Either: 1) A blank page is given to the user. 2) You get an error message meaning unexpected T_RETURN. -- Edit this bug report at https://bugs.php.net/bug.php?id=62637edit=1
[PHP-BUG] Bug #62637 [NEW]: Cannot use return command with variables
From: brandonskypimenta at gmail dot com Operating system: Mac OS X PHP version: Irrelevant Package: Scripting Engine problem Bug Type: Bug Bug description:Cannot use return command with variables Description: When using return command under PHP 5.3.0, the command will not work. Using return $string or return($string) will not work. Test script: --- ?php error_reporting( E_ALL ); ini_set( 'display_errors', 1 ); $hello = 'Hello World!'; return $hello; ? Expected result: The text should have appeared on the page. Actual result: -- Either: 1) A blank page is given to the user. 2) You get an error message meaning unexpected T_RETURN. -- Edit bug report at https://bugs.php.net/bug.php?id=62637edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62637r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62637r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62637r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62637r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62637r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62637r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62637r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62637r=needscript Try newer version: https://bugs.php.net/fix.php?id=62637r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62637r=support Expected behavior: https://bugs.php.net/fix.php?id=62637r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62637r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62637r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62637r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62637r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62637r=dst IIS Stability: https://bugs.php.net/fix.php?id=62637r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62637r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62637r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62637r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62637r=mysqlcfg