Upload php error

When trying to upload an image onto the grid in my website I receive this error message. I’ve no idea what it means or how to correct the fault. Can anyone advise immediately as its been happening for 2 weeks!

Warning: move_uploaded_file(adverts/3276e7191e11a9d5207fc1604a10d96djpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/artscraf/public_html/upload.php on line 29

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move ‘/tmp/phpG7cwzJ’ to ‘adverts/3276e7191e11a9d5207fc1604a10d96djpg’ in /home/artscraf/public_html/upload.php on line 29

Are your files in the right folder? The web pages should reside inside “yourdomain.com” folder. I don’t know how you access the php file. But I think the path should be something like /home/artscraft/yourdomain.com/yourfolder/yourfile

not sure about that. If your files are in the right folder, you can want to try these codes to set the upload folder.

$uploadFolder=getcwd()."/upload/"; //this is the folder where the uploaded images reside

Save [color=#CC0000]$97[/color] (max discount) on dreamhost plans by using promo code: [color=#CC0000]97CRAZY[/color]. Sign Up NOW

Hi, Thanks for your reply but I’m really computer illiterate. Could you put it into a, b, c, step by step instructions as I don’t want to damage any of the scripting. Thanks

first, make sure that your files are inside “yourdomain.com” folder.

second, you can try these codes.


if (file_exists($_FILES[“file”][“name”])){
echo $_FILES[“file”][“name”]." already exists.";
move_uploaded_file($_FILES[“file”][“tmp_name”], [color=#0000CC]$uploadFolder[/color].$_FILES[“file”][“name”]);
echo "Stored in: ".[color=#0000CC]$uploadFolder[/color].$_FILES[“file”][“name”];

hope it helps.

Save [color=#CC0000]$97[/color] (max discount) on dreamhost plans by using promo code: [color=#CC0000]97CRAZY[/color]. Sign Up NOW

Thanks for the reply but where do I put the codes you’ve suggested? I did say I was computer illiterate (and probably can’t spell!!)

Going back to your original problem for a second…

What scripts/application are you using to upload the images?

Is the problem occurring with all images or only some images?

How large are the images? The default DreamHost PHP installs limit PHP uploads to around 7Mbyte.

Has the problem always occurred, or were things working correctly until recently?


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)

I’m not sure what the script/ application is I’m using.

The images that are already on the grid are fine but any new ones I try to place I get the error message from before.

Most images are fairly small - the largest is 10k - about 300 x 200 pixels.

The problem has only started recently - begining of February 2007.

We have compared our original script to a new script for an identical site and there doesn’t seem to be anything obvious wrong with it. Could it be that the host has blocked the images being uploaded for some reasons i.e security. The host is not responding to any of our emails either which rings alarm bells straight away.

If things were working previously, then just stopped working without you having made any changes to your site, then I suggest you contact support via the support section of the admin panel and explain the situation.

You are hosted with DreamHost right?


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)

If the problem happens recently, nothing is wrong with the script.

You may want to checke whether anybody modified the code. Another thing, can you check the codes, there is a missing fullstop between the file name and extension name.

Save [color=#CC0000]$97[/color] (max discount) with [color=#CC0000]97CRAZY[/color]; Save [color=#CC0000]$82[/color] get lifetime domain with [color=#CC0000]82CRAZY[/color]. Sign Up NOW