php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43511 unlink() gives "No error in..." warning
Submitted: 2007-12-06 07:42 UTC Modified: 2013-02-18 00:33 UTC
Votes:41
Avg. Score:4.3 ± 1.0
Reproduced:37 of 38 (97.4%)
Same Version:18 (48.6%)
Same OS:35 (94.6%)
From: marius dot radvan at yahoo dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5.2.5 OS: windows
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-12-06 07:42 UTC] marius dot radvan at yahoo dot com
Description:
------------
Warning: unlink() [function.unlink]: No error in C:\Program Files\VertrigoServ\www\peluza.info\poze.php 
i get this non error warning

Reproduce code:
---------------
 if (($pext != "jpg")  && ($pext != "jpeg")) {
  unlink($_FILES['img']['tmp_name']);
?>

Expected result:
----------------
delete temp file

Actual result:
--------------
it shows me that warning

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-15 01:00 UTC] 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-12-22 01:36 UTC] admin at beyondmaster dot com
I got the same error even trying to set chmod to 0777
chmod() [function.chmod]: No error in ... on line 34

Warning: unlink() [function.unlink]: No error in ...
 [2010-08-10 22:42 UTC] calicojack at gmail dot com
Getting this as of PHP Version 5.2.9-2 on Windows Server 2008. 

     
if(ftp_put($connection, $dest, $source,FTP_ASCII)){ 
	echo 'FTP Upload SUCCESS!';
	ftp_close($connection); 
	unlink($source);
}
 [2010-09-01 23:46 UTC] wytsep at hotmail dot com
I got this when I uploaded a file which exceeded the maximum file size which was defined in HTML like this:

<input type="hidden" name="MAX_FILE_SIZE" value="50000">

After removing the tag it worked.

(PHP version 5.3.0)
 [2011-02-17 11:57 UTC] gheos at 24 dot fi
I try to rename .lnk files and get this no error bug.
I also get it if I try to copy them......
 [2011-02-17 12:01 UTC] pajoye@php.net
-Status: No Feedback +Status: Feedback
 [2011-02-17 12:01 UTC] pajoye@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.

Without any dep, uploaded files or not do not affect the way unlink work. But 
temporary files during the processing of uploaded files may cause this error, but 
that's not a bug.
 [2011-04-05 23:21 UTC] sendspampl0x at live dot de
I am not sure if this is what fixed the bug in the end, but I used:

if(is_file("$del_path")){
	unlink($del_path);
}

Instead of:

unlink($del_path);

I changed a few other things as well, so I am really not sure what fixed it in the end. I thought I would share though in case it might help.
 [2013-02-18 00:33 UTC] php-bugs at lists dot php dot net
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.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Jan 29 07:03:34 2022 UTC