#45401 [Fbk-Opn]: run-tests.php
ID: 45401 User updated by: rajendra at itoffshorenepal dot com Reported By: rajendra at itoffshorenepal dot com -Status: Feedback +Status: Open Bug Type: *General Issues Operating System: UNIX Type: L8 PHP Version: 5.2.6 New Comment: Actually I was not trying to test any thing. I have develop our own (small) framework and already implemented in several sites. And it is performed well in other sites in different server. And this time I have uploaded my test site. After I logged in, it seems working fine. But after, if I do refresh the page or click to other menus then it shows the error as below. Notice: Undefined variable: argc in /usr/local/lib/php/build/run-tests.php on line 124 ERROR: environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable! Previous Comments: [2008-07-02 09:16:29] [EMAIL PROTECTED] Exactly how do you try to run the tests? How about 'make test' ?? [2008-07-01 11:57:17] rajendra at itoffshorenepal dot com Description: when i open my site it shows below error. And i couldn't get any solution. Notice: Undefined variable: argc in /usr/local/lib/php/build/run-tests.php on line 124 ERROR: environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable! -- Edit this bug report at http://bugs.php.net/?id=45401edit=1
#45429 [Opn-Fbk]: move_uploaded_file is terminating my scripts
ID: 45429 Updated by: [EMAIL PROTECTED] Reported By: aatelfer at hotmail dot com -Status: Open +Status: Feedback Bug Type: Filesystem function related Operating System: Apache/2.0.63 (Unix) PHP Version: 5.2.6 New Comment: So the problem is gone? Previous Comments: [2008-07-03 23:49:47] aatelfer at hotmail dot com Sorry, I did not install the GD library. It caused a fatal error and the error was suppressed. [2008-07-03 20:11:05] aatelfer at hotmail dot com Description: move_uploaded_file file has some error that causes my script to terminate. I don't get any errors at all. The script just ends. Reproduce code: --- function uploadfile($filename,$path) { if(is_uploaded_file($_FILES[$filename]['tmp_name'])) { move_uploaded_file($_FILES[$filename]['tmp_name'],$path); return true; } return false; } Expected result: function should return a true or false value Actual result: -- Scripts terminates without any error -- Edit this bug report at http://bugs.php.net/?id=45429edit=1
#45401 [Opn-Bgs]: run-tests.php
ID: 45401 Updated by: [EMAIL PROTECTED] Reported By: rajendra at itoffshorenepal dot com -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: UNIX Type: L8 PHP Version: 5.2.6 New Comment: Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: [2008-07-04 06:59:01] rajendra at itoffshorenepal dot com Actually I was not trying to test any thing. I have develop our own (small) framework and already implemented in several sites. And it is performed well in other sites in different server. And this time I have uploaded my test site. After I logged in, it seems working fine. But after, if I do refresh the page or click to other menus then it shows the error as below. Notice: Undefined variable: argc in /usr/local/lib/php/build/run-tests.php on line 124 ERROR: environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable! [2008-07-02 09:16:29] [EMAIL PROTECTED] Exactly how do you try to run the tests? How about 'make test' ?? [2008-07-01 11:57:17] rajendra at itoffshorenepal dot com Description: when i open my site it shows below error. And i couldn't get any solution. Notice: Undefined variable: argc in /usr/local/lib/php/build/run-tests.php on line 124 ERROR: environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable! -- Edit this bug report at http://bugs.php.net/?id=45401edit=1
#45430 [NEW]: crypt () not thread-safe on threaded webserver (ISAPI)
From: alex at all-dynamics dot de Operating system: Win32 PHP version: 5.2.6 PHP Bug Type: *Encryption and hash functions Bug description: crypt () not thread-safe on threaded webserver (ISAPI) Description: crypt () seems not to be thread-safe when using a threaded webserver (Windows, ISAPI). Maybe this has something to do with win32/md5crypt.c / md5_crypt: static char passwd[120] (static buffer which is returned to the calling function). Reproduce code: --- Run this code with two or more simultaneous requests on a threaded server: set_time_limit (0); $passwd1 = testtesttest; $passwd2 = passwordpassword; for ($i = 0; $i 3000; $i++) { $crypted = crypt ($passwd1); if ($crypted != crypt ($passwd1, $crypted)) die (no match); $crypted = crypt ($passwd2); if ($crypted != crypt ($passwd2, $crypted)) die (no match); } echo ok; Expected result: ok on all requests Actual result: -- one request may end with no match, the other request will display ok -- Edit bug report at http://bugs.php.net/?id=45430edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45430r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45430r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45430r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45430r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45430r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45430r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45430r=needscript Try newer version:http://bugs.php.net/fix.php?id=45430r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45430r=support Expected behavior:http://bugs.php.net/fix.php?id=45430r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45430r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45430r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45430r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45430r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45430r=dst IIS Stability:http://bugs.php.net/fix.php?id=45430r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45430r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45430r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45430r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45430r=mysqlcfg
#43348 [Ctl]: Mail function returns true but no email sent
ID: 43348 Updated by: [EMAIL PROTECTED] Reported By: RQuadling at GMail dot com Status: Critical Bug Type: Mail related Operating System: Windows XP SP2 PHP Version: 5.3CVS-2007-11-20 (snap) -Assigned To: johannes +Assigned To: jani New Comment: This is a regression caused by http://bugs.php.net/bug.php?id=42657 Check in was http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini.c?r1=1.39.2.2.2.18.2.6r2=1.39.2.2.2.18.2.7 It affects any place that relied on INI_STR to return NULL for the original value. Previous Comments: [2008-07-03 12:53:48] [EMAIL PROTECTED] This needs to be fixed before 5.3 goes out the door. [2008-04-22 15:46:42] RQuadling at GMail dot com Nuno, if (!sendmail_path || !*sendmail_path) works for me on 5.3 CVS. Not tested HEAD as I've not got ICU yet. Richard. [2008-04-20 00:49:21] [EMAIL PROTECTED] Nuno I posted about the underlying change that broke this to internals last week. It's potentially broken in more places that relied on INI_STR to turn NULL as it now returns . [2008-04-19 23:59:46] [EMAIL PROTECTED] a better fix is: if (!sendmail_path || !*sendmail_path) let me know if you want me to commit this. [2008-04-17 14:45:55] RQuadling at GMail dot com Hi. I have finally managed to get php to compile for windows (yippee for me). So I can now try and get mail() working again. The issue is that in ext/standard/mail.c (/* $Id: mail.c,v 1.87.2.1.2.7.2.3 2007/12/31 07:17:15 sebastian Exp $ */), line 197, the test of ... if (!sendmail_path) always evaluates to false when there is no sendmail_path which would be the case on windows. The next line differentiates between processing for windows/netware and everything else. If the test is if(0 == strlen(sendmail_path)) then that would work. The INI_STR call in Line 194 always returns a string if the directive is known (doesn't need to be set, just has to exist as a directive). So, I've attached a patch which I have compiled and tested on Windows. This is in relation to bug http://bugs.php.net/bug.php?id=43348 Index: mail.c === RCS file: /repository/php-src/ext/standard/mail.c,v retrieving revision 1.87.2.1.2.7.2.3 diff -u -u -r1.87.2.1.2.7.2.3 mail.c --- mail.c 31 Dec 2007 07:17:15 - 1.87.2.1.2.7.2.3 +++ mail.c 17 Apr 2008 14:40:33 - @@ -194,7 +194,7 @@ char *sendmail_path = INI_STR(sendmail_path); char *sendmail_cmd = NULL; - if (!sendmail_path) { + if (0 == strlen(sendmail_path)) { #if (defined PHP_WIN32 || defined NETWARE) /* handle old style win smtp sending */ if (TSendMail(INI_STR(SMTP), tsm_err, tsm_errmsg, headers, subject, to, message, NULL, NULL, NULL TSRMLS_CC) == FAILURE) { The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/43348 -- Edit this bug report at http://bugs.php.net/?id=43348edit=1
#45361 [Bgs]: IE / IIS Double form post in case of redirection
ID: 45361 User updated by: ssruprai at hotmail dot com Reported By: ssruprai at hotmail dot com Status: Bogus Bug Type: IIS related Operating System: Windows 2003, XP PHP Version: 5.2.6 New Comment: I think I have found what is causing this double post. It is a sapce between Location: and the url. Instead of header(Location:http://www.google.com;); header(Location: http://www.google.com;); should be used to avoid this double posting. This seems to have solved the problem. Previous Comments: [2008-07-02 12:25:44] ssruprai at hotmail dot com Whatever it is, I am just reporting the problem because it is php header function which is creating this problem. I think you should test it yourself as I have provided the code to reproduce. Most of the people use IE although PHP is rarely used on Windows. I think this needs to be solved as it is very common to self post and redirect. [2008-07-02 11:37:48] [EMAIL PROTECTED] It works with firefox, Apache / PHP combination. It works with IE / Apache / PHP combination So it's IIS vs. IE bug. Not PHP problem - bogus. [2008-07-01 11:12:54] ssruprai at hotmail dot com The production server is a fast cgi windows 2003. Behavior is same. [2008-07-01 09:53:27] [EMAIL PROTECTED] Instead of using the (buggy) ISAPI module, use the fastcgi approach instead (supported/preferred also by Microsoft themselves!). [2008-06-25 22:26:46] ssruprai at hotmail dot com Description: I am facing a strange problem of IE double posting in case of self post. PHP 5.2.6 / IIS 5.1 on windows XP. Before starting I must tell you that: It works with firefox, Apache / PHP combination. It works with IE / Apache / PHP combination It works with firefox / IIS / PHP Combination But it DOES NOT work with IE/PHP/ IIS This seems to be the case case with all IE versions (specially IE 6) and it happens on even the windows 2003 server. I have a form with just one field which uploads a single file and posts back to same PHP file. The file is a csv file and it is properly read and inserted into database. After it is successfully inserted I issue a redirect to some other page using header(Location:other_page.php). When the header is executed the form is posted again. I know that it was posted twice because when I see the database the records are inserted twice. I am not sure if it is IIS, PHP or IE Problem. This is not the first time I have experienced this. I had earlier faced the similar double post problem in case of self post (WITHOUT USING REDIRECT header but this seems to have been resolved with latest php ISAPI version. At that time I just switched to apache as most hosting servers were linux and there was no problem). But now the problem is that production server is Windows 2003 server with IIS. (The version of PHP IIS or windows shouldn't not matter though) My application is using all sorts of libraries, from pear db, quickform to smarty so I have just created a simple upload form . Which does nothing but logs the access to find out about double post. I had tried many different php versions and all produced same result. I have created a simple form for testing. If you'll upload a small text file you'll see that there are two entries in log file for one access. The platform to test is IIS (ISAPI) php 5 and Internet explorer 6. (IE 7 may not post values twice but it will display some page not found error.) Reproduce code: --- ?php set_time_limit ( 300); if (@$_POST['submitted'] == 'yes') { $csv_file = $_FILES['csv_file']; if ($csv_file['size'] 0) { $fp = fopen('access.txt', 'a'); fwrite($fp, 'Accessed at '. date('d-m-y H:i:s u'). \r\n); fclose($fp); header('Location:http://www.google.com'); exit; /* if instead of above header, javascript redirect is used then it is not posted twice */ /*echo script language='javascript'\n; echo location.replace('http://www.google.com');\n; echo /script;*/ } else if ($csv_file['error'] == UPLOAD_ERR_FORM_SIZE || $csv_file['error'] == UPLOAD_ERR_INI_SIZE) { $error = File size exceeds max allowed size of whatever; } else { $error = There was error in uploading your file.; } }
#45429 [Fbk-Opn]: move_uploaded_file is terminating my scripts
ID: 45429 User updated by: aatelfer at hotmail dot com Reported By: aatelfer at hotmail dot com -Status: Feedback +Status: Open Bug Type: Filesystem function related Operating System: Apache/2.0.63 (Unix) PHP Version: 5.2.6 New Comment: Yes it is. My apologies. Previous Comments: [2008-07-04 07:54:17] [EMAIL PROTECTED] So the problem is gone? [2008-07-03 23:49:47] aatelfer at hotmail dot com Sorry, I did not install the GD library. It caused a fatal error and the error was suppressed. [2008-07-03 20:11:05] aatelfer at hotmail dot com Description: move_uploaded_file file has some error that causes my script to terminate. I don't get any errors at all. The script just ends. Reproduce code: --- function uploadfile($filename,$path) { if(is_uploaded_file($_FILES[$filename]['tmp_name'])) { move_uploaded_file($_FILES[$filename]['tmp_name'],$path); return true; } return false; } Expected result: function should return a true or false value Actual result: -- Scripts terminates without any error -- Edit this bug report at http://bugs.php.net/?id=45429edit=1
#45429 [Opn-Bgs]: move_uploaded_file is terminating my scripts
ID: 45429 Updated by: [EMAIL PROTECTED] Reported By: aatelfer at hotmail dot com -Status: Open +Status: Bogus Bug Type: Filesystem function related Operating System: Apache/2.0.63 (Unix) PHP Version: 5.2.6 New Comment: Closing then. Previous Comments: [2008-07-04 11:29:09] aatelfer at hotmail dot com Yes it is. My apologies. [2008-07-04 07:54:17] [EMAIL PROTECTED] So the problem is gone? [2008-07-03 23:49:47] aatelfer at hotmail dot com Sorry, I did not install the GD library. It caused a fatal error and the error was suppressed. [2008-07-03 20:11:05] aatelfer at hotmail dot com Description: move_uploaded_file file has some error that causes my script to terminate. I don't get any errors at all. The script just ends. Reproduce code: --- function uploadfile($filename,$path) { if(is_uploaded_file($_FILES[$filename]['tmp_name'])) { move_uploaded_file($_FILES[$filename]['tmp_name'],$path); return true; } return false; } Expected result: function should return a true or false value Actual result: -- Scripts terminates without any error -- Edit this bug report at http://bugs.php.net/?id=45429edit=1
#45415 [Fbk-Opn]: function base_convert bugs
ID: 45415 User updated by: aurorakay at yeah dot net Reported By: aurorakay at yeah dot net -Status: Feedback +Status: Open Bug Type: Math related Operating System: Linux 2.6.23-tuxonice-r10- PHP Version: 5.2.6 New Comment: Expected result: e.g.1; Actual result: e.g.1; example.1 's result is my want. but in examle.2,I want get the example.1's result.but actual, it is string(26) 10100010001000 I want get string(30) 10100010001000 in example.2; Excuse my poor english = = Previous Comments: [2008-07-02 11:59:28] [EMAIL PROTECTED] Exactly what is the expected and what is the actual results? [2008-07-02 11:54:26] aurorakay at yeah dot net Description: the same data,but at e.g.1,I convert hex to dec. The value is my wish, at e.g.2 I convert dec to hex. The value isn't my wish. Reproduce code: --- /*e.g.1*/ $flag=129; $mark=0x808080; $mark=base_convert($mark,16,10); $flag=$flag | $mark; $t=(base_convert($flag,10,2)); /* this will print string(30) 10100010001000 */ var_dump($t); /*e.g.2*/ $flag1=129; $mark1=0x808080; $flag1=base_convert($flag1,10,16); $flag1=$flag1 | $mark1; $t1=(base_convert($flag1,16,2)); /* this will print string(26) 10100010001000 */ var_dump($t1); Expected result: /*e.g.1*/ is my wish. Actual result: -- e.g.1 print string(30) 10100010001000; e.g.2 print string(26) 10100010001000 -- Edit this bug report at http://bugs.php.net/?id=45415edit=1
#30804 [Com]: multiple returned lob resource being overwritten
ID: 30804 Comment by: rain_c1 at yahoo dot com Reported By: michael dot caplan at lechateau dot ca Status: Suspended Bug Type: Feature/Change Request Operating System: RHE 3 PHP Version: 5CVS-2005-04-05 Assigned To: tony2001 New Comment: This Bug is also valid for PDO_OCI. In PDO_OCI there is no load() method for LOBs. So the described workaround does not work. This makes this bug much more serious than evaluated until now in the discussion. Previous Comments: [2006-03-21 10:05:41] [EMAIL PROTECTED] The problem is that we allocate ONE LOB descriptor, bind it to the statement and then fetch real data into it. So there may be multiple resources, but all of them will point to the same lob descriptor in the end. I still don't see a decent way to change it, but in the same time I don't think this is a major problem. [2006-03-21 04:05:20] [EMAIL PROTECTED] Well, echo $row['CLOB_TEXT']-load(); is not exactly the same as $res[] = $row['CLOB_TEXT']; In the last one you are assigning the whole object to an element of an array. This may be the reason it overwrites all the rest. Try this: $res[] = $row['CLOB_TEXT']-load(); and the print as foreach($res as $r) { echo $r . \r\n; } Just my guess. maxim [2005-04-06 21:35:25] michael dot caplan at lechateau dot ca It was a little difficult to test -- php kept on segfaulting with the DB abstraction lib I normaily use. I tried a new test as follows, but unfortunately I had the same results: CREATE TABLE INTRANET.CLOB_TEST (ID NUMBER NOT NULL ENABLE, TEXT_TEXT VARCHAR2(500) NOT NULL ENABLE, CLOB_TEXT CLOB, PRIMARY KEY (ID) ) ID TEXT_TEXT CLOB_TEXT -- - - 1 text1 this is a clob of text1 2 text2 this is a clob of text2 3 text3 this is a clob of text3 4 text4 this is a clob of text4 5 text5 this is a clob of text5 ?php $db = ocinlogon('intranet', 'stidemoron', 'webdev'); $query = 'select ID, TEXT_TEXT, CLOB_TEXT from CLOB_TEST'; $stmt = ociparse($db, $query); ociexecute($stmt); while (OCIFetchInto ($stmt, $row, OCI_ASSOC)) { echo $row['ID'] . \r\n; echo $row['TEXT_TEXT'] . \r\n; echo $row['CLOB_TEXT']-load() . \r\n; } echo 2-\r\n; $stmt = ociparse($db, $query); ociexecute($stmt); $res = array(); while (OCIFetchInto ($stmt, $row, OCI_ASSOC)) { $res[] = $row['CLOB_TEXT']; } foreach($res as $r) { echo $r-load() . \r\n; } ? results: 1 text1 this is a clob of text1 2 text2 this is a clob of text2 3 text3 this is a clob of text3 4 text4 this is a clob of text4 5 text5 this is a clob of text5 2- this is a clob of text5 this is a clob of text5 this is a clob of text5 this is a clob of text5 this is a clob of text5 [2004-11-16 14:48:26] michael dot caplan at lechateau dot ca Description: I'm not 100% sure if this is a bug, or just a 'quirk', but my attempt to get feedback on this issue on the php db support list was unsuccessful. So, here I am I am selecting multiple columns from a table, one being a clob. the query returns multiple records for the query. The results are all good, execpt the clob column in certain circumstances. Normally, with such a db return, I would loop through the results and grab the clobs one by one. Under 'special' circumstances, I would want to first loop throught the results and assign the results to a new array before fetching the clob. This is where things get funky. In this senario, the last returned record's clob column overwrites all previous clob columns (all the previous records have there unique data, except the clob columns which contains the data for the last record across all previous records). A working example: $query = 'select id, author, cdate, views, title, message, top from APP_THREADS where TYPE = \'D\''; $stmt = ociparse($fw_db-connection, $query); ociexecute($stmt); while (OCIFetchInto ($stmt, $row, OCI_ASSOC)) { echo $row['MESSAGE']-load(); echo $row['id']; // etc } as expected, I get all clobs from the result set. But in this example, I do not: $query = 'select id, author, cdate, views, title, message, top from APP_THREADS
#45431 [NEW]: getimagesize() can't handle a colon in filename parameter
From: hundrambit at gmail dot com Operating system: Windows XP Professional + SP3 PHP version: 5.2.6 PHP Bug Type: GetImageSize related Bug description: getimagesize() can't handle a colon in filename parameter Description: getimagesize() function will return FALSE when a remote file containing a colon (:) in filename is specified. It can't be handled / opened. This image is used as example: http://inattack.ru/bar/inattack_bar_2012_2:10_FF_5_0.jpg PHP configuration allows remote files. Reproduce code: --- $res = @getimagesize(http://inattack.ru/bar/inattack_bar_2012_2:10_FF_5_0.jpg;); if ($res === false) { echo Failed to open target image.; } else { echo WxH: .$res[0].x.$res[1]; } Expected result: $res should return array with 5 elements, as it does when same image without a colon in filename is specified. Actual result: -- A FALSE is returned. -- Edit bug report at http://bugs.php.net/?id=45431edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45431r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45431r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45431r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45431r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45431r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45431r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45431r=needscript Try newer version:http://bugs.php.net/fix.php?id=45431r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45431r=support Expected behavior:http://bugs.php.net/fix.php?id=45431r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45431r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45431r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45431r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45431r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45431r=dst IIS Stability:http://bugs.php.net/fix.php?id=45431r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45431r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45431r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45431r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45431r=mysqlcfg
#44327 [Opn]: PDORow::queryString property numeric offsets / Crash
ID: 44327 Updated by: [EMAIL PROTECTED] Reported By: uwendel at mysql dot com Status: Open Bug Type: PDO related Operating System: Linux PHP Version: 5.3CVS-2008-03-04 (snap) New Comment: Part one of my report is bogus and the crash seems to be gone. Can anybody verify and close it? Previous Comments: [2008-04-14 09:06:06] uwendel at mysql dot com Adding Crash to Summary. [2008-04-14 09:03:12] uwendel at mysql dot com Crash with CVS snapshot [EMAIL PROTECTED]:~/php53_libmysql sapi/cli/php -v PHP 5.3.0-dev (cli) (built: Apr 11 2008 12:02:49) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies [EMAIL PROTECTED]:~/php53_libmysql sapi/cli/php -r '$db = new PDO(sqlite:/tmp/foo); $stmt = $db-query(SELECT 1); $row = $stmt-fetch(PDO::FETCH_LAZY); var_dump($row-{0}); var_dump($row-queryString); get_class($row);' string(1) 1 string(1) 1 Speicherzugriffsfehler [2008-03-04 17:21:29] uwendel at mysql dot com Description: What kind of thing is the PDORow::queryString property? PDORow objects are generated and returned by PDOStatement::fetch(PDO::FETCH_LAZY). PDORow objects seem a bit special in some ways. 1) PDO::FETCH_LAZY = PDO::FETCH_OBJ + PDO::FETCH_BOTH PDO::FETCH_BOTH means that the returned data is both indexed by the column name and a column offset number. For example, a query like SELECT id FROM test should return an object (resp. array) with the properties {0} and id. You can access both properties and you get what you want. But var_dump() will report only the column name based property and not the property based on the numeric column offset. I have no idea if this is a var_dump() or a PDO flaw. 2) The magic queryString property var_dump() reports a queryString property for PDORow objects returned by PDOStatement::fetch(). In all my testing I found the queryString propery value to be the query string which has constructed the corresponding PDOStatement object. However, I cannot access this property. I see it, but I have no access. That makes it a bit magic. Also, note how var_dump(), var_export() and debug_zval_dump report different things. Johannes already explained to me that the functions might do different things, but anyway it looks confusing to me. Reproduce code: --- 1, FETCH_LAZY and numeric offset -- sapi/cli/php -r '$db = new PDO(mysql:dbname=phptest;unix_socket=/tmp/mysql.sock, root, root); $stmt = $db-prepare(SELECT 1 AS \one\); $stmt-execute(); $row = $stmt-fetch(PDO::FETCH_LAZY); var_dump($row); var_dump($row-{0}); var_dump($row-one); ' object(PDORow)#3 (2) { [queryString]= string(17) SELECT 1 AS one [one]= string(1) 1 } -- string(1) 1 string(1) 1 2, magic PDORow::queryString() - sapi/cli/php -r '$db = new PDO(mysql:dbname=phptest;unix_socket=/tmp/mysql.sock, root, root); $stmt = $db-prepare(SELECT 1 AS \one\); $stmt-execute(); $row = $stmt-fetch(PDO::FETCH_LAZY); var_dump($row); var_dump($row-queryString); ' object(PDORow)#3 (2) { [queryString]= string(17) SELECT 1 AS one [one]= string(1) 1 } -- UNKNOWN:0 sapi/cli/php -r '$db = new PDO(mysql:dbname=phptest;unix_socket=/tmp/mysql.sock, root, root); $db-exec(DROP TABLE test); $db-exec(CREATE TABLE test (id INT)); $db-exec(INSERT INTO test(id) VALUES (1)); $stmt = $db-prepare(SELECT id FROM test); $stmt-execute(); $row = $stmt-fetch(PDO::FETCH_LAZY); var_dump($row); var_dump($row-queryString); var_export($row-queryString); print \n; debug_zval_dump($row-queryString);' -- UNKNOWN:0 NULL UNKNOWN:0 -- Edit this bug report at http://bugs.php.net/?id=44327edit=1
#45432 [NEW]: PDO: persistent connection leak
From: uwendel at mysql dot com Operating system: Linux 64bit PHP version: 5.3CVS-2008-07-04 (CVS) PHP Bug Type: PDO related Bug description: PDO: persistent connection leak Description: Creating a persistent connection handle and assigning a new persistent connection to the same handle (variable) causes a leak. $db = new PDO(...) $db = new PDO(...) --- leak My PHP 5.3 CVS snapshot is a little older than 04.07.2008, anyway. [EMAIL PROTECTED]:~/php53 sapi/cli/php -v PHP 5.3.0-dev (cli) (built: Jul 3 2008 16:20:01) (DEBUG) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies Reproduce code: --- [EMAIL PROTECTED]:~/php53 valgrind sapi/cli/php -r '$db = new PDO(sqlite:/tmp/foo, NULL, NULL, array(PDO::ATTR_PERSISTENT = true)); $db = new PDO(sqlite:/tmp/foo, NULL, NULL, array(PDO::ATTR_PERSISTENT = true));' ==32328== Memcheck, a memory error detector. ==32328== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==32328== Using LibVEX rev 1804, a library for dynamic binary translation. ==32328== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==32328== Using valgrind-3.3.0, a dynamic binary instrumentation framework. ==32328== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==32328== For more details, rerun with: -v [Fri Jul 4 19:35:02 2008] Script: '-' /home/nixnutz/php53/ext/pdo/pdo_dbh.c(1513) : Freeing 0x0655C3C8 (72 bytes), script=- [Fri Jul 4 19:35:02 2008] Script: '-' /home/nixnutz/php53/ext/pdo/pdo_dbh.c(1514) : Freeing 0x0655C468 (64 bytes), script=- /home/nixnutz/php53/Zend/zend_alloc.c(2374) : Actual location (location was relayed) === Total 2 memory leaks detected === ==32328== ==32328== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) ==32328== malloc/free: in use at exit: 91,869 bytes in 137 blocks. ==32328== malloc/free: 11,910 allocs, 11,773 frees, 3,125,629 bytes allocated. ==32328== For counts of detected errors, rerun with: -v ==32328== searching for pointers to 137 not-freed blocks. ==32328== checked 558,296 bytes. ==32328== ==32328== LEAK SUMMARY: ==32328==definitely lost: 11,325 bytes in 128 blocks. ==32328== possibly lost: 456 bytes in 6 blocks. ==32328==still reachable: 80,088 bytes in 3 blocks. ==32328== suppressed: 0 bytes in 0 blocks. ==32328== Rerun with --leak-check=full to see details of leaked memory. -- Edit bug report at http://bugs.php.net/?id=45432edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45432r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45432r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45432r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45432r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45432r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45432r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45432r=needscript Try newer version:http://bugs.php.net/fix.php?id=45432r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45432r=support Expected behavior:http://bugs.php.net/fix.php?id=45432r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45432r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45432r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45432r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45432r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45432r=dst IIS Stability:http://bugs.php.net/fix.php?id=45432r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45432r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45432r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45432r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45432r=mysqlcfg
#45433 [NEW]: aumento una hora a la hora actual
From: luisgilgm at gmail dot com Operating system: windows xp PHP version: 5.2.6 PHP Bug Type: Date/time related Bug description: aumento una hora a la hora actual Description: Que tal. Tengo un problema y esque instale en Windows el Php5 y Apache2 y tengo un script donde solo pongo la siguiente instruccion: ?=date(H:i)? Si lo ejecuto a las 14:00 del servidor donde se esta ejecutando el php la instruccion me imprime 15:00 He hecho varias pruebas una de ellas fue retroceder a php4 con el apache2 y me trae la hora correcta como debe de ser. otra prueba que llegue a ver en foros fue que podria utilizar gmdate() pero esta instruccion si la ejecuto a las 14:00 me imprime 20:00 tambien he declarado date_default_timezone_set(America/Mexico_City); y aun asi me aumenta una hora exacta quiero saber si esto es un bug de php5 o hay una forma de configuracion para la hora sin el horario de verano o pueda ser la configuracion del sistema operativo. muchas gracias por la ayuda Reproduce code: --- ?=date(H:i)? Expected result: si lo ejecuto a las 14:00 me debe imprimir 14:00 y no 15:00 -- Edit bug report at http://bugs.php.net/?id=45433edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45433r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45433r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45433r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45433r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45433r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45433r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45433r=needscript Try newer version:http://bugs.php.net/fix.php?id=45433r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45433r=support Expected behavior:http://bugs.php.net/fix.php?id=45433r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45433r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45433r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45433r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45433r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45433r=dst IIS Stability:http://bugs.php.net/fix.php?id=45433r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45433r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45433r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45433r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45433r=mysqlcfg
#45434 [NEW]: circular reference causes segfault in gc_collect_cycles()
From: php at benjaminschulz dot com Operating system: linux, osx PHP version: 5.3CVS-2008-07-04 (CVS) PHP Bug Type: Reproducible crash Bug description: circular reference causes segfault in gc_collect_cycles() Description: A circular reference causes gc_collect_cycles() to segfault. I know there is another bug that looks similar (#36482) but i think this is a far better (because simpler) test case. Reproduce code: --- ?php class foo { public $foo; public function __destruct() { throw new Exception(foobar); } } $f1 = new foo; $f2 = new foo; $f1-foo = $f2; $f2-foo = $f1; unset($f1, $f2); // triggers a segfault gc_collect_cycles(); Actual result: -- $ php test.php Segmentation fault -- Edit bug report at http://bugs.php.net/?id=45434edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45434r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45434r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45434r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45434r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45434r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45434r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45434r=needscript Try newer version:http://bugs.php.net/fix.php?id=45434r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45434r=support Expected behavior:http://bugs.php.net/fix.php?id=45434r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45434r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45434r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45434r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45434r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45434r=dst IIS Stability:http://bugs.php.net/fix.php?id=45434r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45434r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45434r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45434r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45434r=mysqlcfg
#45434 [Opn]: circular reference causes segfault in gc_collect_cycles()
ID: 45434 User updated by: php at benjaminschulz dot com Reported By: php at benjaminschulz dot com Status: Open Bug Type: Reproducible crash Operating System: linux, osx PHP Version: 5.3CVS-2008-07-04 (CVS) New Comment: Oops, i missed one important point: the segfault occurs if an exception is thrown ;) Sorry, it's too late for me today. Previous Comments: [2008-07-04 20:14:21] php at benjaminschulz dot com Description: A circular reference causes gc_collect_cycles() to segfault. I know there is another bug that looks similar (#36482) but i think this is a far better (because simpler) test case. Reproduce code: --- ?php class foo { public $foo; public function __destruct() { throw new Exception(foobar); } } $f1 = new foo; $f2 = new foo; $f1-foo = $f2; $f2-foo = $f1; unset($f1, $f2); // triggers a segfault gc_collect_cycles(); Actual result: -- $ php test.php Segmentation fault -- Edit this bug report at http://bugs.php.net/?id=45434edit=1
#44942 [Opn]: exec() hangs apache
ID: 44942 User updated by: inqualab1985 at gmail dot com Reported By: inqualab1985 at gmail dot com Status: Open Bug Type: Program Execution Operating System: Microsoft Window 2000 SP4 PHP Version: 5.2.5 New Comment: Dear markus In the first sight, I also understand that this happen only when multiple request hit the script with exec(). But in reality there is no guarantee that if the request goes one by one Hanging will not happen. I had done a test at the time of writing this bug in which call the script one by one but it randomly hanged up again after a period of time. At that time period is long. So dear PHP team , you have to really look up this matter. Thanks Previous Comments: [2008-07-03 20:33:19] markus at opahle dot com Windows XP SP3 Apache 2.2.6 PHP 5.2.6 I have the same problem. I noticed that apache only hangs up when a php script with an exec command was called twice at the same time. The problem also ocours when I tried to use popen or proc_open(with and without bypass_shell option) [2008-06-10 14:59:10] aleaddict at yahoo dot com Windows Server 2003 R2 Service Pack 1 Apache 2.2.6 PHP 5.2.4 (upgraded to 5.2.6 with no success) Executing resource kit utility shortcut.exe via exec() with EXACTLY the same results... Random, no errors logged, hangs up all succeeding calls to exec(), requires restart. Keith [2008-05-14 07:56:17] inqualab1985 at gmail dot com Dear Jani There is no problem with 'sample.exe'. I have tested the same for different exe or even for dos command. It hangs when we are calling the page at regular interval of time (through Ajax). There is a problem in the definition of exec() function. For any further information , feel free to contact me. [2008-05-09 14:20:40] [EMAIL PROTECTED] What exactly does this sample.exe do? It's most likely not any PHP problem at all anyway, you just call some exe that hangs itself.. [2008-05-08 05:40:53] inqualab1985 at gmail dot com Description: Hi! PHP Team I am facing a problem of apache hang up due to exec() function. I am using PHP 5.2.5 and Apache 2.2 on MS Window 2000 SP4 also on MS Window XP. The problem is that I have to execute a exe, for which I have use exec(). Normally it works Fine, but sometime (randomly) it hang up. It will lock the apache and if we call the same page or any other page of php having exec(), it hang up at the line where exec() function is used. If we commented the line having exec(), then the page run loaded correctly. The problem also become critical because there is no error for this. Also none of the error handling logging mechanism works. The only solution to this problem is to restart the Apache. I am providing you as much as information as possible to catch the problem correctly. Reproduce code: --- $exeFilePath = realpath(../sample.exe); if (eregi(win, PHP_OS)) $command = \\$exeFilePath\ argument1\; else $command = \$exeFilePath\ argument1; $output = null; $returnVal = null; $result = exec($command,$output,$returnVal); if($returnVal !=0) echo Error; else echo $output[0]; echo end of the program; Expected result: it will show the output of exe for particular argument. Actual result: -- Normally it works correctly as expected but sometime the the execution of the page hang at line $result = exec($command,$output,$returnVal); . After this has happen I am not able to run any script that will use the exec(). In all scripts apache hangs at exec() function, do not matter which exe will be called. -- Edit this bug report at http://bugs.php.net/?id=44942edit=1
#45434 [Opn-Asn]: circular reference causes segfault in gc_collect_cycles()
ID: 45434 Updated by: [EMAIL PROTECTED] Reported By: php at benjaminschulz dot com -Status: Open +Status: Assigned Bug Type: Reproducible crash Operating System: linux, osx PHP Version: 5.3CVS-2008-07-04 (CVS) -Assigned To: +Assigned To: dmitry New Comment: (gdb) bt #0 0x082d6232 in zend_objects_destroy_object (object=0x89f0bc0, handle=2) at /home/johannes/src/php/PHP_5_3/Zend/zend_objects.c:111 #1 0x082d5146 in gc_collect_cycles () at /home/johannes/src/php/PHP_5_3/Zend/zend_gc.c:561 #2 0x082c9223 in zif_gc_collect_cycles (ht=0, return_value=0x89ef718, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0) at /home/johannes/src/php/PHP_5_3/Zend/zend_builtin_functions.c:184 #3 0x082f2361 in zend_do_fcall_common_helper_SPEC (execute_data=0x8a1fd20) at /home/johannes/src/php/PHP_5_3/Zend/zend_vm_execute.h:313 #4 0x082e039e in execute (op_array=0x89ede88) at /home/johannes/src/php/PHP_5_3/Zend/zend_vm_execute.h:104 #5 0x082ba286 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/johannes/src/php/PHP_5_3/Zend/zend.c:1198 #6 0x08269487 in php_execute_script (primary_file=0xbff2c988) at /home/johannes/src/php/PHP_5_3/main/main.c:2082 #7 0x0832dcc4 in main (argc=1, argv=0xbff2cae4) at /home/johannes/src/php/PHP_5_3/sapi/cli/php_cli.c:1139 Previous Comments: [2008-07-04 20:25:34] php at benjaminschulz dot com Oops, i missed one important point: the segfault occurs if an exception is thrown ;) Sorry, it's too late for me today. [2008-07-04 20:14:21] php at benjaminschulz dot com Description: A circular reference causes gc_collect_cycles() to segfault. I know there is another bug that looks similar (#36482) but i think this is a far better (because simpler) test case. Reproduce code: --- ?php class foo { public $foo; public function __destruct() { throw new Exception(foobar); } } $f1 = new foo; $f2 = new foo; $f1-foo = $f2; $f2-foo = $f1; unset($f1, $f2); // triggers a segfault gc_collect_cycles(); Actual result: -- $ php test.php Segmentation fault -- Edit this bug report at http://bugs.php.net/?id=45434edit=1
#45435 [NEW]: putenv(TMPDIR=... doens't always sets the TMPDIR
From: lvdgraaff at gmail dot com Operating system: Mac OS 10.5.3 PHP version: 5.2.6 PHP Bug Type: Filesystem function related Bug description: putenv(TMPDIR=... doens't always sets the TMPDIR Description: Due to a bug with the ftp_*list functions I had to set the TMPDIR manually. [http://bugs.php.net/bug.php?id=28865] But, to my surprise, this doesn't ALWAYS work correctly. I'll demonstrate it with the function sys_get_temp_dir and tmpfile. Details: If the putenv fails, than it doesn't work to direct try it again. I really have to wait for a few seconds, before a retry will be succesfull. When it works again, it does it for a few minutes. I use PHP 5.2.5, but I saw no issues in the changelog witch seem to be related to this. Reproduce code: --- ? putenv(TMPDIR=/Users/lvdgraaff/Web/www/compile/tmp); echo GET ENV: \t . getenv(TMPDIR) . \n; echo SGTD: \t\t . sys_get_temp_dir() . \n; print_r(tmpfile()); NOTE: this was the only code in the whole file Expected result: GET ENV:/Users/lvdgraaff/Web/www/compile/tmp SGTD: /Users/lvdgraaff/Web/www/compile/tmp Resource id #2 NOTE: I get this, most of the time, but not ALL the time. Actual result: -- GET ENV:/Users/lvdgraaff/Web/www/compile/tmp SGTD: /var/folders/4T/4TDJmSQYGV04rPNp5PKZ2TI/-Tmp-/ (note: no resource, but an empty line!) SOMETIMES I get this result. -- Edit bug report at http://bugs.php.net/?id=45435edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45435r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45435r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45435r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45435r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45435r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45435r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45435r=needscript Try newer version:http://bugs.php.net/fix.php?id=45435r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45435r=support Expected behavior:http://bugs.php.net/fix.php?id=45435r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45435r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45435r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45435r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45435r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45435r=dst IIS Stability:http://bugs.php.net/fix.php?id=45435r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45435r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45435r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45435r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45435r=mysqlcfg
#45431 [Opn-Csd]: getimagesize() can't handle a colon in filename parameter
ID: 45431 User updated by: hundrambit at gmail dot com Reported By: hundrambit at gmail dot com -Status: Open +Status: Closed Bug Type: GetImageSize related Operating System: Windows XP Professional + SP3 PHP Version: 5.2.6 New Comment: This information is invalid. Previous Comments: [2008-07-04 13:38:37] hundrambit at gmail dot com Description: getimagesize() function will return FALSE when a remote file containing a colon (:) in filename is specified. It can't be handled / opened. This image is used as example: http://inattack.ru/bar/inattack_bar_2012_2:10_FF_5_0.jpg PHP configuration allows remote files. Reproduce code: --- $res = @getimagesize(http://inattack.ru/bar/inattack_bar_2012_2:10_FF_5_0.jpg;); if ($res === false) { echo Failed to open target image.; } else { echo WxH: .$res[0].x.$res[1]; } Expected result: $res should return array with 5 elements, as it does when same image without a colon in filename is specified. Actual result: -- A FALSE is returned. -- Edit this bug report at http://bugs.php.net/?id=45431edit=1
#45436 [NEW]: cloned Objects can't be passed by value to a function
From: jtrelfa at gmail dot com Operating system: Windows XP PHP version: 5.2.6 PHP Bug Type: Class/Object related Bug description: cloned Objects can't be passed by value to a function Description: I was trying to fill an array with objects by cloning the object as the argument in the function. I read http://us2.php.net/manual/en/language.oop5.basic.php#language.oop5.basic.new It mentions that passing the object to a function is a reference - but why doesn't cloning work, either? I tried two different ways to pass a cloned object, but still got a referenced object rather than a cloned one. Reproduce code: --- class Foo { var $ar; function __construct() { $this-ar = array(0,0,0); } } //use clone keyword $obj = new Foo(); $bar = array_fill(0,2,clone $obj); print_r($bar); $bar[1]-ar[0] = 1; print_r($bar); //a different way to clone $obj = new Foo(); $bar = array_fill(0,2,$t = clone $obj); print_r($bar); $bar[0]-ar[0] = 1; print_r($bar); Expected result: Array ( [0] = Foo Object ( [ar] = Array ( [0] = 0 [1] = 0 [2] = 0 ) ) [1] = Foo Object ( [ar] = Array ( [0] = 1 [1] = 0 [2] = 0 ) ) ) Actual result: -- Array ( [0] = Foo Object ( [ar] = Array ( [0] = 1 [1] = 0 [2] = 0 ) ) [1] = Foo Object ( [ar] = Array ( [0] = 1 [1] = 0 [2] = 0 ) ) ) -- Edit bug report at http://bugs.php.net/?id=45436edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45436r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45436r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45436r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45436r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45436r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45436r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=45436r=needscript Try newer version:http://bugs.php.net/fix.php?id=45436r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45436r=support Expected behavior:http://bugs.php.net/fix.php?id=45436r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45436r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45436r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45436r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45436r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45436r=dst IIS Stability:http://bugs.php.net/fix.php?id=45436r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45436r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45436r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45436r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=45436r=mysqlcfg
#38111 [Com]: PHP crashes IIS worker process and application pool
ID: 38111 Comment by: noone at nowhere dot com Reported By: svendavidh at hotmail dot com Status: No Feedback Bug Type: IIS related Operating System: Windows Server 2003 Std. Ed. R2 PHP Version: 5.1.4 Assigned To: pajoye New Comment: I too see this problem on IIS7 with both Vista Ultimate and Win2K8 Web Edition. The problem is certainly related to security/authentication and such, since if you run the worker process under a named admin account, then the crashes at regular intervals dissappear. The thing is that PHP does still cause a fault on exit, which is a bit unpleasant, especially if you develop your own ISAPI modules and or PECL extensions alongside PHP. It makes it much harder to trace memory leaks in ones own code, and so on. One might think that people are keen to promote the quality of PHP, but it seems They all do that sir. is good enough. Previous Comments: [2008-07-03 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2008-06-27 02:23:24] leo at calinfomgmt dot com Same problem here. We are also using the ISAPI install of PHP. Maybe someone will use this backtrace to fix a problem that seems to pleg the entire 5.1.x version. [2008-06-25 18:02:32] kevin dot webb at f2bc dot net Since it's an ISAPI istall of PHP there is no php.exe process to tag. This is a crash dump will all IIS related process flaged and using the PHP debug. Thread 0 - System ID 6548 Entry point w3wp!wmainCRTStartup Create time 6/25/2008 9:58:56 AM Time spent in user mode 0 Days 0:0:0.78 Time spent in kernel mode 0 Days 0:0:0.62 Function Arg 1 Arg 2 Arg 3 Source w3core!W3_SERVER::Terminate+164 01001418 010013e4 w3core!UlW3Start+280 0007 00263978 w3wp!wmain+22a 0007 00263978 00264560 w3wp!wmainCRTStartup+12f bffdb000 kernel32!BaseProcessStart+23 010018f8 78746341 W3CORE!W3_SERVER::TERMINATE+164In w3wp__PID__2044__Date__06_25_2008__Time_10_26_06AM__734__Second_Chance_Exception_C005.dmp the assembly instruction at w3core!W3_SERVER::Terminate+164 in c:\WINDOWS\system32\inetsrv\w3core.dll from Microsoft Corporation has caused an access violation exception (0xC005) when trying to read from memory location 0x608fc030 on thread 0 Module Information Image Name: c:\WINDOWS\system32\inetsrv\w3core.dll Symbol Type: PDB Base address: 0x5a39 Time Stamp: Sat Feb 17 06:01:40 2007 Checksum: 0x00064439 Comments: COM DLL: False Company Name: Microsoft Corporation ISAPIExtension: False File Description: IIS Web Server Core ISAPIFilter: False File Version: 6.0.3790.3959 (srv03_sp2_rtm.070216-1710) Managed DLL: False Internal Name: w3core.dll VB DLL: False Legal Copyright: © Microsoft Corporation. All rights reserved. Loaded Image Name: w3core.dll Legal Trademarks: Mapped Image Name: Original filename: w3core.dll Module name: w3core Private Build: Single Threaded: False Product Name: Internet Information Services Module Size: 352.00 KBytes Product Version: 6.0.3790.3959 Symbol File Name: c:\symcache\w3core.pdb\1BD3D6C6BC5C44D3B496F792D23444952\w3core.pdb Special Build: [2008-06-25 16:33:14] kevin dot webb at f2bc dot net Here you go. Thread 0 - System ID 9988 Entry point w3wp!wmainCRTStartup Create time 6/24/2008 9:06:45 PM Time spent in user mode 0 Days 0:0:0.93 Time spent in kernel mode 0 Days 0:0:0.62 Function Arg 1 Arg 2 Arg 3 Source w3core!W3_SERVER::Terminate+164 01001418 010013e4 w3core!UlW3Start+280 0007 00263978 w3wp!wmain+22a 0007 00263978 00264560 w3wp!wmainCRTStartup+12f bffdb000 kernel32!BaseProcessStart+23 010018f8 78746341 W3CORE!W3_SERVER::TERMINATE+164In w3wp__PID__9860__Date__06_24_2008__Time_09_27_54PM__62__Second_Chance_Exception_C005.dmp the assembly instruction at w3core!W3_SERVER::Terminate+164 in c:\WINDOWS\system32\inetsrv\w3core.dll from Microsoft Corporation has caused an access violation exception (0xC005) when trying to read from memory location 0x608fc030 on thread 0 Module Information Image Name: c:\WINDOWS\system32\inetsrv\w3core.dll Symbol Type: PDB Base address: 0x5a39 Time Stamp: Sat Feb 17