Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New Coder
    Join Date
    Jan 2003
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    php coding problem - dun understand error

    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

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    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

    PHP Code:
    rename("file.jpg","filechanged.jpg"); 
    Use quotes

  • #3
    New Coder
    Join Date
    Jan 2003
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Attached Files Attached Files

  • #4
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    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

  • #5
    New Coder
    Join Date
    Jan 2003
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is my admin setting.php file

    define('IN_CP', 1);
    define('ROOT_PATH', './../');
    require('admin_global.php');

    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?

  • #6
    New Coder
    Join Date
    Jan 2003
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #7
    Regular Coder
    Join Date
    Feb 2003
    Location
    East Side/West Side
    Posts
    118
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Perhaps you should make the file you want to rename?

  • #8
    New Coder
    Join Date
    Jan 2003
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The file is already there ... but it seems that it cannot find it .. dunno why ...

  • #9
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    You need to somehow get rid of the ./

  • #10
    Regular Coder
    Join Date
    Feb 2003
    Location
    East Side/West Side
    Posts
    118
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •