Jump to content

Chmoding Images


Guest rpvc

Recommended Posts

Something strange is happening when trying to upload a new category image.

The image gets transferred to the server but it cannot be seen as it gives me an X. The fact is that the image is there as I can see it in the folder in ftp and in MySql. Other images I have uploaded in the past are visible so there are no problems with the PHP script.

However when I check if the images folder is chmoded it tells me is 644. When I make it 777 it will stay like that until I get log out of ftp. When I go back it has gone back to 644. Furthermore new uploaded images can be seen if I chmod them individually to 777.

I am lost as I have uploaded a number of carts but this had never occured.

I hope someone can help me.

Rick

Link to comment
Share on other sites

How are you uploading the image, through FTP or through the admin section?

If your using FTP, I think you may be uploading as text as opposed to binary.

Link to comment
Share on other sites

I am uploading through the administration setting which does upoload as per normal.

I have just noticed that when I try to URL view the picture I have just uploaded I get the following message :

--------------------------------------------------------------------------------------------

Sorry, www.premiercomputer.biz/2005/images/SDMHS74B.jpg is unavailable.

403 Forbidden by Web Configuration

Webmasters - check your file/firectory permissions

PowWeb Hosting offers 5Gb of BandWidth a Day!

--------------------------------------------------------------------------------------------

However if i chmod the image individually than I can view the image as per normal.

I am even more lost

Link to comment
Share on other sites

What permissions are your images set to when you upload them? Are they 644? The images directory does not seem to be the problem, as you are able to upload the images to the folder.

If your images are not chmod 644, try this as a fix:

Open your admin/add_product.php file and find:

  $res = move_uploaded_file($userfile, $path . $userfile_name);}




Directly below that line, add:




  chmod($path . $userfile_name,0644);

Open your admin/edit_product.php file and do the same thing.

(I'm not sure of the line numbers, as my files are already modded.)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...