php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14475 unlink($PHP_SELF) cause strange message
Submitted: 2001-12-12 19:45 UTC Modified: 2001-12-13 19:53 UTC
From: jj at thecloud dot org Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.0.6 OS: Linux Slackware and Cobalt Raq4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jj at thecloud dot org
New email:
PHP Version: OS:

 

 [2001-12-12 19:45 UTC] jj at thecloud dot org
I've tryed to unlink the self .php file with:
unlink($PHP_SELF);

and got this warning:
Warning: Failed opening '/home/sites/site4/web/uff.php' for inclusion (include_path='') in Unknown on line 0

Obviously:
1) the file name was uff.php placed in the path '/home/sites/site4/web/
2) The page had no "include" statements.

uff.php
-------
<?php
 if ($login!="hello"){ exit("Hello"); }
?>
Hello Word
<?php
unlink($PHP_SELF);
?>

Byez

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-13 06:18 UTC] sander@php.net
This error is probably caused by incorrect permission. Check if your webserver has READ access to the file. If not, PHP can't open the file to parse it and it will die with this message. Reopen if this is not the case.
 [2001-12-13 19:52 UTC] jj at thecloud dot org
chmod 777 uff.php then it gives the same error.
Infact I wouldn't suggest for a bug if I wasn't sure the permissions where correctly set.
However, even if permissions were not correclt set, the error message should have been different.

Ciao
Julien
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jun 22 15:01:24 2021 UTC