gwood_25 Posted October 14, 2007 Share Posted October 14, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/73208-php-upload-script-problem/ Share on other sites More sharing options...
BlueSkyIS Posted October 14, 2007 Share Posted October 14, 2007 what are the permissions on the directory that holds the images and on the images themselves? Quote Link to comment https://forums.phpfreaks.com/topic/73208-php-upload-script-problem/#findComment-369335 Share on other sites More sharing options...
gwood_25 Posted October 14, 2007 Author Share Posted October 14, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/73208-php-upload-script-problem/#findComment-369345 Share on other sites More sharing options...
BlueSkyIS Posted October 14, 2007 Share Posted October 14, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/73208-php-upload-script-problem/#findComment-369347 Share on other sites More sharing options...
gwood_25 Posted October 14, 2007 Author Share Posted October 14, 2007 yes I can see the file in yahoo's file manager. However, attempting to view the file give the "unauthorized" error message. Quote Link to comment https://forums.phpfreaks.com/topic/73208-php-upload-script-problem/#findComment-369351 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.