#47667 [NEW]: mkoppanen
From: [email protected] Operating system: Debian Linux PHP version: 5.2.9 PHP Bug Type: Zip Related Bug description: mkoppanen Description: ZipArchive::OVERWRITE flag has no effect. Even if the flag is passed to ZipArchive::open method new files seem to be appended rather than overwrite the existing files. Reproduce code: --- open($File, ZipArchive::CREATE); if($res === true) { $zip->addFromString('foo.txt', 'foo bar foobar'); $zip->close(); echo "ok\n"; } else { echo "failed errno: ". $res ."\n\n"; } unset($zip); $zip = new ZipArchive; $res = $zip->open($File, ZipArchive::OVERWRITE); if($res === true) { $zip->addFromString('bar.txt', 'foo bar foobar'); $zip->close(); echo "ok\n"; } else { echo "failed errno: ". $res ."\n\n"; } unset($zip); Expected result: Zip file containing bar.txt Actual result: -- Zip file containing foo.txt and bar.txt -- Edit bug report at http://bugs.php.net/?id=47667&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47667&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47667&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47667&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47667&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47667&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47667&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47667&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47667&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47667&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47667&r=support Expected behavior: http://bugs.php.net/fix.php?id=47667&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47667&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47667&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47667&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47667&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=47667&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47667&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47667&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47667&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47667&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47667&r=mysqlcfg
#47991 [NEW]: SSL streams fail if error stack contains items
From: [email protected] Operating system: Any PHP version: 5.2.9 PHP Bug Type: Streams related Bug description: SSL streams fail if error stack contains items Description: In ext/openssl/openssl.c : php_openssl_parse_config might push errors into OpenSSL error stack in case the keys requested by the application are not found from the openssl.cnf file. This is fine normally but it seems that if error stack contains such an error all future calls to SSL_CTX_use_certificate_chain_file fail. This is a nasty side-effect since SSL_CTX_use_certificate_chain_file is used when opening streams that authenticate with client cert. I haven't tested if the SSL_CTX_use_certificate_chain_file fails with other errors than missing config keys. Probably does. The simple fix which fixes the issue seems to be the following: Index: openssl.c === RCS file: /repository/php-src/ext/openssl/openssl.c,v retrieving revision 1.180 diff -u -r1.180 openssl.c --- openssl.c 29 Mar 2009 23:32:17 - 1.180 +++ openssl.c 16 Apr 2009 16:42:35 - @@ -4674,6 +4674,10 @@ char resolved_path_buff[MAXPATHLEN]; if (VCWD_REALPATH(certfile, resolved_path_buff)) { + /* SSL_CTX_use_certificate_chain_file seems to be failing if error + stack is not cleared before using cert chain file */ + ERR_clear_error(); + /* a certificate to use for authentication */ if (SSL_CTX_use_certificate_chain_file(ctx, resolved_path_buff) != 1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set local cert chain file `%s'; Check that your cafile/capath settings include details of your certificate and its issuer", certfile); Reproduce code: --- https://someurl.example.com/'; $crt = '/tmp/test.pem'; $context = stream_context_create(); stream_context_set_option($context, 'ssl', 'allow_self_signed', true); stream_context_set_option($context, 'ssl', 'local_cert', $crt); /* This call causes the failure */ openssl_pkey_new(); var_dump(file_get_contents($url, 0, $context)); /* The last error shows missing conf key warning */ echo openssl_error_string(); ?> Expected result: No errors, everything works. Actual result: -- SSL_CTX_use_certificate_chain_file returns failure and the call fails. -- Edit bug report at http://bugs.php.net/?id=47991&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47991&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47991&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47991&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47991&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47991&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47991&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47991&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47991&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47991&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47991&r=support Expected behavior: http://bugs.php.net/fix.php?id=47991&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47991&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47991&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47991&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47991&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=47991&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47991&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47991&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47991&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47991&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47991&r=mysqlcfg
Req #43948 [PATCH]: IMAP: Add imap_myrights() function
Edit report at http://bugs.php.net/bug.php?id=43948&edit=1 ID: 43948 Patch added by: [email protected] Reported by:diegows at xtech dot com dot ar Summary:IMAP: Add imap_myrights() function Status: Feedback Type: Feature/Change Request Package:IMAP related PHP Version:trunk Assigned To:pajoye Block user comment: N New Comment: The following patch has been added/updated: Patch Name: imap_myrights.patch Revision: 1280393307 URL: http://bugs.php.net/patch-display.php?bug=43948&patch=imap_myrights.patch&revision=1280393307 Previous Comments: [2010-07-29 10:42:00] [email protected] Add A Patch form responds to using @php.net address: "Email address must be valid!". [2010-07-29 10:06:16] [email protected] Change category and move to trunk for now, will be applied&tested there first. If it happens to work well and it will then be applied to 5.3 (if RM ok it too). [2010-07-29 10:04:51] [email protected] Please attach the patches to this bug, between the versions posted on the list and the ones in external sites, it is hard to track the changes. I'll back at work next week and will review&test the patch, and surely apply it if there is no issue left. ---- [2010-07-28 20:17:13] [email protected] Looking at the myrights patch: + /* set the callback for the GET_ACL function */ + mail_parameters(NIL, SET_MYRIGHTS, (void *) mail_myrights); Should this be 'GET_MYRIGHTS' as the function is used for getting the rights? Slightly updated version of the patch http://valokuva.org/~mikko/imap_myrights.patch. Does this work as expected? [2010-07-28 12:45:45] clint at ubuntu dot com The original patches suggested have been maintained by the kolab project, all the way up to v5.3.2. I'd like to suggest that this (very old) bug be patched into PHP, so that users can benefit from the additional functionality. This link includes the patch for myrights at v5.3.2, which I imagine should apply fairly cleanly to the latest svn version as well: http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/php/patches/php-5.3.2/ 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/bug.php?id=43948 -- Edit this bug report at http://bugs.php.net/bug.php?id=43948&edit=1
Req #43948 [PATCH]: IMAP: Add imap_myrights() function
Edit report at http://bugs.php.net/bug.php?id=43948&edit=1 ID: 43948 Patch added by: [email protected] Reported by:diegows at xtech dot com dot ar Summary:IMAP: Add imap_myrights() function Status: Feedback Type: Feature/Change Request Package:IMAP related PHP Version:trunk Assigned To:pajoye Block user comment: N New Comment: The following patch has been added/updated: Patch Name: imap_annotation.patch Revision: 1280393332 URL: http://bugs.php.net/patch-display.php?bug=43948&patch=imap_annotation.patch&revision=1280393332 Previous Comments: [2010-07-29 10:48:28] [email protected] The following patch has been added/updated: Patch Name: imap_myrights.patch Revision: 1280393307 URL: http://bugs.php.net/patch-display.php?bug=43948&patch=imap_myrights.patch&revision=1280393307 [2010-07-29 10:42:00] [email protected] Add A Patch form responds to using @php.net address: "Email address must be valid!". [2010-07-29 10:06:16] [email protected] Change category and move to trunk for now, will be applied&tested there first. If it happens to work well and it will then be applied to 5.3 (if RM ok it too). [2010-07-29 10:04:51] [email protected] Please attach the patches to this bug, between the versions posted on the list and the ones in external sites, it is hard to track the changes. I'll back at work next week and will review&test the patch, and surely apply it if there is no issue left. -------- [2010-07-28 20:17:13] [email protected] Looking at the myrights patch: + /* set the callback for the GET_ACL function */ + mail_parameters(NIL, SET_MYRIGHTS, (void *) mail_myrights); Should this be 'GET_MYRIGHTS' as the function is used for getting the rights? Slightly updated version of the patch http://valokuva.org/~mikko/imap_myrights.patch. Does this work as expected? 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/bug.php?id=43948 -- Edit this bug report at http://bugs.php.net/bug.php?id=43948&edit=1
Req #43948 [PATCH]: IMAP: Add imap_myrights() function
Edit report at http://bugs.php.net/bug.php?id=43948&edit=1 ID: 43948 Patch added by: [email protected] Reported by:diegows at xtech dot com dot ar Summary:IMAP: Add imap_myrights() function Status: Feedback Type: Feature/Change Request Package:IMAP related PHP Version:trunk Assigned To:pajoye Block user comment: N New Comment: The following patch has been added/updated: Patch Name: imap_annotation.patch Revision: 1280490672 URL: http://bugs.php.net/patch-display.php?bug=43948&patch=imap_annotation.patch&revision=1280490672 Previous Comments: [2010-07-30 10:28:10] [email protected] Right, c-client needs to be patched. It does not sound too good to me but I would like to add some HAVE_ to the c-client patch for cleaner detection. I also dropped a mail to the the uw imap mailing list to ask what's the status of this patch (if has been actually proposed, rejected, etc.). [2010-07-29 20:15:43] [email protected] It looks like c-client needs to be patched to support annotations: http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/patches/imap/ Can't find annotation support in upstream c-client 2007e. [2010-07-29 19:32:57] clint at ubuntu dot com Thanks for taking this on pajoye. We are tracking this bug in Ubuntu here: https://bugs.launchpad.net/ubuntu/+source/php5/+bug/610630 As soon as its committed, we'll most likely apply the patches to 5.3.2 or 5.3.3 for release with Maverick 10.10 to make Kolab function properly. [2010-07-29 10:49:53] [email protected] Finally! imap_annotation.patch is untested as it doesn't compile with my c-client version. -------- [2010-07-29 10:48:52] [email protected] The following patch has been added/updated: Patch Name: imap_annotation.patch Revision: 1280393332 URL: http://bugs.php.net/patch-display.php?bug=43948&patch=imap_annotation.patch&revision=1280393332 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/bug.php?id=43948 -- Edit this bug report at http://bugs.php.net/bug.php?id=43948&edit=1
