Jump to content

Failing to open stream uploading an image via browser upload


frank9310

Recommended Posts

Please help. I'm getting the following error. If I submit a listing without uploading an image, it works fine, but if I do attempt to upload one, I get the below error. I tried changing the permissions on the file, the cars_images folder etc. The AddOffer.php page works:

 

Error upon submit after including image to upload:

 

Warning: copy(../cars_images/1346168202_offer_1966mustagc1082712.jpg): failed to open stream: Permission denied in /home/www/classiccarsbyfp/manager/AddOffer.php on line 16

 

Warning: Cannot modify header information - headers already sent by (output started at /home/www/classiccarsbyfp/manager/AddOffer.php:16) in /home/www/classiccarsbyfp/manager/AddOffer.php on line 48

 

Here is the code written on the AddOffer.php page from the above errors:

Lines 15&16

$NewImageName = $t."_offer_".$value;

copy($_FILES[images][tmp_name][$key], "../cars_images/".$NewImageName);

 

Line 48

header("location:info.php?id=$last")

Read-Write on owners

Read-Write-Execute groups

Read-Execute on public

 

Also, the folder where the page is located that is attempting to add the listing is also the same as above and all pages insides that same folder e.g. AddOffer.php is set to 777

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.