Warning:unable to open...

They have: 164 posts

Joined: Nov 2001

Hi, can anybody tell me what this warning means?

Warning: Unable to open 'C:\\My Documents\\Wallpaper\\Cute\\0160.jpg' for reading: No such file or directory in /usr/local/plesk/apache/vhosts/certifyexpress.com/httpdocs/test/template/admin.php on line 1317
'

i got this error when i tried to add a image. i tried this in localhost(my pc, not connected to server), and everything works fine. Then, i uploaded everything to the server and start testing. and i got this warning.

how can i solved it??

line 1317 of admin.php is:

<?php
copy
($re_image, $image);
?>

pls help...pls...

Confused

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

Check to make sure your form has:

They have: 164 posts

Joined: Nov 2001

after i added the enctype...i got this error:

Warning: open_basedir restriction in effect. File is in wrong directory in /usr/local/plesk/apache/vhosts/certifyexpress.com/httpdocs/test/template/admin.php on line 1317
'

wat this means? wat can i do?

They have: 601 posts

Joined: Nov 2001

Um, I'm not a PHP expert but it does sound like exactly that...

open_basedir restriction in effect
'

Check with your hosting provider what restrictions they have in effect, and if they would be willing to lift them for your domain and/or selected scripts?

- wil

They have: 164 posts

Joined: Nov 2001

any suggestion on wat should i do? asked the hosting provider to change? or change my code?

if change my code? how should i change??

my code:

<?php
$ext
= substr($re_image, -3, 3);
       
$path = \"../template/imga/\";
       
$filename = \"img\".$category_ID.\".\".$ext;
               
$image = $path.$filename;
                    
        copy(
$re_image, $image);
?>

They have: 601 posts

Joined: Nov 2001

Have you asked your hosting provider?

They have: 164 posts

Joined: Nov 2001

the openbase_dir are set to :

/usr/local/plesk/apache/vhosts/abc.com/httpdocs
'

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.