ericp Posted August 9, 2013 Share Posted August 9, 2013 Hi there, Can you help me with the script 19.2. please? The problem is that though I uploaded the size-allowed image to uploads folder, which is in the same directory as add_print.php file, but it failed and the error message says 'No file was uploaded.' . You can test it here (http://hiteachers.com/add_print.php) Note: As the uploads folder is on the same level as the add_print.php, and I don't create the admin folder either, I change the paths for $temp from '../../uploads/' . md5($_FILES['image']['name']); to $temp = './uploads/' . md5($_FILES['image']['name']); and for rename from ($temp, "../../uploads/$id"); to rename ($temp, "./uploads/$id"); Is it the cause of the problem or what else? Thanks for your help in advance. Regards, Ericp Link to comment Share on other sites More sharing options...
Larry Posted August 10, 2013 Share Posted August 10, 2013 The book whose forum you've posted in doesn't have a Chapter 19. Also, is this the same issue that you're discussing in TWO other threads? Link to comment Share on other sites More sharing options...
ericp Posted August 10, 2013 Author Share Posted August 10, 2013 Sorry, but the name of the book i am discussing about is PHP and MYSQL for Dynamic web sites, 4th Edition, Copyright © 2012 by Larry Ullman. So, can you help me move this topic to the appropriate book's forum, please? Thanks and regards, Ericp Link to comment Share on other sites More sharing options...
ericp Posted August 12, 2013 Author Share Posted August 12, 2013 I successfully configured this already. The problem was at godaddy server. If you guys out there use Godaddy sharing hosting plan (Linux), you need to create a php5.ini file with the code to reset the upload_tmp_dir to /tmp value instead of No Value by default. the code is upload_tmp_dir = /tmp 1 Link to comment Share on other sites More sharing options...
Larry Posted August 12, 2013 Share Posted August 12, 2013 Kudos for figuring it out and thanks for sharing what you learned. That being said, this surprises me some, as I thought PHP would use the /tmp directory automatically if no value is set. But perhaps GoDaddy has its servers configured differently. Link to comment Share on other sites More sharing options...
Recommended Posts