Bug #61044 [Com]: invalid PHP_BINDIR
Edit report at https://bugs.php.net/bug.php?id=61044edit=1 ID: 61044 Comment by: rk at srsbiz dot pl Reported by:bugzilla33 at gmail dot com Summary:invalid PHP_BINDIR Status: Assigned Type: Bug Package:Unknown/Other Function Operating System: win 7 PHP Version:5.4.0RC7 Assigned To:pajoye Block user comment: N Private report: N New Comment: It is not only Windows problem: root@core /# /root/src/php5.4-201202102030/sapi/cli/php -r 'echo PHP_BINDIR . PHP_EOL;'; /usr/local/php54/bin root@core /# It always point to directory provided in --prefix at compile time. Previous Comments: [2012-02-10 22:19:06] johan...@php.net This is defined while compiling PHP (prefix-option from compile.js), the way to fix this would be to do some run-time detection, not sure whether there's a proper way. [2012-02-10 18:05:38] anon at anon dot anon He's right. This seems to be totally broken on Windows: C:\server\php\php.exe --version PHP 5.3.2 (cli) (built: Mar 3 2010 19:40:13) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans C:\server\php\php.exe -r echo PHP_BINDIR; C:\php5 [2012-02-10 13:42:02] bugzilla33 at gmail dot com Description: Install php in folder c:\Php5 As module apache Test script: --- ?php print(PHP_BINDIR); phpinfo(); ? Expected result: c:\Php5 Actual result: -- c:\Php -- Edit this bug report at https://bugs.php.net/bug.php?id=61044edit=1
Bug #60704 [PATCH]: unlink() bug with some files path
Edit report at https://bugs.php.net/bug.php?id=60704edit=1 ID: 60704 Patch added by: s...@php.net Reported by:dean at dacunha dot net Summary:unlink() bug with some files path Status: Assigned Type: Bug Package:Filesystem function related Operating System: Linux 3.0.0-14-generic #23-Ubunt PHP Version:5.3.10 Assigned To:shm Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: themostevilpatchever.patch Revision: 1328949124 URL: https://bugs.php.net/patch-display.php?bug=60704patch=themostevilpatchever.patchrevision=1328949124 Previous Comments: [2012-02-06 14:55:40] dean at dacunha dot net Hi, I've just tested with php 5.3.10, the bug is still here. Do you still need me to test with version 5.3.9 ? Here is the proof: root@djavanubu:/root# root@djavanubu:/root# cat b.php #!/usr/local/bin/php ?php $Target=/mnt/M://BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3; $Link=/mnt/M:/NEWBASE/BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.1.2.mp3; link($Target,$Link); unlink($Target); ? root@djavanubu:/root# root@djavanubu:/root# /usr/local/bin/php -v PHP 5.3.10 (cli) (built: Jan 31 2012 22:48:16) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies root@djavanubu:/root# root@djavanubu:/root# root@djavanubu:/root# ./b.php Warning: unlink(BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3): No such file or directory in /root/b.php on line 7 root@djavanubu:/root# root@djavanubu:/root# rm /mnt/M:/NEWBASE/BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.1.2.mp3 root@djavanubu:/root# root@djavanubu:/root# strace ./b.php [...] lstat(/mnt/M://BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3, {st_mode=S_IFREG|0755, st_size=1247232, ...}) = 0 lstat(/mnt/M://BRASIL/Carlinhos Brown, {st_mode=S_IFDIR|0755, st_size=40960, ...}) = 0 lstat(/mnt/M://BRASIL, {st_mode=S_IFDIR|0755, st_size=81920, ...}) = 0 link(/mnt/M://BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3, /mnt/M:/NEWBASE/BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.1.2.mp3) = 0 unlink(BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3) = -1 ENOENT (No such file or directory) write(1, \nWarning: unlink(BRASIL/Carlinho..., 135 Warning: unlink(BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3): No such file or directory in /root/b.php on line 7 ) = 135 [...] [2012-01-27 05:42:04] carloschilazo at gmail dot com Does this happen also in 5.3.9 ? Please confirm so I can look into it Thanks [2012-01-10 19:58:07] dean at dacunha dot net Description: unlink() function truncates the file path name argument in some cases. This bug appears also with the rename() function in the same cases. The given source code use link() to duplicate a file, then unlink() to remove the source file. link() function works and unlink() bugs. Test script: --- #!/usr/local/bin/php ?php $Target=/mnt/M://BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3; $Link=/mnt/M:/NEWBASE/BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.1.2.mp3; link($Target,$Link); unlink($Target); ? Expected result: unlink() should remove the /mnt/M://BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3 file Actual result: -- root@djavanubu:/# ./b.php Warning: unlink(BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3): No such file or directory in /b.php on line 8 ### below trace shows the truncated file path given to unlink() syscall: [...] lstat(/mnt/M://BRASIL, {st_mode=S_IFDIR|0755, st_size=69632, ...}) = 0 link(/mnt/M://BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3, /mnt/M:/NEWBASE/BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.1.2.mp3) = 0 unlink(BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3) = -1 ENOENT (No such file or directory) write(1, \nWarning: unlink(BRASIL/Carlinho..., 130 Warning: unlink(BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3): No such file or directory in /b.php on line 8 ) = 130 [...] -- Edit this bug report at https://bugs.php.net/bug.php?id=60704edit=1
Bug #60704 [Com]: unlink() bug with some files path
Edit report at https://bugs.php.net/bug.php?id=60704edit=1 ID: 60704 Comment by: s...@php.net Reported by:dean at dacunha dot net Summary:unlink() bug with some files path Status: Assigned Type: Bug Package:Filesystem function related Operating System: Linux 3.0.0-14-generic #23-Ubunt PHP Version:5.3.10 Assigned To:shm Block user comment: N Private report: N New Comment: Attached patch should fix this issue. Will commit if after a review. Previous Comments: [2012-02-11 08:32:04] s...@php.net The following patch has been added/updated: Patch Name: themostevilpatchever.patch Revision: 1328949124 URL: https://bugs.php.net/patch-display.php?bug=60704patch=themostevilpatchever.patchrevision=1328949124 [2012-02-06 14:55:40] dean at dacunha dot net Hi, I've just tested with php 5.3.10, the bug is still here. Do you still need me to test with version 5.3.9 ? Here is the proof: root@djavanubu:/root# root@djavanubu:/root# cat b.php #!/usr/local/bin/php ?php $Target=/mnt/M://BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3; $Link=/mnt/M:/NEWBASE/BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.1.2.mp3; link($Target,$Link); unlink($Target); ? root@djavanubu:/root# root@djavanubu:/root# /usr/local/bin/php -v PHP 5.3.10 (cli) (built: Jan 31 2012 22:48:16) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies root@djavanubu:/root# root@djavanubu:/root# root@djavanubu:/root# ./b.php Warning: unlink(BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3): No such file or directory in /root/b.php on line 7 root@djavanubu:/root# root@djavanubu:/root# rm /mnt/M:/NEWBASE/BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.1.2.mp3 root@djavanubu:/root# root@djavanubu:/root# strace ./b.php [...] lstat(/mnt/M://BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3, {st_mode=S_IFREG|0755, st_size=1247232, ...}) = 0 lstat(/mnt/M://BRASIL/Carlinhos Brown, {st_mode=S_IFDIR|0755, st_size=40960, ...}) = 0 lstat(/mnt/M://BRASIL, {st_mode=S_IFDIR|0755, st_size=81920, ...}) = 0 link(/mnt/M://BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3, /mnt/M:/NEWBASE/BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.1.2.mp3) = 0 unlink(BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3) = -1 ENOENT (No such file or directory) write(1, \nWarning: unlink(BRASIL/Carlinho..., 135 Warning: unlink(BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3): No such file or directory in /root/b.php on line 7 ) = 135 [...] [2012-01-27 05:42:04] carloschilazo at gmail dot com Does this happen also in 5.3.9 ? Please confirm so I can look into it Thanks [2012-01-10 19:58:07] dean at dacunha dot net Description: unlink() function truncates the file path name argument in some cases. This bug appears also with the rename() function in the same cases. The given source code use link() to duplicate a file, then unlink() to remove the source file. link() function works and unlink() bugs. Test script: --- #!/usr/local/bin/php ?php $Target=/mnt/M://BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3; $Link=/mnt/M:/NEWBASE/BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.1.2.mp3; link($Target,$Link); unlink($Target); ? Expected result: unlink() should remove the /mnt/M://BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3 file Actual result: -- root@djavanubu:/# ./b.php Warning: unlink(BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3): No such file or directory in /b.php on line 8 ### below trace shows the truncated file path given to unlink() syscall: [...] lstat(/mnt/M://BRASIL, {st_mode=S_IFDIR|0755, st_size=69632, ...}) = 0 link(/mnt/M://BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3, /mnt/M:/NEWBASE/BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.1.2.mp3) = 0 unlink(BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3) = -1 ENOENT (No such file or directory) write(1, \nWarning: unlink(BRASIL/Carlinho..., 130 Warning: unlink(BRASIL/Carlinhos Brown/Alfagamabetizado - Angel's Robot List.mp3): No such file or directory in /b.php on line 8 ) = 130 [...] -- Edit this bug report at https://bugs.php.net/bug.php?id=60704edit=1
[PHP-BUG] Bug #61054 [NEW]: preg_match () matching end of line in text file of windows style make a mistake
From: Operating system: Windows XP,Ubuntu 11.10 PHP version: 5.3.10 Package: *Regular Expressions Bug Type: Bug Bug description:preg_match () matching end of line in text file of windows style make a mistake Description: function:preg_ match() when processing text file of windows style like blow example,it get wrong the $matches[2] behind follow a character CR, Create a text file(test.txt) in windowsï¼Content: hello guo hi jason test Test script: --- ?php $file = fopen(test.txt,r); while(!feof($file)){ $line = fgets($file); preg_match('/^(.+) (.+)$/',$line,$matches); print_r($matches); echo $line; echo $matches[1].$matches[2]; } fclose($file); ? Expected result: Array ( [0] = hello guo [1] = hello [2] = guo ) hello guo helloguo Array ( [0] = hi jason [1] = hi [2] = jason ) hi jason hijason Array ( ) test Actual result: -- hello guo Array ( [0] = hello guo [1] = hello [2] = guo ) hi jason Array ( [0] = hi jason [1] = hi [2] = jason ) testArray ( ) test -- Edit bug report at https://bugs.php.net/bug.php?id=61054edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61054r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61054r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61054r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61054r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61054r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61054r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61054r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61054r=needscript Try newer version: https://bugs.php.net/fix.php?id=61054r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61054r=support Expected behavior: https://bugs.php.net/fix.php?id=61054r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61054r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61054r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61054r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61054r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=61054r=dst IIS Stability: https://bugs.php.net/fix.php?id=61054r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61054r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61054r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61054r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61054r=mysqlcfg
Bug #61054 [Opn]: preg_match () matching end of line in text file of windows style make a mistake
Edit report at https://bugs.php.net/bug.php?id=61054edit=1 ID: 61054 User updated by:gzpan123 at gmail dot com Reported by:gzpan123 at gmail dot com Summary:preg_match () matching end of line in text file of windows style make a mistake Status: Open Type: Bug Package:*Regular Expressions -Operating System: Windows XP,Ubuntu 11.10 +Operating System: Windows,linux all PHP Version:5.3.10 Block user comment: N Private report: N New Comment: windows,linux all meet this bug Previous Comments: [2012-02-11 09:42:45] gzpan123 at gmail dot com Description: function:preg_ match() when processing text file of windows style like blow example,it get wrong the $matches[2] behind follow a character CR, Create a text file(test.txt) in windowsï¼Content: hello guo hi jason test Test script: --- ?php $file = fopen(test.txt,r); while(!feof($file)){ $line = fgets($file); preg_match('/^(.+) (.+)$/',$line,$matches); print_r($matches); echo $line; echo $matches[1].$matches[2]; } fclose($file); ? Expected result: Array ( [0] = hello guo [1] = hello [2] = guo ) hello guo helloguo Array ( [0] = hi jason [1] = hi [2] = jason ) hi jason hijason Array ( ) test Actual result: -- hello guo Array ( [0] = hello guo [1] = hello [2] = guo ) hi jason Array ( [0] = hi jason [1] = hi [2] = jason ) testArray ( ) test -- Edit this bug report at https://bugs.php.net/bug.php?id=61054edit=1
Bug #61044 [Asn]: invalid PHP_BINDIR
Edit report at https://bugs.php.net/bug.php?id=61044edit=1 ID: 61044 Updated by: johan...@php.net Reported by:bugzilla33 at gmail dot com Summary:invalid PHP_BINDIR Status: Assigned Type: Bug Package:Unknown/Other Function Operating System: win 7 PHP Version:5.4.0RC7 Assigned To:pajoye Block user comment: N Private report: N New Comment: rk, that is correct, but on non-Windows you usually don't relocate the installation. Either you install using your package manager or by compiling yourself with a proper prefix, everything else is unsupported. On Windows we have the installer (which defaults to c:\program files\php (system dependent)) and the zip where people almost certainly won't use c:\php Previous Comments: [2012-02-11 08:30:04] rk at srsbiz dot pl It is not only Windows problem: root@core /# /root/src/php5.4-201202102030/sapi/cli/php -r 'echo PHP_BINDIR . PHP_EOL;'; /usr/local/php54/bin root@core /# It always point to directory provided in --prefix at compile time. [2012-02-10 22:19:06] johan...@php.net This is defined while compiling PHP (prefix-option from compile.js), the way to fix this would be to do some run-time detection, not sure whether there's a proper way. [2012-02-10 18:05:38] anon at anon dot anon He's right. This seems to be totally broken on Windows: C:\server\php\php.exe --version PHP 5.3.2 (cli) (built: Mar 3 2010 19:40:13) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans C:\server\php\php.exe -r echo PHP_BINDIR; C:\php5 [2012-02-10 13:42:02] bugzilla33 at gmail dot com Description: Install php in folder c:\Php5 As module apache Test script: --- ?php print(PHP_BINDIR); phpinfo(); ? Expected result: c:\Php5 Actual result: -- c:\Php -- Edit this bug report at https://bugs.php.net/bug.php?id=61044edit=1
Req #61053 [Opn-Nab]: mysql_fetch_field should return type = enum and enum options
Edit report at https://bugs.php.net/bug.php?id=61053edit=1 ID: 61053 Updated by: johan...@php.net Reported by:zzatkin at gmail dot com Summary:mysql_fetch_field should return type = enum and enum options -Status: Open +Status: Not a bug Type: Feature/Change Request Package:MySQL related Operating System: Linux PHP Version:5.3.10 Block user comment: N Private report: N New Comment: We report the information we get from the MySQL serer. To change this the MySQL Server has to report a different type. Report there. Previous Comments: [2012-02-11 01:49:06] zzatkin at gmail dot com Description: mysql_fetch_field returns type = string for enum fields in the MySQL database, but should instead return enum and an array of possible values for convenience. Test script: --- ?php $connect = mysql_connect('localhost','user','password'); mysql_select_db('some_database',$connect); $query = mysql_query('SELECT * FROM table'); var_dump(mysql_fetch_field($query,1)); ? Expected result: array(12) { ... [type]= string(6) string ... } Actual result: -- array(12) { ... [type]= array(3) { string(1) a [1]= string(1) b [2]= string(1) c } ... } -- Edit this bug report at https://bugs.php.net/bug.php?id=61053edit=1
[PHP-BUG] Bug #61056 [NEW]: NuSOAP problems with max execution time
From: Operating system: Windows NT 6.1 x86_64 PHP version: 5.4.0RC7 Package: Built-in web server Bug Type: Bug Bug description:NuSOAP problems with max execution time Description: I've got problems with NuSOAP library and PHP built-in server. Web server works great, but when I'm creating NuSOAP client object and do a request, PHP parser doesn't respoding and finally returns errors about max-execution time. -- Edit bug report at https://bugs.php.net/bug.php?id=61056edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61056r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61056r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61056r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61056r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61056r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61056r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61056r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61056r=needscript Try newer version: https://bugs.php.net/fix.php?id=61056r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61056r=support Expected behavior: https://bugs.php.net/fix.php?id=61056r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61056r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61056r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61056r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61056r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=61056r=dst IIS Stability: https://bugs.php.net/fix.php?id=61056r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61056r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61056r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61056r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61056r=mysqlcfg
Bug #46378 [Com]: IIS7 FastCGI - upload_tmp_dir not working correctly
Edit report at https://bugs.php.net/bug.php?id=46378edit=1 ID: 46378 Comment by: julientld at free dot fr Reported by:tomas dot hlavacek at telekomaustria dot cz Summary:IIS7 FastCGI - upload_tmp_dir not working correctly Status: Not a bug Type: Bug Package:*Configuration Issues Operating System: Windows Server 2008 PHP Version:5.2.6 Block user comment: N Private report: N New Comment: Hi Pierre Joye, I have the same problem with an IIS 6 server with PHP 5.3.10 and FastCGI 1.5. I want to use a custom temp directory for php file uploads. If I set upload_tmp_dir=D:\Temp\ and set read and write acls for the user IUSR on the Temp directory, upload fails. As said by tomas, if we want the upload to function, the acls must also be set on the parent directory (D:\). Obviously, I do not want to give IUSR write acls to the whole partition !! For the moment, I have created a sub-directory for php uploads (D:\Temp\php\). I have given IUSR acls on \Temp and \php directories (not D:\) and uploads run fine now. But I would like to understand this phenomenon. If PHP can't write in a directory if the parent directory does not have also same acls, it is a specific behavior related to PHP or it is a Windows problem ? For me it is a bug. It has no sense to be forced to give acls also to the parent directory... Thanks for your clarifications ;) Julien Previous Comments: [2008-10-24 13:04:27] paj...@php.net Not a bug bogus [2008-10-24 12:51:07] tomas dot hlavacek at telekomaustria dot cz Finally, I found the problem. Listing on E: must be allowed for IIS_IUSRS: E:\icacls e: e: NT AUTHORITY\SYSTEM:(OI)(CI)(F) BUILTIN\Administrators:(OI)(CI)(F) BUILTIN\IIS_IUSRS:(S,RD) [2008-10-24 12:20:01] tomas dot hlavacek at telekomaustria dot cz Description: Hello, in php.ini I have set upload_tmp_dir directive to e:\php5-uploadtemp. phpinfo() confirms, the directive is set to this value. But PHP is using C:\Windows\Temp for uploading files instead. This is confirmed by printing $_FILES['uploadedfile']['tmp_name'] in script. Server configuration: - Windows Server 2008 IIS 7 PHP 5.2.6 as FastCGI module with fastcgi.impersonate = 1 phpcgi.exe processes are running with Network Service privileges (same as w3wp.exe) and are impersonating to IUSR_xxx accounts (each customer has one). IUSR_xxx accounts are members of IIS_IUSRS group. Rights on folders: C:\icacls c:\windows\temp c:\windows\temp CREATOR OWNER:(OI)(CI)(IO)(F) NT AUTHORITY\SYSTEM:(OI)(CI)(F) BUILTIN\Administrators:(OI)(CI)(F) BUILTIN\Users:(CI)(S,WD,AD,X) BUILTIN\IIS_IUSRS:(OI)(CI)(M) C:\icacls e:\php5-uploadtemp e:\php5-uploadtemp BUILTIN\IIS_IUSRS:(OI)(CI)(M) BUILTIN\Administrators:(I)(OI)(CI)(F) NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F) Under Windows Server 2003, IIS6, PHP5 as CGI, with same configuration it was working. The rights should be ok, because I have also set session.save_path = e:\php5-sessiondata with same rights as on e:\php5-uploadtemp and this is working correctly. Reproduce code: --- ? ... print $_FILES['uploadedfile']['tmp_name']; ... ? Expected result: e:\php5-uploadtemp\php214E.tmp Actual result: -- C:\Windows\Temp\php214E.tmp -- Edit this bug report at https://bugs.php.net/bug.php?id=46378edit=1
[PHP-BUG] Bug #61057 [NEW]: PHP 5.3.10 fails to cross compile when FPM is enabled (ptrace)
From: Operating system: Linux PHP version: 5.3.10 Package: Compile Failure Bug Type: Bug Bug description:PHP 5.3.10 fails to cross compile when FPM is enabled (ptrace) Description: I'm trying to cross compile php 5.3.10 (build x86, host x86, target x86) but when i enable FPM i get the following error checking whether ptrace works... configure: error: can not run test program while cross compiling I know that FPM is experimental, btw the bug is related to configure script and not to FPM itself. Wihtout fpm, enabling only cgi and cli works fine Here more output, starting from SAPI modules Configuring SAPI modules checking for AOLserver support... no checking for Apache 1.x module support via DSO through APXS... no checking for Apache 1.x module support... no checking whether to enable Apache charset compatibility option... no checking for Apache 2.0 filter-module support via DSO through APXS... no checking for Apache 2.0 handler-module support via DSO through APXS... no checking for Apache 1.x (hooks) module support via DSO through APXS... no checking for Apache 1.x (hooks) module support... no checking whether to enable Apache charset compatibility option... no checking for Caudium support... no checking for CLI build... yes checking for Continuity support... no checking for embedded SAPI library support... no checking for FPM build... yes checking for setenv... yes checking for clearenv... yes checking for setproctitle... no checking for library containing socket... none required checking for library containing inet_addr... none required checking for errno.h... yes checking for fcntl.h... yes checking for stdio.h... yes checking for stdlib.h... yes checking for unistd.h... yes checking for sys/uio.h... yes checking for sys/select.h... yes checking for sys/socket.h... yes checking for sys/time.h... yes checking for arpa/inet.h... yes checking for netinet/in.h... yes checking for prctl... yes checking for clock_gettime... yes checking for ptrace... yes checking whether ptrace works... configure: error: can not run test program while cross compiling make[1]: *** [/home/daniele/sviluppo/clew.js/br-rootfs/build/php- 5.3.10/.stamp_configured] Errore 1 make: *** [all] Errore 2 Expected result: it should go ahead Actual result: -- checking whether ptrace works... configure: error: can not run test program while cross compiling -- Edit bug report at https://bugs.php.net/bug.php?id=61057edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61057r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61057r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61057r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61057r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61057r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61057r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61057r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61057r=needscript Try newer version: https://bugs.php.net/fix.php?id=61057r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61057r=support Expected behavior: https://bugs.php.net/fix.php?id=61057r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61057r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61057r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61057r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61057r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=61057r=dst IIS Stability: https://bugs.php.net/fix.php?id=61057r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61057r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61057r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61057r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61057r=mysqlcfg
Bug #45191 [Com]: error_log ignores date.timezone php.ini val when setting logging timestamps
Edit report at https://bugs.php.net/bug.php?id=45191edit=1 ID: 45191 Comment by: christopher at specialtyproduce dot com Reported by:info at organicdata dot co dot za Summary:error_log ignores date.timezone php.ini val when setting logging timestamps Status: Closed Type: Bug Package:Date/time related Operating System: Centos el5 PHP Version:5.2CVS-2008-06-05 (snap) Assigned To:derick Block user comment: N Private report: N New Comment: It seems this bug may have reappeared between 5.3.8 and 5.3.9? I have two MS 2008 R2 VMs, built from the same starting images. Both running IIS 7.5, system timezone is set for Pacific Standard Time and the TZ environment variable is not set. Machine A : PHP 5.3.8 (cli) (built: Aug 23 2011 12:14:39) (Originally configured with PHP 5.2.17 and subsequently upgraded to 5.3.8) Machine B : PHP 5.3.9 (cli) (built: Jan 10 2012 16:33:06) Their php.ini files are virtually identical, with: log_errors = On date.timezone=America/Los_Angeles error_log=C:\PHP\logs\php53_errors.log I ran a version of the mycode.php from the original bug report on both machines. mycode.php -- FIRSTBADCONSTANT; date_default_timezone_set(UTC); SOMEBADCONSTANT; date_default_timezone_set(America/Los_Angeles); ANOTHERBADCONSTANT; Machine A php53_errors.log -- [11-Feb-2012 09:39:18] PHP Notice: Use of undefined constant FIRSTBADCONSTANT - assumed 'FIRSTBADCONSTANT' in C:\Temp\mycode.php on line 2 [11-Feb-2012 17:39:18] PHP Notice: Use of undefined constant SOMEBADCONSTANT - assumed 'SOMEBADCONSTANT' in C:\Temp\mycode.php on line 4 [11-Feb-2012 09:39:18] PHP Notice: Use of undefined constant ANOTHERBADCONSTANT - assumed 'ANOTHERBADCONSTANT' in C:\Temp\mycode.php on line 6 Machine B php53_errors.log -- [11-Feb-2012 18:06:52 UTC] PHP Notice: Use of undefined constant FIRSTBADCONSTANT - assumed 'FIRSTBADCONSTANT' in C:\Temp\mycode.php on line 2 [11-Feb-2012 18:06:52 UTC] PHP Notice: Use of undefined constant SOMEBADCONSTANT - assumed 'SOMEBADCONSTANT' in C:\Temp\mycode.php on line 4 [11-Feb-2012 18:06:52 UTC] PHP Notice: Use of undefined constant ANOTHERBADCONSTANT - assumed 'ANOTHERBADCONSTANT' in C:\Temp\mycode.php on line 6 The 5.3.9 error reporting seems locked in UTC. Previous Comments: [2012-02-09 23:21:35] daniel dot caillibaud at sesamath dot net In an openvz VM, with php-fpm 5.3.10 (debian squeeze OS), with a sytem date configured on UTC+1 (on physical host, but `date` in VM also show UTC+1), in php.ini I've a date.timezone = Europe/Paris but php error_log date is displayed as UTC [09-Feb-2012 23:15:08 UTC] PHP Notice: ... while all others logs are in the system timezone, e.g nginx [10/Feb/2012:00:16:46 +0100] ... and syslog as well is UTC+1 (but doesn't show it on each log line). Hope it helps... [2012-01-30 09:20:08] wadkar at gmail dot com This bug may still be a problem for someone, here are the details : # php -v PHP 5.3.8 (cli) (built: Dec 1 2011 12:23:50) The problem is with the OS this time= CentOS 5+OpenVZ with IUS repo. The host machine (with the OpenVZ kernel) has no problems # uname -a Linux vz-node2 2.6.18-274.el5.028stab093.2xen #1 SMP Tue Aug 23 16:50:42 MSD 2011 x86_64 x86_64 x86_64 GNU/Linux # echo '' /tmp/error.log php -dlog_errors=On -derror_log=/tmp/error.log -r 'error_reporting(-1); SOMEBADCONSTANT;' cat /tmp/error.log date [30-Jan-2012 14:38:56] PHP Notice: Use of undefined constant SOMEBADCONSTANT - assumed 'SOMEBADCONSTANT' in Command line code on line 1 Mon Jan 30 14:38:56 IST 2012 The same code snippet, however, when run on a VM gives # uname -a Linux container1 2.6.18-274.el5.028stab093.2xen #1 SMP Tue Aug 23 16:50:42 MSD 2011 x86_64 x86_64 x86_64 GNU/Linux # echo '' /tmp/error.log php -dlog_errors=On -derror_log=/tmp/error.log -r 'error_reporting(-1); SOMEBADCONSTANT;' cat /tmp/error.log date [30-Jan-2012 09:10:05 UTC] PHP Notice: Use of undefined constant SOMEBADCONSTANT - assumed 'SOMEBADCONSTANT' in Command line code on line 1 Mon Jan 30 14:40:05 IST 2012 The internal TZ settings are respected though: # php -i | grep timezone Default timezone = Asia/Calcutta date.timezone = Asia/Calcutta = Asia/Calcutta # php -r 'echo date_default_timezone_get(), PHP_EOL; $d = new DateTime(); echo $d-format(DATE_RFC822), PHP_EOL;' date Asia/Calcutta Mon, 30 Jan 12 14:49:17 +0530 Mon Jan 30 14:49:17 IST 2012 I am not sure if this is the bug with PHP or with virtualized environment. I just wanted to comment/report my observation. I was worried for a moment that my CLI scripts would fail to respect the TZ settings, but that is not the case. Thanks -Sudarshan Wadkar
Bug #46851 [Com]: Strict standards: Declaration of ... should be compatible with that of ...
Edit report at https://bugs.php.net/bug.php?id=46851edit=1 ID: 46851 Comment by: ldr at ldrutledge dot com Reported by:oliver at teqneers dot de Summary:Strict standards: Declaration of ... should be compatible with that of ... Status: Not a bug Type: Bug Package:Scripting Engine problem Operating System: OpenSuSE 11.0 PHP Version:5.2.8 Block user comment: N Private report: N New Comment: I understand the discussion above. The warning is because some possible method calls may fail due to incomplete knowledge at compile-time. However this causes the warning: class A { public function foo(StdClass $a) {;}} class B extends A { public function foo($a) {;}} as does this: class A { public function foo($a) {;}} class B extends A { public function foo(StdClass $a) {;}} In the case of function bar(A $a, A $b){$a-foo($b);} The second form can fail at run-time, but the first can not and should not trigger the error. Previous Comments: [2012-02-09 06:10:45] eyal dot t at zend dot com was wondering why the order of the class declarations affects whether a notice is given, that is while abstract class B extends A { public static function foo($str){ echo $str; } } abstract class A { public static function foo(){ echo 'bar'; } } causes the strict standard notice to show, the reversed order does not: abstract class A { public static function foo(){ echo 'bar'; } } abstract class B extends A { public static function foo($str){ echo $str; } } [2011-08-03 21:32:13] josh dot x dot guthrie at gmail dot com This is not a bug in PHP, this is a flaw in your understanding of PHP and how it handles method overloading. If your child class inherits from the parent class and you override one of the parent class's methods, you must still pass it the same number of parameters. Ex: abstract class B extends A { public static function foo($str){ echo $str; } } abstract class A { public static function foo(){ echo 'bar'; } } What you will notice is that class A has a method foo which takes no parameters. We then extend A with class B which overrides the method foo and gives it a parameter $str. This method overload is causing the strict error. If you want a fix, make the parameter optional and it should remove the strict warning. This fix has been tested with the __autoload function for class loading. [2010-11-09 02:49:37] gabriel dot delepine at gmail dot com I have exactly the same problem. Autoload() is called for the subclass before the class. A error E_STRICT is throw. I use PHP 5.3.2-1 on Ubuntu Serveur 10.04 It append for me when I use the design pattern sigleton and when I call the function getInstance() of the subclass. This function have to return an instance of the subclass but the error E_STRICT is throw. I check the change log of PHP 5.3.3-1 but I seen nothing about this. [2010-07-14 21:46:58] demaio at vanylla dot it I sthis a PHP bug then? Is this bug going to be fixed? [2010-07-11 16:45:07] col...@php.net What change? The error is in both cases here, only that in one case, it is not displayed because at the time it is emitted, error_reporting does not contain E_STRICT (.e. php.ini). It's not about ensuring class loading order. It is simply that if you define classes in a wrong order, or if you use autoload, classes loading will get postponed at runtime, hence errors will be triggered at runtime i.e. after the error_reporting call. 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=46851 -- Edit this bug report at https://bugs.php.net/bug.php?id=46851edit=1
[PHP-BUG] Bug #61058 [NEW]: array_fill leaks if start index is PHP_INT_MAX
From: nikic Operating system: PHP version: Irrelevant Package: *General Issues Bug Type: Bug Bug description:array_fill leaks if start index is PHP_INT_MAX Description: ?php array_fill(PHP_INT_MAX, 2, '*') Leaks: [Sat Feb 11 20:47:35 2012] Script: 'reproduceCode4_memoryLeak.php' /home/nikic/dev/php-src-git/Zend/zend_vm_execute.h(2371) : Freeing 0xB786F010 (20 bytes), script=reproduceCode4_memoryLeak.php [Sat Feb 11 20:47:35 2012] Script: 'reproduceCode4_memoryLeak.php' /home/nikic/dev/php-src-git/Zend/zend_vm_execute.h(2374) : Freeing 0xB7870558 (1 bytes), script=reproduceCode4_memoryLeak.php /home/nikic/dev/php-src-git/Zend/zend_variables.c(121) : Actual location (location was relayed) === Total 2 memory leaks detected === Reason: zval_add_ref is called regardless of whether zend_hash_next_index_insert succeeds in http://lxr.php.net/opengrok/xref/PHP_TRUNK/ext/standard/array.c#1570. -- Edit bug report at https://bugs.php.net/bug.php?id=61058edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61058r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61058r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61058r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61058r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61058r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61058r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61058r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61058r=needscript Try newer version: https://bugs.php.net/fix.php?id=61058r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61058r=support Expected behavior: https://bugs.php.net/fix.php?id=61058r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61058r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61058r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61058r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61058r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=61058r=dst IIS Stability: https://bugs.php.net/fix.php?id=61058r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61058r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61058r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61058r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61058r=mysqlcfg
[PHP-BUG] Bug #61059 [NEW]: array_fill leaks if start index is PHP_INT_MAX
From: nikic Operating system: PHP version: Irrelevant Package: *General Issues Bug Type: Bug Bug description:array_fill leaks if start index is PHP_INT_MAX Description: ?php array_fill(PHP_INT_MAX, 2, '*') Leaks: [Sat Feb 11 20:47:35 2012] Script: 'reproduceCode4_memoryLeak.php' /home/nikic/dev/php-src-git/Zend/zend_vm_execute.h(2371) : Freeing 0xB786F010 (20 bytes), script=reproduceCode4_memoryLeak.php [Sat Feb 11 20:47:35 2012] Script: 'reproduceCode4_memoryLeak.php' /home/nikic/dev/php-src-git/Zend/zend_vm_execute.h(2374) : Freeing 0xB7870558 (1 bytes), script=reproduceCode4_memoryLeak.php /home/nikic/dev/php-src-git/Zend/zend_variables.c(121) : Actual location (location was relayed) === Total 2 memory leaks detected === Reason: zval_add_ref is called regardless of whether zend_hash_next_index_insert succeeds in http://lxr.php.net/opengrok/xref/PHP_TRUNK/ext/standard/array.c#1570. -- Edit bug report at https://bugs.php.net/bug.php?id=61059edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61059r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61059r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61059r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61059r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61059r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61059r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61059r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61059r=needscript Try newer version: https://bugs.php.net/fix.php?id=61059r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61059r=support Expected behavior: https://bugs.php.net/fix.php?id=61059r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61059r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61059r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61059r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61059r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=61059r=dst IIS Stability: https://bugs.php.net/fix.php?id=61059r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61059r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61059r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61059r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61059r=mysqlcfg
Bug #61059 [Opn-Dup]: array_fill leaks if start index is PHP_INT_MAX
Edit report at https://bugs.php.net/bug.php?id=61059edit=1 ID: 61059 Updated by: johan...@php.net Reported by:ni...@php.net Summary:array_fill leaks if start index is PHP_INT_MAX -Status: Open +Status: Duplicate Type: Bug Package:*General Issues PHP Version:Irrelevant Block user comment: N Private report: N New Comment: See #61058 Previous Comments: [2012-02-11 19:51:42] ni...@php.net Description: ?php array_fill(PHP_INT_MAX, 2, '*') Leaks: [Sat Feb 11 20:47:35 2012] Script: 'reproduceCode4_memoryLeak.php' /home/nikic/dev/php-src-git/Zend/zend_vm_execute.h(2371) : Freeing 0xB786F010 (20 bytes), script=reproduceCode4_memoryLeak.php [Sat Feb 11 20:47:35 2012] Script: 'reproduceCode4_memoryLeak.php' /home/nikic/dev/php-src-git/Zend/zend_vm_execute.h(2374) : Freeing 0xB7870558 (1 bytes), script=reproduceCode4_memoryLeak.php /home/nikic/dev/php-src-git/Zend/zend_variables.c(121) : Actual location (location was relayed) === Total 2 memory leaks detected === Reason: zval_add_ref is called regardless of whether zend_hash_next_index_insert succeeds in http://lxr.php.net/opengrok/xref/PHP_TRUNK/ext/standard/array.c#1570. -- Edit this bug report at https://bugs.php.net/bug.php?id=61059edit=1
[PHP-BUG] Bug #61060 [NEW]: MySQL memory leak
From: Operating system: Windows Vista PHP version: 5.3.10 Package: MySQL related Bug Type: Bug Bug description:MySQL memory leak Description: Fetching data through mysql_fetch_assoc() causes php memory usage to go up after each query. This occurs even after unsetting the retrieved data. Test script: --- ?php $db = mysql_connect(DB_DOMAIN, DB_USERNAME, DB_PASS, true); echo Start Memory : .memory_get_usage().\n; $result = mysql_query('SELECT * FROM addr', $db); for ($i = 0; $i 10; $i++) { $row = mysql_fetch_assoc($result); if ($row === false) break; unset($row); gc_collect_cycles(); echo .memory_get_usage().\n; } mysql_free_result($result); echo End Memory : .memory_get_usage().\n; ? Expected result: Memory usage should be similar after each execution Start Memory : 31108008 65407576 65407576 65407576 65407576 65407576 65407576 65407576 65407576 65407576 65407576 End Memory : 31108160 Actual result: -- Memory usage increases significantly after each execution Start Memory : 31108008 65407576 65408120 65408664 65409208 65409752 65410296 65410840 65411384 65411944 65412488 End Memory : 31108160 -- Edit bug report at https://bugs.php.net/bug.php?id=61060edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61060r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61060r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61060r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61060r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61060r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61060r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61060r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61060r=needscript Try newer version: https://bugs.php.net/fix.php?id=61060r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61060r=support Expected behavior: https://bugs.php.net/fix.php?id=61060r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61060r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61060r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61060r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61060r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=61060r=dst IIS Stability: https://bugs.php.net/fix.php?id=61060r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61060r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61060r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61060r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61060r=mysqlcfg
Bug #61058 [Opn]: array_fill leaks if start index is PHP_INT_MAX
Edit report at https://bugs.php.net/bug.php?id=61058edit=1 ID: 61058 Updated by: larue...@php.net Reported by:ni...@php.net Summary:array_fill leaks if start index is PHP_INT_MAX Status: Open Type: Bug Package:*General Issues PHP Version:Irrelevant Block user comment: N Private report: N New Comment: There are lots of functions/codes doesn't check the return value of zend_hash_next_index_insert(and other variants of zend_hash_update_**). So, IMO, there should be some familar issues there. if we only focus on this one, a simple patch will be(but I think it's no needed to fix this, since this really a intentional behavior :) thanks ): Index: ext/standard/array.c === --- ext/standard/array.c(revision 323122) +++ ext/standard/array.c(working copy) @@ -1564,11 +1564,15 @@ num--; zval_add_ref(val); - zend_hash_index_update(Z_ARRVAL_P(return_value), start_key, val, sizeof(zval *), NULL); + if (zend_hash_index_update(Z_ARRVAL_P(return_value), start_key, val, sizeof(zval *), NULL) == FAILURE) { + zval_ptr_dtor(val); + } while (num--) { zval_add_ref(val); - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), val, sizeof(zval *), NULL); + if (zend_hash_next_index_insert(Z_ARRVAL_P(return_value), val, sizeof(zval *), NULL) == FAILURE) { + zval_ptr_dtor(val); + } } } /* }}} */ Previous Comments: [2012-02-11 19:51:41] ni...@php.net Description: ?php array_fill(PHP_INT_MAX, 2, '*') Leaks: [Sat Feb 11 20:47:35 2012] Script: 'reproduceCode4_memoryLeak.php' /home/nikic/dev/php-src-git/Zend/zend_vm_execute.h(2371) : Freeing 0xB786F010 (20 bytes), script=reproduceCode4_memoryLeak.php [Sat Feb 11 20:47:35 2012] Script: 'reproduceCode4_memoryLeak.php' /home/nikic/dev/php-src-git/Zend/zend_vm_execute.h(2374) : Freeing 0xB7870558 (1 bytes), script=reproduceCode4_memoryLeak.php /home/nikic/dev/php-src-git/Zend/zend_variables.c(121) : Actual location (location was relayed) === Total 2 memory leaks detected === Reason: zval_add_ref is called regardless of whether zend_hash_next_index_insert succeeds in http://lxr.php.net/opengrok/xref/PHP_TRUNK/ext/standard/array.c#1570. -- Edit this bug report at https://bugs.php.net/bug.php?id=61058edit=1
Bug #61058 [Opn]: array_fill leaks if start index is PHP_INT_MAX
Edit report at https://bugs.php.net/bug.php?id=61058edit=1 ID: 61058 Updated by: larue...@php.net Reported by:ni...@php.net Summary:array_fill leaks if start index is PHP_INT_MAX Status: Open Type: Bug Package:*General Issues PHP Version:Irrelevant Block user comment: N Private report: N New Comment: hmm, I think I should fix this, since this was explored :) Previous Comments: [2012-02-12 04:42:08] larue...@php.net There are lots of functions/codes doesn't check the return value of zend_hash_next_index_insert(and other variants of zend_hash_update_**). So, IMO, there should be some familar issues there. if we only focus on this one, a simple patch will be(but I think it's no needed to fix this, since this really a intentional behavior :) thanks ): Index: ext/standard/array.c === --- ext/standard/array.c(revision 323122) +++ ext/standard/array.c(working copy) @@ -1564,11 +1564,15 @@ num--; zval_add_ref(val); - zend_hash_index_update(Z_ARRVAL_P(return_value), start_key, val, sizeof(zval *), NULL); + if (zend_hash_index_update(Z_ARRVAL_P(return_value), start_key, val, sizeof(zval *), NULL) == FAILURE) { + zval_ptr_dtor(val); + } while (num--) { zval_add_ref(val); - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), val, sizeof(zval *), NULL); + if (zend_hash_next_index_insert(Z_ARRVAL_P(return_value), val, sizeof(zval *), NULL) == FAILURE) { + zval_ptr_dtor(val); + } } } /* }}} */ [2012-02-11 19:51:41] ni...@php.net Description: ?php array_fill(PHP_INT_MAX, 2, '*') Leaks: [Sat Feb 11 20:47:35 2012] Script: 'reproduceCode4_memoryLeak.php' /home/nikic/dev/php-src-git/Zend/zend_vm_execute.h(2371) : Freeing 0xB786F010 (20 bytes), script=reproduceCode4_memoryLeak.php [Sat Feb 11 20:47:35 2012] Script: 'reproduceCode4_memoryLeak.php' /home/nikic/dev/php-src-git/Zend/zend_vm_execute.h(2374) : Freeing 0xB7870558 (1 bytes), script=reproduceCode4_memoryLeak.php /home/nikic/dev/php-src-git/Zend/zend_variables.c(121) : Actual location (location was relayed) === Total 2 memory leaks detected === Reason: zval_add_ref is called regardless of whether zend_hash_next_index_insert succeeds in http://lxr.php.net/opengrok/xref/PHP_TRUNK/ext/standard/array.c#1570. -- Edit this bug report at https://bugs.php.net/bug.php?id=61058edit=1
Bug #61058 [Opn]: array_fill leaks if start index is PHP_INT_MAX
Edit report at https://bugs.php.net/bug.php?id=61058edit=1 ID: 61058 Updated by: larue...@php.net Reported by:ni...@php.net Summary:array_fill leaks if start index is PHP_INT_MAX Status: Open Type: Bug Package:*General Issues PHP Version:Irrelevant -Assigned To: +Assigned To:laruence Block user comment: N Private report: N New Comment: Fixed in 5.3 , trunk, will close this after I meger this fix to 5.4. Previous Comments: [2012-02-12 04:59:07] larue...@php.net Automatic comment from SVN on behalf of laruence Revision: http://svn.php.net/viewvc/?view=revisionamp;revision=323160 Log: Fixed bug #61058 (array_fill leaks if start index is PHP_INT_MAX) [2012-02-12 04:56:52] larue...@php.net hmm, I think I should fix this, since this was explored :) [2012-02-12 04:42:08] larue...@php.net There are lots of functions/codes doesn't check the return value of zend_hash_next_index_insert(and other variants of zend_hash_update_**). So, IMO, there should be some familar issues there. if we only focus on this one, a simple patch will be(but I think it's no needed to fix this, since this really a intentional behavior :) thanks ): Index: ext/standard/array.c === --- ext/standard/array.c(revision 323122) +++ ext/standard/array.c(working copy) @@ -1564,11 +1564,15 @@ num--; zval_add_ref(val); - zend_hash_index_update(Z_ARRVAL_P(return_value), start_key, val, sizeof(zval *), NULL); + if (zend_hash_index_update(Z_ARRVAL_P(return_value), start_key, val, sizeof(zval *), NULL) == FAILURE) { + zval_ptr_dtor(val); + } while (num--) { zval_add_ref(val); - zend_hash_next_index_insert(Z_ARRVAL_P(return_value), val, sizeof(zval *), NULL); + if (zend_hash_next_index_insert(Z_ARRVAL_P(return_value), val, sizeof(zval *), NULL) == FAILURE) { + zval_ptr_dtor(val); + } } } /* }}} */ [2012-02-11 19:51:41] ni...@php.net Description: ?php array_fill(PHP_INT_MAX, 2, '*') Leaks: [Sat Feb 11 20:47:35 2012] Script: 'reproduceCode4_memoryLeak.php' /home/nikic/dev/php-src-git/Zend/zend_vm_execute.h(2371) : Freeing 0xB786F010 (20 bytes), script=reproduceCode4_memoryLeak.php [Sat Feb 11 20:47:35 2012] Script: 'reproduceCode4_memoryLeak.php' /home/nikic/dev/php-src-git/Zend/zend_vm_execute.h(2374) : Freeing 0xB7870558 (1 bytes), script=reproduceCode4_memoryLeak.php /home/nikic/dev/php-src-git/Zend/zend_variables.c(121) : Actual location (location was relayed) === Total 2 memory leaks detected === Reason: zval_add_ref is called regardless of whether zend_hash_next_index_insert succeeds in http://lxr.php.net/opengrok/xref/PHP_TRUNK/ext/standard/array.c#1570. -- Edit this bug report at https://bugs.php.net/bug.php?id=61058edit=1
Bug #60837 [Com]: Segmentation fail, if use trait
Edit report at https://bugs.php.net/bug.php?id=60837edit=1 ID: 60837 Comment by: piphon at gmail dot com Reported by:piphon at gmail dot com Summary:Segmentation fail, if use trait Status: Re-Opened Type: Bug Package:Reproducible crash Operating System: Ubuntu 11.10 64bit PHP Version:5.4SVN-2012-01-22 (SVN) Block user comment: N Private report: N New Comment: Sorry. SVN branch so far not compiled, but last snapshots, e.g PHP 5.4.0RC7 Feb 10 2012, worked normal without this bug. You can probably close this issue. Previous Comments: [2012-01-26 01:16:15] larue...@php.net oh, I mis-read your words, re-opened. [2012-01-26 01:15:32] larue...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. [2012-01-24 06:46:57] piphon at gmail dot com I check svn head, when https://bugs.php.net/bug.php?id=60840 fixed [2012-01-24 06:27:54] piphon at gmail dot com Snapshot PHP 5.4.0RC7-dev (cli) (built: Jan 24 2012 11:49:24) worked. Sorry, can't try SVN branch (https://svn.php.net/repository/php/php-src/branches/PHP_5_4@322646). Could not compile sources for test issue. Modules (pdo, pdo_mysql) not compiled as static libraries (multiple definition of `get_module') or pdo_mysql not linked as shared library (mysqlnd_debug_std_no_trace_funcs not found). And debugging and normal. I'll try again. [2012-01-24 05:32:44] larue...@php.net Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ could you plz also try with 5.4 branch head? thanks very much :) 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=60837 -- Edit this bug report at https://bugs.php.net/bug.php?id=60837edit=1