...

View Full Version : rename not renaming files.



jasonpc1
06-17-2010, 06:22 PM
Unable to rename my files.

this is the error i get.



Warning: rename("/photos/7d5559ba623135639b055f4de96187cd.jpg","/photos/old.jpg") [function.rename]: No such file or directory in


i have tried both...

/home/site/public_html/photos/

and just the photos folder but none work.

how do i correctly change the name of the file?

i have set permissions of the folder photos to 0777

Jazz914
06-17-2010, 06:28 PM
The file doesn't exist at the location being stated, try placing the file in the root directory and then try renaming the script. (To verify that its not a code problem).

jasonpc1
06-17-2010, 07:37 PM
The file doesn't exist at the location being stated, try placing the file in the root directory and then try renaming the script. (To verify that its not a code problem).

strange as i view the page of the full path shown on screen and the photo shows in the browser?

eu4ria
06-17-2010, 09:25 PM
Files on a server are part of the file system and so maybe in different folders to the files on the webserver which are relative to the webroot.

Rowsdower!
06-17-2010, 10:29 PM
Unable to rename my files.

this is the error i get.



Warning: rename("/photos/7d5559ba623135639b055f4de96187cd.jpg","/photos/old.jpg") [function.rename]: No such file or directory in


i have tried both...

/home/site/public_html/photos/

and just the photos folder but none work.

how do i correctly change the name of the file?

i have set permissions of the folder photos to 0777

Are you certain that there is no other folder between the www root (public_html) and the photos folder? If, for example, you have a hosting account with multiple domain names and/or subdomains you might have each site in a different folder.

Jazz914
06-18-2010, 09:57 AM
Create a php file in the photos folder and add the following code:

<?php echo($_SERVER['SCRIPT_FILENAME']); ?>

and tell us what you get, or adjust your folder link as demonstrated ^_^



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum