cyllibi Posted December 15, 2011 Share Posted December 15, 2011 Hi, I'm new to Helio and I think it's a fantastic service. I'm also fairly new to php, css, javascript, and mysql so maybe/hopefully this is something easy. My site is on Johnny, my domain is primitiveelegance.heliohost.org. My username here and there is cyllibi. I scored a $1 domain through GoDaddy and already put it to use at primitiveelegance.com. I've run into an issue with uploading files to my site, which is a core part of what I'm wanting to set up (the site is being designed to ultimately be run by my mom) and hope I can find some help getting past it. Each time I try it, I run into a 500 error, and I welcome you to check it as well: http://primitiveeleg...com/additem.php This page is essentially the file upload script from http://www.zubrag.co...upload-form.php copy/pasted into my layout. I work on the site from my home computer before I upload it to Helio and it works fine for me at home. I apologize if this issue has already been addressed, I promise I scoured search results trying to find a fix or workaround to no success. Similar issues indicated .htaccess might be the culprit, but mine is just the default that came with the installation and pasted here in the interest of giving as much info as may be necessary: IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow allow from all </Limit> AuthName primitiveelegance.heliohost.org AuthUserFile /home/cyllibi/public_html/_vti_pvt/service.pwd Thank you for any assistance. ~cyllibi Quote Link to comment Share on other sites More sharing options...
Byron Posted December 15, 2011 Share Posted December 15, 2011 Destination folder does not exist or no permissions to see it. Did you go inside the php file of the upload script and modify the settings? Also did you create the upload folder? Quote Link to comment Share on other sites More sharing options...
cyllibi Posted December 15, 2011 Author Share Posted December 15, 2011 Yes, I've got an images folder created and these are the settings I put into the script: define('DESTINATION_FOLDER','images/'); define('MAX_FILE_SIZE', 0); define('SUCCESS_URL','additem2.php'); $exts = array(); define('RENAME_FILE', true); define('APPEND_STRING', ''); define('DO_LOG', false); Once the upload processes and it sends you to SUCCESS_URL, I also modified the 'do not modify' section just a little to pass the filename with it, but since removing it doesn't make it work, I don't think the issue is here:header('Location: ' . SUCCESS_URL . '?file=' . $dest_filename); ~cyllibi Quote Link to comment Share on other sites More sharing options...
Byron Posted December 15, 2011 Share Posted December 15, 2011 I'm seeing some image files in your images folder. Is the problem still a 500 error or is it that your browser isn't getting redirected to the image? Quote Link to comment Share on other sites More sharing options...
cyllibi Posted December 15, 2011 Author Share Posted December 15, 2011 Still a 500 error for me, the images in there both went through somehow last night using one of the virtual machines at my workplace and ie7, it still gave an error but not a 500 error. I thought it was ie7 having a problem with the form. I'll try to recreate it today. Quote Link to comment Share on other sites More sharing options...
Byron Posted December 15, 2011 Share Posted December 15, 2011 Since I'm not where I can trouble shoot your acript right now and it's really not our respnsibility to do so, you should probably ask your questions in the forum of the writer of the script: http://www.zubrag.com/forum/ Just make sure you don't have any problems uploading through the cpanel. You might want to check your Error Log at your cpanel for an explanation of the 500 error. Quote Link to comment Share on other sites More sharing options...
cyllibi Posted December 15, 2011 Author Share Posted December 15, 2011 I understand it's not your responsibility to fix it, so thank you for your input thus far. I'll keep trying stuff. Quote Link to comment Share on other sites More sharing options...
Byron Posted December 15, 2011 Share Posted December 15, 2011 Your script is working. I just now uploaded this image: http://primitiveelegance.com/images/e11f78c97e8c20f91361ae9f5cb3c49e.jpeg And the error your getting is this: Warning: Cannot modify header information - headers already sent by (output started at /home/cyllibi/public_html/additem.php:5) in /home/cyllibi/public_html/additem.php on line 243 You've edited the original script and that's why your getting that error. Quote Link to comment Share on other sites More sharing options...
Ice IT Support Posted December 16, 2011 Share Posted December 16, 2011 The script code is fine. The error is that headers must be sent BEFORE the <html> tag. PHP header() manual. Quote Link to comment Share on other sites More sharing options...
cyllibi Posted December 16, 2011 Author Share Posted December 16, 2011 OK, thanks again for the tips. I am happy to report that it is working satisfactorily for me now and ultimately, that's all I wanted I found a few things. After you guys identified the header error, I determined a quick (and dirty?) workaround by adding <?PHP ob_start();?> to the start of the file and then <?PHP ob_end_flush();?> to the end. I was still running into errors trying to upload a few test images but then realized the one byron used and the ones I accidentally pushed through at work were smaller than the ones I was testing from here at home. I did not think 450 kilobytes was large enough to cause an error, but then I sized the image down a bit and it went through quite easily. I was planning to size down my images a bit before sending them, so I'll just scale them down a little more and it will work just fine. Thanks again for the assistance, now I can stop banging my head and move on with my design ~cyllibi Quote Link to comment Share on other sites More sharing options...
Guest xaav Posted December 16, 2011 Share Posted December 16, 2011 Glad your question got answered! Please spare a few minutes to take our brief survey: http://feedback.heliohost.org/ Your participation in this survey is greatly appreciated. Quote Link to comment 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.