Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Can't rename

by b10m (Vicar)
on Mar 18, 2004 at 10:10 UTC ( [id://337650]=note: print w/replies, xml ) Need Help??


in reply to Can't rename

In case you have no clue why something doesn't work, just add debug print statements everywhere, so you can see what is the problem.

My guesses are: file1.htm is not in $ENV{DOCUMENT_ROOT}, or your webdaemon user (apache, www, nobody...) doesn't have sufficient rights to write to $ENV{DOCUMENT_ROOT}

Besides that, you can also skip the chdir() command and try it with the use of full path names in the rename() command. Something like:

$a = "$ENV{DOCUMENT_ROOT}/file1.htm"; $b = "$ENV{DOCUMENT_ROOT}/file2.htm"; rename($a, $b) || die "Uh oh, can't rename: $!";
--
b10m

All code is usually tested, but rarely trusted.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://337650]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-19 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found