Bug #51433 [Fbk->NoF]: file_put_contents() doesn't overwrites a existent file
| From: | php-bugs at lists dot php dot net | Date: | Mon, 18 Feb 2013 00:34:11 +0000 |
| Subject: | Bug #51433 [Fbk->NoF]: file_put_contents() doesn't overwrites a existent file | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-176821@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=51433&edit=1
ID: 51433
Updated by: php-bugs@lists.php.net
Reported by: ggens at gmail dot com
Summary: file_put_contents() doesn't overwrites a existent file
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Filesystem function related
Operating System: Windows XP SP3
PHP Version: 5.3.2
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2010-03-30 15:07:16] imaggens at gmail dot com
Well, the CLI results:
== Begin CLI Code ==
<?php
ini_set( 'display_errors', TRUE );
error_reporting( E_ALL | E_STRICT );
$path = 'C:\Arquivos de
programas\Zend\Apache2\htdocs\ca\library\Insight\FileSystem\File\Adapter/PHP/Templates\CLASS';
$file = 'C:\Arquivos de programas\Zend\Apache2\htdocs\ca\users\Insight\test.php';
file_put_contents( $file, file_get_contents( $path ) );
?>
== End CLI Code ==
Results
=======
When the file in $file doesn't exist, the file is created succesfully.
When the file already exist, no matter how many times I run the code under CLI, the content of file
doesn't changes.
Expected Results
================
Content of file updated.
Extra Information
=================
The presence of two types of slashes doesn't affects the result. Even I replace all
'/' by '\' (Windows Slash) the results are the same.
------------------------------------------------------------------------
[2010-03-30 13:59:05] pajoye@php.net
And enable the error_reporting and show error as well, as I'm pretty sure you get a nice error
message (permissions or stmg like that). Alternatively check your error log.
If you don't how to do it, please go to the Zend support forums or to the PHP general mailing
list.
------------------------------------------------------------------------
[2010-03-30 13:57:56] pajoye@php.net
Open a console:
cd c:\where\is\php
php.exe yourscript.php
------------------------------------------------------------------------
[2010-03-30 13:42:23] imaggens at gmail dot com
I don't know how to use CLI, and it's not a Zend Server problem.
------------------------------------------------------------------------
[2010-03-30 13:34:40] johannes@php.net
And please use our PHP builds. For support for Zend Server please got to Zend.
------------------------------------------------------------------------
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=51433
--
Edit this bug report at https://bugs.php.net/bug.php?id=51433&edit=1