#50243 [Bgs]: Second attempt after successful file_put_contents to FTP causes crash
| From: | pontus dot alexander at gmail dot com | Date: | Sat, 21 Nov 2009 00:32:18 +0000 |
| Subject: | #50243 [Bgs]: Second attempt after successful file_put_contents to FTP causes crash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-144897@lists.php.net to get a copy of this message | ||
ID: 50243
User updated by: pontus dot alexander at gmail dot com
Reported By: pontus dot alexander at gmail dot com
Status: Bogus
Bug Type: Reproducible crash
Operating System: Debian
-PHP Version: 5.3SVN-2009-11-20 (snap)
+PHP Version: 5.3.1
Assigned To: pierrick
New Comment:
I can reproduce the crash in the recently announced 5.3.1 release.
Here's my configure-string copied from phpinfo();
'./configure' '--with-config-file-path=/etc/php' '--with-gd'
'--enable-inline-optimization' '--with-curl' '--with-gettext'
'--with-iconv' '--with-openssl' '--enable-xml'
'--with-pcre-regex'
'--with-zlib' '--enable-exif' '--enable-magic-quotes'
'--enable-sockets'
'--with-mysql' '--with-jpeg-dir=/usr/lib/' '--with-mysqli'
'--enable-mbstring' '--enable-zend-multibyte'
Previous Comments:
------------------------------------------------------------------------
[2009-11-20 18:45:56] pierrick@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP --
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
------------------------------------------------------------------------
[2009-11-20 17:53:46] rasmus@php.net
I tested this on an Ubuntu box and was unable to reproduce the crash.
And under Valgrind it didn't report anything suspicious either.
I assume this is without curlwrappers enabled? Please list all your
compile flags.
------------------------------------------------------------------------
[2009-11-20 17:22:12] pierrick@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2009-11-20 14:32:27] pontus dot alexander at gmail dot com
Description:
------------
After one successful write to FTP via file_put_contents (or fopen,
fwrite, fclose) the next attempt causes PHP to die with message
"Segmentation fault".
Reproduce code:
---------------
<?
$location = "ftp://foo:bar@domain.com/";
$unique = uniqid();
$items = array(
'foo',
'bar'
);
$i = 0;
foreach($items as $content) {
$filename = $location . sprintf("File_%s_%03u.txt", $unique, $i++);
file_put_contents($filename, $content); // Crash on _second_
successful iteration
}
Expected result:
----------------
Two files placed on FTP-server successfully containing foo and bar
respectively.
Actual result:
--------------
First file writes fine. At second iteration file_put_contents causes
PHP to die.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50243&edit=1