|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-05-18 16:19 UTC] a dot eibach at gmx dot net
Hi.
I can see this has been discussed multiple times in this forum: however, there's no real solution for it, it seems.
First my specs:
- Apache 1.3.27 (<- could that be it?)
- PHP 4.3.2 RC3 (PHP running as a *module* (dll))
- Win2k
I scanned the news groups about this problem, where lots of people claimed this to work. However, even such a simple script here:
<?php
if (!is_dir("thisisatest"))
{
mkdir ("thisisatest");
}
else echo "Dir creation skipped. Dir already exists.";
echo "Waiting ...";
sleep(3);
echo "done.";
unlink ("thisisatest");
?>
fails on my system with a Permission denied error.
Tips to 'chmod' the current directory are fruitless, because this is WINDOWS and not UNIX and there are no permissions like this.
I do not intend to use OS-specific stuff like 'del' or 'rm', combined with the system() command.
I also tested with PHP 4.0.6 and also failed.
Warning: Unlink failed (Permission denied) in d:\devel\www\apache\apache\htdocs\testme.php on line 14
I'd be happy if you could help me with this and/or fix this problem with Windows systems.
Some php ML entry told about this being fixed shortly after 4.0.x, but this might as well have been another issue.
Thanks.
-ae-
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Mon May 25 06:00:01 2026 UTC |
YES! And I just figured it out! As I said "I wanted to keep it simple". The whole stuff happened in a if ($newdirhandle = @opendir($newdirname)) { ... } construct, and *THAT* was causing the problem. You **must** do a closedir() _BEFORE_ doing this renaming stuff because you're blocking everything otherwise. Frankly, I thought these two could interact independently of each other, but in fact, they're working closely together. Anyway, thanks for your reactions. -ae-