uknowho008 Posted May 7, 2007 Share Posted May 7, 2007 i set up a simple script to upload images to the server and put the file names into the mysql database for use on the site. and everything seems to work perfect. all files upload to the server and inputed to the database. but when you try to view the picture yahoo denies access to it. whats up with that? and how can i get around it without using ftp and manually putting everything in or using there stupid file manager and manually putting everything in? Link to comment https://forums.phpfreaks.com/topic/50332-yahoo-hosting-problems/ Share on other sites More sharing options...
chronister Posted May 7, 2007 Share Posted May 7, 2007 I don't use yahoo web hosting, so bear with the stupid questions Is the mysql_db supplied by yahoo? What are the error messages you are getting? Is the username / password correct? Can you post code or give a link Link to comment https://forums.phpfreaks.com/topic/50332-yahoo-hosting-problems/#findComment-247105 Share on other sites More sharing options...
uknowho008 Posted May 7, 2007 Author Share Posted May 7, 2007 codes simple and it works just fine. all the files make it to the server and database just fine. this is the error i get when i go to the picture url: http://screwballindustries.com/screwball/slide_images/slide_002.jpg but when im on the webpage it just gives you the red x box thing. http://screwballindustries.com/screwball/slide_images/ its in a javascript slidshow script by the way. but that all works just fine. The website declined to show this webpage HTTP 403 Most likely causes: This website requires you to log in. What you can try: Go back to the previous page. More information This error (HTTP 403 Forbidden) means that Internet Explorer was able to connect to the website, but it does not have permission to view the webpage. For more information about HTTP errors, see Help. heres the code anyways foreach ($_FILES["image"]["error"] as $key => $error) { if ($error == UPLOAD_ERR_OK) { $tmp_name = $_FILES["image"]["tmp_name"][$key]; $name = $_FILES["image"]["name"][$key]; move_uploaded_file($tmp_name, "slide_images/$name"); $insert_sql = " INSERT INTO SlideImages(URL) VALUES ('$name') "; mysql_query($insert_sql) or die("Bad query"); } } Link to comment https://forums.phpfreaks.com/topic/50332-yahoo-hosting-problems/#findComment-247112 Share on other sites More sharing options...
chronister Posted May 7, 2007 Share Posted May 7, 2007 permissions issue, you have to set proper permissions on that directory If you can use an ftp client, that will be pretty easy. If not, then I would try the php method of chmod chmod("/screwball/slide_images/filename.jpg", 0644); You may need to chmod each file that you upload this way. Hope this helps Link to comment https://forums.phpfreaks.com/topic/50332-yahoo-hosting-problems/#findComment-247117 Share on other sites More sharing options...
uknowho008 Posted May 7, 2007 Author Share Posted May 7, 2007 awesome! thanks a ton. Link to comment https://forums.phpfreaks.com/topic/50332-yahoo-hosting-problems/#findComment-247416 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.