Jump to content

Recommended Posts

Hello, I have a php upload script that stores a reference to an image in a mysql database and uploads the image to a specified directory. I am hosting a site on yahoo and the script uploads the image successfully and stores the appropriate data in the database without a problem. However, when I go to view the image, i get an "unauthorized" error returned from the webserver. If I upload an image with yahoo's online file manager, I have no problems. Forcing users to use the yahoo file manager is not acceptable. Yahoo is blaming my script stating that my script is the problem. If that is true, what could the problem with the script be? I personally think this is a permissions issue on their side. Any advice would be greatly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/73208-php-upload-script-problem/
Share on other sites

That's the problem. I cannot see them. This site is being hosted on yahoo and using their file manager the only thing i can see is that the folder is a public folder. Also, I have uploaded images with the same script on multiple client machines running different OS's (vista, xp, mac os 10.x) and get the same result. I am suspecting that this is a yahoo problem that I would not have access to change even if I wanted to. Also, they are blaming the script for not setting the appropriate permissions? I don't get that. How unsecure would that be if a script was allowed to change permissions for a file or directory? Can I safely assume that if my script is putting the files where they are supposed to and successfully writing to the db that my script is not the problem? Again, thank you for your help.

Can I safely assume that if my script is putting the files where they are supposed to and successfully writing to the db that my script is not the problem?

 

No, not necessarily.

 

There are PHP functions to set permissions on files. After your script uploads an image, can you see the image in Yahoo's file manager?

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

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.