Bug #60403 [Fbk->Opn]: $_SERVER in embedded server under Windows is empty
Edit report at https://bugs.php.net/bug.php?id=60403&edit=1 ID: 60403 User updated by:keisial at gmail dot com Reported by:keisial at gmail dot com Summary:$_SERVER in embedded server under Windows is empty -Status: Feedback +Status: Open Type: Bug Package:Built-in web server Operating System: Windows Vista PHP Version:5.4SVN-2011-11-28 (snap) Block user comment: N Private report: N New Comment: Nevermind. It was using a php.ini with variables_order = "GPC" Sorry for the noise, Laruence. Previous Comments: [2011-11-29 03:30:27] larue...@php.net I can not reproduce this under windows 7, could you verify that you have the exactlly same script as you described? [2011-11-28 19:17:23] keisial at gmail dot com Description: $_SERVER in embedded server under Windows is empty A simple index.php string(12) "/tmp/PHP_5_4" ["REMOTE_ADDR"]=> string(9) "127.0.0.1" ["REMOTE_PORT"]=> string(5) "58298" ["SERVER_SOFTWARE"]=> string(35) "PHP 5.4.0RC3-dev Development Server" ["SERVER_PROTOCOL"]=> string(8) "HTTP/1.1" ["SERVER_PORT"]=> string(4) "8080" ["REQUEST_URI"]=> string(1) "/" ["REQUEST_METHOD"]=> string(3) "GET" ["SCRIPT_NAME"]=> string(10) "/index.php" ["SCRIPT_FILENAME"]=> string(22) "/tmp/PHP_5_4/index.php" ["PHP_SELF"]=> string(10) "/index.php" ["HTTP_USER_AGENT"]=> string(23) "Wget/1.13.4 (linux-gnu)" ["HTTP_ACCEPT"]=> string(3) "*/*" ["HTTP_HOST"]=> string(14) "127.0.0.1:8080" ["HTTP_CONNECTION"]=> string(10) "Keep-Alive" ["REQUEST_TIME"]=> float(1322485593.4282) ["argv"]=> array(0) { } ["argc"]=> int(0) } Tested Windows version is the nightly php-5.4-nts-windows-vc9-x86-r319967 Tested Linux version is a checkout of r320088, branch PHP_5_4 (and it wasn't fixed on those revisions 121, they were to a different subtree: phpdoc, pecl, or pear) -- Edit this bug report at https://bugs.php.net/bug.php?id=60403&edit=1
[PHP-BUG] Bug #61228 [NEW]: htmlspecialchars() silently failing
From: Operating system: PHP version: 5.4.0RC8 Package: Unknown/Other Function Bug Type: Bug Bug description:htmlspecialchars() silently failing Description: htmlspecialchars() no longer provides warnings in PHP 5.4 This is specially worrying as 5.4 changes its default charset from ISO-8859-1 to UTF-8. So the same string that passed flawlessly through 5.3, will now silently output nothing in 5.4 (and htmlspecialchars is one of the last things to check!). In 5.3 the following can produce: var_dump( htmlspecialchars("a\237a", ENT_COMPAT, 'UTF-8') ); PHP Warning: htmlspecialchars(): Invalid multibyte sequence in argument in php shell code on line 1 string(0) "" whereas in 5.4: var_dump( htmlspecialchars("a\237a", ENT_COMPAT, 'UTF-8') ); string(0) "" The explicit UTF-8 is to make both work the same, htmlspecialchars("a\237a") *works* in 5.3 (but it may not be in your page encoding). The reason is clear, php_error_docref() of php_escape_html_entities_ex is gone in 5.4 and trunk. I attach a patch against 5.4 branch readding the warning (should apply fine in trunk, moved 5 lines below) -- Edit bug report at https://bugs.php.net/bug.php?id=61228&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61228&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61228&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61228&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61228&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61228&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61228&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61228&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61228&r=needscript Try newer version: https://bugs.php.net/fix.php?id=61228&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61228&r=support Expected behavior: https://bugs.php.net/fix.php?id=61228&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61228&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61228&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61228&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61228&r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=61228&r=dst IIS Stability: https://bugs.php.net/fix.php?id=61228&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61228&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61228&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61228&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61228&r=mysqlcfg
Bug #61228 [Wfx]: htmlspecialchars() silently failing
Edit report at https://bugs.php.net/bug.php?id=61228&edit=1 ID: 61228 User updated by:keisial at gmail dot com Reported by:keisial at gmail dot com Summary:htmlspecialchars() silently failing Status: Wont fix Type: Bug Package:Unknown/Other Function PHP Version:5.4.0RC8 Block user comment: N Private report: N New Comment: I agree the hesitant warning was a problem, but I'd rather prefer a warning in my logs than having to check htmlspecialchars() return value (in the end, creating a wrapper). I'm not convinced that showing that warning on misconfigured servers was that a big deal (after all, if an attacker can influence the output providing invalid strings, he can as well see that they are no longer shown there), but it could be produced by forcing not sending it to the output buffer. Get user data Operate with it Send to the db Iterate the result set Fetch the values from the result Process that data htmlspecialchars() echo it Maybe it's my fault for treating htmlspecialchars() as a function that would always work, but it made me look everywhere why it was failing. And the badly- encoded data wasn't even provided by me, the culprit was strftime() Combined with the charset change, I suspect it will bite a number of developers. Previous Comments: [2012-03-01 23:37:50] cataphr...@php.net This is intentional. The way PHP "warns" of invalid multibyte sequences is to return an empty string. The "hesitant" warning in 5.3 was not a good idea. [2012-03-01 22:47:38] ni...@php.net The main problem with that error was that it was very inconsistent: It only was generated when error display was *disabled*. That basically meant that you would never see that error in development, but it would flood your log in production. This was done for security reasons, in order to protect people who had display_errors=1 on production servers. Especially as PHP 5.4 provides ENT_SUBSTITUTE I think that this error doesn't make much sense anymore. But probably I'm wrong :) -------------------- [2012-03-01 20:39:49] keisial at gmail dot com Description: htmlspecialchars() no longer provides warnings in PHP 5.4 This is specially worrying as 5.4 changes its default charset from ISO-8859-1 to UTF-8. So the same string that passed flawlessly through 5.3, will now silently output nothing in 5.4 (and htmlspecialchars is one of the last things to check!). In 5.3 the following can produce: var_dump( htmlspecialchars("a\237a", ENT_COMPAT, 'UTF-8') ); PHP Warning: htmlspecialchars(): Invalid multibyte sequence in argument in php shell code on line 1 string(0) "" whereas in 5.4: var_dump( htmlspecialchars("a\237a", ENT_COMPAT, 'UTF-8') ); string(0) "" The explicit UTF-8 is to make both work the same, htmlspecialchars("a\237a") *works* in 5.3 (but it may not be in your page encoding). The reason is clear, php_error_docref() of php_escape_html_entities_ex is gone in 5.4 and trunk. I attach a patch against 5.4 branch readding the warning (should apply fine in trunk, moved 5 lines below) -- Edit this bug report at https://bugs.php.net/bug.php?id=61228&edit=1
#45823 [NEW]: php_ini_scanned_path_len wasn't fixed on PHP_5_2 tag
From: Keisial at gmail dot com Operating system: Windows PHP version: 5.2CVS-2008-08-14 (snap) PHP Bug Type: Compile Failure Bug description: php_ini_scanned_path_len wasn't fixed on PHP_5_2 tag Description: Jani added a new ini check system based on php_ini_scanned_path_len to HEAD: http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.167&r2=1.168 PHP 5.3: http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.136.2.4.2.15.2.9&r2=1.136.2.4.2.15.2.10 PHP 5.2: http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.136.2.4.2.16&r2=1.136.2.4.2.17 Alas, it had a bug and didn't build on some compilers, so pajoye fixed it: PHP_5_3: http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.136.2.4.2.15.2.10&r2=1.136.2.4.2.15.2.11 HEAD: http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.168&r2=1.169 ...and 5.2 branch remains broken. Please apply the same patch to 5.2 (i tested it and fixes the issue) or undo jani's. -- Edit bug report at http://bugs.php.net/?id=45823&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45823&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45823&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45823&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45823&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45823&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45823&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45823&r=needscript Try newer version:http://bugs.php.net/fix.php?id=45823&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45823&r=support Expected behavior:http://bugs.php.net/fix.php?id=45823&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45823&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45823&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45823&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45823&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45823&r=dst IIS Stability:http://bugs.php.net/fix.php?id=45823&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45823&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45823&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45823&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45823&r=mysqlcfg
#45698 [Fbk->Opn]: Doesn't compile with VC6 - Include problem
ID: 45698 User updated by: Keisial at gmail dot com Reported By: Keisial at gmail dot com -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: Windows - VC6 PHP Version: 5.3CVS-2008-08-03 (snap) Assigned To: pajoye New Comment: Thanks for your attention. I had solved it by doing: set INCLUDE=C:\PROGRA~1\Microsoft Platform SDK\Include;%INCLUDE% Just doing configure.bat "--with-extra-includes=C:\PROGRA~1\Microsoft Platform SDK\Include" "--with-extra-libs=C:\PROGRA~1\Microsoft Platf orm SDK\lib" as you mention doesn't work, you still need the VC includes, or you get "fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory" Some includes only have the platform sdk (windows.h, winsock2.h...) but don't provide standard headers. The newest use a deprecated attribute which is not recognised, mingw32 headers fail for gcc specific code... Here are the different results i got when looking for a working combination: C:\PROGRA~1\Microsoft Visual Studio 9.0\VC\include\crtdefs.h(548) : error C2485: 'deprecated' : unrecognized extended attribute C:\PROGRA~1\Microsoft Visual Studio 8\VC\include\crtdefs.h(556) : error C2485: ' deprecated' : unrecognized extended attribute Zend\zend.h(37) : fatal error C1083: Cannot open include file: 'stdio.h': No suc C:\PROGRA~1\Microsoft SDKs\Windows\v6.1\Include No stdio.h C:\PROGRA~1\Microsoft SDKs\Windows\v6.1\Include + VC6 C:\PROGRA~1\Microsoft SDKs\Windows\v6.1\Include\specstrings.h(9) : fatal error C 1083: Cannot open include file: 'sal.h': No such file or directory C:\PROGRA~1\Microsoft Platform SDK\Include No stdio C:\PROGRA~1\Microsoft Platform SDK\Include + VC Works Mingw32 headers -> Fail for GCCisms w32api headers + VC6 include\stdio.h(217) : error C2054: expected '(' to follow ' __inline__' Previous Comments: [2008-08-23 09:49:02] [EMAIL PROTECTED] I finally got some more time to investigate. Can you try the following: - open a normal console - "c:\program files\Microsoft Visual Studio\VC98\bin\vcvars32.bat" - Do not register the SDK or VS vars, type "export" to be sure that no LIB or INCLUDE are defined (may be set to VC98 include or lib) Then run: configure.bat --with-extra-includes=c:\path\to\sdk200302\include --with-extra-libs=c:\path\to\sdk200302\lib and finally nmake. It may fix the problem as the correct winsock2 will be included. The important thing to remember is that winsock2.h is a special case, it has to be included before windows.h (msdn or google about it). [2008-08-03 13:35:50] [EMAIL PROTECTED] Err no. Please do not commit this patch as it does break VC6 builds now. Please use the following compilers SDK pairs: http://wiki.php.net/internals/windows/compiler http://wiki.php.net/internals/windows/windowssdk This is what we use for http://snaps.php.net [2008-08-03 13:25:31] [EMAIL PROTECTED] Stas, can you commit the patch please? [2008-08-03 12:27:13] [EMAIL PROTECTED] This will probably fix the compile failure that Steph and I were getting... [2008-08-03 12:23:45] Keisial at gmail dot com Description: 5.3 doesn't compile with VC6. When including winsock2.h at zend_config.w32.h it includes windows.h which in turn includes winsock stuff before a SOCKET is defined. Compilation fails with error on mswsock.h (This doesn't happen including only those two headers, so some defines are modifying the defualt behaviour) Changing the order to include windows.h before winsock2.h fixes it: --- zend_config.w32.h 2008-07-17 20:33:46.0 +0200 +++ zend_config.w32.h 2008-08-03 14:19:56.59375 +0200 @@ -35,8 +35,8 @@ #ifndef ZEND_INCLUDE_FULL_WINDOWS_HEADERS #define WIN32_LEAN_AND_MEAN #endif -#include #include +#include #include -- Edit this bug report at http://bugs.php.net/?id=45698&edit=1
#45900 [NEW]: timelib_structs.h include path issue on Windows
From: Keisial at gmail dot com Operating system: Windows PHP version: 5.3CVS-2008-08-23 (snap) PHP Bug Type: Compile Failure Bug description: timelib_structs.h include path issue on Windows Description: Compiling date extension on windows has the same problem reported in bug 37163. ext/date/lib is included in the config.w32, but with the wrong switch. Being for windows, it should use /I instead of -I --- config.w32 2006-01-05 07:41:10.0 +0100 +++ config.w32 2008-08-23 19:45:58.0 +0200 @@ -1,7 +1,7 @@ // $Id: config.w32,v 1.5.2.1 2006/01/05 06:41:09 sebastian Exp $ // vim:ft=javascript -EXTENSION("date", "php_date.c", false, "-Iext/date/lib"); +EXTENSION("date", "php_date.c", false, "/Iext/date/lib"); ADD_SOURCES("ext/date/lib", "astro.c timelib.c dow.c parse_date.c parse_tz.c tm2unixtime.c unixtime2tm.c", "date"); AC_DEFINE('HAVE_DATE', 1, 'Have date/time support'); -- Edit bug report at http://bugs.php.net/?id=45900&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45900&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45900&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45900&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45900&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45900&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45900&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45900&r=needscript Try newer version:http://bugs.php.net/fix.php?id=45900&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45900&r=support Expected behavior:http://bugs.php.net/fix.php?id=45900&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45900&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45900&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45900&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45900&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45900&r=dst IIS Stability:http://bugs.php.net/fix.php?id=45900&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45900&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45900&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45900&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45900&r=mysqlcfg
#45698 [Asn]: Doesn't compile with VC6 - Include problem
ID: 45698 User updated by: Keisial at gmail dot com Reported By: Keisial at gmail dot com Status: Assigned Bug Type: Compile Failure Operating System: Windows - VC6 PHP Version: 5.3CVS-2008-08-03 (snap) Assigned To: pajoye New Comment: I didn't know you could cvs checkout a module called php5! It isn't listed at http://cvs.php.net/ However, just running those scripts doesn't work, buildconf fails complaining that snap53\win32\build\buildconf.js wasn't found If you want to make easy for anyone to build php on windows, you may find useful the script i use. It automatically pulls the latest snapshot, the requeriments (bindlib, libiconv, zlib, libxml2), builds php and moves the relevant files to a different Release folder. It's not completely foolproof, but imho it's on the right path. If you're interested, send me an email or just /query me on irc. Previous Comments: [2008-08-23 15:29:16] [EMAIL PROTECTED] > I had solved it by doing: > set INCLUDE=C:\PROGRA~1\Microsoft Platform SDK\Include;%INCLUDE% Great, that confirms the (old) winsock2 bug. I'm updating our scripts so it can be used easily by anyone to setup an environment (be vc6 or vc9). You can find them here: http://cvs.php.net/php-internals-win/script/ Some docs will be added to the wiki as well. ---------------- [2008-08-23 13:40:15] Keisial at gmail dot com Thanks for your attention. I had solved it by doing: set INCLUDE=C:\PROGRA~1\Microsoft Platform SDK\Include;%INCLUDE% Just doing configure.bat "--with-extra-includes=C:\PROGRA~1\Microsoft Platform SDK\Include" "--with-extra-libs=C:\PROGRA~1\Microsoft Platf orm SDK\lib" as you mention doesn't work, you still need the VC includes, or you get "fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory" Some includes only have the platform sdk (windows.h, winsock2.h...) but don't provide standard headers. The newest use a deprecated attribute which is not recognised, mingw32 headers fail for gcc specific code... Here are the different results i got when looking for a working combination: C:\PROGRA~1\Microsoft Visual Studio 9.0\VC\include\crtdefs.h(548) : error C2485: 'deprecated' : unrecognized extended attribute C:\PROGRA~1\Microsoft Visual Studio 8\VC\include\crtdefs.h(556) : error C2485: ' deprecated' : unrecognized extended attribute Zend\zend.h(37) : fatal error C1083: Cannot open include file: 'stdio.h': No suc C:\PROGRA~1\Microsoft SDKs\Windows\v6.1\Include No stdio.h C:\PROGRA~1\Microsoft SDKs\Windows\v6.1\Include + VC6 C:\PROGRA~1\Microsoft SDKs\Windows\v6.1\Include\specstrings.h(9) : fatal error C 1083: Cannot open include file: 'sal.h': No such file or directory C:\PROGRA~1\Microsoft Platform SDK\Include No stdio C:\PROGRA~1\Microsoft Platform SDK\Include + VC Works Mingw32 headers -> Fail for GCCisms w32api headers + VC6 include\stdio.h(217) : error C2054: expected '(' to follow ' __inline__' [2008-08-23 09:49:02] [EMAIL PROTECTED] I finally got some more time to investigate. Can you try the following: - open a normal console - "c:\program files\Microsoft Visual Studio\VC98\bin\vcvars32.bat" - Do not register the SDK or VS vars, type "export" to be sure that no LIB or INCLUDE are defined (may be set to VC98 include or lib) Then run: configure.bat --with-extra-includes=c:\path\to\sdk200302\include --with-extra-libs=c:\path\to\sdk200302\lib and finally nmake. It may fix the problem as the correct winsock2 will be included. The important thing to remember is that winsock2.h is a special case, it has to be included before windows.h (msdn or google about it). [2008-08-03 13:35:50] [EMAIL PROTECTED] Err no. Please do not commit this patch as it does break VC6 builds now. Please use the following compilers SDK pairs: http://wiki.php.net/internals/windows/compiler http://wiki.php.net/internals/windows/windowssdk This is what we use for http://snaps.php.net [2008-08-03 13:25:31] [EMAIL PROTECTED] Stas, can you commit the patch please? 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/45698 -- Edit this bug report at http://bugs.php.net/?id=45698&edit=1
#45698 [Asn]: Doesn't compile with VC6 - Include problem
ID: 45698 User updated by: Keisial at gmail dot com Reported By: Keisial at gmail dot com Status: Assigned Bug Type: Compile Failure Operating System: Windows - VC6 PHP Version: 5.3CVS-2008-08-03 (snap) Assigned To: pajoye New Comment: > Hm, did you check it to snap53? Yes. It doesn't seem to be exactly that. I got that error only once manually calling buildconf, the file is there. The actual error was "System can't found specified path", which is not too informative about which part of the bat failed :) Now i removed echo hiding of buildconf during checkout, and the problem seem to be that configure was passed he flags --with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared --with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared --with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared > Well, 5.3 will have no dependency by default but a compiler. PHP6 depends on ICU only. You mean for unix system, isn't? Otherwise i should visit my psychologist, I see configure failing with: ERROR: We really need that arpa\nameser.h file - it is part of the bindlib package ;) t-build --enable-debug-pack --disable-fileinfo At some point, I may add one single zip per area, for the core (libxml2, > as well as some script to automatically fetch the lib from our > downloads section (http://pecl2.php.net/downloads/php-windows-builds/php-libs/). That's what i'm using. Requisites: wget, unzip and tar >By the way, the snapshot scripts are used to build snapshots. I'm not > sure it makes sense to use them for daily developments. Their main > advantage is that they are callable from a scheduled task. You would want at least different flags. I expect much more people wanting to develop on php than making snapshots. The great advantage is not having to worry about compile options or configure flags. You can also happily delete your build folder and get everything refetched from scratch > Ping on IRC? Where/who? :) you already found me :) Previous Comments: [2008-08-23 18:29:18] [EMAIL PROTECTED] > However, just running those scripts doesn't work, buildconf fails > complaining that snap53\win32\build\buildconf.js wasn't found Hm, did you check it to snap53? > If you want to make easy for anyone to build php on > windows, you may find useful the script i use. > It automatically pulls the latest snapshot, > the requeriments (bindlib, libiconv, zlib, libxml2), builds > php and moves the relevant files to a different Release folder. Well, 5.3 will have no dependency by default but a compiler. PHP6 depends on ICU only. At some point, I may add one single zip per area, for the core (libxml2, libiconv, zlib) and per extension as well as some script to automatically fetch the lib from our downloads section (http://pecl2.php.net/downloads/php-windows-builds/php-libs/). By the way, the snapshot scripts are used to build snapshots. I'm not sure it makes sense to use them for daily developments. Their main advantage is that they are callable from a scheduled task. Ping on IRC? Where/who? :) ---------------- [2008-08-23 18:19:06] Keisial at gmail dot com I didn't know you could cvs checkout a module called php5! It isn't listed at http://cvs.php.net/ However, just running those scripts doesn't work, buildconf fails complaining that snap53\win32\build\buildconf.js wasn't found If you want to make easy for anyone to build php on windows, you may find useful the script i use. It automatically pulls the latest snapshot, the requeriments (bindlib, libiconv, zlib, libxml2), builds php and moves the relevant files to a different Release folder. It's not completely foolproof, but imho it's on the right path. If you're interested, send me an email or just /query me on irc. [2008-08-23 15:29:16] [EMAIL PROTECTED] > I had solved it by doing: > set INCLUDE=C:\PROGRA~1\Microsoft Platform SDK\Include;%INCLUDE% Great, that confirms the (old) winsock2 bug. I'm updating our scripts so it can be used easily by anyone to setup an environment (be vc6 or vc9). You can find them here: http://cvs.php.net/php-internals-win/script/ Some docs will be added to the wiki as well. [2008-08-23 13:40:15] Keisial at gmail dot com Thanks for your attention. I had solved it by doing: set INCLUDE=C:\PROGRA~1\Microsoft Platform SDK\Include;%INCLUDE% Just doing configure.bat "--with-extra-includes=C:\PROGRA~1\Microsoft Platform SDK\Include" "--with-extra-libs=C:\PROGRA~1\Microsoft Platf orm SDK\lib" as you mention doesn't work, you stil
#45900 [Fbk->Opn]: timelib_structs.h include path issue on Windows
ID: 45900 User updated by: Keisial at gmail dot com Reported By: Keisial at gmail dot com -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: Windows PHP Version: 5.3CVS-2008-08-23 (snap) New Comment: You're right. The issue is not the switch style. Why is it always documented with / ? :) The error is: .\ext/date/lib/timelib_structs.h(24) : fatal error C1083: Cannot open include file: 'timelib_config.h': No such file or directory I have gone deeper into it, and is not caused on compiling date but when compiling ext\standard\microtime.c which #include "ext/date/php_date.h" Interestingly, i only see it with --enable-snapshot-build and running again nmake skips it. Previous Comments: [2008-08-23 18:00:54] [EMAIL PROTECTED] -I works like /I There is other extension using the -I (gd, pcre, etc.) without problems. Which error do you get (exactly)? ---- [2008-08-23 17:52:17] Keisial at gmail dot com Description: Compiling date extension on windows has the same problem reported in bug 37163. ext/date/lib is included in the config.w32, but with the wrong switch. Being for windows, it should use /I instead of -I --- config.w32 2006-01-05 07:41:10.0 +0100 +++ config.w32 2008-08-23 19:45:58.0 +0200 @@ -1,7 +1,7 @@ // $Id: config.w32,v 1.5.2.1 2006/01/05 06:41:09 sebastian Exp $ // vim:ft=javascript -EXTENSION("date", "php_date.c", false, "-Iext/date/lib"); +EXTENSION("date", "php_date.c", false, "/Iext/date/lib"); ADD_SOURCES("ext/date/lib", "astro.c timelib.c dow.c parse_date.c parse_tz.c tm2unixtime.c unixtime2tm.c", "date"); AC_DEFINE('HAVE_DATE', 1, 'Have date/time support'); -- Edit this bug report at http://bugs.php.net/?id=45900&edit=1
#46026 [NEW]: bz2_decompress_filter tries to decompress after end of stream
From: Keisial at gmail dot com Operating system: PHP version: 5.2CVS-2008-09-08 (snap) PHP Bug Type: Filter related Bug description: bz2_decompress_filter tries to decompress after end of stream Description: If the input is larger than the bzip2 stream, bz2_decompress_filter tries to continue decompressing after it has received a BZ_STREAM_END, so bzlib returns BZ_SEQUENCE_ERROR and the stream filter finalises with PSFS_ERR_FATAL, getting no output. Reproduce code: --- bz2Decompress.php: $ echo 'Hello world' > hello.txt $ bzip2 hello.txt $ php bz2Decompress.php hello.txt.bz2 Hello world $ echo '!' >> hello.txt.bz2 $ php bz2Decompress.php hello.txt.bz2 /* No output */ Expected result: At least the correctly read data should be returned. Two things can be done on receiving a BZ_STREAM_END: -Setting an EOF flag and remove any further incoming data (allow to continue reading if the filter is removed?). -Reinitialising the decompressing library (approach of the bzip2 utility) so concatenated bzip2 streams can be unbzipped as the concatenation of its output. -- Edit bug report at http://bugs.php.net/?id=46026&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46026&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46026&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46026&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46026&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46026&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46026&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=46026&r=needscript Try newer version:http://bugs.php.net/fix.php?id=46026&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46026&r=support Expected behavior:http://bugs.php.net/fix.php?id=46026&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46026&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46026&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46026&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46026&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46026&r=dst IIS Stability:http://bugs.php.net/fix.php?id=46026&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46026&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46026&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46026&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=46026&r=mysqlcfg
#46026 [Opn]: bz2_decompress_filter tries to decompress after end of stream
ID: 46026 User updated by: Keisial at gmail dot com Reported By: Keisial at gmail dot com Status: Open Bug Type: Bzip2 Related Operating System: * PHP Version: 5.2CVS-2008-09-08 (snap) New Comment: Ok, I have implemented a fix. Patch: http://pastebin.com/f24d58100 Patch ignoring whitespaces: http://pastebin.com/fb084a7b When adding a filter to a stream, "bzip2.decompress", $parameters only indicated if bzlib should use the alternative decompression algorithm which uses less memory but at the cost of decompressing more slowly, either as a boolean or as an array("small"=>value). I have extended the array syntax to also allow a 'concatenated' parameter. By default, bzip2.decompress filter won't process any data after it has reached and end-of-stream. However, if you provide array("concatenated"=>true) it will continue reading as if it has another bzip2 stream concatenated, just as bzip2 does. In the future, it would be nice to be able to apply a bzip2.decompress, read the data, remove the filter, and read non-bzip data appended, but the stream_filter system would need to be extended to support that. Additionally, if there is a decompression error, it will show a warning. Also, bzip2 internal buffers will now be allocated later and freed sooner. Previous Comments: -------------------- [2008-09-08 22:58:41] Keisial at gmail dot com Description: If the input is larger than the bzip2 stream, bz2_decompress_filter tries to continue decompressing after it has received a BZ_STREAM_END, so bzlib returns BZ_SEQUENCE_ERROR and the stream filter finalises with PSFS_ERR_FATAL, getting no output. Reproduce code: --- bz2Decompress.php: $ echo 'Hello world' > hello.txt $ bzip2 hello.txt $ php bz2Decompress.php hello.txt.bz2 Hello world $ echo '!' >> hello.txt.bz2 $ php bz2Decompress.php hello.txt.bz2 /* No output */ Expected result: At least the correctly read data should be returned. Two things can be done on receiving a BZ_STREAM_END: -Setting an EOF flag and remove any further incoming data (allow to continue reading if the filter is removed?). -Reinitialising the decompressing library (approach of the bzip2 utility) so concatenated bzip2 streams can be unbzipped as the concatenation of its output. -- Edit this bug report at http://bugs.php.net/?id=46026&edit=1
#46146 [NEW]: XMLReader should be able to work on an open stream
From: Keisial at gmail dot com Operating system: PHP version: 5.2CVS-2008-09-21 (snap) PHP Bug Type: XML Reader Bug description: XMLReader should be able to work on an open stream Description: XMLReader should be able to work on an open stream. The extension is already stream-aware so it's only a matter of xmlAllocParserInputBuffer() the xmlParserInputBuffer as in php_libxml_input_buffer_create_filename() (see ext/libxml/libxml.c) and load that with xmlNewTextReader(), providing a nice method for that (open_stream?, attach_to_stream?) -- Edit bug report at http://bugs.php.net/?id=46146&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46146&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46146&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46146&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46146&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46146&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46146&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=46146&r=needscript Try newer version:http://bugs.php.net/fix.php?id=46146&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46146&r=support Expected behavior:http://bugs.php.net/fix.php?id=46146&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46146&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46146&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46146&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46146&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46146&r=dst IIS Stability:http://bugs.php.net/fix.php?id=46146&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46146&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46146&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46146&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=46146&r=mysqlcfg
#46151 [NEW]: file_get_contents() doesn't use mmap
From: Keisial at gmail dot com Operating system: PHP version: 5.2CVS-2008-09-22 (snap) PHP Bug Type: Streams related Bug description: file_get_contents() doesn't use mmap Description: As opposed to 5.3 on 5.2 php_stream_copy_to_mem doesn't use php_stream_mmap_range, even though there is a comment on the call to php_stream_copy_to_mem saying 'uses mmap if possible' (on file_get_contents, at file.c:562) 5.2 is using read() calls instead. Still, 5.2 is faster both in loading and treating the file. -- Edit bug report at http://bugs.php.net/?id=46151&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46151&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46151&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46151&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46151&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46151&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46151&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=46151&r=needscript Try newer version:http://bugs.php.net/fix.php?id=46151&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46151&r=support Expected behavior:http://bugs.php.net/fix.php?id=46151&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46151&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46151&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46151&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46151&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46151&r=dst IIS Stability:http://bugs.php.net/fix.php?id=46151&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46151&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46151&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46151&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=46151&r=mysqlcfg
#46146 [Opn]: XMLReader should be able to work on an open stream
ID: 46146 User updated by: Keisial at gmail dot com Reported By: Keisial at gmail dot com Status: Open Bug Type:XML Reader PHP Version: 5.2CVS-2008-09-21 (snap) New Comment: Implementation: http://pastebin.com/f50204f1f Previous Comments: [2008-09-21 23:09:12] Keisial at gmail dot com Description: XMLReader should be able to work on an open stream. The extension is already stream-aware so it's only a matter of xmlAllocParserInputBuffer() the xmlParserInputBuffer as in php_libxml_input_buffer_create_filename() (see ext/libxml/libxml.c) and load that with xmlNewTextReader(), providing a nice method for that (open_stream?, attach_to_stream?) -- Edit this bug report at http://bugs.php.net/?id=46146&edit=1
#45900 [Bgs]: timelib_structs.h include path issue on Windows
ID: 45900 User updated by: Keisial at gmail dot com Reported By: Keisial at gmail dot com Status: Bogus Bug Type: Compile Failure Operating System: Windows PHP Version: 5.3CVS-2008-08-23 (snap) Assigned To: pajoye New Comment: Looks it wasn't fixed as it is happening with a clean folder :( Calling configure again after the error it then builds !? php5.3-200809241430> del * /s /q cd .. tar xjf php5.3-200809241430.tar.bz2 cd php5.3-200809241430 buildconf cscript /nologo configure.js nmake head.c C:\PROGRA~1\Microsoft Platform SDK\Include\Ws2tcpip.h(593) : warning C4142: benign redefinition of type .\ext/date/lib/timelib_structs.h(24) : fatal error C1083: Cannot open include file: 'timelib_config.h': No such file or directory NMAKE : fatal error U1077: '"cl.exe"' : return code '0x2' Stop. nmake head.c C:\PROGRA~1\Microsoft Platform SDK\Include\Ws2tcpip.h(593) : warning C4142: benign redefinition of type .\ext/date/lib/timelib_structs.h(24) : fatal error C1083: Cannot open include file: 'timelib_config.h': No such file or directory NMAKE : fatal error U1077: '"cl.exe"' : return code '0x2' Stop. cscript /nologo configure.js nmake It doesn't hit the error with --disable-calendar Previous Comments: [2008-08-25 18:55:26] [EMAIL PROTECTED] I have discussed with Keisal on IRC and the issue is fixed (clean co and al). [2008-08-25 18:25:53] [EMAIL PROTECTED] Is timelib_config.h generated or not when this happens? WHERE is it generated to? Search for it, it might get generated but in a wrong directory.. -------------------- [2008-08-23 21:28:33] Keisial at gmail dot com You're right. The issue is not the switch style. Why is it always documented with / ? :) The error is: .\ext/date/lib/timelib_structs.h(24) : fatal error C1083: Cannot open include file: 'timelib_config.h': No such file or directory I have gone deeper into it, and is not caused on compiling date but when compiling ext\standard\microtime.c which #include "ext/date/php_date.h" Interestingly, i only see it with --enable-snapshot-build and running again nmake skips it. [2008-08-23 18:00:54] [EMAIL PROTECTED] -I works like /I There is other extension using the -I (gd, pcre, etc.) without problems. Which error do you get (exactly)? ---- [2008-08-23 17:52:17] Keisial at gmail dot com Description: Compiling date extension on windows has the same problem reported in bug 37163. ext/date/lib is included in the config.w32, but with the wrong switch. Being for windows, it should use /I instead of -I --- config.w32 2006-01-05 07:41:10.0 +0100 +++ config.w32 2008-08-23 19:45:58.0 +0200 @@ -1,7 +1,7 @@ // $Id: config.w32,v 1.5.2.1 2006/01/05 06:41:09 sebastian Exp $ // vim:ft=javascript -EXTENSION("date", "php_date.c", false, "-Iext/date/lib"); +EXTENSION("date", "php_date.c", false, "/Iext/date/lib"); ADD_SOURCES("ext/date/lib", "astro.c timelib.c dow.c parse_date.c parse_tz.c tm2unixtime.c unixtime2tm.c", "date"); AC_DEFINE('HAVE_DATE', 1, 'Have date/time support'); -- Edit this bug report at http://bugs.php.net/?id=45900&edit=1
#46171 [NEW]: stream_bucket_new don't work with write streams
From: Keisial at gmail dot com Operating system: PHP version: 5.3CVS-2008-09-25 (snap) PHP Bug Type: Streams related Bug description: stream_bucket_new don't work with write streams Description: Calling stream_bucket_new on a write stream doesn't work (the same code fopening for reading works). Reproduce code: --- http://php.net/manual/function.stream-filter-register.php **/ /* Define our filter class */ class strtoupper_filter extends php_user_filter { function filter($in, $out, &$consumed, $closing) { $new_bucket = stream_bucket_new($this->stream, "Uppercase text: "); if ($new_bucket === false) throw new Exception("stream_bucket_new should have returned a bucket"); stream_bucket_append($out, $new_bucket); while ($bucket = stream_bucket_make_writeable($in)) { $bucket->data = strtoupper($bucket->data); $consumed += $bucket->datalen; stream_bucket_append($out, $bucket); } return PSFS_PASS_ON; } } /* Register our filter with PHP */ stream_filter_register("strtoupper", "strtoupper_filter") or die("Failed to register filter"); $fp = fopen("foo-bar.txt", "w"); /* Attach the registered filter to the stream just opened */ stream_filter_append($fp, "strtoupper"); fwrite($fp, "Line1\n"); fwrite($fp, "Word - 2\n"); fwrite($fp, "Easy As 123\n"); fclose($fp); // Read the contents back out readfile("foo-bar.txt"); ?> Actual result: -- Warning: stream_bucket_new(): 5 is not a valid stream resource in bucket_new_testcase.php on line 7 Fatal error: Uncaught exception 'Exception' with message 'stream_bucket_new should have returned a bucket' Stack trace: #0 [internal function]: strtoupper_filter->filter(Resource id #20, Resource id #21, 0, true) #1 bucket_new_testcase.php(36): fclose(Resource id #5) #2 {main} thrown in bucket_new_testcase.php on line 8 -- Edit bug report at http://bugs.php.net/?id=46171&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46171&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46171&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46171&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46171&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46171&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46171&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=46171&r=needscript Try newer version:http://bugs.php.net/fix.php?id=46171&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46171&r=support Expected behavior:http://bugs.php.net/fix.php?id=46171&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46171&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46171&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46171&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46171&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46171&r=dst IIS Stability:http://bugs.php.net/fix.php?id=46171&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46171&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46171&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46171&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=46171&r=mysqlcfg
#46026 [Csd]: bz2.decompress/zlib.inflate filter tries to decompress after end of stream
ID: 46026 User updated by: Keisial at gmail dot com Reported By: Keisial at gmail dot com Status: Closed Bug Type: Bzip2 Related Operating System: * PHP Version: 5.2CVS-2008-09-08 (snap) Assigned To: cellog New Comment: Wow, thank you very much. :-) Sorry about the tabs. My editor messed them (I know, I know, real programmers use butterflies...). However, consider doing this: if (SUCCESS == zend_hash_find(HASH_OF(filterparams), "concatenated", sizeof("concatenated"), (void **) &tmpzval) ) { -SEPARATE_ZVAL(tmpzval); -convert_to_boolean_ex(tmpzval); data->expect_concatenated = Z_LVAL_PP(tmpzval); -zval_ptr_dtor(tmpzval); tmpzval = NULL; } There were memory corruption problems with the previous patch, and zval_ptr_dtor seemed to be the source (thanks to rrichards and pajoye for their help on this on irc). Also, the other zval_ptr_dtor below (present there since first version by Sara) would be a "good possible candidate for another possible point of mem corruption". Previous Comments: [2008-10-11 19:15:22] [EMAIL PROTECTED] This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. fixed in PHP 5.2, 5.3, 6.0. Concatenation was only added in PHP 5.3 and 6.0, as new features cannot be added to PHP 5.2 [2008-10-11 19:08:35] [EMAIL PROTECTED] changing summary to reflect addition of zlib problem [2008-10-11 18:25:14] [EMAIL PROTECTED] In the future, please follow 2 important elements of the coding standards: 1) use tabs instead of spaces 2) always use {} around if/else blocks I had to waste 15 minutes just getting the patch formatted correctly before I could even begin testing it. I don't like wasting time. [2008-10-11 17:12:10] [EMAIL PROTECTED] this same bug applies to zlib stream filter, and also happens simply when trying to read from a filtered stream that contains a limited amount of compressed data (as in a zip archive with a bz2-compressed file), as php_stream_fill_read_buffer reads in maxlen data, triggering the problem you found. I'll try to get this fixed up and put in a few tests ---------------- [2008-09-19 16:47:15] Keisial at gmail dot com Ok, I have implemented a fix. Patch: http://pastebin.com/f24d58100 Patch ignoring whitespaces: http://pastebin.com/fb084a7b When adding a filter to a stream, "bzip2.decompress", $parameters only indicated if bzlib should use the alternative decompression algorithm which uses less memory but at the cost of decompressing more slowly, either as a boolean or as an array("small"=>value). I have extended the array syntax to also allow a 'concatenated' parameter. By default, bzip2.decompress filter won't process any data after it has reached and end-of-stream. However, if you provide array("concatenated"=>true) it will continue reading as if it has another bzip2 stream concatenated, just as bzip2 does. In the future, it would be nice to be able to apply a bzip2.decompress, read the data, remove the filter, and read non-bzip data appended, but the stream_filter system would need to be extended to support that. Additionally, if there is a decompression error, it will show a warning. Also, bzip2 internal buffers will now be allocated later and freed sooner. 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/46026 -- Edit this bug report at http://bugs.php.net/?id=46026&edit=1
[PHP-BUG] Bug #51936 [NEW]: Crash with clone xmlreader
From: Operating system: PHP version: 5.3.2 Package: XML Reader Bug Type: Bug Bug description:Crash with clone xmlreader Description: Trying to use a cloned xmlreader results in a crash (original one can be used fine). php 5.3.2 libxml2 2.7.7-1 Test script: --- xml(""); $xmlreader->next(); $xmlreader2 = clone $xmlreader; $xmlreader2->next(); Actual result: -- Program received signal SIGSEGV, Segmentation fault in xmlTextReaderNext__internal_alias () -- Edit bug report at http://bugs.php.net/bug.php?id=51936&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51936&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51936&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=51936&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=51936&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51936&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51936&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51936&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51936&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51936&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51936&r=support Expected behavior: http://bugs.php.net/fix.php?id=51936&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51936&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51936&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51936&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51936&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=51936&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51936&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51936&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51936&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51936&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51936&r=mysqlcfg
#45456 [NEW]: _WIN32_WINNT redefined
From: Keisial at gmail dot com Operating system: Windows PHP version: 5.3CVS-2008-07-08 (snap) PHP Bug Type: Compile Warning Bug description: _WIN32_WINNT redefined Description: _WIN32_WINNT macro can be defiend before including windows headers to specify the minimun windows nt version to support (usually to unhide prototypes not available on previous versions). It is used like this on TSRM/readdir.h before including windows.h So far, so good. However, due to include order, windows.h is already included before, defining _WIN32_WINNT by itself and thus it doesn't do anything. So the define should either be removed (if it's not needed), or moved before. Reproduce code: --- _WIN32_WINNT is defined on TSRM/readdir.h:10: main/php.h:405->TSRM/tsrm_virtual_cwd.h:55->readdir.h windows.h was already included by: main/php.h:34->Zend/zend.h:53->zend_config.w32.h:39 (in fact winsock2.h at zend_config.w32.h:38 is already including it before the real one) -- Edit bug report at http://bugs.php.net/?id=45456&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45456&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45456&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45456&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45456&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45456&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45456&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45456&r=needscript Try newer version:http://bugs.php.net/fix.php?id=45456&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45456&r=support Expected behavior:http://bugs.php.net/fix.php?id=45456&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45456&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45456&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45456&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45456&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45456&r=dst IIS Stability:http://bugs.php.net/fix.php?id=45456&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45456&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45456&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45456&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45456&r=mysqlcfg
#45694 [NEW]: libxml doesn't build with libiconv
From: Keisial at gmail dot com Operating system: Windows PHP version: 5.2CVS-2008-08-03 (snap) PHP Bug Type: Compile Failure Bug description: libxml doesn't build with libiconv Description: libxml2 can't be built on windows with libraries from http://pecl2.php.net/downloads/php-windows-builds/ as it is searching for iconv_a.lib;iconv.lib, while libiconv_a.lib;libiconv.lib names are used. Please backport to PHP_5_2 branch the patch used on head and 5.3: http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/config.w32?r1=1.8.6.1&r2=1.8.6.2&pathrev=PHP_5_3 Config for iconv should also be backported, although in this case it's less critical, as library detection is commented. http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/config.w32?r1=1.6&r2=1.7 -- Edit bug report at http://bugs.php.net/?id=45694&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45694&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45694&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45694&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45694&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45694&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45694&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45694&r=needscript Try newer version:http://bugs.php.net/fix.php?id=45694&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45694&r=support Expected behavior:http://bugs.php.net/fix.php?id=45694&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45694&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45694&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45694&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45694&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45694&r=dst IIS Stability:http://bugs.php.net/fix.php?id=45694&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45694&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45694&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45694&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45694&r=mysqlcfg
#45698 [NEW]: Doesn't compile with VC6 - Include problem
From: Keisial at gmail dot com Operating system: Windows - VC6 PHP version: 5.3CVS-2008-08-03 (snap) PHP Bug Type: Compile Failure Bug description: Doesn't compile with VC6 - Include problem Description: 5.3 doesn't compile with VC6. When including winsock2.h at zend_config.w32.h it includes windows.h which in turn includes winsock stuff before a SOCKET is defined. Compilation fails with error on mswsock.h (This doesn't happen including only those two headers, so some defines are modifying the defualt behaviour) Changing the order to include windows.h before winsock2.h fixes it: --- zend_config.w32.h 2008-07-17 20:33:46.0 +0200 +++ zend_config.w32.h 2008-08-03 14:19:56.59375 +0200 @@ -35,8 +35,8 @@ #ifndef ZEND_INCLUDE_FULL_WINDOWS_HEADERS #define WIN32_LEAN_AND_MEAN #endif -#include #include +#include #include -- Edit bug report at http://bugs.php.net/?id=45698&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45698&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45698&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45698&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45698&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45698&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45698&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45698&r=needscript Try newer version:http://bugs.php.net/fix.php?id=45698&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45698&r=support Expected behavior:http://bugs.php.net/fix.php?id=45698&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45698&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45698&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45698&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45698&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45698&r=dst IIS Stability:http://bugs.php.net/fix.php?id=45698&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45698&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45698&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45698&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45698&r=mysqlcfg
#45694 [Fbk->Opn]: libxml doesn't build with libiconv
ID: 45694 User updated by: Keisial at gmail dot com Reported By: Keisial at gmail dot com -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: Windows PHP Version: 5.2CVS-2008-08-03 (snap) Assigned To: pajoye New Comment: This bug is filed against PHP 5.2. I confirm it is fixed on PHP 5.3 (after gettting it to compile, bug #45698), as i already found when reporting, but other extensions don't work on it. That's why i'm using 5.2 Any reason for not backporting these patches to the 5.2 branch? Previous Comments: [2008-08-03 00:44:55] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.3-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.3-win32-installer-latest.msi [2008-08-03 00:32:40] Keisial at gmail dot com Description: libxml2 can't be built on windows with libraries from http://pecl2.php.net/downloads/php-windows-builds/ as it is searching for iconv_a.lib;iconv.lib, while libiconv_a.lib;libiconv.lib names are used. Please backport to PHP_5_2 branch the patch used on head and 5.3: http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/config.w32?r1=1.8.6.1&r2=1.8.6.2&pathrev=PHP_5_3 Config for iconv should also be backported, although in this case it's less critical, as library detection is commented. http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/config.w32?r1=1.6&r2=1.7 -- Edit this bug report at http://bugs.php.net/?id=45694&edit=1
[PHP-BUG] Bug #60403 [NEW]: $_SERVER in embedded server under Windows is empty
From: Operating system: Windows Vista PHP version: 5.4SVN-2011-11-28 (snap) Package: Built-in web server Bug Type: Bug Bug description:$_SERVER in embedded server under Windows is empty Description: $_SERVER in embedded server under Windows is empty A simple index.php string(12) "/tmp/PHP_5_4" ["REMOTE_ADDR"]=> string(9) "127.0.0.1" ["REMOTE_PORT"]=> string(5) "58298" ["SERVER_SOFTWARE"]=> string(35) "PHP 5.4.0RC3-dev Development Server" ["SERVER_PROTOCOL"]=> string(8) "HTTP/1.1" ["SERVER_PORT"]=> string(4) "8080" ["REQUEST_URI"]=> string(1) "/" ["REQUEST_METHOD"]=> string(3) "GET" ["SCRIPT_NAME"]=> string(10) "/index.php" ["SCRIPT_FILENAME"]=> string(22) "/tmp/PHP_5_4/index.php" ["PHP_SELF"]=> string(10) "/index.php" ["HTTP_USER_AGENT"]=> string(23) "Wget/1.13.4 (linux-gnu)" ["HTTP_ACCEPT"]=> string(3) "*/*" ["HTTP_HOST"]=> string(14) "127.0.0.1:8080" ["HTTP_CONNECTION"]=> string(10) "Keep-Alive" ["REQUEST_TIME"]=> float(1322485593.4282) ["argv"]=> array(0) { } ["argc"]=> int(0) } Tested Windows version is the nightly php-5.4-nts-windows-vc9-x86-r319967 Tested Linux version is a checkout of r320088, branch PHP_5_4 (and it wasn't fixed on those revisions 121, they were to a different subtree: phpdoc, pecl, or pear) -- Edit bug report at https://bugs.php.net/bug.php?id=60403&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60403&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60403&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60403&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60403&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60403&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60403&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60403&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60403&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60403&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60403&r=support Expected behavior: https://bugs.php.net/fix.php?id=60403&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60403&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60403&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60403&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60403&r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=60403&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60403&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60403&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60403&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60403&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60403&r=mysqlcfg