Bug #64563 [Opn-Nab]: when i try viewing a directory list only array returns and that's it.
Edit report at https://bugs.php.net/bug.php?id=64563edit=1 ID: 64563 Updated by: re...@php.net Reported by:flownoun59 at gmail dot com Summary:when i try viewing a directory list only array returns and that's it. -Status: Open +Status: Not a bug Type: Bug Package:Directory function related Operating System: windows PHP Version:5.4.13 Block user comment: N Private report: N New Comment: you are trying to echo an array, output `array` is expected. see: http://php.net/ftp_nlist mark as not bug for now. Previous Comments: [2013-04-02 10:38:29] flownoun59 at gmail dot com Description: ?php $conn = ftp_connect(ftp.smartsociety.tk) or die(Could not connect); ftp_login($conn,u137184334,drowssap); echo ftp_nlist($conn,pic); ftp_close($conn); ? -- Edit this bug report at https://bugs.php.net/bug.php?id=64563edit=1
Req #60793 [Opn-Wfx]: max_input_vars should indicate target file in error log
Edit report at https://bugs.php.net/bug.php?id=60793edit=1 ID: 60793 Updated by: re...@php.net Reported by:royanee at yahoo dot com Summary:max_input_vars should indicate target file in error log -Status: Open +Status: Wont fix Type: Feature/Change Request Package:*General Issues Operating System: RHEL5 PHP Version:5.3.9 Block user comment: N Private report: N New Comment: see #64319 Previous Comments: [2012-01-18 15:16:10] royanee at yahoo dot com Description: When the max_input_vars is exceeded, the message is as follows: PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0 It would be very useful to know which PHP file was being sent the variables instead of Unknown. -- Edit this bug report at https://bugs.php.net/bug.php?id=60793edit=1
Req #44972 [Opn-Csd]: Feature Request: overriding sys_get_tmp_dir
Edit report at https://bugs.php.net/bug.php?id=44972edit=1 ID: 44972 Updated by: re...@php.net Reported by:timtowdi at yahoo dot com Summary:Feature Request: overriding sys_get_tmp_dir -Status: Open +Status: Closed Type: Feature/Change Request -Package:Feature/Change Request +Package:*General Issues Operating System: FreeBSD PHP Version:5.2.6 -Assigned To: +Assigned To:reeze Block user comment: N Private report: N New Comment: Implemented #60524 Previous Comments: [2011-12-30 11:54:04] jan dot kellermann at werk21 dot de Please just add a flag to this function for loading the default tmp-dir (cached in static var) or get it actually from env TMPDIR. There ARE situations you dont want to save your user-temp-files to your sys-temp- dir. Then you can use SetEnv in apache-conf. [2011-03-14 19:35:45] royanee at yahoo dot com sys_get_tmp_dir() and tempnam() are both affected on my system. However, using SetEnv TMPDIR in the Apache configuration does not work. getenv('TMPDIR') returns the expected result, but sys_get_tmp_dir() is unaffected. Please allow for a default temporary directory option so that I can switch my virtual hosts to that and resolve all of the temporary file issues (not simply uploads). [2010-09-07 05:44:47] brian at macserve dot net 1. the suggested php.ini setting for uploaded files has ZERO effect on the original requestors report. the directory returned by the sys_get_tmp_dir() function cannot be overriden from within PHP or php.ini; only where uploaded files are placed can be overridden which only coincidentally is the same when you do NOT define upload_tmp_dir in php.ini. the original request stands as a valid critique. 2. your url is missing an el at the end of manual. corrected: http://www.php.net/manual/en/ini.core.php#ini.upload-tmp-dir 3. The security environment of the original request is interesting and perhaps up for debate, but is not relevant to this discussion. There may be valid technical reasons for locating TMPDIR for PHP to another location other than the TMPDIR environment variable that comes into Apache. Perhaps temp files for PHP need to live on a different disk for performance and/or security reasons. Being able to define this with a php.ini setting is completely reasonable. 4. Sorry to be a noodge, but this request over 2 years old and not resolved? ./main/php_open_temporary_file.c : php_get_temporary_directory() needs just a little bit of code it looks like. Thanks! [2008-05-12 15:46:49] paj...@php.net One is already possible: http://www.php.net/manua/en/ini.core.php#ini.upload-tmp-dir About the temp directory, you will have to teach your ISP how to configure php correctly. Not having the tmp dir in the open_basedir lists (and having only one global tmp dir instead of per user) is so wrong. However a temp_dir ini setting (settable per vhost) would be nice. Let see what's the other say (I'm not a fan of ENV variables ;). [2008-05-12 15:30:47] timtowdi at yahoo dot com Description: On a server with open_basedir in effect, sys_get_temp_dir() still uses the default TMPDIR environment variable (which in this case is '/tmp'). This effectively renders sys_get_temp_dir useless for me, and there is no way to override it. It would be EXTREMELY useful to be able to set the default temp directory from an ini directive, such as the session temp dir and the uploaded files temp dir. -- Edit this bug report at https://bugs.php.net/bug.php?id=44972edit=1
Req #44282 [Opn-Csd]: new function get_object_name()
Edit report at https://bugs.php.net/bug.php?id=44282edit=1 ID: 44282 Updated by: re...@php.net Reported by:msaspence at gmail dot com Summary:new function get_object_name() -Status: Open +Status: Closed Type: Feature/Change Request -Package:Feature/Change Request +Package:*General Issues PHP Version:5.2.5 -Assigned To: +Assigned To:reeze Block user comment: N Private report: N New Comment: I thought __toString() magic method is what you want. close for now Previous Comments: [2008-02-28 10:55:36] msaspence at gmail dot com Description: Currently to get the objects variable name within the object you must pass it as a parameter and have the constructor define it. This solution while simple would be tidier if there was a function that could retrieve the object's variable instance from inside itself. Reproduce code: --- Currently ?php class myClass { function __construct($objectName) { $this-objectName = $objectName; } function printName() { echo the name of this object instance is .$this-objectName; } } $object = 'myObject'; $$object = new myClass('$object'); $$object-printName(); ? Expected result: How it might be done: ?php class myClass { function printName() { echo the name of this object instance is .$this-get_object_name(); } } $object = 'myObject'; $$object = new myClass; $$object-printName(); ? -- Edit this bug report at https://bugs.php.net/bug.php?id=44282edit=1
Bug #64340 [Csd-ReO]: sockets tests failed
Edit report at https://bugs.php.net/bug.php?id=64340edit=1 ID: 64340 Updated by: re...@php.net Reported by:re...@php.net Summary:sockets tests failed -Status: Closed +Status: Re-Opened Type: Bug Package:Sockets related Operating System: Mac OSX 10.8 PHP Version:5.5.0alpha5 Assigned To:laruence Block user comment: N Private report: N New Comment: Hi, the attached patch is intend to fix IPV6_PKTINFO failure, the commit didn't contain all of the fix. but only the macro define. The patch isn't break build. but the partially applied patch. only define __APPLE_USE_RFC is not enough. the rest of the changes should be applied too. I couldn't figure out a better solution which didn't require header inclusion order, since the macro itself required to be defined first. Previous Comments: [2013-03-05 06:05:33] larue...@php.net I revert the previous fix, since the build broken. I am wondering, if don't fix that, what's the problem is? thanks [2013-03-05 06:04:06] larue...@php.net Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=3f67d5ae434236be1db2ee54baf85725ac7b6a56 Log: Revert quot;Fixed Bug #64340 (sockets tests failed) Patch by Reezequot; [2013-03-05 05:58:56] larue...@php.net Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=3f67d5ae434236be1db2ee54baf85725ac7b6a56 Log: Revert quot;Fixed Bug #64340 (sockets tests failed) Patch by Reezequot; [2013-03-04 18:21:21] re...@php.net Hi, cataphract The macro __APPLE_USE_RFC_3542 must be defined before including netinet/in.h, but not all of the our c files include php_sockets.h in the topmost, but by indirectly include other header files. eg: $ head -n 1 conversions.c sockaddr_conv.h $ header -n 5 sockaddr_conv.h ... #include php_network.h #include php_sockets.h /* php_socket */ php_network.h wil be included netinet/in.h before the macro defined. and php_network.h has to been included before php_sockets.h, so I have to move conversion.h up instead. in the mean time, in convesion.h netinet/in.h was included before php_sockets.h too, so I have to move it up to meet the requirement of the macro. The current partial patch breaks the build because of missing the left part: Undefined symbols for architecture x86_64: _from_zval_write_in6_pktinfo, referenced from: _init_ancillary_registry in sendrecvmsg.o _php_do_setsockopt_ipv6_rfc3542 in sendrecvmsg.o _to_zval_read_in6_pktinfo, referenced from: _init_ancillary_registry in sendrecvmsg.o _php_do_getsockopt_ipv6_rfc3542 in sendrecvmsg.o ld: symbol(s) not found for architecture x86_64 [2013-03-03 02:55:50] larue...@php.net Thank you for your bug report. This issue has already been fixed in the latest released version of PHP, which you can download at http://www.php.net/downloads.php I commmitted, since reeze doesn't has PHP karma. please verify the fix. 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=64340 -- Edit this bug report at https://bugs.php.net/bug.php?id=64340edit=1
Bug #55514 [Nab]: Can't install PHP 5.2.17. Error code 2738
Edit report at https://bugs.php.net/bug.php?id=55514edit=1 ID: 55514 Updated by: re...@php.net Reported by:Chris_Walsh at Prodigy dot bet Summary:Can't install PHP 5.2.17. Error code 2738 Status: Not a bug Type: Bug Package:Unknown/Other Function Operating System: Windows Vista PHP Version:Irrelevant Block user comment: N Private report: N New Comment: @iamjahid your question seems nothing to do with the bug report. PS: please refer: http://www.w3schools.com/tags/att_option_selected.asp for what you looking for. Previous Comments: [2013-03-05 16:25:32] iamjahid at gmail dot com Plz Help. In drop down menu it always show year 2005. But i want to set default year. echobDATE/b;echo nbsp;; echo select size=1 name='d'; for( $i=1;$i=31;$i++) echo option label=. $i . value= . $i . .$i./option; echo/select;echo nbsp;; echo select size=1 name='m'; $months = array(January,February,March,April,May,June,July,Auguest,September,October,November,December); foreach( $months as $month ) { echo option label=. $month . value= . $month . .$month./option; }; echo/select; echo nbsp;; echo select size=1 name='y'; for( $year=2005;$year=2020;$year++) echo option label=. $year . value=.$year. .$year./option; echo/select; [2011-08-26 22:56:48] johan...@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. The current version is 5.3.8. Windows downloads are on http://windows.php.net/download/ [2011-08-26 21:34:54] Chris_Walsh at Prodigy dot net Did I commit a typo in my email address?? should be dot net not dot bet of course. [2011-08-26 21:23:34] Chris_Walsh at Prodigy dot bet Description: I have seen other bugs categorized as being in the Windows Installer package but I don't have that option in the dropdown menu so I have put it as unknown/other I am trying to install 5.2.17 because, according to http://windows.php.net/download/ it is what I need to use with Apache. (I don't see a later version for Windows that looks usable) The PHP version drop-down implies I should be using something more recent that 5.2.x but the Windows download page doesn't give me the options to use something more current. I want to install php-5.2.17-Win32-VC6-x86.msi (as opposed to the nts version) because it has the option for Apache 2.2 in the Web Server Setup options. If I need to use a more recent version, then the info at http://windows.php.net/download/ is misleading at best: Which version do I choose? If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP Here's my situation: I get most of the way through the installation and I get an error pop-up saying the installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2738 I have done a great deal of searching on this and have found many references recommending doing some registry changes. This page in particular seems to explain well what to do: http://blogs.msdn.com/b/heaths/archive/2007/05/31/windows-installer-errors-2738-and-2739-with-script-custom-actions.aspx I have done what it recommends yet I still get the error. The keys mentioned are not in HKCU, which I checked using regedit. VBScript, B54F3741-5B07-11CF-A4B0-00AA004A55E8 is in HKEY_LOCAL_MACHINE This dll is the one that causes the 2738 error, apparently. JScript, F414C260-6AC0-11CF-B6D1-00AA0058 is HKEY_CLASSES_ROOT, which I mention because it is referenced in the link I cite above. I have tried deleting and re-registering the dlls (regsvr32 vbscript.dll) and that didn't help. I have hit a dead end. Expected result: Would like to be able to get php installed on my Vista PC. Actual result: -- Error -- Edit this bug report at https://bugs.php.net/bug.php?id=55514edit=1
Bug #64325 [Fbk]: Issue in automatic $_POST array handling
Edit report at https://bugs.php.net/bug.php?id=64325edit=1 ID: 64325 Updated by: re...@php.net Reported by:php at sygmoral dot com Summary:Issue in automatic $_POST array handling Status: Feedback Type: Bug Package:*General Issues Operating System: Debian PHP Version:5.4.12 Assigned To:laruence Block user comment: N Private report: N New Comment: The attached patch may break form like: foo[bar][index]=test after some research, this seems a undocumented behavior but not a bug. only the field name `save` can not have '[' and other special chars. the subkeys didn't required to be a legal variable name but '[]' are special chars. Previous Comments: [2013-03-01 03:29:43] larue...@php.net The following patch has been added/updated: Patch Name: bug64325.patch Revision: 1362108583 URL: https://bugs.php.net/patch-display.php?bug=64325patch=bug64325.patchrevision=1362108583 [2013-03-01 03:29:02] larue...@php.net PHP won't allow variables name to contains [, . etc , so I think this is really a narrow usage. but, however I do believe there is a bug. a patch will be attached. but I need to ask someone else's opinion before commit it. thanks [2013-02-28 19:45:57] php at sygmoral dot com Thank you for your reaction! But no: I did in fact mean what I wrote. I realise it's a strange data structure, so here's a short explanation for it: the 'save' array holds a collection of html form elements that are not yet to be submitted, but should be saved temporarily into some other set of memory, so that upon the next visit, those temporary values can be easily inserted into the displayed form, without having been submitted. In other words, it's for a form that remembers its state throughout visits. So I send an object containing the name-value pairs in the form, and send that over POST. In the example used here, this results in one or more name-value pairs that are saved into the save array, as save['line[]'] = value. And that is the situation that triggers this bug, as in my original post. I'm sure there are other ways to achieve what I want, but I figured I'd report it since this does not look as if it's intended. Note that the example is a simplification of my application, where multiple 'single' and 'array' values are saved. [2013-02-28 18:22:57] re...@php.net post_data = {'save[line[]]':'A line with text'}â do you mean post_data = {'save[line][]':'A line with text'} ? ^^ is this you intention? array( 'save' = ['line' = ['A line with text', 'maybe more lines'] ] ); ? [2013-02-28 16:09:49] php at sygmoral dot com Description: Php automatically puts POSTed name-value pairs with names ending in [] into arrays. Very handy feature! However, I notice issues when more of those square brackets are encountered. If I send a name like `save[line[]]`, then `save` will be an array and the first key in it will be `line[`, instead of `line[]`. It's not that I expect a second level of arrays - just that it doesn't strangely remove that last bracket. So suppose we have the tiny php script below, and I send this with e.g. jquery: post_data = {'save[line[]]':'A line with text'} Effectively, the raw POST data being sent is: save%5Bline%5B%5D%5D=A+line+with+text Test script: --- print_r( $_POST['save'] ); Expected result: POST: Array ( [line[]] = A line with text ) Actual result: -- POST: Array ( [line[] = A line with text ) -- Edit this bug report at https://bugs.php.net/bug.php?id=64325edit=1
Req #38379 [Opn-Csd]: mail() returns false when using 5th parameter in safe mode (even when empty)
Edit report at https://bugs.php.net/bug.php?id=38379edit=1 ID: 38379 Updated by: re...@php.net Reported by:marekm at apnet dot pl Summary:mail() returns false when using 5th parameter in safe mode (even when empty) -Status: Open +Status: Closed Type: Feature/Change Request Package:Mail related Operating System: All PHP Version:4.4.3 -Assigned To: +Assigned To:reeze Block user comment: N Private report: N New Comment: Safe mode was gone. Previous Comments: [2006-08-08 10:37:26] marekm at apnet dot pl Description: I think, mail() function with 5 parameters should work in safe mode when additional_parameters is an empty string. Reproduce code: --- mail(someb...@somewhere.com,subject,body,,); Expected result: The functions should work in safe mode. Actual result: -- The function returns false in safe mode. -- Edit this bug report at https://bugs.php.net/bug.php?id=38379edit=1
Req #32701 [Opn-Csd]: Safe-mode popen(): escaping problem
Edit report at https://bugs.php.net/bug.php?id=32701edit=1 ID: 32701 Updated by: re...@php.net Reported by:kosmo at miechow dot com Summary:Safe-mode popen(): escaping problem -Status: Open +Status: Closed Type: Feature/Change Request -Package:Feature/Change Request +Package:*General Issues Operating System: Linux PHP Version:5.0.4 -Assigned To: +Assigned To:reeze Block user comment: N Private report: N New Comment: Safe mode was gone. Previous Comments: [2005-11-13 02:31:42] 5Wupdd51ogZj7Lm8B at anime dot net Is there any link to more detailed info about safe_mode going away, and how php is handling security in the next release? [2005-11-09 12:57:50] sni...@php.net It's still not bug but a change request. Reclassified. You can provide a patch if you wish. The fact is that we're going to remove the whole safe-mode anyway, so you're basically wasting your time. This is not the only thing that goes wrong with it.. [2005-11-09 12:09:52] vr...@php.net It works bad. There's no way to echo '-= Test =-' in safe_mode. No characters inside single quotes should be escaped by php_escape_shell_cmd() as they have no special meaning. I can prepare a patch for it if it will be accepted. [2005-04-14 09:51:57] sni...@php.net This is how it works. No bug here. [2005-04-14 09:22:15] kosmo at miechow dot com Description: In safe-mode popen() is escaping command line by calling php_escape_shell_cmd(). This funcion escaping command line, and changing valid command arguments. IMHO there should be any way to disable this escaping and run in safe-mode. Reproduce code: --- ?php $r = popen(echo '-= Test =-', r); print(stream_get_contents($r)); pclose($r); ? Expected result: -= Test =- Actual result: -- -=\ Test \=- -- Edit this bug report at https://bugs.php.net/bug.php?id=32701edit=1
Req #18332 [Opn-Csd]: is_readable/is_writable/is_executable support under safe mode
Edit report at https://bugs.php.net/bug.php?id=18332edit=1 ID: 18332 Updated by: re...@php.net Reported by:ilia at prohost dot org Summary:is_readable/is_writable/is_executable support under safe mode -Status: Open +Status: Closed Type: Feature/Change Request -Package:Feature/Change Request +Package:*General Issues Operating System: any PHP Version:4.2.1 -Assigned To: +Assigned To:reeze Block user comment: N Private report: N New Comment: Safe mode was gone. Previous Comments: [2002-09-24 21:55:46] ekilf...@php.net I recently ran into this same problem. With the open_basedir config option set, is_readable() can report unexpected results. Perhaps a solution may be to run through all of the security checks that fopen goes through and find out if the file is readable. Another solution would be to actually just flat out open the file with php_fopen() for read or append (for is_writable()) and see what is returned. Perhaps an argument can be added such as: is_readable(STRICT) where STRICT checks everything is_readable(STRICT | ATTEMPT) would actually attempt the open. I'm just throwing out ideas. My problem is that I would like a way to guarantee that no errors or warnings are returned by a call to fopen() with the E_ALL error level set. I was using: file_exists() is_readable() I can't think of any check to perform other than writing a function in my script that does a safe open such as: function is_truly_readable() { $e = error_reporting(0); if ($f = fopen($file, r)) { fclose($f); error_reporting($e); return(TRUE); } error_reporting($e); return(FALSE); } [2002-09-22 16:37:38] il...@php.net In the current release of the manual is_readable/is_writable now mention the fact that they will not check safe_mode limitation. The is_executable however, still needs to be documented. [2002-07-15 21:52:19] yohg...@php.net I think stat function can be used to know actual permissions. is_* function supposed to return if current process can do something or not. IMO. We may need to change doc a bit. - Documentation Problem [2002-07-13 18:31:32] ilia at prohost dot org It would be very useful if is_readable/is_writable/is_executable series of functions would work with safe mode. Currently is_writable() will report a file that in reality cannot be accessed undersafe mode is writeable, which is clearly misleading. At least, could the manual be modified in such a way as to document that those functions will not work properly under safe_mode. -- Edit this bug report at https://bugs.php.net/bug.php?id=18332edit=1
Req #51507 [Opn-Csd]: Setting filename for @... multipart uploads
Edit report at https://bugs.php.net/bug.php?id=51507edit=1 ID: 51507 Updated by: re...@php.net Reported by:david at frankieandshadow dot com Summary:Setting filename for @... multipart uploads -Status: Open +Status: Closed Type: Feature/Change Request Package:cURL related Operating System: n/a PHP Version:5.2.13 -Assigned To: +Assigned To:reeze Block user comment: N Private report: N New Comment: As pierrick said, implemented. close Previous Comments: [2011-11-22 09:20:01] pierr...@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. This functionality is implemented but you need to remove the space beetween the ; and the filename. You can even put the type : curl_setopt(CURLOPT_POSTFIELDS, array('myfile'=@{$pathname};type=image/jpeg; filename=name.jpg)); [2010-04-08 11:47:10] david at frankieandshadow dot com Description: Using curl_setopt, you can make a multipart POST by passing an array of parameters, and if preceded by an @, a file upload is created from the path following the @. curl_setopt(CURLOPT_POSTFIELDS, array('myfile'=@{$pathname})); However, I haven't been able to find a way to set the filename part of the multipart description, so that it generates e.g. Content-disposition: form-data; name=myfile; filename=desiredfilename Content-Type: text/plain That is, there isn't a way to get desiredfilename in there. The only option seems to be for the filename part appears to come from the name of the file within the path. The cURL command line interface seems to support explicitly setting the filename different from the name of the source file with '-F @path ; filename=whatever' so presumably it is possible in the library, but not exposed through the PHP binding. In case it was merely passing on the string to the cURL library verbatim, I tried: curl_setopt(CURLOPT_POSTFIELDS, array('myfile'=@{$pathname}; filename=\desiredfilename\)); but that gives an error. The problem is that the files I have are stored with simple numeric names and the file names which an external user would know them by are in the database that indexes the disk files. I have a workround which is to make a temporary hard link to the file by its user name and give that to cURL, but I don't think I should really need to do that. Test script: --- $now = time(); $tmpdirpath = /tmp/enspub-{$now}-{$version-id}; mkdir($tmpdirpath); $tmpfilepath = {$tmpdirpath}/ . mb_ereg_replace('[/?%*:|@~=+]', '_', $version-name); // replace disallowed characters link($version-pathname(), $tmpfilepath); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); /* tell me, not echo */ curl_setopt($ch, CURLOPT_POST, TRUE); $post['file'] = @{$tmpfilepath}; /* ... and other $post settings ... */ curl_setopt($ch, CURLOPT_POSTFIELDS, $post); $data = curl_exec($ch); /* ... error checking ... */ curl_close($ch); @unlink($tmpfilepath); @rmdir($tmpdirpath); Expected result: It works, but I'd like to be able to set the filename explicitly without copying the file. Actual result: -- n/a -- Edit this bug report at https://bugs.php.net/bug.php?id=51507edit=1
Bug #55867 [Opn-Fbk]: segfault while declaring function
Edit report at https://bugs.php.net/bug.php?id=55867edit=1 ID: 55867 Updated by: re...@php.net Reported by:savetheinternet at omegasdg dot com Summary:segfault while declaring function -Status: Open +Status: Feedback Type: Bug Package:Unknown/Other Function Operating System: Debian 2.6.26-26lenny3 PHP Version:5.3.8 Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2012-04-20 10:19:48] vnsavage at gmail dot com Do you still get this? What is your PHP setup? Configuration parameters and modules? Do you use APC? [2011-10-10 18:16:38] goingbackayear at hotmail dot com I'll tell you what's wrong with the code STI when you ban Lazare and all the other Paulberg spammers. [2011-10-08 08:33:35] savetheinternet at omegasdg dot com Well, the file that short extract is from is quite a large file. It is a configuration file for https://github.com/savetheinternet/Tinyboard. Aside from the fhash function, all the file does is modify an associative array which is originally defined elsewhere. --- ?php $config['something'] = false; $config['something_else']['foo'] = 'bar'; // [...] if(!function_exists('fhash')) { --- As I said, I'm not able to reproduce this bug manually so I'm not sure where exactly it goes wrong, but I don't think anything else in the file is relevant. When it happens, my syslog is filled up with the below, and I am forced to restart fastcgi. Oct 8 10:32:30 kernel: [9364589.325832] php-cgi[28124]: segfault at 0 ip b6f67d5c sp bf844b6c error 4 in libc-2.7.so[b6ef+155000] Oct 8 10:32:30 kernel: [9364589.330222] php-cgi[28125]: segfault at 0 ip b6f67d5c sp bf844b6c error 4 in libc-2.7.so[b6ef+155000] Oct 8 10:32:30 kernel: [9364589.335009] php-cgi[28126]: segfault at 0 ip b6f67d5c sp bf844b6c error 4 in libc-2.7.so[b6ef+155000] Oct 8 10:32:30 kernel: [9364589.337822] php-cgi[28127]: segfault at 0 ip b6f67d5c sp bf844b6c error 4 in libc-2.7.so[b6ef+155000] [2011-10-08 06:19:41] paj...@php.net Can you paste the short example please? As in not only the place where it occurs. [2011-10-07 17:21:10] savetheinternet at omegasdg dot com Description: Although I do have a short code sample, I'm not sure where exactly or what conditions causes the segfault; I am unable to reproduce it myself. The backtrace indicates that this is indeed where the bug occurs. The code sample below is an extract from a file that is included various times throughout a much larger application. fhash is not defined anywhere else. Test script: --- if(!function_exists('fhash')) { function fhash($file) { system('optipng ' . escapeshellarg(preg_replace('/src\/(\d+)\.(.+)$/', 'thumb/$1.png', $file)) . ' /dev/null'); return sha1_file($file); } } Expected result: To ensure that fhash() is not declared multiple times as this file may be included multiple times. Actual result: -- (gdb) bt #0 0xb6f2ed5c in memcpy () from /lib/i686/cmov/libc.so.6 #0 0xb6f2ed5c in memcpy () from /lib/i686/cmov/libc.so.6 #1 0x084e9e17 in _zend_hash_add_or_update (ht=0x9bb7498, arKey=0xb49e3c98 fhash, nKeyLength=6, pData=0x0, nDataSize=144, pDest=0x0, flag=2, __zend_filename=0x88aa40c /home/user/php-5.3.8/Zend/zend_compile.c, __zend_lineno=2956) at /home/user/php-5.3.8/Zend/zend_hash.c:256 #2 0x084c3d48 in do_bind_function (opline=0xb49e88fc, function_table=0x9bb7498, compile_time=0 '\0') at /home/user/php-5.3.8/Zend/zend_compile.c:2956 #3 0x0850aa49 in ZEND_DECLARE_FUNCTION_SPEC_HANDLER (execute_data=0x9d79da8) at /home/user/php-5.3.8/Zend/zend_vm_execute.h:586 #4 0x08508506 in execute (op_array=0x9d5ceac) at /home/user/php- 5.3.8/Zend/zend_vm_execute.h:107 #5 0x084dcf8d in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/user/php-5.3.8/Zend/zend.c:1236 #6 0x08472037 in php_execute_script (primary_file=0xbfc62428) at /home/user/php-5.3.8/main/main.c:2284 #7 0x085a504e in main (argc=3, argv=0xbfc62594) at /home/user/php- 5.3.8/sapi/cgi/cgi_main.c:2112 (gdb) print (char *)executor_globals.active_op_array-filename $2 = 0xb49e34d0 /var/www/inc/instance-config.php (gdb) frame 4 #4 0x08508506 in execute (op_array=0x9d5ceac) at /home/user/php- 5.3.8/Zend/zend_vm_execute.h:107 107 if ((ret =
Req #40248 [Opn-Csd]: Undefined members with combined operators produce no warning
Edit report at https://bugs.php.net/bug.php?id=40248edit=1 ID: 40248 Updated by: re...@php.net Reported by:jontsa at amigaone dot cc Summary:Undefined members with combined operators produce no warning -Status: Open +Status: Closed Type: Feature/Change Request Package:Scripting Engine problem Operating System: Solaris PHP Version:5.2.0 -Assigned To: +Assigned To:reeze Block user comment: N Private report: N New Comment: The fix for this bug has been committed. 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. This was implemented in lastest version 5.5 master Previous Comments: [2012-03-20 21:00:46] php dot net at doppy dot nl Can still reproduce this. PHP 5.3.10-1ubuntu2 with Suhosin-Patch (cli) (built: Mar 5 2012 18:27:21) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies Recommend using this reproduce code: ?php error_reporting(-1); $a+=5; $b=new stdClass; $b-a+=5; $b=new stdClass; $b-a=$b-a + 5; Expected result: PHP Notice: Undefined variable: a in /test.php on line 3 PHP Notice: Undefined property: stdClass::$a in /test.php on line 6 PHP Notice: Undefined property: stdClass::$a in /test.php on line 9 Actual result: PHP Notice: Undefined variable: a in /test.php on line 3 PHP Notice: Undefined property: stdClass::$a in /test.php on line 9 [2007-01-26 10:12:51] jontsa at amigaone dot cc Description: When using a combined operator like += or ++ on an undefined class member, it does not produce undefined property notice as expected. Tested with all errors enabled. Reproduce code: --- $a+=5; $b=new stdClass; $b-a+=5; Expected result: Notice: Undefined variable: a Notice: Undefined property: stdClass::$a Actual result: -- Notice: Undefined variable: a -- Edit this bug report at https://bugs.php.net/bug.php?id=40248edit=1
Bug #64326 [Opn-Fbk]: Parse error on casting a bracket array to an object
Edit report at https://bugs.php.net/bug.php?id=64326edit=1 ID: 64326 Updated by: re...@php.net Reported by:f at worldhomes dot com Summary:Parse error on casting a bracket array to an object -Status: Open +Status: Feedback Type: Bug Package:*General Issues Operating System: Mac PHP Version:5.4.12 Block user comment: N Private report: N New Comment: There is no such error, see: http://3v4l.org/Qjk0T PHP = 5.4 works fine. Are you sure you are running 5.4.12? Previous Comments: [2013-02-28 16:11:03] f at worldhomes dot com Description: This code does not work on Mac OSX Lion : json_encode ( (object) [ 'status' = (int) $newstatus ] ) After further debugging, problem: (object)[] : you can not cast a bracket array to object Parse error: unexpected '[' Test script: --- json_encode ( (object) [ 'status' = 4 ] ) -- Edit this bug report at https://bugs.php.net/bug.php?id=64326edit=1
Bug #64322 [Opn-Nab]: $_ENV{PATH} does not work
Edit report at https://bugs.php.net/bug.php?id=64322edit=1 ID: 64322 Updated by: re...@php.net Reported by:porton at narod dot ru Summary:$_ENV{PATH} does not work -Status: Open +Status: Not a bug Type: Bug Package:*General Issues Operating System: Debian Linux PHP Version:5.5Git-2013-02-28 (Git) Block user comment: N Private report: N New Comment: Please make sure you ini setting 'E' for $_ENV http://www.php.net/manual/en/ini.core.php#ini.variables-order withouth 'E' $_ENV will not been filled with environment variables Previous Comments: [2013-02-28 14:20:32] porton at narod dot ru Description: With Bash: $ php -r 'echo $_ENV{PATH}, \n;' PHP Notice: Undefined index: PATH in Command line code on line 1 The variable PATH is of course defined in my Bash. Version info: Debian Linux Wheezy $ php --version PHP 5.4.4-13 (cli) (built: Feb 19 2013 12:42:38) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies Test script: --- php -r 'echo $_ENV{PATH}, \n;' -- Edit this bug report at https://bugs.php.net/bug.php?id=64322edit=1
Bug #64235 [Opn]: Insteadof not work for class method in 5.4.11
Edit report at https://bugs.php.net/bug.php?id=64235edit=1 ID: 64235 Updated by: re...@php.net Reported by:imenem at inox dot ru Summary:Insteadof not work for class method in 5.4.11 Status: Open Type: Bug Package:Scripting Engine problem Operating System: Debian GNU/Linux PHP Version:5.4.11 -Assigned To: +Assigned To:dmitry Block user comment: N Private report: N New Comment: Hi dmitry, will you take a look please. Previous Comments: [2013-02-18 11:58:23] imenem at inox dot ru Description: In PHP 5.4.4 test script works as expected, in 5.4.11 script caused fatal error. Test script: --- ?php class TestParentClass { public function method() { print_r('Parent method'); print \n; } } trait TestTrait { public function method() { print_r('Trait method'); print \n; } } class TestChildClass extends TestParentClass { use TestTrait { TestTrait::method as methodAlias; TestParentClass::method insteadof TestTrait; } } (new TestChildClass)-method(); (new TestChildClass)-methodAlias(); Expected result: Parent method Trait method Actual result: -- Fatal error: Trait TestParentClass is not used in test.php on line 28 -- Edit this bug report at https://bugs.php.net/bug.php?id=64235edit=1
Bug #63847 [Opn-Fbk]: wrong warning when using in_array() function with specific parameters
Edit report at https://bugs.php.net/bug.php?id=63847edit=1 ID: 63847 Updated by: re...@php.net Reported by:evil0x3a at gmail dot com Summary:wrong warning when using in_array() function with specific parameters -Status: Open +Status: Feedback Type: Bug -Package:Compile Warning +Package:Scripting Engine problem Operating System: Linux PHP Version:5.3.20 Block user comment: N Private report: N New Comment: I can't reproduce it, will you check it again? Previous Comments: [2012-12-24 10:53:38] evil0x3a at gmail dot com Description: in_array() function cannot deal with an array that has been declared in an included script , and the compiler shows ths warning : PHP Warning: in_array() expects parameter 2 to be array, null given in ... Test script: --- we have 2 files file 1 ( arrayFile.php ) ?php $languages = array('en','fr','es','it','ar','in','ru','jp'); ? file 2 ( index.php ) ?php require_once('arrayFile.php'); $language = 'ar'; if(in_array($language,$languages)) { print 200 OK; } else { print 404 not found; } ? Expected result: i expect that in_array() function returns true while the value of $language is available in $languages directory ! Actual result: -- Returns nothing and provides this warning : PHP Warning: in_array() expects parameter 2 to be array, null given in ... -- Edit this bug report at https://bugs.php.net/bug.php?id=63847edit=1
Bug #63857 [Opn-Nab]: calling closure when providing it as an arg from the args array
Edit report at https://bugs.php.net/bug.php?id=63857edit=1 ID: 63857 Updated by: re...@php.net Reported by:alexander dot moldova at gmail dot com Summary:calling closure when providing it as an arg from the args array -Status: Open +Status: Not a bug Type: Bug Package:Reflection related Operating System: ubuntu 12.10 PHP Version:5.4.10 Block user comment: N Private report: N New Comment: From the error message, the closure declared like: function(array $param); see http://php.net/call_user_func_array so : call_user_func_array($b, $c) + $a; = call_user_func_array($b, array(2)) + 0; and = $closure(2); 2 is not an array Previous Comments: [2012-12-26 15:32:04] alexander dot moldova at gmail dot com Description: calling closure when providing it as an arg from the args array provided as the second parameter for the invokeArgs method from \ReflectionMethod class Test script: --- method is: public function simpleTest($a, callable $b, array $c) { return (int) call_user_func_array($b, $c) + $a; } $params is: array (size=3) 0 = int 2 1 = object(Closure)[95] 2 = array (size=1) 0 = int 2 and calling: $this-refl-invokeArgs(new Blablabla, $params); will generate the bug Expected result: method returning value Actual result: -- Error: Argument 1 passed to {closure}() must be of the type array, integer given In fact instead or the array is provided the int 2 -- Edit this bug report at https://bugs.php.net/bug.php?id=63857edit=1
Bug #63786 [Opn-Nab]: Compile failure in ext/json/utf8_to_utf16.c
Edit report at https://bugs.php.net/bug.php?id=63786edit=1 ID: 63786 Updated by: re...@php.net Reported by:me at derrabus dot de Summary:Compile failure in ext/json/utf8_to_utf16.c -Status: Open +Status: Not a bug Type: Bug Package:Compile Failure Operating System: Ubuntu 12.10 PHP Version:5.5Git-2012-12-17 (Git) Block user comment: N Private report: N New Comment: closed Previous Comments: [2012-12-17 16:07:11] me at derrabus dot de Thank you for your quick reply. After running buildconf (which I forgot after the pull), php compiles fine. Sorry for this bogus report. :-( [2012-12-17 11:48:03] johan...@php.net Have you run ./buildconf and configure to regenerate the Makefile after updating from git? [2012-12-17 11:21:14] me at derrabus dot de Description: I've just tried to compile the current 5.5 branch from git. ext/json fails to build. My test machine runs a Ubuntu 12.10 standard configuration. Linux 3.5.0-19-generic (64bit) GCC 4.7.2 Test script: --- ./configure --prefix=/opt/php/php-5.5-dev --enable-cli --with-zlib --with-pear make Expected result: A compiled version of PHP 5.5. Actual result: -- /home/rabus/php-src/ext/json/json.c: In function âjson_escape_stringâ: /home/rabus/php-src/ext/json/json.c:422:6: warning: unknown conversion type character âkâ in format [-Wformat] /home/rabus/php-src/ext/json/json.c: In function âphp_json_encodeâ: /home/rabus/php-src/ext/json/json.c:630:6: warning: unknown conversion type character âkâ in format [-Wformat] make: *** No rule to make target `/home/rabus/php-src/ext/json/utf8_to_utf16.c', needed by `ext/json/utf8_to_utf16.lo'. Stop. -- Edit this bug report at https://bugs.php.net/bug.php?id=63786edit=1
Bug #63782 [Opn-Fbk]: php.ini not loaded by php-fpm unless -c switch is used
Edit report at https://bugs.php.net/bug.php?id=63782edit=1 ID: 63782 Updated by: re...@php.net Reported by:infected817 at gmail dot com Summary:php.ini not loaded by php-fpm unless -c switch is used -Status: Open +Status: Feedback Type: Bug Package:*Configuration Issues Operating System: Ubuntu Desktop 12.10 PHP Version:5.4.9 Block user comment: N Private report: N New Comment: It's compiled with: /etc/php5/fpm Configuration File (php.ini) Path */etc/php5/[fpm]* Loaded Configuration File (none) but you try to load php.ini from: /etc/php5 -- no fpm it's different. Previous Comments: [2012-12-16 08:40:21] infected817 at gmail dot com Description: I am seeing an issue where PHP 5.4.9 I compile myself or installed via apt-get will not load the php.ini file even if it exists in the Configuration File Path unless I pass in a -c /path/to/php.in to start up PHP-FPM. 1. To reproduce, compile PHP 5.4.9 with these configuration options: --prefix=/usr/local/php-5.4.9 --with-config-file-path=/etc/php5/ 2. Run make make install. 3. Copy the stock php.ini-development to /etc/php5/php.ini 4. Create a phpinfo() file on the webserver. 5. Start PHP-FPM and browse to that phpinfo() file. 6. See the following result in the output: Configuration File (php.ini) Path /etc/php5/fpm Loaded Configuration File (none) 7. However, if we start PHP-FPM with the -c switch: ./php-fpm --fpm-config /etc/php5/php-fpm.conf -c /etc/php5/php.ini We see that php.ini is loaded: Configuration File (php.ini) Path /etc/php5/fpm Loaded Configuration File php.ini The configuration is not loaded at all unless you explicitly pass it using the -c switch to php.ini. That is even though php.ini resides in the Configuration File Path Expected result: php.ini should be loaded since it is in the Configuration File Path Actual result: -- php.ini is not loaded at all, even though it exists in the Configuration File Path -- Edit this bug report at https://bugs.php.net/bug.php?id=63782edit=1
Bug #63780 [Opn-Fbk]: Segmentation fault when try to get $request
Edit report at https://bugs.php.net/bug.php?id=63780edit=1 ID: 63780 Updated by: re...@php.net Reported by:php dot maks3w at virtualplanets dot net Summary:Segmentation fault when try to get $request -Status: Open +Status: Feedback Type: Bug Package:SOAP related PHP Version:5.4.9 Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. Thank you for helping us make PHP better. Previous Comments: [2012-12-15 18:06:17] php dot maks3w at virtualplanets dot net Description: Situation: Custom class which extend from SoapClient and override public function __doRequest($request, $location, $action, $version, $one_way = null) $request can't be used to compare strings, instead throw a Segmentation Fault error. $request looks like a C Pointer or any other type instead of a PHP String type As workaround you can filter the variable passing the value through a function which return basically the same value of the argument passed as input (like ltrim) after that it's possible save the returned value and now is a normal PHP String and can be compared. Test script: --- FAILING CODE: public $lastRequest; function __doRequest($request, $location, $action, $version, $one_way = 0) { $this-lastRequest = $request; } $this-assertEquals('SomeContent', $this-lastRequest); // Segmentation Faul. WORKAROUND: public $lastRequest; function __doRequest($request, $location, $action, $version, $one_way = 0) { $this-lastRequest = ltrim($request); // Pass $request through a function } $this-assertEquals('SomeContent', $this-lastRequest); // Works -- Edit this bug report at https://bugs.php.net/bug.php?id=63780edit=1
Bug #63591 [Opn-Fbk]: Can't write to properties of mysqli classes using Reflection API
Edit report at https://bugs.php.net/bug.php?id=63591edit=1 ID: 63591 Updated by: re...@php.net Reported by:HMWiesinger at gmx dot at Summary:Can't write to properties of mysqli classes using Reflection API -Status: Open +Status: Feedback Type: Bug Package:MySQLi related Operating System: Linux PHP Version:5.4.9 Block user comment: N Private report: N New Comment: affected_rows property is kinda readonly property, so we can't change that with reflection apis or property value update. it makes the property reliable, I don't see a reason to change that, I you really need to do that inherit it with a subclass. Previous Comments: [2012-11-23 20:07:34] HMWiesinger at gmx dot at Description: It doesn't seem to be possible to get write access to properties of mysqli classes using the Reflection API. Test script: --- $mysqli = new MySQLi(); $reflection = new ReflectionClass('\MySQLi'); $property = $reflection-getProperty('affected_rows'); $property-setAccessible(TRUE); $property-setValue($mysqli, 10); Expected result: No Error Actual result: -- Fatal error: ReflectionProperty::setValue(): Cannot write property -- Edit this bug report at https://bugs.php.net/bug.php?id=63591edit=1
Bug #62460 [Csd]: php binaries installed as binary.dSYM
Edit report at https://bugs.php.net/bug.php?id=62460edit=1 ID: 62460 Updated by: re...@php.net Reported by:phpbugs at adam dot gs Summary:php binaries installed as binary.dSYM Status: Closed Type: Bug Package:*Compile Issues Operating System: OSX 10.8 PHP Version:5.3.14 Assigned To:johannes Block user comment: N Private report: N New Comment: @levim Yes, it's ok to just rename it, if you want to run fpm, you may need to rename php-cgi too :) Previous Comments: [2012-11-18 20:40:31] le...@php.net As someone who is showing up late to the party; is it safe to rename the file `php.dSYM` to `php` or should I apply the patch, reconfigure, recompile, etc? [2012-08-06 03:31:39] s...@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-08-06 03:28:09] s...@php.net Automatic comment on behalf of reeze@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=07ee764e5709dc8d9f26382d8e7438696f5bb834 Log: Fixed bug #62460 (php binaries installed as binary.dSYM) [2012-07-20 02:55:21] reeze dot xia at gmail dot com Hi, The new released PHP-5.3.15 still have this bug. you could use the distributed tar package to reproduce. using google to search php.dSYM there are a lot of result about it. Thanks [2012-07-19 06:45:26] larue...@php.net johannes, could you please look at this? thanks The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=62460 -- Edit this bug report at https://bugs.php.net/bug.php?id=62460edit=1
Bug #63428 [Opn]: The behavior of execute() changed
Edit report at https://bugs.php.net/bug.php?id=63428edit=1 ID: 63428 Updated by: re...@php.net Reported by:re...@php.net Summary:The behavior of execute() changed Status: Open Type: Bug Package:*General Issues Operating System: ANY PHP Version:master-Git-2012-11-03 (Git) -Assigned To: +Assigned To:nikic Block user comment: N Private report: N New Comment: Hi Nikic, will you take a look? Thanks :) https://github.com/php/php-src/pull/227 Previous Comments: [2012-11-03 15:25:32] re...@php.net Description: Test Zend/tests/bug35437.phpt failed because of this when dtrace enabled or any extension which override zend_execute function pointer, such as xdebug. Test script: --- Test: Zend/tests/bug35437.phpt with dtrace or xdebug enabled Expected result: test PASS Actual result: -- Test failed because of segfault. -- Edit this bug report at https://bugs.php.net/bug.php?id=63428edit=1
Bug #63411 [Opn]: curl_multi_select() returns invalid value
Edit report at https://bugs.php.net/bug.php?id=63411edit=1 ID: 63411 Updated by: re...@php.net Reported by:marcel at silverstreet dot com Summary:curl_multi_select() returns invalid value Status: Open Type: Bug Package:cURL related Operating System: CentOS 6.3 PHP Version:5.3.18 -Assigned To: +Assigned To:pierrick Block user comment: N Private report: N New Comment: This is related to this see: https://github.com/php/php-src/commit/2e8ab65270e7d1ebe1ef0dfe13836c29d72c7010 http://curl.haxx.se/libcurl/c/curl_multi_fdset.html There is no handles in the test script, it is expected after the patch. Previous Comments: [2012-11-01 18:33:41] aa dot vasilenko at gmail dot com Confirming the same bug. PHP 5.4.8, CentOS 5.8 [2012-11-01 11:10:46] marcel at silverstreet dot com Description: curl_multi_select() seems broken in PHP 5.3.18 on CentOS 6.3. The behavior of the test script below is different than it used to be, returning immediately without select with a -1 (failure) return value. Test script: --- $mh = curl_multi_init(); print curl_multi_select($mh, 1.0); curl_multi_close($mh); Expected result: curl_multi_select() should take 1.0 seconds to complete and returns 0 Actual result: -- curl_multi_select() returns immediately with return value of -1 -- Edit this bug report at https://bugs.php.net/bug.php?id=63411edit=1
Bug #63248 [Opn]: ext\fileinfo\tests\bug61964.phpt fails
Edit report at https://bugs.php.net/bug.php?id=63248edit=1 ID: 63248 Updated by: re...@php.net Reported by:a...@php.net Summary:ext\fileinfo\tests\bug61964.phpt fails Status: Open Type: Bug Package:*General Issues Operating System: Windows PHP Version:5.4Git-2012-10-09 (Git) Block user comment: N Private report: N New Comment: on windows we couldn't fopen() or file_get_contents() a directory. it didn't consist on *nix systems behavior so does the test failed because of this. maybe we could update streams implementation? Previous Comments: [2012-10-11 22:40:08] mattfic...@php.net Most recent patch fixes the actual problem for me. Test still fails, but I don't get any error messages. It fails because the expected warning messages are missing. [2012-10-11 15:53:18] a...@php.net Updated the patch, using the PHPs readdir implementation win32/readdir.c instead of reimlementing it :) [2012-10-11 15:42:01] a...@php.net The following patch has been added/updated: Patch Name: bug63248.patch Revision: 1349970121 URL: https://bugs.php.net/patch-display.php?bug=63248patch=bug63248.patchrevision=1349970121 [2012-10-10 18:02:46] a...@php.net The issue is the following - when a directory is given as a magic path, libmagic looks for files inside it and tries to load all the files as magic files. Under windows there are two wrong points - libmagic tries to get a directory handle - libmagic uses opendir, readdir and so on which doesn't well on windows The patch prevents libmagic from opening a directory and uses FindNextFile from the windows API to iterate dirs. After applying this patch there are two tests failing ext\fileinfo\tests\finfo_file_regex-win32.phpt ext\fileinfo\tests\finfo_open_error-win32.phpt But, the corresponding non win32 tests pass. Different behaviour of that two win32 tests seems co be caused because of the bug in this ticket, so then they could be kicked after the patch was applied. [2012-10-10 17:51:00] a...@php.net The following patch has been added/updated: Patch Name: bug63248.patch Revision: 1349891460 URL: https://bugs.php.net/patch-display.php?bug=63248patch=bug63248.patchrevision=1349891460 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=63248 -- Edit this bug report at https://bugs.php.net/bug.php?id=63248edit=1
Bug #53289 [Fbk-Nab]: about __destruct
Edit report at https://bugs.php.net/bug.php?id=53289edit=1 ID: 53289 Updated by: re...@php.net Reported by:asersz at gmail dot com Summary:about __destruct -Status: Feedback +Status: Not a bug Type: Bug Package:Scripting Engine problem Operating System: Windows 7 PHP Version:5.2.14 Block user comment: N Private report: N New Comment: @see http://3v4l.org/QJMph å¨ææççæ¬ä¸é½è¡¨ç°æ£å¸¸ããä½ çæè¿°æç¹ä¸æ¸ æ¥ãè¿æ®µä»£ç æ¬æ¥å°±ä¸ä¼æä»ä¹è¾åºã æå å ³éäºï¼å¦ææé®é¢ä½ åreopenå§ã I can't reproduce it, seems not a but, Closed for now, if you have any issues, please reopen it. Previous Comments: [2012-03-29 15:16:15] php dot net at doppy dot nl I'm unable to reproduce any error's or a white screen. Code looks fine, although it is a bit of a strange construction. Recommend closing this bug as not a bug as it has been open for 1,5 years now. [2010-11-10 23:37:44] fel...@php.net Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. Thank you for helping us make PHP better. I can't reproduce any problem with this test script. [2010-11-10 09:25:36] asersz at gmail dot com Description: I am not good at english.. Read the following code .. An error occurs when you run it.. (there will be white-screen in my codes.) Chinese : å¦æä½ è½çæä¸æ.é£æ好ä¸è¿äº. ä¸é¢ç代ç æ认为__destruct被继æ¿ä¹å, ä¼å¯¼è´ä¸é¢ä¸¤ä¸ªç±»ç对象å¨éæ¾æ¶åºç°æ æ³æ¾å°static $childsçé误. ä½æ¯å¨æç代ç éé¢ä»ç¡®å®æ²¡æåºç°è¿ä¸ªé误, åèè¿è¡äºå¾ä¹ ä¹ååºç°äºç½å±. çä¸å»å¾åä¸ä¸ªæ»å¾ªç¯. Test script: --- error_reporting(E_ALL); ini_set('display_errors', 'on'); abstract class Father { private static $childs = array(); public static function getChild( $child ) { if (!array_key_exists($child, self::$childs)) { self::$childs[$child] = new $child; } return self::$childs[$child]; } public function __destruct() { foreach (self::$childs as $i = $child) { self::$childs[$i] = $child = null; } } } class Child1 extends Father {} class Child2 extends Father {} $child1 = Father::getChild('Child1'); $child2 = Father::getChild('Child2'); -- Edit this bug report at https://bugs.php.net/bug.php?id=53289edit=1
Bug #61927 [Opn-Csd]: ext/standard/tests/general_functions/debug_zval_dump_o.phpt diffs in ZTS mode
Edit report at https://bugs.php.net/bug.php?id=61927edit=1 ID: 61927 Updated by: re...@php.net Reported by:s...@php.net Summary:ext/standard/tests/general_functions/debug_zval_dump_o.phpt diffs in ZTS mode -Status: Open +Status: Closed Type: Bug Package:Testing related PHP Version:5.4.1 -Assigned To: +Assigned To:reeze Block user comment: N Private report: N New Comment: Fixed in 11d05589282a7f9c795a0af77dcd2b3cc0a158ce Previous Comments: [2012-05-03 18:16:15] s...@php.net Description: Similar to https://bugs.php.net/bug.php?id=61892 the test ext/standard/tests/general_functions/debug_zval_dump_o.phpt diffs in ZTS mode. This probably needs the test to be forked, but the code should be reviewed first. Expected result: No diff Actual result: -- 007+ long(10) refcount(1) 007- long(10) refcount(5) 009+ long(20) refcount(1) 009- long(20) refcount(5) 011+ long(30) refcount(1) 011- long(30) refcount(7) 013+ array(2) refcount(1){ 013- array(2) refcount(5){ 015+ long(1) refcount(5) 015- long(1) refcount(1) 017+ long(3) refcount(5) 017- long(3) refcount(1) 024+ long(10) refcount(1) 024- long(10) refcount(5) 026+ long(20) refcount(1) 026- long(20) refcount(5) 028+ long(30) refcount(1) 028- long(30) refcount(7) 030+ array(2) refcount(1){ 030- array(2) refcount(5){ 032+ long(1) refcount(5) 032- long(1) refcount(1) 034+ long(3) refcount(5) 034- long(3) refcount(1) 046+ long(30) refcount(1) 046- long(30) refcount(2) 048+ long(40) refcount(1) 048- long(40) refcount(2) 050+ long(50) refcount(1) 050- long(50) refcount(2) 056+ long(10) refcount(1) 056- long(10) refcount(5) 058+ long(20) refcount(1) 058- long(20) refcount(5) 060+ long(30) refcount(3) 060- long(30) refcount(7) 062+ array(2) refcount(1){ 062- array(2) refcount(5){ 064+ long(1) refcount(5) 064- long(1) refcount(1) 066+ long(3) refcount(5) 066- long(3) refcount(1) 073+ long(10) refcount(1) 073- long(10) refcount(5) 075+ long(20) refcount(1) 075- long(20) refcount(5) 077+ long(30) refcount(3) 077- long(30) refcount(7) 079+ array(2) refcount(1){ 079- array(2) refcount(5){ 081+ long(1) refcount(5) 081- long(1) refcount(1) 083+ long(3) refcount(5) 083- long(3) refcount(1) 094+ long(10) refcount(1) 094- long(10) refcount(5) 096+ long(20) refcount(1) 096- long(20) refcount(5) 098+ long(30) refcount(1) 098- long(30) refcount(7) 100+ array(2) refcount(1){ 100- array(2) refcount(5){ 102+ long(1) refcount(5) 102- long(1) refcount(1) 104+ long(3) refcount(5) 104- long(3) refcount(1) 111+ long(10) refcount(1) 111- long(10) refcount(5) 113+ long(20) refcount(1) 113- long(20) refcount(5) 115+ long(30) refcount(1) 115- long(30) refcount(7) 117+ array(2) refcount(1){ 117- array(2) refcount(5){ 119+ long(1) refcount(5) 119- long(1) refcount(1) 121+ long(3) refcount(5) 121- long(3) refcount(1) 132+ long(10) refcount(1) 132- long(10) refcount(5) 134+ long(20) refcount(1) 134- long(20) refcount(5) 136+ long(30) refcount(3) 136- long(30) refcount(7) 138+ array(2) refcount(1){ 138- array(2) refcount(5){ 140+ long(1) refcount(5) 140- long(1) refcount(1) 142+ long(3) refcount(5) 142- long(3) refcount(1) 149+ long(10) refcount(1) 149- long(10) refcount(5) 151+ long(20) refcount(1) 151- long(20) refcount(5) 153+ long(30) refcount(3) 153- long(30) refcount(7) 155+ array(2) refcount(1){ 155- array(2) refcount(5){ 157+ long(1) refcount(5) 157- long(1) refcount(1) 159+ long(3) refcount(5) 159- long(3) refcount(1) 170+ long(10) refcount(1) 170- long(10) refcount(5) 172+ long(20) refcount(1) 172- long(20) refcount(5) 174+ long(30) refcount(1) 174- long(30) refcount(7) 176+ array(2) refcount(1){ 176- array(2) refcount(5){ 178+ long(1) refcount(5) 178- long(1) refcount(1) 180+ long(3) refcount(5) 180- long(3) refcount(1) 187+ long(10) refcount(1) 187- long(10) refcount(5) 189+ long(20) refcount(1) 189- long(20) refcount(5) 191+ long(30) refcount(1) 191- long(30) refcount(7) 193+ array(2) refcount(1){ 193- array(2) refcount(5){ 195+ long(1) refcount(5) 195- long(1) refcount(1) 197+ long(3) refcount(5) 197- long(3) refcount(1) 209+ long(30) refcount(1) 209- long(30) refcount(2) 211
Bug #63256 [Opn]: ReflectionProperty::getName() returns false
Edit report at https://bugs.php.net/bug.php?id=63256edit=1 ID: 63256 Updated by: re...@php.net Reported by:asynchronio at gmail dot com Summary:ReflectionProperty::getName() returns false Status: Open Type: Bug Package:Reflection related Operating System: Windows 7 (x64) PHP Version:5.4.7 Block user comment: N Private report: N New Comment: Are the test script the same as yours ? any more information? see http://3v4l.org/Z9T8Q no version of PHP returns false. Previous Comments: [2012-10-11 05:29:05] asynchronio at gmail dot com Note: this looks fixed in 5.4.7 version (bug report is related to 5.4.6) [2012-10-11 04:50:11] asynchronio at gmail dot com Hm, interesting thing - i've found this example working fine via php -e test.php, but it's not working via builtin web-server (php -S localhost:8000 and then requesting script via browser) [2012-10-11 03:20:32] larue...@php.net I can not reproduce this with 5.3/5.4, neither linux nor windows. [2012-10-11 02:51:11] asynchronio at gmail dot com Test script outputs expected result in older versions, tested on 5.2.5 and 5.3.17 [2012-10-11 02:41:01] asynchronio at gmail dot com Sorry, invalid data posted in Expected / Actual results I've meant: Expected result: array(2) { [0]= string(3) foo [1]= string(3) bar } Actual result: -- array(2) { [0]= bool(false) [1]= bool(false) } 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=63256 -- Edit this bug report at https://bugs.php.net/bug.php?id=63256edit=1
Req #63242 [Opn]: Default error page in PHP built-in web server uses outdated html/css
Edit report at https://bugs.php.net/bug.php?id=63242edit=1 ID: 63242 Updated by: re...@php.net Reported by:pascal dot chevrel at free dot fr Summary:Default error page in PHP built-in web server uses outdated html/css Status: Open Type: Feature/Change Request Package:Built-in web server Operating System: Linux PHP Version:5.4.7 Block user comment: N Private report: N New Comment: @Pascal, I like the idea to make it more modern, I just think the color you choose it not well consist with PHP's blue color and visual identity. Previous Comments: [2012-10-09 12:02:24] pascal dot chevrel at free dot fr I just attached an updated patch that restores the blue color. You can see the result here: http://chevrel.org/images/phpbugs/bug63242v2.png I also compiled php locally and ran the tests, there were 2 tests failing because of the new patch, I updated these two tests in my patch. Tell me if you need updates to this patch, thanks. [2012-10-09 09:40:50] pascal dot chevrel at free dot fr @laruence Thanks, I will do that this afternoon. Is that ok if I just add back the blue background color of do you want the page to remain strictly identical to what it is now? (currently the title and paragraph are not aligned, the title also has no padding and sticks to the blue border /ex). [2012-10-09 09:34:33] larue...@php.net sorry, should be: it will be better if you can improve the skeleton, but keep the looks [2012-10-09 09:34:02] larue...@php.net @pascal, thanks it will be better if you can improve the skeleton keep the looks [2012-10-09 08:37:57] pascal dot chevrel at free dot fr Reeze, not sure I understand what you mean. For sure, I am in no way saying that the integrated web server should be used in production. You seem to be of the opinion that since it is not targetting production, it is ok that it is using obsolete HTML/CSS and looks like a 404 page from the 90's, I disagree, there is no reason to use complex sub-quality HTML/CSS, especially since it gives poor visual result. My patch simplifies the code used (less lines of code) while making the error page a bit more decent in terms of layout. I am happy to make compromises on this patch and revert the color to use the same blue color as before if you wish, using correct typography/alignment and simpler html/css code in the source code would already be a win for both consumers (web developpers that see this page during their developement) and the code base I think. 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=63242 -- Edit this bug report at https://bugs.php.net/bug.php?id=63242edit=1
Req #63242 [Opn]: Default error page in PHP built-in web server uses outdated html/css
Edit report at https://bugs.php.net/bug.php?id=63242edit=1 ID: 63242 Updated by: re...@php.net Reported by:pascal dot chevrel at free dot fr Summary:Default error page in PHP built-in web server uses outdated html/css Status: Open Type: Feature/Change Request Package:Built-in web server Operating System: Linux PHP Version:5.4.7 Block user comment: N Private report: N New Comment: It's nice to have modern, but the appearance should be consist on PHP itself(VI). PHP use the BLUE a lot, kind of the color of PHP. as the color yellow, It looks like an error page of django :) and the built-in server is just for testing purpose, If possible, I'd PHP redesign its Visual Identity System to be more modern. And, yes there is a PHP.net alpha there: http://www.php.net/my.php (enable it at the bottom). but seems didn't active for a long time. Previous Comments: [2012-10-08 17:53:00] pascal dot chevrel at free dot fr Here is a after/before screenshot: http://chevrel.org/images/phpbugs/bug63242.png Note that I chose yellow for the error header instead of blue because this is the color used in the terminal for such errors, blue is not usually an error associated to errors. [2012-10-08 17:41:00] pascal dot chevrel at free dot fr Description: The default error page in the built-in webserver is very ugly. Looking at the history of the file in the git repository, these styles and html were copied from the phpinfo styling created in 2002 with CSS selectors that had Netscape 4/IE4 compatibility in mind. Appearances matter :) It makes this new PHP feature look already outdated. I am going to attach a patch that: * will make it look a bit more modern and works in responsive mode too * will remove unused css rules from the code * will add an html5 doctype to the error page * will remove unnecesary html attributes in html5 (I noticed that there are 2 tests in the sapi/cli/tests folder that reproduce some of this html, I don't know how tests work for php but I can give a shot at updating the expected results of the tests in the patch if required) -- Edit this bug report at https://bugs.php.net/bug.php?id=63242edit=1
Req #63188 [Opn]: Display class name when debugging with gdb macro zbacktrace
Edit report at https://bugs.php.net/bug.php?id=63188edit=1 ID: 63188 Updated by: re...@php.net Reported by:re...@php.net Summary:Display class name when debugging with gdb macro zbacktrace Status: Open Type: Feature/Change Request Package:Unknown/Other Function PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Hi Laruence, 1. Hmm, it is, if build with zts zbacktrace need running process, I know it's another problem:) dump_bt didn't before, that could be fixed I will update that to not require running process. 2. It would be easier to debug, such as test script, if there are inherent or the same function/method name, method's backtrace are the same as normal function. if there are class name, we will not need to check them one by one:) Previous Comments: [2012-09-30 15:51:45] larue...@php.net 1. it's not a good idea to make 'zbacktrace' require a running process. 2. and why need this? there are file/line/method already [2012-09-29 19:22:04] re...@php.net A patch was sent here: https://github.com/php/php-src/pull/209 [2012-09-29 19:17:14] re...@php.net Description: For example, an uncatched exception backtrace and debug_backtrace() have class name if it's an method. but when debugging with gdb, the macro zbacktrace and dump_bt didn't display it. it would be easier to debug if the class name displayed just like: Fatal error: Uncaught exception 'Exception' with message 'NO' in /Users/reeze/Opensource/php-test/php-src-5.4/b.php:5 Stack trace: #0 /Users/reeze/Opensource/php-test/php-src-5.4/b.php(9): A::bar() #1 /Users/reeze/Opensource/php-test/php-src-5.4/b.php(15): A-foo(1) #2 /Users/reeze/Opensource/php-test/php-src-5.4/b.php(20): B-foo(1) #3 {main} thrown in /Users/reeze/Opensource/php-test/php-src-5.4/b.php on line 5 Test script: --- ?php class A { static function bar() { core_me('127.0.0.1'); // it will core } function foo($param) { self::bar(); } } class B extends A { function foo($param) { parent::foo($param); } } $b = new B(); $b-foo(1); Expected result: [0x100ca4490] core_me(127.0.0.1) /Users/reeze/Opensource/php-test/php-src- 5.4/b.php:5 [0x100ca43a8] A::bar() /Users/reeze/Opensource/php-test/php-src-5.4/b.php:8 [0x100ca42b8] A-foo(1) /Users/reeze/Opensource/php-test/php-src-5.4/b.php:14 [0x100ca40e8] B-foo(1) /Users/reeze/Opensource/php-test/php-src-5.4/b.php:19 Actual result: -- [0x100ca4490] core_me(127.0.0.1) /Users/reeze/Opensource/php-test/php-src- 5.4/b.php:5 [0x100ca43a8] bar() /Users/reeze/Opensource/php-test/php-src-5.4/b.php:8 [0x100ca42b8] foo(1) /Users/reeze/Opensource/php-test/php-src-5.4/b.php:14 [0x100ca40e8] foo(1) /Users/reeze/Opensource/php-test/php-src-5.4/b.php:19 -- Edit this bug report at https://bugs.php.net/bug.php?id=63188edit=1
Bug #63156 [Opn]: using if ( expression ) requires functions to be declared before calls
Edit report at https://bugs.php.net/bug.php?id=63156edit=1 ID: 63156 Updated by: re...@php.net Reported by:herb at bobbingwide dot com Summary:using if ( expression ) requires functions to be declared before calls Status: Open Type: Bug Package:*Programming Data Structures Operating System: Windows XP PHP Version:5.3.17 Block user comment: N Private report: N New Comment: Top level declaration are available after compiling, but conditional declaration can only be available after executed. (since PHP itself didn't do optimization, i`f(true) {doSomething();}` is not equal to `doSomething();` exactly ) the same rules for class declarations. This could be classified as a documentation problem. Previous Comments: [2012-09-25 02:40:07] larue...@php.net it is good manner always declare function/class before using it. [2012-09-24 19:56:55] herb at bobbingwide dot com Description: When enclosing code between if ( expression ) { and } it appears that versions of PHP up to and including 5.3.17 require functions to be declared before they are used. I first noticed the problem when I tried to wrap a whole PHP source file like this ?php if ( !defined( 'CONSTANT' )) { define( 'CONSTANT', true ); // whole file here } // end defined I reduced the problem to the simplest; replacing !defined( 'CONSTANT') with true and got the same unexpected results. The code did not work unless the (top level) functions were declared before they were used. I found the problem on PHP 5.3.5 where the code produced a Fatal error: Call to undefined function. I have since reproduced the Fatal error on PHP 5.3.16 and 5.3.17 If you remove the 'if test' (lines 2 and 7) the code works fine. If you put the call to the function after the declaration that also works. This code, where the call to b() is before the declaration of function b, also works ?php if ( true ) { function a() { echo a . PHP_EOL; b(); } function b() { echo b . PHP_EOL; } a(); } producing a b Test script: --- ?php if ( true ) { a(); function a() { echo a . PHP_EOL; } } Expected result: a Actual result: -- Fatal error: Call to undefined function a() in C:\apache\htdocs\wordpress\wp-con tent\plugins\play\defined.php on line 3 -- Edit this bug report at https://bugs.php.net/bug.php?id=63156edit=1
Bug #62952 [Opn-Fbk]: Methods from ServerClient cannot be used with ReflectionMethod
Edit report at https://bugs.php.net/bug.php?id=62952edit=1 ID: 62952 Updated by: re...@php.net Reported by:gabriel dot heming at hotmail dot com Summary:Methods from ServerClient cannot be used with ReflectionMethod -Status: Open +Status: Feedback Type: Bug Package:Reflection related Operating System: Windows PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Hi, since call methods from a webservice like $client-method($args) is a proxy method, it didn't exist in Soapclient, it use the magic method Soapclient::__call() to the really work, so th method didn't exist at all see: https://gist.github.com/3750131, it should been a fatal error complain method didn't exists. could you please try the test script from the gist above? Previous Comments: [2012-08-27 14:36:53] gabriel dot heming at hotmail dot com Description: Well, I'm trying reflect a client of web service. When I use call_user_func_array it works fine. But when I use ReflectionMethod, doesn't work. Is better you see: Test script: --- My variables: $client = new SoapClient('http://localhost/webservice?wsdl'); $method = 'someMethod'; arguments = array('argument one' , 'argument two'); This code work fine: return call_user_func_array(array($client , $method) , $arguments); This code doesn't work $reflectionMethod = new ReflectionMethod($client , $method); return $reflectionMethod-invokeArgs($client , $arguments); Expected result: Return of function from ServerClient. Actual result: -- Fatal error: Uncaught SoapFault exception: [Client] looks like we got no XML document in... -- Edit this bug report at https://bugs.php.net/bug.php?id=62952edit=1
Bug #63112 [Opn-Fbk]: PharException when compiling
Edit report at https://bugs.php.net/bug.php?id=63112edit=1 ID: 63112 Updated by: re...@php.net Reported by:bbialek at smartertravelmedia dot com Summary:PharException when compiling -Status: Open +Status: Feedback Type: Bug Package:PHAR related Operating System: CentOS 6.3 PHP Version:5.4.7 Block user comment: N Private report: N New Comment: Does your temp dir have enough space? Previous Comments: [2012-09-18 16:22:21] bbialek at smartertravelmedia dot com Description: When running make after configure, the php build fails in ext/phar/phar.phar with: Fatal error: Uncaught exception 'PharException' with message 'unable to create temporary file' in /usr/src/php-5.4.7/ext/phar/phar.php:1011 Test script: --- ./configure --enable-bcmath --enable-calendar --enable-cli --enable-ftp --enable-mbstring --enable-pcntl --enable-soap --with-apxs2 --with-curl --with-gettext --with-libdir=lib64 --with-mcrypt --with-mysqli --with-mysql=/usr/ --with-openssl --without-pdo-sqlite --with-pdo-mysql=/usr --with-pdo-sqlite --with-tidy --with-zlib-dir=/usr/lib64 --enable-zip make Expected result: I expect make to exit successfully and not with Error 255. Actual result: -- Fatal error: Uncaught exception 'PharException' with message 'unable to create temporary file' in /usr/src/php-5.4.7/ext/phar/phar.php:1011 Stack trace: #0 /usr/src/php-5.4.7/ext/phar/phar.php(1011): Phar- setStub('#!/usr/local/bi...') #1 /usr/src/php-5.4.7/ext/phar/phar.php(1071): PharCommand- phar_set_stub_begin(Object(Phar), '/root/rpmbuild/...', '/usr/src/php-5', '/usr/local/bin/...') #2 [internal function]: PharCommand-cli_cmd_run_pack(Array) #3 /usr/src/php-5.4.7/ext/phar/phar.php(225): call_user_func(Array, Array) #4 /usr/src/php-5.4.7/ext/phar/phar.php(2089): CLICommand-__construct(19, Array) #5 {main} thrown in /usr/src/php-5.4.7/ext/phar/phar.php on line 1011 make: *** [ext/phar/phar.phar] Error 255 -- Edit this bug report at https://bugs.php.net/bug.php?id=63112edit=1
Bug #63112 [Fbk-Csd]: PharException when compiling
Edit report at https://bugs.php.net/bug.php?id=63112edit=1 ID: 63112 Updated by: re...@php.net Reported by:bbialek at smartertravelmedia dot com Summary:PharException when compiling -Status: Feedback +Status: Closed Type: Bug Package:PHAR related Operating System: CentOS 6.3 PHP Version:5.4.7 -Assigned To: +Assigned To:reeze Block user comment: N Private report: N Previous Comments: [2012-09-19 18:20:35] bbialek at smartertravelmedia dot com I did, but this was under Parallels with an expandable disk. I've created a fixed disk and mounted it on /tmp and the compile now completes successfully. Please close the bug. [2012-09-19 16:21:34] re...@php.net Does your temp dir have enough space? [2012-09-18 16:22:21] bbialek at smartertravelmedia dot com Description: When running make after configure, the php build fails in ext/phar/phar.phar with: Fatal error: Uncaught exception 'PharException' with message 'unable to create temporary file' in /usr/src/php-5.4.7/ext/phar/phar.php:1011 Test script: --- ./configure --enable-bcmath --enable-calendar --enable-cli --enable-ftp --enable-mbstring --enable-pcntl --enable-soap --with-apxs2 --with-curl --with-gettext --with-libdir=lib64 --with-mcrypt --with-mysqli --with-mysql=/usr/ --with-openssl --without-pdo-sqlite --with-pdo-mysql=/usr --with-pdo-sqlite --with-tidy --with-zlib-dir=/usr/lib64 --enable-zip make Expected result: I expect make to exit successfully and not with Error 255. Actual result: -- Fatal error: Uncaught exception 'PharException' with message 'unable to create temporary file' in /usr/src/php-5.4.7/ext/phar/phar.php:1011 Stack trace: #0 /usr/src/php-5.4.7/ext/phar/phar.php(1011): Phar- setStub('#!/usr/local/bi...') #1 /usr/src/php-5.4.7/ext/phar/phar.php(1071): PharCommand- phar_set_stub_begin(Object(Phar), '/root/rpmbuild/...', '/usr/src/php-5', '/usr/local/bin/...') #2 [internal function]: PharCommand-cli_cmd_run_pack(Array) #3 /usr/src/php-5.4.7/ext/phar/phar.php(225): call_user_func(Array, Array) #4 /usr/src/php-5.4.7/ext/phar/phar.php(2089): CLICommand-__construct(19, Array) #5 {main} thrown in /usr/src/php-5.4.7/ext/phar/phar.php on line 1011 make: *** [ext/phar/phar.phar] Error 255 -- Edit this bug report at https://bugs.php.net/bug.php?id=63112edit=1
Bug #63096 [Opn-Fbk]: Crash when run cli script
Edit report at https://bugs.php.net/bug.php?id=63096edit=1 ID: 63096 Updated by: re...@php.net Reported by:pracanowo at gmail dot com Summary:Crash when run cli script -Status: Open +Status: Feedback Type: Bug Package:*General Issues Operating System: win xp sp3 PHP Version:5.4.7 Block user comment: N Private report: N New Comment: Could you please try to get a reproducible test script ? if possible it would be much easier to spot. Previous Comments: [2012-09-15 20:48:36] pracanowo at gmail dot com Error are somtimes random, script parse lot of data [ so i think is preg ], on Monday i will be able to reproduce error, now all sessio that my script need handle are finish. I need also create some markers in my code. Now i install Xdebug. I remember in 5.3 whose the same now i update to 5.4.7 [2012-09-15 19:32:54] fel...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. [2012-09-15 17:49:09] pracanowo at gmail dot com Description: [Web crawler preg curl etc] Report for php__PID__2688__Date__09_15_2012__Time_01_31_06PM__296__Second_Chance_Exception_C005.dmp Type of Analysis Performed Crash Analysis Machine Name Operating System Windows XP Dodatek Service Pack 3 Number Of Processors 2 Process ID 2688 Process Image ...php.exe System Up-Time 8 day(s) 01:44:43 Process Up-Time 00:02:07 Thread 0 - System ID 3144 Entry point php!sapi_cli_single_write+80d8 Create time 2012-09-15 13:28:59 Time spent in user mode 0 Days 0:0:43.468 Time spent in kernel mode 0 Days 0:0:1.109 Full Call Stack Function Arg 1 Arg 2 Arg 3 Arg 4 Source php5!zval_dtor_func+45 02b24040 0128f408 03ab0a38 0128f408 php5!zend_objects_store_del_ref_by_handle_ex+24b 01280888 00c1e8f0 00c1e944 php5!execute+164 012bea58 012bc688 00c1e9a8 00c1e9b4 php5!zend_call_function+269 00c1e9b4 012bc688 00c1e9a8 1050f034 php5!zend_objects_destroy_object+bc 03d0ccb8 000c 012253b4 03587678 php5!libiconv_open+57a97 Exception Information PHP5!ZVAL_DTOR_FUNC+45WARNING - DebugDiag was not able to locate debug symbols for php5.dll, so the information below may be incomplete. In php__PID__2688__Date__09_15_2012__Time_01_31_06PM__296__Second_Chance_Exception_C005.dmp the assembly instruction at php5!zval_dtor_func+45 in G:\Home\PHP5\php5.dll from The PHP Group has caused an access violation exception (0xC005) when trying to read from memory location 0x1874 on thread 0 Test script: --- too big need first find error line -- Edit this bug report at https://bugs.php.net/bug.php?id=63096edit=1
Bug #63026 [Fbk]: require_once error
Edit report at https://bugs.php.net/bug.php?id=63026edit=1 ID: 63026 Updated by: re...@php.net Reported by:ian dot xspace at yahoo dot cn Summary:require_once error Status: Feedback Type: Bug Package:*Compile Issues Operating System: windows 7 PHP Version:5.3.16 Block user comment: N Private report: N New Comment: çä½ è¿æ åµï¼æå¯è½æ¯ä½ ç大å°åé®é¢ï¼ ä½ æ¯ç´æ¥require_onceçï¼å¦æ大å°åéäºæ¯æé®é¢çã 为äºå¥½è°è¯ï¼ä½ å¯ä»¥å¨require_once åå ä¸ä¸ªif(!file_exists($file) {die($file not found)} æ£æ¥ä¸ä¸ã ä½ ç¡®è®¤ä¸ä¸æ件çç¡®åå¨å§ã åæ¶ï¼æ¯å¨ä¸è¡ï¼æä½ ç代ç å®æ´æå ä¼ å°æ个å°æ¹å§ãã Previous Comments: [2012-09-12 02:03:08] larue...@php.net é£äºç±»åå¯ä»¥æ£ç¡®å è½½ ,é£äºç±»åä¸å¯ä»¥? ä½ ä¸¾ä¸ªä¾å? [2012-09-12 01:56:19] ian dot xspace at yahoo dot cn //init.php å®ä¹ç½ç«ç®å½ /***ç½ç«ç®å½å®ä¹***/ define('THEME', 'default'); //define('TEMP', WEB_ROOT.DS.'temp'); //define('LIBS', WEB_ROOT.DS.'libs'); define('VIEWS', WEB_ROOT.DS.'views'); define('LOGS', VIEWS.DS.'logs'); define('DYN', VIEWS.DS.'dynamic'); define('HLP', WEB_ROOT.DS.'helpers'); //define('PLNS', WEB_ROOT.DS.'plugins'); define('CONFS', WEB_ROOT.DS.'configs'); define('MODELS', WEB_ROOT.DS.'models'); define('CTRLS', WEB_ROOT.DS.'controls'); //SYS.php sysModuleå½æ°éç对åºå ³ç³»ä¸ºé误åæ³ï¼æ£ç¡®åæ³åºè¯¥æ¯'M'=MODELSåè æ éåå¼å· class SYS { //sysModuleç³»ç»ç®å½æ å° private function sysModule() { return array( 'M'=MODELS, 'V'=VIEWS, 'C'=CTRLS, 'L'=LIBS, 'P'=PLNS, 'H'=HLP ); } //getSysè·åç¸åºé ç½® public static function getSys($fun) { return self::$fun(); } } //common.php å ¶ä¸ä¸ä¸ªå½æ°ï¼å è½½æéè¦çç±» class Common { //loadCS protected function loadCS($cs) { $csName = substr($cs, 2); $type = strtoupper(strtok($cs, '.')); $moArr = SYS::getSys('sysModule'); //ç´æ¥å®ä½ require_once($moArr[$type].DS.{$csName}.php); // switch($type) 以ä¸å°ä¼è·åæ´å¿«æ§è¡é度 // { // case 'M': // require_once(MODELS.DS.$csName.php); // break; // case 'V': // require_once(VIEWS.DS.$csName.php); // break; // case 'C': // require_once(CTRLS.DS.$csName.php); // break; // case 'L': // require_once(LIBS.DS.$csName.php); // break; // case 'P': // require_once(PLNS.DS.$csName.php); // break; // case 'H': // require_once(HLP.DS.$csName.php); // break; // default: // JS::willJS('alertMsg', 'è°ç¨å¤±è´¥!'); // } $CS = ucfirst($csName); return new $CS(); } } //index.php é¦é¡µè°ç¨å ¶å®ç±» //Index class Index extends IAN_C { //__construct public function __construct() { $obj = $this-loadCS('M.share_model');//è°ç¨å ¶å®ç±» //ä½ å¯ä»¥å¤è°ç¨å 个类ï¼å¨ä¸é¢é误åæ³æ åµä¸ï¼æçç±»å¯ä»¥è°ç¨æåï¼æç失败 //sysModule éç对åºå ³ç³»ï¼åºè¯¥è¿ä¹å'C'=CTRLS,åè æ éå¼å· } } new Index //大å¥ä½ è¦æ¯åçä¸æç½ï¼æä¹æ²¡è¾äº [2012-09-12 01:48:03] ian dot xspace at yahoo dot cn æ©è¯´åï¼æè¿ä»¥ä¸ºé½æ¯å¤å½äººå¢ã //å®ä¹ç½ç«è·ç®å½ init.php define('WEB_ROOT', strtr(dirname(__FILE__), '\\', '/')); //å®ä¹ç½ç«çå ¶å®ç®å½ define('TEMP', WEB_ROOT.DS.'temp'); define('LIBS', WEB_ROOT.DS.'libs'); define('VIEWS', WEB_ROOT.DS.'views'); //ä¸é¢æ¯æåçä¸ä¸ªç±» sys.php class SYS { //è¿ä¸ªæ¯æ¯ä¸ªç®å½å¯¹åºçç®åï¼ä½æ¯è¿æ¯é误åæ³ï¼å¯å¨åæçç¨åºè°ç¨ä¸å± ç¶æç //å¯ä»¥æåæçå¤±è´¥äº $moArr = SYS::getSys('sysModule'); //require_once($moArr[$type].DS.{$csName}.php); è¿æ ·å¯ä»¥ç´æ¥ //å¼å ¥æéè¦çæ件ï¼é¿å 使ç¨switch浪费æ¶é´ /* // switch($type) 以ä¸å°ä¼è·åæ´å¿«æ§è¡é度 //
Bug #63026 [Fbk]: require_once error
Edit report at https://bugs.php.net/bug.php?id=63026edit=1 ID: 63026 Updated by: re...@php.net Reported by:ian dot xspace at yahoo dot cn Summary:require_once error Status: Feedback Type: Bug Package:*Compile Issues Operating System: windows 7 PHP Version:5.3.16 Block user comment: N Private report: N New Comment: â$obj = $this-loadCS('M.share_model');//è°ç¨å ¶å®ç±» //ä½ å¯ä»¥å¤è°ç¨å 个类ï¼å¨ä¸é¢é误åæ³æ åµä¸ï¼æçç±»å¯ä»¥è°ç¨æåï¼æç失败 //sysModule éç对åºå ³ç³»ï¼åºè¯¥è¿ä¹å'C'=CTRLS,åè æ éå¼å· â require_onceçè·¯å¾æ¯ç´æ¥æ¼çï¼èä¸ä¸æ¯autoloadï¼ ä»è¿é没æå ¶ä»çä¾åï¼å¦æé¨åç±»å大å°åéäºï¼å°±ä¼åºç°é¨åç±»æ¾ä¸å°çæ åµã å¨requireåå¢å 个æ£æ¥å°±è½ç¡®è®¤æè æé¤è¿ä¸ªé®é¢äº Previous Comments: [2012-09-12 10:25:08] larue...@php.net ä½ ä»åªéçåºæ¥å大å°åæå ³ç³»ç? [2012-09-12 10:15:04] re...@php.net çä½ è¿æ åµï¼æå¯è½æ¯ä½ ç大å°åé®é¢ï¼ ä½ æ¯ç´æ¥require_onceçï¼å¦æ大å°åéäºæ¯æé®é¢çã 为äºå¥½è°è¯ï¼ä½ å¯ä»¥å¨require_once åå ä¸ä¸ªif(!file_exists($file) {die($file not found)} æ£æ¥ä¸ä¸ã ä½ ç¡®è®¤ä¸ä¸æ件çç¡®åå¨å§ã åæ¶ï¼æ¯å¨ä¸è¡ï¼æä½ ç代ç å®æ´æå ä¼ å°æ个å°æ¹å§ãã [2012-09-12 02:03:08] larue...@php.net é£äºç±»åå¯ä»¥æ£ç¡®å è½½ ,é£äºç±»åä¸å¯ä»¥? ä½ ä¸¾ä¸ªä¾å? [2012-09-12 01:56:19] ian dot xspace at yahoo dot cn //init.php å®ä¹ç½ç«ç®å½ /***ç½ç«ç®å½å®ä¹***/ define('THEME', 'default'); //define('TEMP', WEB_ROOT.DS.'temp'); //define('LIBS', WEB_ROOT.DS.'libs'); define('VIEWS', WEB_ROOT.DS.'views'); define('LOGS', VIEWS.DS.'logs'); define('DYN', VIEWS.DS.'dynamic'); define('HLP', WEB_ROOT.DS.'helpers'); //define('PLNS', WEB_ROOT.DS.'plugins'); define('CONFS', WEB_ROOT.DS.'configs'); define('MODELS', WEB_ROOT.DS.'models'); define('CTRLS', WEB_ROOT.DS.'controls'); //SYS.php sysModuleå½æ°éç对åºå ³ç³»ä¸ºé误åæ³ï¼æ£ç¡®åæ³åºè¯¥æ¯'M'=MODELSåè æ éåå¼å· class SYS { //sysModuleç³»ç»ç®å½æ å° private function sysModule() { return array( 'M'=MODELS, 'V'=VIEWS, 'C'=CTRLS, 'L'=LIBS, 'P'=PLNS, 'H'=HLP ); } //getSysè·åç¸åºé ç½® public static function getSys($fun) { return self::$fun(); } } //common.php å ¶ä¸ä¸ä¸ªå½æ°ï¼å è½½æéè¦çç±» class Common { //loadCS protected function loadCS($cs) { $csName = substr($cs, 2); $type = strtoupper(strtok($cs, '.')); $moArr = SYS::getSys('sysModule'); //ç´æ¥å®ä½ require_once($moArr[$type].DS.{$csName}.php); // switch($type) 以ä¸å°ä¼è·åæ´å¿«æ§è¡é度 // { // case 'M': // require_once(MODELS.DS.$csName.php); // break; // case 'V': // require_once(VIEWS.DS.$csName.php); // break; // case 'C': // require_once(CTRLS.DS.$csName.php); // break; // case 'L': // require_once(LIBS.DS.$csName.php); // break; // case 'P': // require_once(PLNS.DS.$csName.php); // break; // case 'H': // require_once(HLP.DS.$csName.php); // break; // default: // JS::willJS('alertMsg', 'è°ç¨å¤±è´¥!'); // } $CS = ucfirst($csName); return new $CS(); } } //index.php é¦é¡µè°ç¨å ¶å®ç±» //Index class Index extends IAN_C { //__construct public function __construct() { $obj = $this-loadCS('M.share_model');//è°ç¨å ¶å®ç±» //ä½ å¯ä»¥å¤è°ç¨å 个类ï¼å¨ä¸é¢é误åæ³æ åµä¸ï¼æçç±»å¯ä»¥è°ç¨æåï¼æç失败 //sysModule éç对åºå ³ç³»ï¼åºè¯¥è¿ä¹å'C'=CTRLS,åè æ éå¼å· } } new Index //大å¥ä½ è¦æ¯åçä¸æç½ï¼æä¹æ²¡è¾äº [2012-09-12
Bug #63055 [Com]: Segfault in zend_gc with SF2 testsuite
Edit report at https://bugs.php.net/bug.php?id=63055edit=1 ID: 63055 Comment by: reeze dot xia at gmail dot com Reported by:php at wallbash dot com Summary:Segfault in zend_gc with SF2 testsuite Status: Open Type: Bug Package:*General Issues Operating System: CentOS 6.3 PHP Version:5.4.6 Block user comment: N Private report: N New Comment: From the backtrace this seems a test for ext: intl, I can't install intl ext in my box because of compile issue. @larucene, do you see some test skip for intl or did you enabled intl extsion? Previous Comments: [2012-09-10 16:34:15] php at wallbash dot com Like stated on pecl: I sadly can't. Every output i generate or just executing that one test case make the segfault go away. I'm really sorry I can't provide anything more helpful but with issues like that (see the last time I ran into something like that: https://bugs.php.net/bug.php?id=60825) getting a good repro is really hard for me. I've tried for a couple of hours but gave up. I totally understand if this is not fixable for you of course but asking in php.pecl encouraged me to post it anyways :) [2012-09-10 12:53:17] larue...@php.net I can not reproduce this with 5.4-branch... could you try to make a small reproduce test script ? thanks [2012-09-10 12:41:19] php at wallbash dot com He laruence, i meant the segfault happens with 5.3.16, 5.4.6 and with master but I only included two coredumps. The included coredump that produced a meaningful stacktrace is from 5.4.6 like noted. [2012-09-10 12:24:42] larue...@php.net you mean , you are running with 5.3? [2012-09-10 12:19:49] php at wallbash dot com Initially I ran into this issue with 5.3.16 but I didn't include a coredump for it. Just added it to make clear it might not be something new in 5.4 Regards, Edorian 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=63055 -- Edit this bug report at https://bugs.php.net/bug.php?id=63055edit=1
Bug #63055 [Com]: Segfault in zend_gc with SF2 testsuite
Edit report at https://bugs.php.net/bug.php?id=63055edit=1 ID: 63055 Comment by: reeze dot xia at gmail dot com Reported by:php at wallbash dot com Summary:Segfault in zend_gc with SF2 testsuite Status: Open Type: Bug Package:*General Issues Operating System: CentOS 6.3 PHP Version:5.4.6 Block user comment: N Private report: N New Comment: Hi wallbash, when you got a backtrace, you could source php-src's backtrace of php script gdb source path/to/php-src/.gdbinit gdb zbactrace then you may see a php level script, then we could find where cause the php crash Previous Comments: [2012-09-11 06:53:26] reeze dot xia at gmail dot com From the backtrace this seems a test for ext: intl, I can't install intl ext in my box because of compile issue. @larucene, do you see some test skip for intl or did you enabled intl extsion? [2012-09-10 16:34:15] php at wallbash dot com Like stated on pecl: I sadly can't. Every output i generate or just executing that one test case make the segfault go away. I'm really sorry I can't provide anything more helpful but with issues like that (see the last time I ran into something like that: https://bugs.php.net/bug.php?id=60825) getting a good repro is really hard for me. I've tried for a couple of hours but gave up. I totally understand if this is not fixable for you of course but asking in php.pecl encouraged me to post it anyways :) [2012-09-10 12:53:17] larue...@php.net I can not reproduce this with 5.4-branch... could you try to make a small reproduce test script ? thanks [2012-09-10 12:41:19] php at wallbash dot com He laruence, i meant the segfault happens with 5.3.16, 5.4.6 and with master but I only included two coredumps. The included coredump that produced a meaningful stacktrace is from 5.4.6 like noted. [2012-09-10 12:24:42] larue...@php.net you mean , you are running with 5.3? 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=63055 -- Edit this bug report at https://bugs.php.net/bug.php?id=63055edit=1
Bug #63055 [Com]: Segfault in zend_gc with SF2 testsuite
Edit report at https://bugs.php.net/bug.php?id=63055edit=1 ID: 63055 Comment by: reeze dot xia at gmail dot com Reported by:php at wallbash dot com Summary:Segfault in zend_gc with SF2 testsuite Status: Open Type: Bug Package:*General Issues Operating System: CentOS 6.3 PHP Version:5.4.6 Block user comment: N Private report: N New Comment: gdb zbactrace --- gdb zbacktrace missing a 'k' :) Previous Comments: [2012-09-11 06:56:49] reeze dot xia at gmail dot com Hi wallbash, when you got a backtrace, you could source php-src's backtrace of php script gdb source path/to/php-src/.gdbinit gdb zbactrace then you may see a php level script, then we could find where cause the php crash [2012-09-11 06:53:26] reeze dot xia at gmail dot com From the backtrace this seems a test for ext: intl, I can't install intl ext in my box because of compile issue. @larucene, do you see some test skip for intl or did you enabled intl extsion? [2012-09-10 16:34:15] php at wallbash dot com Like stated on pecl: I sadly can't. Every output i generate or just executing that one test case make the segfault go away. I'm really sorry I can't provide anything more helpful but with issues like that (see the last time I ran into something like that: https://bugs.php.net/bug.php?id=60825) getting a good repro is really hard for me. I've tried for a couple of hours but gave up. I totally understand if this is not fixable for you of course but asking in php.pecl encouraged me to post it anyways :) [2012-09-10 12:53:17] larue...@php.net I can not reproduce this with 5.4-branch... could you try to make a small reproduce test script ? thanks [2012-09-10 12:41:19] php at wallbash dot com He laruence, i meant the segfault happens with 5.3.16, 5.4.6 and with master but I only included two coredumps. The included coredump that produced a meaningful stacktrace is from 5.4.6 like noted. 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=63055 -- Edit this bug report at https://bugs.php.net/bug.php?id=63055edit=1
Bug #63060 [Com]: Option LIBXML_NOEMPTYTAG is ignored
Edit report at https://bugs.php.net/bug.php?id=63060edit=1 ID: 63060 Comment by: reeze dot xia at gmail dot com Reported by:maglor at i dot ua Summary:Option LIBXML_NOEMPTYTAG is ignored Status: Open Type: Bug Package:SimpleXML related Operating System: Windows XP SP3 PHP Version:5.3.16 Block user comment: N Private report: N New Comment: Hi maglor, http://php.net/manual/en/libxml.constants.php LIBXML_NOEMPTYTAG (integer) Expand empty tags (e.g. br/ to br/br) Note: This option is currently just available in the DOMDocument::save and DOMDocument::saveXML functions. Previous Comments: [2012-09-11 09:36:02] maglor at i dot ua Description: Option LIBXML_NOEMPTYTAG is ignored for SimpleXMLElement::__construct() and simplexml_load_string() Probably, for simplexml_load_file() also. Test script: --- ?php $xml = new SimpleXMLElement('?xml version=1.0 encoding=utf-8?requestpacket/packet/request', LIBXML_NOEMPTYTAG); $xml-saveXML(); Expected result: ?xml version=1.0 encoding=utf-8? requestpacket/packet/request Actual result: -- ?xml version=1.0 encoding=utf-8? requestpacket//request -- Edit this bug report at https://bugs.php.net/bug.php?id=63060edit=1
Bug #63066 [Com]: Calling an undefined method in a generator results in a seg fault
Edit report at https://bugs.php.net/bug.php?id=63066edit=1 ID: 63066 Comment by: reeze dot xia at gmail dot com Reported by:Jared dot Williams1 at ntlworld dot com Summary:Calling an undefined method in a generator results in a seg fault Status: Open Type: Bug Package:Class/Object related Operating System: Linux ubuntu 3.5.0-14-generic #1 PHP Version:master-Git-2012-09-11 (Git) Block user comment: N Private report: N New Comment: I could not reproduce it in Mac OS X do you use any extension like apc, xdebug? Previous Comments: [2012-09-11 12:49:54] Jared dot Williams1 at ntlworld dot com Description: Calling an undefined method in a generator results in an expected fatal error, but then a segmentation fault occurs afterwards. Test script: --- function gen($o) { yield 'foo'; $o-fatalError(); } foreach(gen(new stdClass()) as $value) echo $value, \n; Expected result: foo PHP Fatal error: Call to undefined method stdClass::fatalError() in /home/jared/fatalSegFault.php on line 6 Fatal error: Call to undefined method stdClass::fatalError() in /home/jared/fatalSegFault.php on line 6 Actual result: -- foo PHP Fatal error: Call to undefined method stdClass::fatalError() in /home/jared/fatalSegFault.php on line 6 Fatal error: Call to undefined method stdClass::fatalError() in /home/jared/fatalSegFault.php on line 6 Segmentation fault -- Edit this bug report at https://bugs.php.net/bug.php?id=63066edit=1
Bug #63066 [Com]: Calling an undefined method in a generator results in a seg fault
Edit report at https://bugs.php.net/bug.php?id=63066edit=1 ID: 63066 Comment by: reeze dot xia at gmail dot com Reported by:Jared dot Williams1 at ntlworld dot com Summary:Calling an undefined method in a generator results in a seg fault Status: Open Type: Bug Package:Class/Object related Operating System: Linux ubuntu 3.5.0-14-generic #1 PHP Version:master-Git-2012-09-11 (Git) Block user comment: N Private report: N New Comment: Can't reproduce in Ubuntu too. parallels@ubuntu:~/php-src$ uname -a Linux ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux if your are testing the lastest version, Could please provide backtraceï¼ https://bugs.php.net/bugs-generating-backtrace.php Previous Comments: [2012-09-11 12:59:13] reeze dot xia at gmail dot com I could not reproduce it in Mac OS X do you use any extension like apc, xdebug? [2012-09-11 12:49:54] Jared dot Williams1 at ntlworld dot com Description: Calling an undefined method in a generator results in an expected fatal error, but then a segmentation fault occurs afterwards. Test script: --- function gen($o) { yield 'foo'; $o-fatalError(); } foreach(gen(new stdClass()) as $value) echo $value, \n; Expected result: foo PHP Fatal error: Call to undefined method stdClass::fatalError() in /home/jared/fatalSegFault.php on line 6 Fatal error: Call to undefined method stdClass::fatalError() in /home/jared/fatalSegFault.php on line 6 Actual result: -- foo PHP Fatal error: Call to undefined method stdClass::fatalError() in /home/jared/fatalSegFault.php on line 6 Fatal error: Call to undefined method stdClass::fatalError() in /home/jared/fatalSegFault.php on line 6 Segmentation fault -- Edit this bug report at https://bugs.php.net/bug.php?id=63066edit=1
Bug #61925 [Opn-Fbk]: Crashes on using variable equal to conditional shortcut
Edit report at https://bugs.php.net/bug.php?id=61925edit=1 ID: 61925 Updated by: re...@php.net Reported by:alex dot erwin at dilithiumtoys dot com Summary:Crashes on using variable equal to conditional shortcut -Status: Open +Status: Feedback Type: Bug Package:*Programming Data Structures Operating System: Windows 7 32-bit PHP Version:5.4.1 Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Could you please try lastest version. I can't reproduce it. http://3v4l.org/to5RB Previous Comments: [2012-05-03 16:12:59] alex dot erwin at dilithiumtoys dot com Description: I am using Apache 2.4 with PHP 5.4 on Windows 7 32bit. When executing the code shown, from within a private class method, the server crashes. PHP is compiled as a DSO. If the code is changed to utilize long form conditional processing the execution works. If I use the command line to execute the script, the class loaded by require does not get called. // my index.php require(C:/Infinity/application/shared/classes/a.php); $x = new a(); // my a.php class a { __constructor(){ $this-import_variables($_POST); }} further code in test script. Test script: --- # retrieve caller name $calledby = debug_backtrace(); print_r($calledby); // does not work $caller = (strlen($calledby[1]['class'])) ? $calledby[1]['class'] : $calledby[0]['class']; // works and does does not segfault if (strlen($calledby[1]['class'])) $caller = $calledby[1]['class']; else$caller = $calledby[0]['class']; # arguments are required if (!func_num_args()) { return; } # fill variables with argument contents if exists $variables = (func_num_args() == 0) ? NULL : (is_array(func_get_arg(0)) ? func_get_arg(0) : NULL); Expected result: I expect that Apache will not SEGFAULT -- Edit this bug report at https://bugs.php.net/bug.php?id=61925edit=1
Req #62860 [Opn-Dup]: Moar magic methods! __constructStatic(), __getStatic(), __setStatic(), __get
Edit report at https://bugs.php.net/bug.php?id=62860edit=1 ID: 62860 Updated by: re...@php.net Reported by:michaelduff2 at yahoo dot com Summary:Moar magic methods! __constructStatic(), __getStatic(), __setStatic(), __get -Status: Open +Status: Duplicate Type: Feature/Change Request Package:*General Issues PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Duplicate to https://bugs.php.net/bug.php?id=45002 closed. Previous Comments: [2012-09-05 15:12:01] matthew dot bonner at gmail dot com Sorry in my last example there was a typo, and what I meant was: I would like to add that being magic methods, it would be nice if they could do a little more magic, ie: class Classy { public static $foo = 'foo'; public $bar = 'bar'; public static function __get ($propertyName) { return self::$propertyName; } public function __get ($propertyName) { return $this-$propertyName; } } echo Classy::$foo; // outputs foo $classy = new Classy; echo $classy-bar; // outputs bar [2012-09-05 15:10:36] matthew dot bonner at gmail dot com I would like to add that being magic methods, it would be nice if they could do a little more magic, ie: class Classy { public static $foo = 'foo'; public $bar = 'bar'; public static function __get ($propertyName) { return $this-$propertyName; } public function __get ($propertyName) { return self::$propertyName; } } echo Classy::$foo; // outputs foo $classy = new Classy; echo $classy-bar; // outputs bar [2012-09-05 15:06:06] matthew dot bonner at gmail dot com The additional magic methods with static support have been requested over and over for well over 5 years now. Is PHP a dying language because the developers don't have the time to provide essential functionality? There are so many hacks going about now to try and provide essential functionality and there is so much messy code all over the place to support what should be part of PHP 5 as standard. Sorry for my raving and ranting but the reputation of PHP is being severely damaged by not providing the essentials. .NET has static accessor and mutator support, Java does too. All the big languages do apart from PHP. class PLEASE_SUPPORT_AT_A_MINIMUM { public static function __construct () {} public static function __set ($propertyName, $propertyValue) {} public static function __get ($propertyName) {} public function setConstDynamically () { const Foo = 'foo'; echo self::Foo; } } Otherwise I will fork PHP and provide this essential functionality myself which will ultimately result in the death of the original PHP. [2012-08-18 20:03:22] michaelduff2 at yahoo dot com Description: __constructStatic() - executed automatically on class definition __getStatic() - executed when ClassName::$inaccessible_property is fetched __setStatic() - executed when ClassName::$inaccessible_property is modified The particular use case I have for this is self-loading configuration registry singletons: ?php7 namespace Company; class Config { protected static $settings; function __constructStatic($property) { static::$settings = parse_ini_file('config.ini'); } function __getStatic($property) { return static::$settings[$property]; } } echo Config::$DB_USER; ? Currently, I accomplish this with __callStatic() which needs the extra open-close parenthesis. Ideally, we could get rid of the '$' too, but that would need some __getConst() magic, which is just madness. -- Edit this bug report at https://bugs.php.net/bug.php?id=62860edit=1
Bug #55671 [Com]: clean up the php 6 references in run-tests.php
Edit report at https://bugs.php.net/bug.php?id=55671edit=1 ID: 55671 Comment by: reeze dot xia at gmail dot com Reported by:tyr...@php.net Summary:clean up the php 6 references in run-tests.php Status: Open Type: Bug Package:Testing related PHP Version:Irrelevant Block user comment: N Private report: N New Comment: PHP6 didn't exist so that test was useless, as tyrael said, safe_mode have been removed with 5.4. Previous Comments: [2012-09-09 09:05:29] larue...@php.net MAJOR_VERSION 6 has nothing to do with PHP 6, what do you expected? MAJOR_VERSION = 5? [2012-09-08 14:57:11] reeze dot xia at gmail dot com Do we still have the problem? I saw only one place have php6 specific test in run-tests.php if (PHP_MAJOR_VERSION 6) { ini_set('magic_quotes_runtime',0); // this would break tests by modifying EXPECT sections if (ini_get('safe_mode')) { echo SAFE_MODE_WARNING [2011-09-13 06:38:52] s...@php.net A number of phpt's still have the PHP 6 syntax. These would need to be updated before the string type change is made to run-tests.php [2011-09-12 11:30:19] tyr...@php.net Description: there are mentions and special cases for working with php6, which isn't valid anymore. we should remove those(unicode string/binary string types), and there are some, which should be enabled for = 504000: magic_quotes, safe_mode check, as those are removed with 5.4 -- Edit this bug report at https://bugs.php.net/bug.php?id=55671edit=1
Bug #55671 [Com]: clean up the php 6 references in run-tests.php
Edit report at https://bugs.php.net/bug.php?id=55671edit=1 ID: 55671 Comment by: reeze dot xia at gmail dot com Reported by:tyr...@php.net Summary:clean up the php 6 references in run-tests.php Status: Open Type: Bug Package:Testing related PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Yes, I'm not saying that is a php6's feature. I mean the outmost if (PHP_MAJOR_VERSION 6)â checking is not accurate since PHP6 is going nowhere. That checking is useful in 5.4 but not 6 :) This issue was related to PHP6 cleanup, so I mention that here. Previous Comments: [2012-09-09 09:42:15] larue...@php.net I really don't understand your point. did you read the codes carefully? it's not a php 6 specifc test, it's about to generate a warning about safe_mode. it has nothing to do with php 6. 5.2 5.3 still have safe_mode. then MAJOR_VERSOIN of them will meet that condition.. [2012-09-09 09:31:35] reeze dot xia at gmail dot com PHP6 didn't exist so that test was useless, as tyrael said, safe_mode have been removed with 5.4. [2012-09-09 09:05:29] larue...@php.net MAJOR_VERSION 6 has nothing to do with PHP 6, what do you expected? MAJOR_VERSION = 5? [2012-09-08 14:57:11] reeze dot xia at gmail dot com Do we still have the problem? I saw only one place have php6 specific test in run-tests.php if (PHP_MAJOR_VERSION 6) { ini_set('magic_quotes_runtime',0); // this would break tests by modifying EXPECT sections if (ini_get('safe_mode')) { echo SAFE_MODE_WARNING [2011-09-13 06:38:52] s...@php.net A number of phpt's still have the PHP 6 syntax. These would need to be updated before the string type change is made to run-tests.php 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=55671 -- Edit this bug report at https://bugs.php.net/bug.php?id=55671edit=1
Bug #61634 [Com]: Test ext\sockets\tests\socket_listen-wrongparams.phpt fails
Edit report at https://bugs.php.net/bug.php?id=61634edit=1 ID: 61634 Comment by: reeze dot xia at gmail dot com Reported by:a...@php.net Summary:Test ext\sockets\tests\socket_listen-wrongparams.phpt fails Status: Open Type: Bug Package:Sockets related Operating System: Windows PHP Version:Irrelevant Block user comment: N Private report: N New Comment: This could be closed... Previous Comments: [2012-04-10 11:19:02] a...@php.net Automatic comment on behalf of ab Revision: http://git.php.net/?p=php-src.git;a=commit;h=c4676ee99f5381de502cd6544a9c42a25b53b933 Log: Fixed bug #61634 Test ext\sockets\tests\socket_listen-wrongparams.phpt fails [2012-04-10 02:00:26] mattfic...@php.net The patch works for me on Windows 7 and Gentoo Linux (x86 x64) on php-5-3-r0f180a6. [2012-04-05 14:05:18] a...@php.net The patch disables this test on windows as unix sockets are not available there. [2012-04-05 14:04:40] a...@php.net The following patch has been added/updated: Patch Name: 61634.diff Revision: 1333634680 URL: https://bugs.php.net/patch-display.php?bug=61634patch=61634.diffrevision=1333634680 [2012-04-05 12:28:58] a...@php.net Description: Test diff: 004+ Warning: socket_create(): Unable to create socket [0]: An address incompatible with the requested protocol was used. 005+ in C:\php-sdk\php53\vc9\x86\php-src\ext\sockets\tests\socket_listen-wrongparams.php on line 3 004- Warning: socket_listen(): unable to listen on socket [%d]: Invalid argument in %s on line %d 005- bool(false) 006+ 007+ Warning: socket_listen() expects parameter 1 to be resource, boolean given in C:\php-sdk\php53\vc9\x86\php-src\ext\sockets\tests\socket_listen-wrongparams.php on line 4 008+ NULL Expected result: test pass Actual result: -- test fail -- Edit this bug report at https://bugs.php.net/bug.php?id=61634edit=1
Bug #52003 [Com]: Incorrect PDOStatement::execute() signature
Edit report at https://bugs.php.net/bug.php?id=52003edit=1 ID: 52003 Comment by: reeze dot xia at gmail dot com Reported by:v1d4l0k4 at gmail dot com Summary:Incorrect PDOStatement::execute() signature Status: Assigned Type: Bug Package:PDO related Operating System: Irrelevant PHP Version:Irrelevant Assigned To:pierrick Block user comment: N Private report: N New Comment: This seems been forgotten by pierrick. Previous Comments: [2012-01-30 05:52:51] larry at ldrutledge dot com The situation appears to be unchanged in 5.3.9. The manual still shows a type hint of array but a method in an extended class still triggers a warning unless the type hint is omitted. [2010-10-19 07:07:17] ka...@php.net Pierrick, why don't you commit that patch the src? And add a changelog entry if reasonable for PDOStatement::execute() :) [2010-06-06 06:13:42] pierr...@php.net The following patch has been added/updated: Patch Name: ZEND_ARG_ARRAY_INFO Revision: 1275797622 URL: http://bugs.php.net/patch-display.php?bug=52003patch=ZEND_ARG_ARRAY_INFOrevision=1275797622 [2010-06-05 22:53:10] v1d4l0k4 at gmail dot com Description: Manual says PDOStatement::execute() signature is: bool PDOStatement::execute ([ array $input_parameters = array() ] ) But in fact it is: bool PDOStatement::execute ([ $input_parameters = null ] ) Test script: --- ?php class DBStatement extends PDOStatement { public function execute(array $input_parameters = array()) { return parent::execute($input_parameters); } } $PDO = new PDO('mysql:host=127.0.0.1', 'root', ''); $PDO-setAttribute(PDO::ATTR_STATEMENT_CLASS, array('DBStatement')); Expected result: No errors Actual result: -- Strict Standards: Declaration of DBStatement::execute() should be compatible with that of PDOStatement::execute() in /media/ext/Web/htdocs/test/bug.php on line 9 -- Edit this bug report at https://bugs.php.net/bug.php?id=52003edit=1
Bug #52559 [Com]: Calling undefined method on FilterIterator subclasses causes segfault
Edit report at https://bugs.php.net/bug.php?id=52559edit=1 ID: 52559 Comment by: reeze dot xia at gmail dot com Reported by:tobias382 at gmail dot com Summary:Calling undefined method on FilterIterator subclasses causes segfault Status: Assigned Type: Bug Package:SPL related Operating System: Ubuntu 10.04 PHP Version:5.3SVN-2010-08-06 (snap) Assigned To:colder Block user comment: N Private report: N New Comment: THis bug has been fixed already, could be closed :) see: http://3v4l.org/eavLE Previous Comments: [2010-08-07 03:42:22] tobias382 at gmail dot com Description: The attached test script causes a segmentation fault in PHP 5.3.3 and the current PHP 5.3 snapshot, presumably because count() is not a defined method in FooIterator or any of its ancestor classes. The configure line used to compile the snapshot: Configure Command = './configure' '--prefix=/home/matt/Software/php5.3- 201008070030/build/php_build' '--without-pear' '--without-sqlite3' '--without- pdo-sqlite' '--without-sqlite' '--enable-debug' Test script: --- ?php class FooIterator extends FilterIterator { public function accept() { return true; } } $iterator = new FooIterator(new ArrayIterator(array(1))); echo $iterator-count(); Expected result: PHP Fatal error: Call to undefined method FooIterator::count() in test.php on line 8 Actual result: -- 1Segmentation fault gdb backtrace: #0 0x02926cd0 in ?? () #1 0x00573929 in spl_dual_it_free (intern=0x2a089f0) at /home/matt/Software/php5.3-201008070030/ext/spl/spl_iterators.c:1461 #2 0x00574ebd in spl_dual_it_dtor (_object=0x2a089f0, handle=1) at /home/matt/Software/php5.3-201008070030/ext/spl/spl_iterators.c:1942 #3 0x006ebbea in zend_objects_store_del_ref_by_handle_ex (handle=1, handlers=0xcace80) at /home/matt/Software/php5.3-201008070030/Zend/zend_objects_API.c:206 #4 0x006eba5f in zend_objects_store_del_ref (zobject=0x2a20e30) at /home/matt/Software/php5.3-201008070030/Zend/zend_objects_API.c:172 #5 0x006bbca2 in _zval_dtor_func (zvalue=0x2a20e30, __zend_filename=0xa4e9a8 /home/matt/Software/php5.3- 201008070030/Zend/zend_execute_API.c, __zend_lineno=443) at /home/matt/Software/php5.3- 201008070030/Zend/zend_variables.c:52 #6 0x006abbba in _zval_dtor (zvalue=0x2a20e30, __zend_filename=0xa4e9a8 /home/matt/Software/php5.3-201008070030/Zend/zend_execute_API.c, __zend_lineno=443) at /home/matt/Software/php5.3- 201008070030/Zend/zend_variables.h:35 #7 0x006acb48 in _zval_ptr_dtor (zval_ptr=0x2a24158, __zend_filename=0xa50290 /home/matt/Software/php5.3- 201008070030/Zend/zend_variables.c, __zend_lineno=178) at /home/matt/Software/php5.3- 201008070030/Zend/zend_execute_API.c:443 #8 0x006bc01f in _zval_ptr_dtor_wrapper (zval_ptr=0x2a24158) at /home/matt/Software/php5.3-201008070030/Zend/zend_variables.c:178 #9 0x006ce705 in zend_hash_apply_deleter (ht=0xcc4588, p=0x2a24140) at /home/matt/Software/php5.3-201008070030/Zend/zend_hash.c:611 #10 0x006ced8e in zend_hash_reverse_apply (ht=0xcc4588, apply_func=0x6ac3f5 zval_call_destructor) at /home/matt/Software/php5.3-201008070030/Zend/zend_hash.c:760 #11 0x006ac487 in shutdown_destructors () at /home/matt/Software/php5.3- 201008070030/Zend/zend_execute_API.c:226 #12 0x006bd8db in zend_call_destructors () at /home/matt/Software/php5.3-201008070030/Zend/zend.c:874 #13 0x00647cec in php_request_shutdown (dummy=0x0) at /home/matt/Software/php5.3-201008070030/main/main.c:1587 #14 0x007a27db in main (argc=2, argv=0x7fffd4f78e68) at /home/matt/Software/php5.3-201008070030/sapi/cli/php_cli.c:1373 -- Edit this bug report at https://bugs.php.net/bug.php?id=52559edit=1
Req #53653 [Com]: Allow reading message even with server http code 400
Edit report at https://bugs.php.net/bug.php?id=53653edit=1 ID: 53653 Comment by: reeze dot xia at gmail dot com Reported by:marc dot vachette at gmail dot com Summary:Allow reading message even with server http code 400 Status: Open Type: Feature/Change Request Package:SOAP related Operating System: window PHP Version:5.2.16 Block user comment: N Private report: N New Comment: Hi marc, We could do this already, please try: http://php.net/manual/en/soapclient.getlastresponse.php Previous Comments: [2011-01-04 19:22:35] marc dot vachette at gmail dot com Description: When the server i connect through SoapClient returns an error, ir returns it whith http code 500, and somme error message. The problem is that php_soap extension do not show message content if the error code is larger than 400. -- Edit this bug report at https://bugs.php.net/bug.php?id=53653edit=1
Bug #55671 [Com]: clean up the php 6 references in run-tests.php
Edit report at https://bugs.php.net/bug.php?id=55671edit=1 ID: 55671 Comment by: reeze dot xia at gmail dot com Reported by:tyr...@php.net Summary:clean up the php 6 references in run-tests.php Status: Open Type: Bug Package:Testing related PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Do we still have the problem? I saw only one place have php6 specific test in run-tests.php if (PHP_MAJOR_VERSION 6) { ini_set('magic_quotes_runtime',0); // this would break tests by modifying EXPECT sections if (ini_get('safe_mode')) { echo SAFE_MODE_WARNING Previous Comments: [2011-09-13 06:38:52] s...@php.net A number of phpt's still have the PHP 6 syntax. These would need to be updated before the string type change is made to run-tests.php [2011-09-12 11:30:19] tyr...@php.net Description: there are mentions and special cases for working with php6, which isn't valid anymore. we should remove those(unicode string/binary string types), and there are some, which should be enabled for = 504000: magic_quotes, safe_mode check, as those are removed with 5.4 -- Edit this bug report at https://bugs.php.net/bug.php?id=55671edit=1
Bug #60377 [Com]: ZipArchive::extractTo() memory leaks with invalid path using phar://
Edit report at https://bugs.php.net/bug.php?id=60377edit=1 ID: 60377 Comment by: reeze dot xia at gmail dot com Reported by:fel...@php.net Summary:ZipArchive::extractTo() memory leaks with invalid path using phar:// Status: Assigned Type: Bug Package:Zip Related PHP Version:trunk-SVN-2011-11-24 (SVN) Assigned To:pajoye Block user comment: N Private report: N New Comment: I just test with latest versions, It seems been fixed already :) Previous Comments: [2011-11-24 21:52:14] fel...@php.net Description: See below. Test script: --- ?php $x = new ZipArchive; $x-extractTo(phar:///usr/local/bin/phar.phar/a); Actual result: -- $ sapi/cli/php ../bug.php [Thu Nov 24 19:50:30 2011] Script: '../bug.php' /home/felipe/dev/phptrunk/main/streams/streams.c(258) : Freeing 0x7FF3DEA323F8 (8 bytes), script=../bug.php [Thu Nov 24 19:50:30 2011] Script: '../bug.php' /home/felipe/dev/phptrunk/main/spprintf.c(236) : Freeing 0x7FF3DEA35440 (207 bytes), script=../bug.php === Total 2 memory leaks detected === -- Edit this bug report at https://bugs.php.net/bug.php?id=60377edit=1
Bug #55379 [Com]: can't iterate multidimensional array when referring to an object inside closure
Edit report at https://bugs.php.net/bug.php?id=55379edit=1 ID: 55379 Comment by: reeze dot xia at gmail dot com Reported by:rsk82 at live dot com Summary:can't iterate multidimensional array when referring to an object inside closure Status: Open Type: Bug Package:Class/Object related Operating System: Windows XP SP3 PHP Version:5.3.7 Block user comment: N Private report: N New Comment: Hi rsk82, please try lastest version, from the follow result, it it didn't crash on Linux, but the result output changed. so it might been fixed already. please refer to: http://3v4l.org/NUtav Previous Comments: [2011-08-19 16:33:19] rsk82 at live dot com I nowadays released 5.3.7 this bug wasn't repaired. [2011-08-07 14:50:33] rsk82 at live dot com Description: affected versions: php-5.3.6-Win32-VC9-x86 php-5.3.7RC4-Win32-VC9-x86 php-5.3-ts-windows-vc9-x86-r314352 php-5.3-ts-windows-vc9-x86-r314419 php-5.4-ts-windows-vc9-x86-r314420 operating system: Windows XP SP3 description in code Test script: --- ?php $test_data1 = array('one','two','three'); // all is ok $test_data2 = array(array('one','two','three')); // windows error: // #The instruction at 'address' referenced memory at 'address'. // #The memory could not be read. // #Click OK to terminate the program. // No error shows up in console, sometimes script stops without error but sometimes executes like nothing is happening. $test_data3 = array(array('one','two','three'),array('four','five','six')); // error in PHP console: // Fatal error: Call to a member function show_message() on a non-object in c:\scripts\found-error.php on line xx // values one two three are displayed, four five and six are ommitted. class myClass { function iterate_multidim_array($array) { array_walk_recursive($array,function($val,$key,$obj) { $obj-show_message($val); },$this); } function show_message($msg) { echo $msg.\n; } } echo phpversion().\n\n; $myInstance = new MyClass(); $myInstance- iterate_multidim_array($test_data3); ? Expected result: see no errors Actual result: -- comments in code -- Edit this bug report at https://bugs.php.net/bug.php?id=55379edit=1
Bug #55460 [Com]: if computing an expression in die(), the cgi engine crashes
Edit report at https://bugs.php.net/bug.php?id=55460edit=1 ID: 55460 Comment by: reeze dot xia at gmail dot com Reported by:da at infomantis dot de Summary:if computing an expression in die(), the cgi engine crashes Status: Feedback Type: Bug Package:CGI/CLI related Operating System: Windows Vista PHP Version:5.4.0alpha3 Block user comment: N Private report: N New Comment: I couldn't reproduce that in PHP5.4 with php-cgi in Mac OS X Previous Comments: [2011-08-19 22:49:29] fel...@php.net Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. Thank you for helping us make PHP better. [2011-08-19 10:38:03] da at infomantis dot de Description: If you end a script by calling die(), an give an expression as parameter, that must be computed first, the CGI/CLI Engine crashes. Passing a normal string causes no problems, but everything complexer than a literal(object access, simple arithmetic expressions like 1+1, even concatenation of two strings) leads to an engine crash. Test script: --- ?php echo 'Now its gonna crashing'.PHP_EOL; die('complex '.'expression'); ? Expected result: Now its gonna crashing complex expression Actual result: -- Now its gonna crashing complex expression Windows informs me, that the CGI/CLI engine encountered an unidentified failure and must be restarted. -- Edit this bug report at https://bugs.php.net/bug.php?id=55460edit=1
Bug #63025 [Com]: Method in trait not called when called as __constructor() argument
Edit report at https://bugs.php.net/bug.php?id=63025edit=1 ID: 63025 Comment by: reeze dot xia at gmail dot com Reported by:hinikato at mail dot ru Summary:Method in trait not called when called as __constructor() argument Status: Open Type: Bug Package:Scripting Engine problem Operating System: Windows 7 x64 PHP Version:5.4.6 Block user comment: N Private report: N New Comment: hi hinikato, Yes, as previous email, if constructor was defined it will get called so your func_get_args() test script works :) . if not it will not get called, so the params expression will not executed. new operator is not the same as normal function call. so it behavior differently, Previous Comments: [2012-09-07 07:04:36] hinikato at mail dot ru @reeze.xia, yes, this weird behavior, because we can do somethink like this: function __construct() { $args = func_get_args(); // do something with $args } It seems like a bug. [2012-09-07 05:50:03] reeze dot xia at gmail dot com There is nothing to do with trait. look http://3v4l.org/eOVRJ class A { /* no constructor public function __construct() {} */ } class B { public function __construct() { die(DIE ME!); } } $a = new A(new B()); // output nothing. it didn't die with DIE ME! since class A didn't have any constructor, so the construct params will not executed the same as: if (false $it-iWillNotBeExecuted()) { // } I thought this is a document problem :) [2012-09-07 05:20:18] hinikato at mail dot ru Description: Please see the code below. If I try move the $this-getSomething() to var: $tmp = $this-getSomething(); return new Bar($tmp); it works as expected, however it does not work as shown below. Test script: --- class Foo { use TFoo; function test() { $this-getFromTrait(); } } class Bar { function some() { die(__METHOD__); } } trait TFoo { function getFromTrait() { return new Bar($this-getSomething()); } function getSomething() { // Must be called!!! die(__METHOD__); } } (new Foo())-test(); Expected result: THe TFoo::getSomething() should be called. Actual result: -- The TFoo::getSomething()not called. -- Edit this bug report at https://bugs.php.net/bug.php?id=63025edit=1
Bug #63025 [Com]: Method in trait not called when called as __constructor() argument
Edit report at https://bugs.php.net/bug.php?id=63025edit=1 ID: 63025 Comment by: reeze dot xia at gmail dot com Reported by:hinikato at mail dot ru Summary:Method in trait not called when called as __constructor() argument Status: Open Type: Bug Package:Scripting Engine problem Operating System: Windows 7 x64 PHP Version:5.4.6 Block user comment: N Private report: N New Comment: There is nothing to do with trait. look http://3v4l.org/eOVRJ class A { /* no constructor public function __construct() {} */ } class B { public function __construct() { die(DIE ME!); } } $a = new A(new B()); // output nothing. it didn't die with DIE ME! since class A didn't have any constructor, so the construct params will not executed the same as: if (false $it-iWillNotBeExecuted()) { // } I thought this is a document problem :) Previous Comments: [2012-09-07 05:20:18] hinikato at mail dot ru Description: Please see the code below. If I try move the $this-getSomething() to var: $tmp = $this-getSomething(); return new Bar($tmp); it works as expected, however it does not work as shown below. Test script: --- class Foo { use TFoo; function test() { $this-getFromTrait(); } } class Bar { function some() { die(__METHOD__); } } trait TFoo { function getFromTrait() { return new Bar($this-getSomething()); } function getSomething() { // Must be called!!! die(__METHOD__); } } (new Foo())-test(); Expected result: THe TFoo::getSomething() should be called. Actual result: -- The TFoo::getSomething()not called. -- Edit this bug report at https://bugs.php.net/bug.php?id=63025edit=1
Bug #63007 [Com]: json functions corrupt arrayindizes
Edit report at https://bugs.php.net/bug.php?id=63007edit=1 ID: 63007 Comment by: reeze dot xia at gmail dot com Reported by:janfili+phpbugs at gmail dot com Summary:json functions corrupt arrayindizes Status: Open Type: Bug Package:JSON related Operating System: Linux ubuntu1010 PHP Version:5.3.16 Block user comment: N Private report: N New Comment: This is not a problem of JSON itself. but. array vs object conversion. and it was documented: http://www.php.net/manual/en/language.types.array.php#language.types.array.casti ng after json_encode key: 1 was encoded as string. In object properties and only been string key. but after convert to array, it will not be able to accessed since. if the key will be changed to number key if possible. similar to https://bugs.php.net/bug.php?id=54082 Previous Comments: [2012-09-04 07:38:41] janfili+phpbugs at gmail dot com Description: after json en/decoding the original array index cant be used to retrieve the values. however foreach and all other array-related functions work as expected. Test script: --- ? $class = new stdClass(); $class-field = 'foo'; var_dump($class); $array = array(1 = $class); var_dump($array); $json_sting = json_encode($array); var_dump($json_sting); $array_obj = json_decode($json_sting); var_dump($array_obj); $array = (array) $array_obj; var_dump($array); var_dump($array[1]); ? Expected result: output of last var_dump is expected to be object(stdClass)#3 (1) { [field]= string(3) foo } Actual result: -- NULL -- Edit this bug report at https://bugs.php.net/bug.php?id=63007edit=1
Bug #63007 [Com]: json functions corrupt arrayindizes
Edit report at https://bugs.php.net/bug.php?id=63007edit=1 ID: 63007 Comment by: reeze dot xia at gmail dot com Reported by:janfili+phpbugs at gmail dot com Summary:json functions corrupt arrayindizes Status: Open Type: Bug Package:JSON related Operating System: Linux ubuntu1010 PHP Version:5.3.16 Block user comment: N Private report: N New Comment: Ah, I'm sorry, the bug ID: #54082, I can't find the report right now. will post that later Previous Comments: [2012-09-04 08:18:29] janfili+phpbugs at gmail dot com using this var_dump($array['1']); as the last statement will not help either [2012-09-04 08:04:22] reeze dot xia at gmail dot com This is not a problem of JSON itself. but. array vs object conversion. and it was documented: http://www.php.net/manual/en/language.types.array.php#language.types.array.casti ng after json_encode key: 1 was encoded as string. In object properties and only been string key. but after convert to array, it will not be able to accessed since. if the key will be changed to number key if possible. similar to https://bugs.php.net/bug.php?id=54082 [2012-09-04 07:38:41] janfili+phpbugs at gmail dot com Description: after json en/decoding the original array index cant be used to retrieve the values. however foreach and all other array-related functions work as expected. Test script: --- ? $class = new stdClass(); $class-field = 'foo'; var_dump($class); $array = array(1 = $class); var_dump($array); $json_sting = json_encode($array); var_dump($json_sting); $array_obj = json_decode($json_sting); var_dump($array_obj); $array = (array) $array_obj; var_dump($array); var_dump($array[1]); ? Expected result: output of last var_dump is expected to be object(stdClass)#3 (1) { [field]= string(3) foo } Actual result: -- NULL -- Edit this bug report at https://bugs.php.net/bug.php?id=63007edit=1
Bug #63007 [Com]: json functions corrupt arrayindizes
Edit report at https://bugs.php.net/bug.php?id=63007edit=1 ID: 63007 Comment by: reeze dot xia at gmail dot com Reported by:janfili+phpbugs at gmail dot com Summary:json functions corrupt arrayindizes Status: Open Type: Bug Package:JSON related Operating System: Linux ubuntu1010 PHP Version:5.3.16 Block user comment: N Private report: N New Comment: Yes, it will not accessible anymore if you have property with string number. since array handle keys different from objects. Previous Comments: [2012-09-04 08:19:17] reeze dot xia at gmail dot com Ah, I'm sorry, the bug ID: #54082, I can't find the report right now. will post that later [2012-09-04 08:18:29] janfili+phpbugs at gmail dot com using this var_dump($array['1']); as the last statement will not help either [2012-09-04 08:04:22] reeze dot xia at gmail dot com This is not a problem of JSON itself. but. array vs object conversion. and it was documented: http://www.php.net/manual/en/language.types.array.php#language.types.array.casti ng after json_encode key: 1 was encoded as string. In object properties and only been string key. but after convert to array, it will not be able to accessed since. if the key will be changed to number key if possible. similar to https://bugs.php.net/bug.php?id=54082 [2012-09-04 07:38:41] janfili+phpbugs at gmail dot com Description: after json en/decoding the original array index cant be used to retrieve the values. however foreach and all other array-related functions work as expected. Test script: --- ? $class = new stdClass(); $class-field = 'foo'; var_dump($class); $array = array(1 = $class); var_dump($array); $json_sting = json_encode($array); var_dump($json_sting); $array_obj = json_decode($json_sting); var_dump($array_obj); $array = (array) $array_obj; var_dump($array); var_dump($array[1]); ? Expected result: output of last var_dump is expected to be object(stdClass)#3 (1) { [field]= string(3) foo } Actual result: -- NULL -- Edit this bug report at https://bugs.php.net/bug.php?id=63007edit=1
Bug #63007 [Com]: json functions corrupt arrayindizes
Edit report at https://bugs.php.net/bug.php?id=63007edit=1 ID: 63007 Comment by: reeze dot xia at gmail dot com Reported by:janfili+phpbugs at gmail dot com Summary:json functions corrupt arrayindizes Status: Not a bug Type: Bug Package:JSON related Operating System: Linux ubuntu1010 PHP Version:5.3.16 Block user comment: N Private report: N New Comment: Hi janfili, It IS a bug, @see https://bugs.php.net/bug.php?id=61655 object - array have problem, so does array - object have the same problem. It is inconsistent, but it was documented. Previous Comments: [2012-09-04 14:37:23] larue...@php.net would you read my comment clearly(or the comment of scott...@php.net in #51951)? as I said, the key has become to a string... I knew what you are saying, but as I said, it's a knew behavior(or knew issue)... [2012-09-04 14:16:03] janfili+phpbugs at gmail dot com Would you please read my comments carefully again? as i mentioned in earlier comments it is NOT possible to get the values using 1. var_dump($array[1]); or 2. var_dump($array['1']); or 3. var_dump($array[1]); or 4. $k = array_keys($array); var_dum($array[$k[0]]); All of these options will result into undefined index. Even though the keys we convertet to strings, you cant get the values by using the string key. You cant even get the value if you get the keys by array_keys() first. Before posting something about string keys vs int keys now, just take a close look at 4. best regards [2012-09-04 13:17:45] larue...@php.net they are the same the array's key 1 has become to string 1.. [2012-09-04 11:39:27] janfili+phpbugs at gmail dot com not similar to https://bugs.php.net/bug.php?id=51915 51915 mentions that the indexes become strings, and that is the case of course through json en/decoding. The bug described in this ticket is that the elements belonging to these keys are not retrievable anymore. even if you explicitly get the keys $k = array_keys($array); echo $array[$k[0]]; will result in undefined index. Reductio ad absurdum [2012-09-04 11:17:17] larue...@php.net similar to https://bugs.php.net/bug.php?id=51915 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=63007 -- Edit this bug report at https://bugs.php.net/bug.php?id=63007edit=1
[PHP-BUG] Req #62994 [NEW]: Disallow some magic methods been generators
From: reeze dot xia at gmail dot com Operating system: PHP version: master-Git-2012-09-02 (Git) Package: Scripting Engine problem Bug Type: Feature/Change Request Bug description:Disallow some magic methods been generators Description: magic method are called in a special way, if those methods was defined as generator, most of them will not work as expected. We could disallow them when compiling. Test script: --- class A { public function __construct(array $data) { $this-initData = $data; // maybe more initialization... var_dump($this-initData); foreach$(this-initData as $v) { yield $v; } } } $a = new A(array(1, 2)); // constructor didn't get called. so does the that magic methods: http://www.php.net/manual/en/language.oop5.magic.php most of them are meanning less if they are generators. *some of them* maybe useful if they return value but not void. Those could be allowed: __call(), __callStatic(), __get(), __invoke() but those seems meaningless to be generators __construct(), __destruct(), __set(), __isset(), __unset(), __sleep(), __wakeup(), __toString(), __set_state() and __clone(), -- Edit bug report at https://bugs.php.net/bug.php?id=62994edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62994r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62994r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62994r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62994r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62994r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62994r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62994r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62994r=needscript Try newer version: https://bugs.php.net/fix.php?id=62994r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62994r=support Expected behavior: https://bugs.php.net/fix.php?id=62994r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62994r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62994r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62994r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62994r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62994r=dst IIS Stability: https://bugs.php.net/fix.php?id=62994r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62994r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62994r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62994r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62994r=mysqlcfg
Bug #63000 [Com]: MCAST_JOIN_GROUP on OSX is broken
Edit report at https://bugs.php.net/bug.php?id=63000edit=1 ID: 63000 Comment by: reeze dot xia at gmail dot com Reported by:igor at wiedler dot ch Summary:MCAST_JOIN_GROUP on OSX is broken Status: Open Type: Bug Package:Sockets related Operating System: Mac OSX 10.7, 10.8 PHP Version:5.4.6 Block user comment: N Private report: N New Comment: Ah, you mention which version the bug exist, both 10.710.8 right ? Is there any way to detect whether is broken or not disable it seems not a better choice. Previous Comments: [2012-09-02 21:41:13] igor at wiedler dot ch See also: http://trac.videolan.org/vlc/ticket/6104#comment:19 [2012-09-02 21:38:36] igor at wiedler dot ch Description: The multicast support in PHP 5.4 makes use of MCAST_JOIN_GROUP if it is present. The problem is that OSX 10.7 added the constant, but did not correctly implement the feature. This causes the setsockopt call to fail. The solution to the problem is to not use MCAST_JOIN_GROUP on OSX. Test script: --- ?php if (!extension_loaded('sockets')) { die('skip sockets extension not available.'); } if (PHP_OS !== 'Darwin') { die('is not OSX.'); } $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); socket_bind($socket, '0.0.0.0', 31057); $so = socket_set_option($socket, IPPROTO_IP, MCAST_JOIN_GROUP, array( group = '224.0.0.251', interface = 0, )); var_dump($so); Expected result: bool(true) Actual result: -- PHP Warning: socket_set_option(): unable to set socket option [22]: Invalid argument in /Users/igor/code/react-mdns-userland/src/React/Mdns/Client.php on line 27 PHP Stack trace: PHP 1. {main}() /Users/igor/code/react-mdns-userland/examples/client.php:0 PHP 2. React\Mdns\Client-query() /Users/igor/code/react-mdns- userland/examples/client.php:10 PHP 3. socket_set_option() /Users/igor/code/react-mdns- userland/src/React/Mdns/Client.php:27 bool(false) -- Edit this bug report at https://bugs.php.net/bug.php?id=63000edit=1
Bug #63000 [Com]: MCAST_JOIN_GROUP on OSX is broken
Edit report at https://bugs.php.net/bug.php?id=63000edit=1 ID: 63000 Comment by: reeze dot xia at gmail dot com Reported by:igor at wiedler dot ch Summary:MCAST_JOIN_GROUP on OSX is broken Status: Open Type: Bug Package:Sockets related Operating System: Mac OSX 10.7, 10.8 PHP Version:5.4.6 Block user comment: N Private report: N New Comment: I haven't use this option before, if it's an important feature, if your patch didn't apply the only impact is the warning issued ? that maybe need to be fixed, but if not... eg this bug https://bugs.php.net/bug.php?id=62881 I reported. maybe the bug reported may set to won't fix :( more conversation see: https://github.com/php/php-src/pull/176 anyway I prefer it get fixed :) Previous Comments: [2012-09-03 02:47:47] reeze dot xia at gmail dot com Ah, you mention which version the bug exist, both 10.710.8 right ? Is there any way to detect whether is broken or not disable it seems not a better choice. [2012-09-02 21:41:13] igor at wiedler dot ch See also: http://trac.videolan.org/vlc/ticket/6104#comment:19 [2012-09-02 21:38:36] igor at wiedler dot ch Description: The multicast support in PHP 5.4 makes use of MCAST_JOIN_GROUP if it is present. The problem is that OSX 10.7 added the constant, but did not correctly implement the feature. This causes the setsockopt call to fail. The solution to the problem is to not use MCAST_JOIN_GROUP on OSX. Test script: --- ?php if (!extension_loaded('sockets')) { die('skip sockets extension not available.'); } if (PHP_OS !== 'Darwin') { die('is not OSX.'); } $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); socket_bind($socket, '0.0.0.0', 31057); $so = socket_set_option($socket, IPPROTO_IP, MCAST_JOIN_GROUP, array( group = '224.0.0.251', interface = 0, )); var_dump($so); Expected result: bool(true) Actual result: -- PHP Warning: socket_set_option(): unable to set socket option [22]: Invalid argument in /Users/igor/code/react-mdns-userland/src/React/Mdns/Client.php on line 27 PHP Stack trace: PHP 1. {main}() /Users/igor/code/react-mdns-userland/examples/client.php:0 PHP 2. React\Mdns\Client-query() /Users/igor/code/react-mdns- userland/examples/client.php:10 PHP 3. socket_set_option() /Users/igor/code/react-mdns- userland/src/React/Mdns/Client.php:27 bool(false) -- Edit this bug report at https://bugs.php.net/bug.php?id=63000edit=1
Bug #62987 [Com]: Assigning to ArrayObject[null][something] overrides all undefined variables
Edit report at https://bugs.php.net/bug.php?id=62987edit=1 ID: 62987 Comment by: reeze dot xia at gmail dot com Reported by:danko at very dot lv Summary:Assigning to ArrayObject[null][something] overrides all undefined variables Status: Open Type: Bug Package:SPL related Operating System: Linux PHP Version:5.4Git-2012-08-31 (Git) Block user comment: N Private report: N New Comment: Hi, I'v send a PR to fix this: https://github.com/php/php-src/pull/181 Previous Comments: [2012-08-31 21:20:50] danko at very dot lv Forget about arrays. It just dawned on me that *everything undefined* is affected. var_dump($nothing); var_dump($a-nothing); string(6) srsly? string(6) srsly? [2012-08-31 21:05:35] danko at very dot lv A bit different behavior shows in older versions. See http://codepad.org/RBPih545 for example (don't know their version, but older than 5.4, obviously) [2012-08-31 20:57:44] danko at very dot lv Description: Basically, when you try to assign anything to ArrayObject[null]['any_key'], it fails as it should, but since that moment anytime you access a non-existing key in any array, you get the last created zval, or so it seems. Strangely enough, all warnings and notices are shown and isset() returns false. Test script: --- ? $a = new ArrayObject(); $b = []; $a[null]['hurr'] = 'durr'; var_dump($a['epic_magic']); var_dump($b['epic_magic']); var_dump($c['epic_magic']); // Undefined var!! $d = []; var_dump($a['epic_magic']); // more magic! var_dump($d['epic_magic']); $e = 'srsly?'; var_dump($a['epic_magic']); // srsly. Expected result: Warning: Illegal offset type in /home/virtuall/epic.php on line 7 NULL NULL NULL NULL NULL NULL bool(false) Actual result: -- Warning: Illegal offset type in /home/virtuall/epic.php on line 7 array(1) { [hurr]= string(4) durr } array(1) { [hurr]= string(4) durr } array(1) { [hurr]= string(4) durr } array(0) { } array(0) { } string(6) srsly? bool(false) -- Edit this bug report at https://bugs.php.net/bug.php?id=62987edit=1
Bug #62976 [Com]: Notice: could not be converted to int when comparing some builtin classes
Edit report at https://bugs.php.net/bug.php?id=62976edit=1 ID: 62976 Comment by: reeze dot xia at gmail dot com Reported by:ladislav at marek dot su Summary:Notice: could not be converted to int when comparing some builtin classes Status: Open Type: Bug Package:Class/Object related Operating System: Linux PHP Version:5.4Git-2012-08-30 (Git) Block user comment: N Private report: N New Comment: After the fix for #61326 ArrayObject have different compare_objects handler: http://git.php.net/?p=php- src.git;a=commit;h=23e65a9dcc71cf11ee5ec82c256588626545d4db There is an test case the same as bug report: https://github.com/php/php-src/blob/master/tests/lang/compare_objects_basic2.phpt I agree with @laruence that it could be improved. if both of the object couldn't be cast to compare. they ARE not equal. Previous Comments: [2012-08-30 16:13:03] larue...@php.net Arrayobject is share the same object handlers as stdClass, but exception does. anyway, I think there is a room to improve.. [2012-08-30 13:16:10] ladislav at marek dot su Description: Comparing instance of some builtin class with instance of different class issues notice: Object of class ArrayObject could not be converted to int. Test script: --- new stdClass == new ArrayObject; // but new stdClass == new Exception works without notice Actual result: -- Notice: Object of class ArrayObject could not be converted to int in Command line code on line 1 Notice: Object of class stdClass could not be converted to int in Command line code on line 1 -- Edit this bug report at https://bugs.php.net/bug.php?id=62976edit=1
Bug #62976 [Com]: Notice: could not be converted to int when comparing some builtin classes
Edit report at https://bugs.php.net/bug.php?id=62976edit=1 ID: 62976 Comment by: reeze dot xia at gmail dot com Reported by:ladislav at marek dot su Summary:Notice: could not be converted to int when comparing some builtin classes Status: Open Type: Bug Package:Class/Object related Operating System: Linux PHP Version:5.4Git-2012-08-30 (Git) Block user comment: N Private report: N New Comment: Hi, I proposed a patch for this: https://github.com/php/php-src/pull/179 Previous Comments: [2012-08-30 17:40:24] reeze dot xia at gmail dot com After the fix for #61326 ArrayObject have different compare_objects handler: http://git.php.net/?p=php- src.git;a=commit;h=23e65a9dcc71cf11ee5ec82c256588626545d4db There is an test case the same as bug report: https://github.com/php/php-src/blob/master/tests/lang/compare_objects_basic2.phpt I agree with @laruence that it could be improved. if both of the object couldn't be cast to compare. they ARE not equal. [2012-08-30 16:13:03] larue...@php.net Arrayobject is share the same object handlers as stdClass, but exception does. anyway, I think there is a room to improve.. [2012-08-30 13:16:10] ladislav at marek dot su Description: Comparing instance of some builtin class with instance of different class issues notice: Object of class ArrayObject could not be converted to int. Test script: --- new stdClass == new ArrayObject; // but new stdClass == new Exception works without notice Actual result: -- Notice: Object of class ArrayObject could not be converted to int in Command line code on line 1 Notice: Object of class stdClass could not be converted to int in Command line code on line 1 -- Edit this bug report at https://bugs.php.net/bug.php?id=62976edit=1
[PHP-BUG] Bug #62962 [NEW]: Test failed ext/zlib/tests/bug_52944.phpt
From: reeze dot xia at gmail dot com Operating system: Mac OSX 10.8 PHP version: 5.4Git-2012-08-29 (Git) Package: Zlib related Bug Type: Bug Bug description:Test failed ext/zlib/tests/bug_52944.phpt Description: ext/zlib/tests/bug_52944.phpt test failed Expected result: Pass Actual result: -- failed. â php-src-5.4 git:(PHP-5.4) â cat ext/zlib/tests/bug_52944.diff 001+ string(1) % 002+ string(1) C 001- string(0) 002- string(0) -- Edit bug report at https://bugs.php.net/bug.php?id=62962edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62962r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62962r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62962r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62962r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62962r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62962r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62962r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62962r=needscript Try newer version: https://bugs.php.net/fix.php?id=62962r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62962r=support Expected behavior: https://bugs.php.net/fix.php?id=62962r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62962r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62962r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62962r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62962r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62962r=dst IIS Stability: https://bugs.php.net/fix.php?id=62962r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62962r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62962r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62962r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62962r=mysqlcfg
Bug #62903 [Com]: array_slice ignores preserve_keys with no length
Edit report at https://bugs.php.net/bug.php?id=62903edit=1 ID: 62903 Comment by: reeze dot xia at gmail dot com Reported by:php at nobswolf dot info Summary:array_slice ignores preserve_keys with no length Status: Open Type: Bug Package:Arrays related Operating System: windows PHP Version:5.3.16 Block user comment: N Private report: N New Comment: I don't get it. could you please supply full test script. Look at this. perserver_keys works. http://3v4l.org/hCVAv#v524 and #4168 was marked at fixed. Do I missing something? Previous Comments: [2012-08-23 06:52:26] php at nobswolf dot info no its not... the problem is a later array_merge, which does not have the option of preserve_keys my fault, sorry maybe every reorder-function should have this option [2012-08-23 06:18:54] php at nobswolf dot info Description: I want to slice an array into a first one with the first 3 entries and a second one with the rest (variable length). Test script: --- $wertA2 = array_slice ($wertA, 0, 3, true); $wertA3 = array_slice ($wertA, 3, null, true); Expected result: I need preserved keys even when I can not give a length. Actual result: -- The preserve_keys = true gets ignored and keys a get renumbered :-( see also #41686 This bug is 5 years old. When will it get fixed? -- Edit this bug report at https://bugs.php.net/bug.php?id=62903edit=1
Bug #62904 [Com]: Crash when cloning an object which inherits SplFixedArray
Edit report at https://bugs.php.net/bug.php?id=62904edit=1 ID: 62904 Comment by: reeze dot xia at gmail dot com Reported by:fel...@php.net Summary:Crash when cloning an object which inherits SplFixedArray Status: Open Type: Bug Package:SPL related PHP Version:Irrelevant Block user comment: N Private report: N New Comment: when construct a object but didn't call the parent constructor. this patch makes it construct as default. We could also throw an exception here too, but other method didn't checked the situation of SplFixArray::__construct didn't get called. so I think we could makes them consist. Previous Comments: [2012-08-23 12:30:59] fel...@php.net Description: See below. Test script: --- ?php class foo extends SplFixedArray { public function __construct() { } } $x = new foo; try { $z = clone $x; } catch (Exception $e) { var_dump($e-getMessage()); } Actual result: -- Program received signal SIGSEGV, Segmentation fault. 0x082fc564 in spl_fixedarray_object_new_ex (class_type=0xb6a06f74, obj=0xbfffbf08, orig=0xb6a05964, clone_orig=1, tsrm_ls=0x8942050) at /home/felipe/dev/php-src/ext/spl/spl_fixedarray.c:228 228 spl_fixedarray_init(intern-array, other-array-size TSRMLS_CC); (gdb) p other-array $6 = (spl_fixedarray *) 0x0 -- Edit this bug report at https://bugs.php.net/bug.php?id=62904edit=1
Bug #62904 [Com]: Crash when cloning an object which inherits SplFixedArray
Edit report at https://bugs.php.net/bug.php?id=62904edit=1 ID: 62904 Comment by: reeze dot xia at gmail dot com Reported by:fel...@php.net Summary:Crash when cloning an object which inherits SplFixedArray Status: Open Type: Bug Package:SPL related PHP Version:Irrelevant Block user comment: N Private report: N New Comment: but other method didn't check I mean *did* :) Previous Comments: [2012-08-23 14:46:29] reeze dot xia at gmail dot com when construct a object but didn't call the parent constructor. this patch makes it construct as default. We could also throw an exception here too, but other method didn't checked the situation of SplFixArray::__construct didn't get called. so I think we could makes them consist. [2012-08-23 12:30:59] fel...@php.net Description: See below. Test script: --- ?php class foo extends SplFixedArray { public function __construct() { } } $x = new foo; try { $z = clone $x; } catch (Exception $e) { var_dump($e-getMessage()); } Actual result: -- Program received signal SIGSEGV, Segmentation fault. 0x082fc564 in spl_fixedarray_object_new_ex (class_type=0xb6a06f74, obj=0xbfffbf08, orig=0xb6a05964, clone_orig=1, tsrm_ls=0x8942050) at /home/felipe/dev/php-src/ext/spl/spl_fixedarray.c:228 228 spl_fixedarray_init(intern-array, other-array-size TSRMLS_CC); (gdb) p other-array $6 = (spl_fixedarray *) 0x0 -- Edit this bug report at https://bugs.php.net/bug.php?id=62904edit=1
Bug #62904 [Com]: Crash when cloning an object which inherits SplFixedArray
Edit report at https://bugs.php.net/bug.php?id=62904edit=1 ID: 62904 Comment by: reeze dot xia at gmail dot com Reported by:fel...@php.net Summary:Crash when cloning an object which inherits SplFixedArray Status: Closed Type: Bug Package:SPL related PHP Version:Irrelevant Assigned To:laruence Block user comment: N Private report: N New Comment: I really don't think throw an exception is a good idea. Think about this: ?php class foo extends SplFixedArray { public function __construct() { } } $x = new foo; $x-setSize(1); $x[0] = 30; var_dump($x); ? This works. if you throw an exception when clone. $x-setSize(0) should throw too. since it was not initialized properly. Previous Comments: [2012-08-23 15:24:39] larue...@php.net Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=13bcf685cb0a92e502ebe39f4b22c64304a9f333 Log: Fixed bug #62904 (Crash when cloning an object which inherits SplFixedArray) [2012-08-23 15:19:16] 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-08-23 15:18:48] larue...@php.net Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=42f91d6ac6e4c359313ddc90b86067ab9be6a80f Log: Fixed bug #62904 (Crash when cloning an object which inherits SplFixedArray) [2012-08-23 14:48:04] reeze dot xia at gmail dot com but other method didn't check I mean *did* :) [2012-08-23 14:46:29] reeze dot xia at gmail dot com when construct a object but didn't call the parent constructor. this patch makes it construct as default. We could also throw an exception here too, but other method didn't checked the situation of SplFixArray::__construct didn't get called. so I think we could makes them consist. 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=62904 -- Edit this bug report at https://bugs.php.net/bug.php?id=62904edit=1
[PHP-BUG] Bug #62881 [NEW]: posix_getpwnam() posix_getgrnam() didn't return false on Mac OSX 10.8
From: reeze dot xia at gmail dot com Operating system: Mac OSX 10.8 PHP version: Irrelevant Package: POSIX related Bug Type: Bug Bug description:posix_getpwnam() posix_getgrnam() didn't return false on Mac OSX 10.8 Description: In Mac OS X 10.8 mountain lion, getpwnam() getgrnam() didn't return NULL when empty string supplied. this is a bug of 10.8.0 since uid 0 an gid 0 most belongs to root, this might have security issue. and this breaks these test cases: posix_getgrnam(): Basic tests [ext/posix/tests/posix_getgrnam.phpt] posix_getgrnam(): Basic tests [ext/posix/tests/posix_getgrnam_basic.phpt] posix_getpwnam(): Basic tests [ext/posix/tests/posix_getpwnam.phpt] posix_getpwnam(): Basic tests [ext/posix/tests/posix_getpwnam_basic.phpt] here is reproducible code from: Andreas Fink af...@list.fink.org: #include sys/types.h #include stdio.h #include pwd.h #include uuid/uuid.h #include stdlib.h #define MAYBE_NULL_STRING(a)(a ? a : (NULL)) extern int errno; int main(int argc, char *argv[]) { errno = 0; struct passwd *pwdstruct = getpwnam(); printf(errno = %d\n,errno); if(pwdstruct == NULL) { printf(pwdstruct == NULL\n); exit(0); } printf(pw_name: %s\n,MAYBE_NULL_STRING(pwdstruct-pw_name)); printf(pw_passwd: %s\n,MAYBE_NULL_STRING(pwdstruct-pw_passwd)); printf(pw_uid: %d\n,pwdstruct-pw_uid); printf(pw_gid: %d\n,pwdstruct-pw_gid); } produces $ ./a.out errno = 0 pw_name: pw_passwd: pw_uid: 0 pw_gid: 0 Test script: --- ?php var_dump(posix_getpwnam()); var_dump(posix_getgrnam()); Expected result: bool(false) bool(false) Actual result: -- array(7) { [name]= string(0) [passwd]= string(0) [uid]= int(0) [gid]= int(0) [gecos]= string(0) [dir]= string(0) [shell]= string(0) } array(4) { [name]= string(0) [passwd]= string(0) [members]= array(0) { } [gid]= int(0) } -- Edit bug report at https://bugs.php.net/bug.php?id=62881edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62881r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62881r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62881r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62881r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62881r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62881r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62881r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62881r=needscript Try newer version: https://bugs.php.net/fix.php?id=62881r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62881r=support Expected behavior: https://bugs.php.net/fix.php?id=62881r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62881r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62881r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62881r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62881r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62881r=dst IIS Stability: https://bugs.php.net/fix.php?id=62881r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62881r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62881r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62881r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62881r=mysqlcfg
Bug #62881 [Com]: posix_getpwnam() posix_getgrnam() didn't return false on Mac OSX 10.8
Edit report at https://bugs.php.net/bug.php?id=62881edit=1 ID: 62881 Comment by: reeze dot xia at gmail dot com Reported by:reeze dot xia at gmail dot com Summary:posix_getpwnam() posix_getgrnam() didn't return false on Mac OSX 10.8 Status: Open Type: Bug Package:POSIX related Operating System: Mac OSX 10.8 PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Hi, I'v sent a pull request for this bug: https://github.com/php/php-src/pull/176 thanks Previous Comments: [2012-08-21 16:54:16] reeze dot xia at gmail dot com Description: In Mac OS X 10.8 mountain lion, getpwnam() getgrnam() didn't return NULL when empty string supplied. this is a bug of 10.8.0 since uid 0 an gid 0 most belongs to root, this might have security issue. and this breaks these test cases: posix_getgrnam(): Basic tests [ext/posix/tests/posix_getgrnam.phpt] posix_getgrnam(): Basic tests [ext/posix/tests/posix_getgrnam_basic.phpt] posix_getpwnam(): Basic tests [ext/posix/tests/posix_getpwnam.phpt] posix_getpwnam(): Basic tests [ext/posix/tests/posix_getpwnam_basic.phpt] here is reproducible code from: Andreas Fink af...@list.fink.org: #include sys/types.h #include stdio.h #include pwd.h #include uuid/uuid.h #include stdlib.h #define MAYBE_NULL_STRING(a)(a ? a : (NULL)) extern int errno; int main(int argc, char *argv[]) { errno = 0; struct passwd *pwdstruct = getpwnam(); printf(errno = %d\n,errno); if(pwdstruct == NULL) { printf(pwdstruct == NULL\n); exit(0); } printf(pw_name: %s\n,MAYBE_NULL_STRING(pwdstruct-pw_name)); printf(pw_passwd: %s\n,MAYBE_NULL_STRING(pwdstruct-pw_passwd)); printf(pw_uid: %d\n,pwdstruct-pw_uid); printf(pw_gid: %d\n,pwdstruct-pw_gid); } produces $ ./a.out errno = 0 pw_name: pw_passwd: pw_uid: 0 pw_gid: 0 Test script: --- ?php var_dump(posix_getpwnam()); var_dump(posix_getgrnam()); Expected result: bool(false) bool(false) Actual result: -- array(7) { [name]= string(0) [passwd]= string(0) [uid]= int(0) [gid]= int(0) [gecos]= string(0) [dir]= string(0) [shell]= string(0) } array(4) { [name]= string(0) [passwd]= string(0) [members]= array(0) { } [gid]= int(0) } -- Edit this bug report at https://bugs.php.net/bug.php?id=62881edit=1
Bug #62881 [Com]: posix_getpwnam() posix_getgrnam() didn't return false on Mac OSX 10.8
Edit report at https://bugs.php.net/bug.php?id=62881edit=1 ID: 62881 Comment by: reeze dot xia at gmail dot com Reported by:reeze dot xia at gmail dot com Summary:posix_getpwnam() posix_getgrnam() didn't return false on Mac OSX 10.8 Status: Wont fix Type: Bug Package:POSIX related Operating System: Mac OSX 10.8 PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Hi, aharvey how did you made it? by a tricky way?. :) Previous Comments: [2012-08-22 03:43:45] larue...@php.net it's no need: 1. first it's a knew bug of apple, apple will fix that 2. as you said, you can create a group with empty string in ubuntu. we have no reason to introduce such a temporary fix [2012-08-22 03:18:07] ahar...@php.net To reiterate what I said on GitHub: I think we could put a workaround in just for those OS X versions behind an appropriate #if guard (blank user and group names are valid in at least some POSIX OSes, so we don't want to hardcode the behaviour for posix_getgrnam('')), but it's probably not worth the code clutter in the grand scheme of things. [2012-08-22 03:02:37] larue...@php.net same comment copied from the pr: we don't fix bug doesn't belong to php Linux man page of posix_getpwnam doesn't specific the situation about empty string Posix functions are buggy in mac os. so, won't fix for this, leave it to apple . btw: after a quick google, seems you have file a bug to apple, then file another bug to ruby.. and the ruby guy told you the same thing I told. why you still think it should be fixed in php self? [2012-08-21 17:06:22] reeze dot xia at gmail dot com Hi, I'v sent a pull request for this bug: https://github.com/php/php-src/pull/176 thanks [2012-08-21 16:54:16] reeze dot xia at gmail dot com Description: In Mac OS X 10.8 mountain lion, getpwnam() getgrnam() didn't return NULL when empty string supplied. this is a bug of 10.8.0 since uid 0 an gid 0 most belongs to root, this might have security issue. and this breaks these test cases: posix_getgrnam(): Basic tests [ext/posix/tests/posix_getgrnam.phpt] posix_getgrnam(): Basic tests [ext/posix/tests/posix_getgrnam_basic.phpt] posix_getpwnam(): Basic tests [ext/posix/tests/posix_getpwnam.phpt] posix_getpwnam(): Basic tests [ext/posix/tests/posix_getpwnam_basic.phpt] here is reproducible code from: Andreas Fink af...@list.fink.org: #include sys/types.h #include stdio.h #include pwd.h #include uuid/uuid.h #include stdlib.h #define MAYBE_NULL_STRING(a)(a ? a : (NULL)) extern int errno; int main(int argc, char *argv[]) { errno = 0; struct passwd *pwdstruct = getpwnam(); printf(errno = %d\n,errno); if(pwdstruct == NULL) { printf(pwdstruct == NULL\n); exit(0); } printf(pw_name: %s\n,MAYBE_NULL_STRING(pwdstruct-pw_name)); printf(pw_passwd: %s\n,MAYBE_NULL_STRING(pwdstruct-pw_passwd)); printf(pw_uid: %d\n,pwdstruct-pw_uid); printf(pw_gid: %d\n,pwdstruct-pw_gid); } produces $ ./a.out errno = 0 pw_name: pw_passwd: pw_uid: 0 pw_gid: 0 Test script: --- ?php var_dump(posix_getpwnam()); var_dump(posix_getgrnam()); Expected result: bool(false) bool(false) Actual result: -- array(7) { [name]= string(0) [passwd]= string(0) [uid]= int(0) [gid]= int(0) [gecos]= string(0) [dir]= string(0) [shell]= string(0) } array(4) { [name]= string(0) [passwd]= string(0) [members]= array(0) { } [gid]= int(0) } -- Edit this bug report at https://bugs.php.net/bug.php?id=62881edit=1
Bug #62881 [Com]: posix_getpwnam() posix_getgrnam() didn't return false on Mac OSX 10.8
Edit report at https://bugs.php.net/bug.php?id=62881edit=1 ID: 62881 Comment by: reeze dot xia at gmail dot com Reported by:reeze dot xia at gmail dot com Summary:posix_getpwnam() posix_getgrnam() didn't return false on Mac OSX 10.8 Status: Wont fix Type: Bug Package:POSIX related Operating System: Mac OSX 10.8 PHP Version:Irrelevant Block user comment: N Private report: N New Comment: OooK... by hacking /etc/passwd hmmm. $ useradd didn't allow that. so technically uid could be -1, etc heh. anyway, there always trade off, I prefer it get fixed. Previous Comments: [2012-08-22 03:50:53] ahar...@php.net Yeah, I had to edit /etc/passwd directly to do it, but it's possible, and once created, the account works normally on Linux: http://i.imgur.com/PI3zt.png [2012-08-22 03:45:25] reeze dot xia at gmail dot com Hi, aharvey how did you made it? by a tricky way?. :) [2012-08-22 03:43:45] larue...@php.net it's no need: 1. first it's a knew bug of apple, apple will fix that 2. as you said, you can create a group with empty string in ubuntu. we have no reason to introduce such a temporary fix [2012-08-22 03:18:07] ahar...@php.net To reiterate what I said on GitHub: I think we could put a workaround in just for those OS X versions behind an appropriate #if guard (blank user and group names are valid in at least some POSIX OSes, so we don't want to hardcode the behaviour for posix_getgrnam('')), but it's probably not worth the code clutter in the grand scheme of things. [2012-08-22 03:02:37] larue...@php.net same comment copied from the pr: we don't fix bug doesn't belong to php Linux man page of posix_getpwnam doesn't specific the situation about empty string Posix functions are buggy in mac os. so, won't fix for this, leave it to apple . btw: after a quick google, seems you have file a bug to apple, then file another bug to ruby.. and the ruby guy told you the same thing I told. why you still think it should be fixed in php self? 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=62881 -- Edit this bug report at https://bugs.php.net/bug.php?id=62881edit=1
Bug #62881 [Com]: posix_getpwnam() posix_getgrnam() didn't return false on Mac OSX 10.8
Edit report at https://bugs.php.net/bug.php?id=62881edit=1 ID: 62881 Comment by: reeze dot xia at gmail dot com Reported by:reeze dot xia at gmail dot com Summary:posix_getpwnam() posix_getgrnam() didn't return false on Mac OSX 10.8 Status: Wont fix Type: Bug Package:POSIX related Operating System: Mac OSX 10.8 PHP Version:Irrelevant Block user comment: N Private report: N New Comment: NO, I don't mean that. PHP isn't always running on lastest OS. It just a conditional workaround for buggy api. Since there are not that much application running on OSX. I'm ok if you guys think we didn't fix that. Previous Comments: [2012-08-22 04:57:57] larue...@php.net you think we should fix this, then after apple fixed their bug, we remove this fix then? [2012-08-22 04:10:58] reeze dot xia at gmail dot com OooK... by hacking /etc/passwd hmmm. $ useradd didn't allow that. so technically uid could be -1, etc heh. anyway, there always trade off, I prefer it get fixed. [2012-08-22 03:50:53] ahar...@php.net Yeah, I had to edit /etc/passwd directly to do it, but it's possible, and once created, the account works normally on Linux: http://i.imgur.com/PI3zt.png [2012-08-22 03:45:25] reeze dot xia at gmail dot com Hi, aharvey how did you made it? by a tricky way?. :) [2012-08-22 03:43:45] larue...@php.net it's no need: 1. first it's a knew bug of apple, apple will fix that 2. as you said, you can create a group with empty string in ubuntu. we have no reason to introduce such a temporary fix 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=62881 -- Edit this bug report at https://bugs.php.net/bug.php?id=62881edit=1
Bug #62875 [Com]: base64_encode broken with binary string
Edit report at https://bugs.php.net/bug.php?id=62875edit=1 ID: 62875 Comment by: reeze dot xia at gmail dot com Reported by:robertleglu at msn dot com Summary:base64_encode broken with binary string Status: Open Type: Bug Package:URL related Operating System: z/OS PHP Version:Irrelevant Block user comment: N Private report: N New Comment: I can't reproduce it. http://3v4l.org/GIL8C It seems a OS specific bug. and I can't get a z/OS :( Previous Comments: [2012-08-20 14:29:22] robertleglu at msn dot com Description: problem occurs on z/OS 1.11 (OS of IBM mainframe) with latest version of php for that system. binary strings are badly encoded with base64_encode. rewriting my own (portable) version bypass the problem. php version : (php_cli --version) PHP 5.1.2 (cli) (built: Sep 28 2010 16:33:24) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies Note that z/OS works in EBCDIC, so any code that assume ascii code, ascii order and ascii continuity is broken Test script: --- ?php $str = chr(0x47).chr(0x49).chr(46); echo base64_encode($str).PHP_EOL; ? Expected result: R0ku Actual result: -- 5fEG -- Edit this bug report at https://bugs.php.net/bug.php?id=62875edit=1
Req #62840 [Com]: Add sort flag to ArrayObject::ksort
Edit report at https://bugs.php.net/bug.php?id=62840edit=1 ID: 62840 Comment by: reeze dot xia at gmail dot com Reported by:bert at becoded dot be Summary:Add sort flag to ArrayObject::ksort Status: Open Type: Feature/Change Request Package:SPL related PHP Version:5.4.5 Block user comment: N Private report: N New Comment: Sounds reasonable to me I am working on a patch for this request. Will send a pull request later. Thanks Previous Comments: [2012-08-16 15:23:36] bert at becoded dot be Description: When mixing numeric and strings for the keys, you can get unexpected results. With the ksort, you can specify a sort flag (see the flags on http://www.php.net/manual/en/function.sort.php). Using that, you are able to change the sort behaviour. It would be great if we could specify the same sort flag for ArrayObject::ksort. So instead of public void ArrayObject::ksort ( void ) it would be public void ArrayObject::ksort ( [ int $sort_flags = SORT_REGULAR ]) Test script: --- ?php $list = array('key_3' = 'Value 3', 'Unknown key 1', 'key_1' = 'Value 1', 'key_2' = 'Value 2', 'key_0' = 'Value 0', 'Unknown key 2'); ksort($list); var_dump($list); ksort($list, SORT_STRING); var_dump($list); $list = new ArrayObject(); $list-offsetSet('key_3', 'Value 3'); $list-append('Unknown key 1'); $list-offsetSet('key_1', 'Value 1'); $list-offsetSet('key_2', 'Value 2'); $list-offsetSet('key_0', 'Value 0'); $list-append('Unknown key 2'); $list-ksort(); //$list-ksort(SORT_STRING); var_dump($list); Expected result: If $list-ksort(SORT_STRING) would work, then I would expect object(ArrayObject)[1689] string 'Unknown key 1' (length=13) string 'Unknown key 2' (length=13) public 'key_0' = string 'Value 0' (length=7) public 'key_1' = string 'Value 1' (length=7) public 'key_2' = string 'Value 2' (length=7) public 'key_3' = string 'Value 3' (length=7) Actual result: -- //ksort array (size=6) 'key_0' = string 'Value 0' (length=7) 'key_1' = string 'Value 1' (length=7) 0 = string 'Unknown key 1' (length=13) 'key_2' = string 'Value 2' (length=7) 'key_3' = string 'Value 3' (length=7) 1 = string 'Unknown key 2' (length=13) //ksort with sort flag SORT_STRING array (size=6) 0 = string 'Unknown key 1' (length=13) 1 = string 'Unknown key 2' (length=13) 'key_0' = string 'Value 0' (length=7) 'key_1' = string 'Value 1' (length=7) 'key_2' = string 'Value 2' (length=7) 'key_3' = string 'Value 3' (length=7) //ArrayObject::ksort object(ArrayObject)[1689] public 'key_0' = string 'Value 0' (length=7) public 'key_1' = string 'Value 1' (length=7) string 'Unknown key 1' (length=13) public 'key_2' = string 'Value 2' (length=7) public 'key_3' = string 'Value 3' (length=7) string 'Unknown key 2' (length=13) -- Edit this bug report at https://bugs.php.net/bug.php?id=62840edit=1
Req #62840 [Com]: Add sort flag to ArrayObject::ksort
Edit report at https://bugs.php.net/bug.php?id=62840edit=1 ID: 62840 Comment by: reeze dot xia at gmail dot com Reported by:bert at becoded dot be Summary:Add sort flag to ArrayObject::ksort Status: Closed Type: Feature/Change Request Package:SPL related PHP Version:5.4.5 Assigned To:laruence Block user comment: N Private report: N New Comment: cool, I implemented it last night, but missing a better test case. I think the error message isn't correct, so I didn't sent it. you could see that, the warning message is not really exactly correct. It just a proxy to call asort($obj, $flag) if the $flag is not valid. It complained about the 2 parameter is not valid but not the first parameter. $obj-sort('adfsd'); // 1 sort($ar, 'adfds'); // 2 Previous Comments: [2012-08-21 05:30:45] 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-08-21 05:30:07] larue...@php.net hmm, after a quick look, this will be very easy to implemented. then I did it. :) [2012-08-21 00:59:20] reeze dot xia at gmail dot com Sounds reasonable to me I am working on a patch for this request. Will send a pull request later. Thanks [2012-08-16 15:23:36] bert at becoded dot be Description: When mixing numeric and strings for the keys, you can get unexpected results. With the ksort, you can specify a sort flag (see the flags on http://www.php.net/manual/en/function.sort.php). Using that, you are able to change the sort behaviour. It would be great if we could specify the same sort flag for ArrayObject::ksort. So instead of public void ArrayObject::ksort ( void ) it would be public void ArrayObject::ksort ( [ int $sort_flags = SORT_REGULAR ]) Test script: --- ?php $list = array('key_3' = 'Value 3', 'Unknown key 1', 'key_1' = 'Value 1', 'key_2' = 'Value 2', 'key_0' = 'Value 0', 'Unknown key 2'); ksort($list); var_dump($list); ksort($list, SORT_STRING); var_dump($list); $list = new ArrayObject(); $list-offsetSet('key_3', 'Value 3'); $list-append('Unknown key 1'); $list-offsetSet('key_1', 'Value 1'); $list-offsetSet('key_2', 'Value 2'); $list-offsetSet('key_0', 'Value 0'); $list-append('Unknown key 2'); $list-ksort(); //$list-ksort(SORT_STRING); var_dump($list); Expected result: If $list-ksort(SORT_STRING) would work, then I would expect object(ArrayObject)[1689] string 'Unknown key 1' (length=13) string 'Unknown key 2' (length=13) public 'key_0' = string 'Value 0' (length=7) public 'key_1' = string 'Value 1' (length=7) public 'key_2' = string 'Value 2' (length=7) public 'key_3' = string 'Value 3' (length=7) Actual result: -- //ksort array (size=6) 'key_0' = string 'Value 0' (length=7) 'key_1' = string 'Value 1' (length=7) 0 = string 'Unknown key 1' (length=13) 'key_2' = string 'Value 2' (length=7) 'key_3' = string 'Value 3' (length=7) 1 = string 'Unknown key 2' (length=13) //ksort with sort flag SORT_STRING array (size=6) 0 = string 'Unknown key 1' (length=13) 1 = string 'Unknown key 2' (length=13) 'key_0' = string 'Value 0' (length=7) 'key_1' = string 'Value 1' (length=7) 'key_2' = string 'Value 2' (length=7) 'key_3' = string 'Value 3' (length=7) //ArrayObject::ksort object(ArrayObject)[1689] public 'key_0' = string 'Value 0' (length=7) public 'key_1' = string 'Value 1' (length=7) string 'Unknown key 1' (length=13) public 'key_2' = string 'Value 2' (length=7) public 'key_3' = string 'Value 3' (length=7) string 'Unknown key 2' (length=13) -- Edit this bug report at https://bugs.php.net/bug.php?id=62840edit=1
Bug #62852 [Com]: Unserialize Invalid Date causes crash
Edit report at https://bugs.php.net/bug.php?id=62852edit=1 ID: 62852 Comment by: reeze dot xia at gmail dot com Reported by:kasper at webmasteren dot eu Summary:Unserialize Invalid Date causes crash Status: Open Type: Bug Package:Reproducible crash Operating System: windows, linux PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Hi, I'v sent pull request to fix this: https://github.com/php/php-src/pull/168 when unserialize it didn't check whether the date is valid. Thanks Previous Comments: [2012-08-18 11:53:03] kasper at webmasteren dot eu Description: Core PHP,every version so far, 5.3.* and 5.4.* When unserializing this string : O:8:DateTime:3:{s:4:date;s:20:10007-06-07 03:51:49;s:13:timezone_type;i:3;s:8:timezone;s:3:UTC;} created from: Datetime:createFromFormat(99-99-,j-n-Y); then serialized, to a file. Later when read and working with, php crashes, from the parse_tz.c, in timelib_get_time_zone_info. the Exception is read at offset 0x0010. it would appear that ts and / or tz is zero. Test script: --- $temp = unserialize('O:8:DateTime:3:{s:4:date;s:20:10007-06-07 03:51:49;s:13:timezone_type;i:3;s:8:timezone;s:3:UTC;}'); var_dump($temp); Expected result: error parsing invalid date or just a date with all entries 0. Actual result: -- php crash [read offset 0x0010] ~ null pointer + offset. at the file ext\date\lib\parse_tz.c -- Edit this bug report at https://bugs.php.net/bug.php?id=62852edit=1
Req #62800 [Com]: Creating/modifying/deleting files in PHP
Edit report at https://bugs.php.net/bug.php?id=62800edit=1 ID: 62800 Comment by: reeze dot xia at gmail dot com Reported by:brandonskypimenta at gmail dot com Summary:Creating/modifying/deleting files in PHP Status: Open Type: Feature/Change Request Package:*General Issues Operating System: all PHP Version:Newest version of PHP Block user comment: N Private report: N New Comment: Maybe this is helpful to you: http://en.wikipedia.org/wiki/RTFM OK, here is some funtions you might want: http://php.net/file_put_contents http://php.net/unlink Previous Comments: [2012-08-12 07:28:21] brandonskypimenta at gmail dot com All text in this bug is copyrighted by Brandon Sky, released under CC-BY 3.0. [2012-08-12 07:25:39] anon at anon dot anon © 2013 Did you just copyright your inability to read documentation? [2012-08-12 01:32:49] brandonskypimenta at gmail dot com fixed php version [2012-08-12 01:31:05] brandonskypimenta at gmail dot com fixed title [2012-08-12 01:29:43] brandonskypimenta at gmail dot com Description: Any way to create files, delete files, modify files in PHP using these commands? create_file creates a file. modify_file edits a file's text. delete_file immediately deletes a file. WARNING: Deletion will be permanent! - © 2013 Test script: --- ?php create_file('FooBar.txt', 'Test'); modify_file('FooBar.txt', '-Test|+FooBar', '1'); delete_file('FooBar.txt'); ? -- Edit this bug report at https://bugs.php.net/bug.php?id=62800edit=1
Req #53866 [Com]: Zend engine's hashtable performance tweaks
Edit report at https://bugs.php.net/bug.php?id=53866edit=1 ID: 53866 Comment by: reeze dot xia at gmail dot com Reported by:marcin dot babij at nasza-klasa dot pl Summary:Zend engine's hashtable performance tweaks Status: Assigned Type: Feature/Change Request Package:Scripting Engine problem PHP Version:trunk-SVN-2011-01-28 (SVN) Assigned To:dmitry Block user comment: N Private report: N New Comment: This seems dead. no response for a long time :( Previous Comments: [2011-01-28 13:27:48] marcin dot babij at nasza-klasa dot pl Description: What was done: - Hash function in zend_hash.h was rebuilt and became much faster, without losing the most important properties. - Hashtable implementation was changed from Simple chaining to Open addressing with linear probing, but with linked bucket, not included in hash array, which causes: -- Bucket structure to lose 2 pointers. -- Searching works similar, but don't have to jump with pointers stored in different memory locations, inserting, deleting and rehashing don't need to update linked list, but must search for first empty bucket, which is fast, because it scans continuous memory. -- Load factor decreases from 1.0 to 0.5-0.75 to make less collisions and faster hashtable, which in turn increases memory footprint a little. - Open addressing doesn't change significantly performance, but next thing was to create new array (arEmpty), which is of size nTableSize bytes, which keeps track of used/empty buckets and makes inserting and rehashing much faster. In future it can be tested as bit-array with size of nTableSize/8 bytes. - More macros were added to replace repetitive constructs. - New constants were added to allow: -- Creating new hashtables of size at least X (where 4 and 8 are reasonable), which makes no rehashing and reallocing memory while changing size to 2 and then to 4. -- For small tables it's better to extend them by a factor of 4 times, not 2, to make rehashing cost smaller for most hashtables, of cost of little higher memory consumption. -- For large tables it's better to have other load factor, closer to 1, while for small tables it's better to use load factor closer to 0.5. What should be done: - http://lxr.php.net/xref/PHP_TRUNK/ext/standard/html_tables/html_table_gen.php#722 should be changed and html_tables.h regenerated, but this will need to rewrite hashtable engine from C to PHP - APC should be fixed What can be done: - Make new constants configurable by php.ini. - Test if changing arEmpty from byte-array to bit-array helps on performance. - Tweak default constants' values using some real-live benchmarks. - Prove (or modify and prove) hash function to have property, that it has no collisions if two keys don't differ on no more than 6 bytes, which will lead to memcmp omit first (or last) 6 bytes of key. Also simpler thing may be proven, that is it has no collisions if two keys are not longer than 6 bytes, which will make most string keys omit memcpy at all. -- Edit this bug report at https://bugs.php.net/bug.php?id=53866edit=1
Bug #62737 [Com]: Segfault invoking SplFileInfo-openFile
Edit report at https://bugs.php.net/bug.php?id=62737edit=1 ID: 62737 Comment by: reeze dot xia at gmail dot com Reported by:leight at gmail dot com Summary:Segfault invoking SplFileInfo-openFile Status: Analyzed Type: Bug Package:Reproducible crash Operating System: Linux / OSX PHP Version:master-Git-2012-08-03 (Git) Block user comment: N Private report: N New Comment: Hi, laruence, I use the test case in this bug report. after apply the latest patch(#62744 and the attached one). i got: Fatal error: Couldn't find implementation for method SplFileObject::__construct in Unknown on line 0 if any internal's parent class was disabled may cause segfault, I have test RecursiveArrayIterator (by disable ArrayIterator), it will segfault if not apply the patch for #62744, and will leaks after apply the patch. There must be other classes have the same problem, even though we fixed this bug, there will really a lot of them need to be fixed too :( we may need a better way to handle class disabling. Previous Comments: [2012-08-04 15:14:39] larue...@php.net The following patch has been added/updated: Patch Name: bug62737.phpt Revision: 1344093279 URL: https://bugs.php.net/patch-display.php?bug=62737patch=bug62737.phptrevision=1344093279 [2012-08-04 15:13:57] larue...@php.net The following patch has been added/updated: Patch Name: bug62737.patch Revision: 1344093237 URL: https://bugs.php.net/patch-display.php?bug=62737patch=bug62737.patchrevision=1344093237 [2012-08-04 02:58:23] larue...@php.net I split the dangling pointer bug out to #62744, we can look at this one after we fixed that one. [2012-08-03 16:27:55] larue...@php.net Actually, I have improved the patch, and I don't know what's your test script? get_class_vars(splFileObject)? you can try with the new patch. [2012-08-03 16:23:54] larue...@php.net sure, I am still working on this, thanks The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=62737 -- Edit this bug report at https://bugs.php.net/bug.php?id=62737edit=1
Bug #62692 [Com]: PHP fails to build with dtrace
Edit report at https://bugs.php.net/bug.php?id=62692edit=1 ID: 62692 Comment by: reeze dot xia at gmail dot com Reported by:eugene at zhegan dot in Summary:PHP fails to build with dtrace Status: Open Type: Bug Package:Compile Failure Operating System: Solaris 10 x86 PHP Version:5.4.5 Block user comment: N Private report: N New Comment: I can't reproduce it in Solaris 11, according to the output, if it's the whole output, it seems you make before switch on --enable-dtrace. I thought, you could $ make clean make Previous Comments: [2012-07-30 07:21:00] eugene at zhegan dot in Description: PHP fails to build on Solaris with --enable-dtrace: [root@japet /home/emz/src/php-5.4.5]# make /bin/bash /home/emz/src/php-5.4.5/libtool --silent --preserve-dup-deps --mode=link /usr/sfw/bin/gcc -export-dynamic -I/usr/include -m64 -O -I/usr/local/freetype/include -I/usr/local/mysql/include -I/usr/local/gmp/include -I/usr/local/openssl/include -I/usr/local/curl/include -I/usr/local/c-client/include -L/usr/ucblib -L/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3 -L/usr/local/openssl/lib -L/usr/local/freetype/lib -L/usr/local/mysql/lib/mysql -R /usr/ucblib -R /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3 -R /usr/local/openssl/lib -R /usr/local/freetype/lib -R /usr/local/mysql/lib/mysql Zend/zend_dtrace.d.o ext/date/php_date.lo ext/date/lib/astro.lo ext/date/lib/dow.lo ext/date/lib/parse_date.lo ext/date/lib/parse_tz.lo ext/date/lib/timelib.lo ext/date/lib/tm2unixtime.lo ext/date/lib/unixtime2tm.lo ext/date/lib/parse_iso_intervals.lo ext/date/lib/interval.lo ext/ereg/ereg.lo ext/ereg/regex/regcomp.lo ext/ereg/regex/regexec.lo ext/ereg/regex/regerror.lo ext/ereg/regex/regfree.lo ext/libxml/libxml.lo ext/pcre/pcrelib/pcre_chartables.lo ext/pcre/pcrelib/pcre_ucd.lo ext/pcre/pcrelib/pcre_compile.lo ext/pcre/pcrelib/pcre_config.lo ext/pcre/pcrelib/pcre_exec.lo ext/pcre/pcrelib/pcre_fullinfo.lo ext/pcre/pcrelib/pcre_get.lo ext/pcre/pcrelib/pcre_globals.lo ext/pcre/pcrelib/pcre_info.lo ext/pcre/pcrelib/pcre_maketables.lo ext/pcre/pcrelib/pcre_newline.lo ext/pcre/pcrelib/pcre_ord2utf8.lo ext/pcre/pcrelib/pcre_refcount.lo ext/pcre/pcrelib/pcre_study.lo ext/pcre/pcrelib/pcre_tables.lo ext/pcre/pcrelib/pcre_try_flipped.lo ext/pcre/pcrelib/pcre_valid_utf8.lo ext/pcre/pcrelib/pcre_version.lo ext/pcre/pcrelib/pcre_xclass.lo ext/pcre/php_pcre.lo ext/sqlite3/sqlite3.lo ext/sqlite3/libsqlite/sqlite3.lo ext/zlib/zlib.lo ext/zlib/zlib_fopen_wrapper.lo ext/zlib/zlib_filter.lo ext/bcmath/bcmath.lo ext/bcmath/libbcmath/src/add.lo ext/bcmath/libbcmath/src/div.lo ext/bcmath/libbcmath/src/init.lo ext/bcmath/libbcmath/src/neg.lo ext/bcmath/libbcmath/src/outofmem.lo ext/bcmath/libbcmath/src/raisemod.lo ext/bcmath/libbcmath/src/rt.lo ext/bcmath/libbcmath/src/sub.lo ext/bcmath/libbcmath/src/compare.lo ext/bcmath/libbcmath/src/divmod.lo ext/bcmath/libbcmath/src/int2num.lo ext/bcmath/libbcmath/src/num2long.lo ext/bcmath/libbcmath/src/output.lo ext/bcmath/libbcmath/src/recmul.lo ext/bcmath/libbcmath/src/sqrt.lo ext/bcmath/libbcmath/src/zero.lo ext/bcmath/libbcmath/src/debug.lo ext/bcmath/libbcmath/src/doaddsub.lo ext/bcmath/libbcmath/src/nearzero.lo ext/bcmath/libbcmath/src/num2str.lo ext/bcmath/libbcmath/src/raise.lo ext/bcmath/libbcmath/src/rmzero.lo ext/bcmath/libbcmath/src/str2num.lo ext/calendar/calendar.lo ext/calendar/dow.lo ext/calendar/french.lo ext/calendar/gregor.lo ext/calendar/jewish.lo ext/calendar/julian.lo ext/calendar/easter.lo ext/calendar/cal_unix.lo ext/ctype/ctype.lo ext/dom/php_dom.lo ext/dom/attr.lo ext/dom/document.lo ext/dom/domerrorhandler.lo ext/dom/domstringlist.lo ext/dom/domexception.lo ext/dom/namelist.lo ext/dom/processinginstruction.lo ext/dom/cdatasection.lo ext/dom/documentfragment.lo ext/dom/domimplementation.lo ext/dom/element.lo ext/dom/node.lo ext/dom/string_extend.lo ext/dom/characterdata.lo ext/dom/documenttype.lo ext/dom/domimplementationlist.lo ext/dom/entity.lo ext/dom/nodelist.lo ext/dom/text.lo ext/dom/comment.lo ext/dom/domconfiguration.lo ext/dom/domimplementationsource.lo ext/dom/entityreference.lo ext/dom/notation.lo ext/dom/xpath.lo ext/dom/dom_iterators.lo ext/dom/typeinfo.lo ext/dom/domerror.lo ext/dom/domlocator.lo ext/dom/namednodemap.lo ext/dom/userdatahandler.lo ext/fileinfo/fileinfo.lo ext/fileinfo/libmagic/apprentice.lo ext/fileinfo/libmagic/apptype.lo ext/fileinfo/libmagic/ascmagic.lo ext/fileinfo/libmagic/cdf.lo ext/fileinfo/libmagic/cdf_time.lo ext/fileinfo/libmagic/compress.lo ext/fileinfo/libmagic/encoding.lo ext/fileinfo/libmagic/fsmagic.lo ext/fileinfo/libmagic/funcs.lo ext/fileinfo/libmagic/is_tar.lo ext/fileinfo/libmagic/magic.lo ext/fileinfo/libmagic/print.lo ext/fileinfo/libmagic/readcdf.lo ext/fileinfo/libmagic/readelf.lo ext
Bug #62737 [Com]: Segfault invoking SplFileInfo-openFile
Edit report at https://bugs.php.net/bug.php?id=62737edit=1 ID: 62737 Comment by: reeze dot xia at gmail dot com Reported by:leight at gmail dot com Summary:Segfault invoking SplFileInfo-openFile Status: Analyzed Type: Bug Package:Reproducible crash Operating System: Linux / OSX PHP Version:master-Git-2012-08-03 (Git) Block user comment: N Private report: N New Comment: Hi, by replace create_object function pointer and free function table isn't enough, after apply the patch, I got this, maybe more handlers need to be replaced and cleanup. Fatal error: Uncaught exception 'RuntimeException' with message 'get_class_vars() expects exactly 1 parameter, 2 given' in /Users/reeze/Opensource/php-test/php-src-5.3-dev/xx.php:6 Stack trace: #0 [internal function]: SplFileObject-get_class_vars('/bin/ls', 'r') #1 /Users/reeze/Opensource/php-test/php-src-5.3-dev/xx.php(6): SplFileInfo- openFile('r') #2 {main} thrown in /Users/reeze/Opensource/php-test/php-src-5.3-dev/xx.php on line 6 Previous Comments: [2012-08-03 15:03:17] larue...@php.net I have made a patch for this. [2012-08-03 15:02:48] larue...@php.net The following patch has been added/updated: Patch Name: ChangeDisableClassHandler.patch Revision: 1344006168 URL: https://bugs.php.net/patch-display.php?bug=62737patch=ChangeDisableClassHandler.patchrevision=1344006168 [2012-08-03 14:25:19] larue...@php.net this is a very badly bug. but I think it's not a spl issues, we should change the behavior of zend_disable_class, since for now, it will delete the class entry, which will make the class entry pointer (preserved by extension) become a wild pointer.. dereference it is a undefined behavior, in this sense, segfault is lucky. [2012-08-03 14:12:33] larue...@php.net I think this is not only splFileObject, many classes may has such issues. (especially those who preserves their own class entry). [2012-08-03 11:06:18] leight at gmail dot com Description: When SplFileObject is on the disable_classes list, and SplFileInfo-openFile is called, PHP crashes because there is no check on whether the SplFileObject object was actually created or not, before trying to use it. The offending code is in ext/spl/spl_directory.c in spl_filesystem_object_create_type Test script: --- ?php // Run with -d disable_classes=SplFileObject $a = new SplFileInfo('/bin/ls'); $a-openFile('r'); Expected result: A message stating SplFileObject is disabled. Actual result: -- Segmentation fault -- Edit this bug report at https://bugs.php.net/bug.php?id=62737edit=1
Bug #62460 [Com]: php binaries installed as binary.dSYM
Edit report at https://bugs.php.net/bug.php?id=62460edit=1 ID: 62460 Comment by: reeze dot xia at gmail dot com Reported by:phpbugs at adam dot gs Summary:php binaries installed as binary.dSYM Status: Open Type: Bug Package:*Compile Issues Operating System: OSX 10.8 PHP Version:5.3.14 Block user comment: N Private report: N New Comment: Hi, OSX 10.9 haven't exist at all, although *nix os didn't have any extension for executable. but I'm ok with *darwin* match too. Previous Comments: [2012-07-18 17:56:00] phpbugs at adam dot gs Perhaps we should just reduce that check to *darwin*? If not its just as likely to break again on 10.9, the *darwin* test seems much simpler in any event. Interestingly I saw that line and though, that's not it because it works on 10.7 for me I just retested and it DOES break on 10.7. [2012-07-18 17:13:11] reeze dot xia at gmail dot com Hi, I can verify this bug. here is another case: http://news.php.net/php.internals/61261 and I'v made pull request: https://github.com/php/php-src/pull/135 [2012-07-15 20:19:09] phpbugs at adam dot gs I did not run buildconf and doesn't appear osx dev tools installs any autoconf [2012-07-15 17:13:56] reeze dot xia at gmail dot com do you run ./buildconf yourself and which version of autoconf in your box? [2012-07-02 00:51:51] phpbugs at adam dot gs Description: PHP installs the cli/cgi SAPI binaries as binary.dSYM instead of simply binary It seems like this block of code: *.c | *.o | *.obj) ;; inside the configure script (around line 108113) needs to be extended to ignore the .dSYM extension. Test script: --- N/A Expected result: /usr/local/bin/php Actual result: -- /usr/local/bin/php.dSYM -- Edit this bug report at https://bugs.php.net/bug.php?id=62460edit=1
Bug #62607 [Com]: array_walk_recursive move internal pointer
Edit report at https://bugs.php.net/bug.php?id=62607edit=1 ID: 62607 Comment by: reeze dot xia at gmail dot com Reported by:tito at miarroba dot net Summary:array_walk_recursive move internal pointer Status: Open Type: Bug Package:Arrays related PHP Version:5.3.14 Block user comment: N Private report: N New Comment: Yes, it did after the fix for https://bugs.php.net/bug.php?id=61730. Previous Comments: [2012-07-19 08:52:53] tito at miarroba dot net Description: array_walk_recursive move internal pointer position since 5.3.13 version Test script: --- $arr = array('a'='b'); echo 'Before - '.current($arr).PHP_EOL; array_walk_recursive($arr, function($val){}); echo 'After - '.current($arr); Expected result: Before - b After - b Actual result: -- Before - b After - false -- Edit this bug report at https://bugs.php.net/bug.php?id=62607edit=1
Bug #62460 [Com]: php binaries installed as binary.dSYM
Edit report at https://bugs.php.net/bug.php?id=62460edit=1 ID: 62460 Comment by: reeze dot xia at gmail dot com Reported by:phpbugs at adam dot gs Summary:php binaries installed as binary.dSYM Status: Assigned Type: Bug Package:*Compile Issues Operating System: OSX 10.8 PHP Version:5.3.14 Assigned To:johannes Block user comment: N Private report: N New Comment: Hi, The new released PHP-5.3.15 still have this bug. you could use the distributed tar package to reproduce. using google to search php.dSYM there are a lot of result about it. Thanks Previous Comments: [2012-07-19 06:45:26] larue...@php.net johannes, could you please look at this? thanks [2012-07-19 06:32:38] reeze dot xia at gmail dot com Hi, OSX 10.9 haven't exist at all, although *nix os didn't have any extension for executable. but I'm ok with *darwin* match too. [2012-07-18 17:56:00] phpbugs at adam dot gs Perhaps we should just reduce that check to *darwin*? If not its just as likely to break again on 10.9, the *darwin* test seems much simpler in any event. Interestingly I saw that line and though, that's not it because it works on 10.7 for me I just retested and it DOES break on 10.7. [2012-07-18 17:13:11] reeze dot xia at gmail dot com Hi, I can verify this bug. here is another case: http://news.php.net/php.internals/61261 and I'v made pull request: https://github.com/php/php-src/pull/135 [2012-07-15 20:19:09] phpbugs at adam dot gs I did not run buildconf and doesn't appear osx dev tools installs any autoconf 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=62460 -- Edit this bug report at https://bugs.php.net/bug.php?id=62460edit=1
Bug #62460 [Com]: php binaries installed as binary.dSYM
Edit report at https://bugs.php.net/bug.php?id=62460edit=1 ID: 62460 Comment by: reeze dot xia at gmail dot com Reported by:phpbugs at adam dot gs Summary:php binaries installed as binary.dSYM Status: Open Type: Bug Package:*Compile Issues Operating System: OSX 10.8 PHP Version:5.3.14 Block user comment: N Private report: N New Comment: Hi, I can verify this bug. here is another case: http://news.php.net/php.internals/61261 and I'v made pull request: https://github.com/php/php-src/pull/135 Previous Comments: [2012-07-15 20:19:09] phpbugs at adam dot gs I did not run buildconf and doesn't appear osx dev tools installs any autoconf [2012-07-15 17:13:56] reeze dot xia at gmail dot com do you run ./buildconf yourself and which version of autoconf in your box? [2012-07-02 00:51:51] phpbugs at adam dot gs Description: PHP installs the cli/cgi SAPI binaries as binary.dSYM instead of simply binary It seems like this block of code: *.c | *.o | *.obj) ;; inside the configure script (around line 108113) needs to be extended to ignore the .dSYM extension. Test script: --- N/A Expected result: /usr/local/bin/php Actual result: -- /usr/local/bin/php.dSYM -- Edit this bug report at https://bugs.php.net/bug.php?id=62460edit=1
Bug #62581 [Com]: Fatal error: Balloc() allocation exceeds list boundary
Edit report at https://bugs.php.net/bug.php?id=62581edit=1 ID: 62581 Comment by: reeze dot xia at gmail dot com Reported by:prakash dot indu at gmail dot com Summary:Fatal error: Balloc() allocation exceeds list boundary Status: Open Type: Bug Package:Output Control Operating System: linux PHP Version:5.3Git-2012-07-16 (Git) Block user comment: N Private report: N New Comment: Hi, I can't reproduce it. see: http://3v4l.org/aFi1e#v430 Previous Comments: [2012-07-16 20:01:38] prakash dot indu at gmail dot com Description: Fatal error: Balloc() allocation exceeds list boundary It is in php 5.3.6. $perm=47; $test=explode(., $perm/64); It coming when i am doing any floating point calculation... Test script: --- It is in php 5.3.6. $perm=47; $test=explode(., $perm/64); It coming when i am doing any floating point calculation... Expected result: array of data Actual result: -- Fatal error: Balloc() allocation exceeds list boundary -- Edit this bug report at https://bugs.php.net/bug.php?id=62581edit=1
Req #62544 [Com]: A function alternative to php -l
Edit report at https://bugs.php.net/bug.php?id=62544edit=1 ID: 62544 Comment by: reeze dot xia at gmail dot com Reported by:narf at bofh dot bg Summary:A function alternative to php -l Status: Open Type: Feature/Change Request Package:Unknown/Other Function Operating System: Irrelevant PHP Version:Irrelevant Block user comment: N Private report: N New Comment: There ever a function for this: http://php.net/manual/en/function.php-check- syntax.php (you could take a look at those user-land implementations in User Contributed Notes sectiion) php_check_syntax(), it was removed after 5.0.5. the reason is here: https://bugs.php.net/bug.php?id=27406 Previous Comments: [2012-07-12 19:53:34] narf at bofh dot bg Description: Currently, there's no way to do a syntax check from within a script (unless we do something like `/usr/bin/php -l /path/to/script.php`) and there deffinately are use cases for such a feature. Considering that the actual checking logic is already available, it shouldn't be hard at all to make a function alternative to it. Here's what the function description would look like: bool php_syntax_check( string $target [, bool $raw_code = FALSE] ) $target is the script file path, unless $raw_code is set to TRUE. In the latter case - $target is raw php code, as it would be passed to eval(). -- Edit this bug report at https://bugs.php.net/bug.php?id=62544edit=1
Req #62544 [Com]: A function alternative to php -l
Edit report at https://bugs.php.net/bug.php?id=62544edit=1 ID: 62544 Comment by: reeze dot xia at gmail dot com Reported by:narf at bofh dot bg Summary:A function alternative to php -l Status: Open Type: Feature/Change Request Package:Unknown/Other Function Operating System: Irrelevant PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Yes, I could like it back too. So +1 for this request :) Previous Comments: [2012-07-15 15:01:50] narf at bofh dot bg So, it used to exist, but due to poor design and implementation it's removed instead of fixed and we're forced to create hacks? This doesn't sound smart. [2012-07-15 14:24:33] reeze dot xia at gmail dot com There ever a function for this: http://php.net/manual/en/function.php-check- syntax.php (you could take a look at those user-land implementations in User Contributed Notes sectiion) php_check_syntax(), it was removed after 5.0.5. the reason is here: https://bugs.php.net/bug.php?id=27406 [2012-07-12 19:53:34] narf at bofh dot bg Description: Currently, there's no way to do a syntax check from within a script (unless we do something like `/usr/bin/php -l /path/to/script.php`) and there deffinately are use cases for such a feature. Considering that the actual checking logic is already available, it shouldn't be hard at all to make a function alternative to it. Here's what the function description would look like: bool php_syntax_check( string $target [, bool $raw_code = FALSE] ) $target is the script file path, unless $raw_code is set to TRUE. In the latter case - $target is raw php code, as it would be passed to eval(). -- Edit this bug report at https://bugs.php.net/bug.php?id=62544edit=1
Bug #62460 [Com]: php binaries installed as binary.dSYM
Edit report at https://bugs.php.net/bug.php?id=62460edit=1 ID: 62460 Comment by: reeze dot xia at gmail dot com Reported by:phpbugs at adam dot gs Summary:php binaries installed as binary.dSYM Status: Open Type: Bug Package:*Compile Issues Operating System: OSX 10.8 PHP Version:5.3.14 Block user comment: N Private report: N New Comment: do you run ./buildconf yourself and which version of autoconf in your box? Previous Comments: [2012-07-02 00:51:51] phpbugs at adam dot gs Description: PHP installs the cli/cgi SAPI binaries as binary.dSYM instead of simply binary It seems like this block of code: *.c | *.o | *.obj) ;; inside the configure script (around line 108113) needs to be extended to ignore the .dSYM extension. Test script: --- N/A Expected result: /usr/local/bin/php Actual result: -- /usr/local/bin/php.dSYM -- Edit this bug report at https://bugs.php.net/bug.php?id=62460edit=1
Bug #62500 [Com]: Segfault in DateInterval class when extended
Edit report at https://bugs.php.net/bug.php?id=62500edit=1 ID: 62500 Comment by: reeze dot xia at gmail dot com Reported by:rik at c-ict dot com Summary:Segfault in DateInterval class when extended Status: Open Type: Bug Package:Reproducible crash Operating System: At least Linux PHP Version:5.4.4 Block user comment: N Private report: N New Comment: It missing a initialized checking when accessing member variable. I've sent a patch here: https://github.com/php/php-src/pull/123 Previous Comments: [2012-07-07 16:00:14] rik at c-ict dot com Also a short note, This problem can be worked around by calling the parent constructor before accessing any members. [2012-07-07 15:53:59] rik at c-ict dot com Description: Hello, I found a way to reproduce a segfault on at least linux but possibly on other OS'es as wel. It is very simple to reproduce: 1 overload the DateInterval in a new class. 2 overload the constructor 3 use one of the member variables. [Sat Jul 07 17:46:32 2012] [notice] child pid 5775 exit signal Segmentation fault (11) I tested with PHP 5.4.4 and it is there, but it also exists in PHP 5.3 Test script: --- ?php class Crasher extends DateInterval { public function __construct($time_spec) { echo Yes i did it, with the next statement it gives a segfault\n; // It doesn't matter if we take the y parameter or any other. $this-y = 3; } } $c = new Crasher('blah'); ? Expected result: Yes i did it, with the next statement it gives a segfault Segmentation fault -- Edit this bug report at https://bugs.php.net/bug.php?id=62500edit=1
Bug #61546 [Com]: get_current_user() return empty string after chdir
Edit report at https://bugs.php.net/bug.php?id=61546edit=1 ID: 61546 Comment by: reeze dot xia at gmail dot com Reported by:daedmen at gmail dot com Summary:get_current_user() return empty string after chdir Status: Open Type: Bug Package:Unknown/Other Function Operating System: Debian 4.3.5-4 PHP Version:5.3.10 Block user comment: N Private report: N New Comment: This bug have already been fixed by laruence. but it's status is open. Can anyone close it please? Previous Comments: [2012-05-29 10:26:59] a...@php.net Automatic comment on behalf of mattficken Revision: http://git.php.net/?p=php-src.git;a=commit;h=4054890b26c4d146cfbcd56d75aab7a7aebc8c89 Log: Fixed bug #62176 Test Bug - sapi/cli/tests/bug61546.phpt [2012-04-30 04:17:04] larue...@php.net Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=bae56a87f81b91cd815604b0f404f616b0d73c2b Log: Fixed bug #61546 (functions related to current script failed when chdir() in cli sapi). [2012-04-30 04:16:03] larue...@php.net Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=bae56a87f81b91cd815604b0f404f616b0d73c2b Log: Fixed bug #61546 (functions related to current script failed when chdir() in cli sapi). [2012-04-30 04:10:41] larue...@php.net Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=bae56a87f81b91cd815604b0f404f616b0d73c2b Log: Fixed bug #61546 (functions related to current script failed when chdir() in cli sapi). [2012-04-29 16:25:36] reeze dot xia at gmail dot com Hi, I can only reproduce it in cli sapi, fast-cgi fpm didn't affected. and I sent a pull request https://github.com/php/php-src/pull/69. Thanks. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=61546 -- Edit this bug report at https://bugs.php.net/bug.php?id=61546edit=1
Bug #62397 [Com]: disable_functions = eval does not work
Edit report at https://bugs.php.net/bug.php?id=62397edit=1 ID: 62397 Comment by: reeze dot xia at gmail dot com Reported by:spamik at yum dot pl Summary:disable_functions = eval does not work Status: Open Type: Bug Package:*General Issues PHP Version:5.3.14 Block user comment: N Private report: N New Comment: eval is not a function but language construct http://php.net/eval so it cannot be disabled by adding it to disable_functions Previous Comments: [2012-06-23 00:24:50] spamik at yum dot pl Description: disable_functions = eval does not work. eval is often used to obfucate code by malicious viruses. I see no reason why blocking access to eval() is not doable. -- Edit this bug report at https://bugs.php.net/bug.php?id=62397edit=1
Req #62386 [Com]: Closures require arguments in function header
Edit report at https://bugs.php.net/bug.php?id=62386edit=1 ID: 62386 Comment by: reeze dot xia at gmail dot com Reported by:Daniel dot L dot Nill at gmail dot com Summary:Closures require arguments in function header Status: Open Type: Feature/Change Request Package:Unknown/Other Function Operating System: linux PHP Version:5.3Git-2012-06-21 (Git) Block user comment: N Private report: N New Comment: It's a function but not a class. We have to use ()to call it Previous Comments: [2012-06-22 00:35:10] Daniel dot L dot Nill at gmail dot com Description: There seems to be no reason for this throwing an error, but if I try to instantiate an anonymous function that does not have any arguments then I get an 'Parse error'. This breaks a lot of closure functionality that could exist. Test script: --- $anonymous_function = function(){ echo hello worldbr/; }; $anonymous_function(); $anonymous_function; Expected result: hello world hello world Actual result: -- Parse error: syntax error, unexpected T_FUNCTION in /index.php(192) : eval()'d code on line 1 -- Edit this bug report at https://bugs.php.net/bug.php?id=62386edit=1