View Full Version : php coding problem - dun understand error

02-27-2003, 07:59 PM
Warning: rename(./data/media/1/guides.jpg,./data/media/1/guides.jpg.shd) [function.rename]: No such file or directory in /home/virtual/site178/fst/var/www/html/4images/includes/annotate.php on line 65

I am using 4 images and wanted to use watermark - but I got this problem .. can anyone figure out what the error means? In layman terms .. dun understnad what the error is talking about

02-27-2003, 08:36 PM
Means that you have rename's directories wrong or you have rename wrong.

By the looks of it, you have rename wrong, it should be


Use quotes

02-27-2003, 09:37 PM
Hi, where would I add the quotes in? I have attached the changes that need to be done to add the mod in to 4images ... could you have a look and advice me on it cause I know nuts about php

02-27-2003, 11:53 PM
Maybe you have the directory path wrong? Try taking the ./ away from your path in whatever file it is that holds that info, which I assume would be the admin/settings.php file

02-28-2003, 02:04 AM
This is my admin setting.php file

define('IN_CP', 1);
define('ROOT_PATH', './../');

if ( $action == "") {
$action = "modifysettings";

function show_template_dir_select($setting_name, $setting_value) {
echo "<select name=\"setting_item[".$setting_name."]\">";
$handle = opendir(ROOT_PATH.TEMPLATE_DIR);
while ($folder = @readdir($handle)) {
if (@is_dir(ROOT_PATH.TEMPLATE_DIR."/".$folder) && $folder != "." && $folder != "..") {
$folderlist[] = $folder;

do I chg my define('root_path' .......

but what will I put in place?

02-28-2003, 02:11 AM
Even when I try editing my admin/settings.php file to
define('ROOT_PATH', '/home/virtual/site178/fst/var/www/html/4images/');

I still get this error.... where is the ./../../ define in the first place.... :(

Processing image asdfasdf from category SgCarLink Picture Highlights, image ID 28 >>
Warning: rename(./../../data/media/1/rgs3.jpg,./../../data/media/1/rgs3.jpg.shd) [function.rename]: No such file or directory in /home/virtual/site178/fst/var/www/html/4images/admin/plugins/batch_annotate.php on line 105

02-28-2003, 03:01 AM
Perhaps you should make the file you want to rename?

02-28-2003, 12:57 PM
The file is already there ... but it seems that it cannot find it .. dunno why ...

02-28-2003, 06:46 PM
You need to somehow get rid of the ./

03-01-2003, 05:03 AM
Path's wrong in some way, that's about all there is to it. Look at your code and, by all of your ./'s and ../'s, figure out the path it's looking for