szkrin Posted December 10, 2014 Share Posted December 10, 2014 Hello. I have one problem with my prestashop 1.5.4.1. When i try to upload picture to my product i receive 'undefined' error. In console i've got 'Failed to load resource: the server responded with a status of 500 (Internal Server Error)' When i tried to upload it again it worked. With other pictures it didn't go such well - i wasn't able to upload them no matter how many times i tried. I changed 'fileuploader.js' but it didn't help. Is anyone able to help me with this problem? Regards. Link to comment Share on other sites More sharing options...
tomerg3 Posted December 10, 2014 Share Posted December 10, 2014 Generally error 500 indicates an out of memory or permissions issue. Were those images very big? Do you have access to the main server error log to find out the exact error (as 500 is a generic error) Link to comment Share on other sites More sharing options...
szkrin Posted December 11, 2014 Author Share Posted December 11, 2014 They had about 1.4MB. I checked again and I can see them added but they aren't visible. There is question mark instead of miniature. Error log is clear in my panel. Link to comment Share on other sites More sharing options...
tomerg3 Posted December 11, 2014 Share Posted December 11, 2014 How many pixels? Does it work with smaller images? (500x500) Link to comment Share on other sites More sharing options...
szkrin Posted December 12, 2014 Author Share Posted December 12, 2014 Thanks for your reply. Your suggestion was right - uploading smaller images (640 x 480 f.ex). works after 2 tries. But when i try to upload sth big it doesn't work. I guess that I can change this limit in some config file. Mostly I would like to solve this double-uploading error. Do you have any suggestion? Link to comment Share on other sites More sharing options...
tomerg3 Posted December 12, 2014 Share Posted December 12, 2014 What double image issue? Increase your ram and the issue should be gone Link to comment Share on other sites More sharing options...
szkrin Posted December 15, 2014 Author Share Posted December 15, 2014 By double image issue i meant that i have to upload every image 2 times. Firstly i get 'undefined' error and then when I try to update the same image again it works. Link to comment Share on other sites More sharing options...
tomerg3 Posted December 15, 2014 Share Posted December 15, 2014 Does that happen also for small images? Link to comment Share on other sites More sharing options...
szkrin Posted December 16, 2014 Author Share Posted December 16, 2014 Yes it does. Link to comment Share on other sites More sharing options...
tomerg3 Posted December 16, 2014 Share Posted December 16, 2014 Try opening the browser error console, and see if there are any errors showing Link to comment Share on other sites More sharing options...
szkrin Posted December 17, 2014 Author Share Posted December 17, 2014 http://scr.hu/3z77/p9hpv Link to comment Share on other sites More sharing options...
tomerg3 Posted December 18, 2014 Share Posted December 18, 2014 Looks like an error, you may need to check the main server error log to find out the exact cause. The most common is out of memory. Link to comment Share on other sites More sharing options...
szkrin Posted December 22, 2014 Author Share Posted December 22, 2014 Error log is clear. ini_set("memory_limit","256M"); doesn't help as well. Link to comment Share on other sites More sharing options...
tomerg3 Posted December 22, 2014 Share Posted December 22, 2014 You need to check the main Apache error log, it always has more info about error 500. Just because you use ini_set() doesn't mean your server is set to accept user defined values for it. Link to comment Share on other sites More sharing options...
szkrin Posted January 30, 2015 Author Share Posted January 30, 2015 I returned to prestashop after 'some' time. I Tried to fix this problem manualy, I asked some friends but noone was able to help me. Last time you asked for logs, so here theye are: [28/Jan/2015:12:05:59 +0100] "GET /admin321/ajax-tab.php?id_product=4166&id_category=0&token=ab71b6dce85c4141537dbce24a8d265f&tab=AdminProducts&action=addImage&ajax=1&qqfile=10859758_752398274829100_1508575172_n.jpg HTTP/1.1" 500 - "http://example.com/admin321/index.php?controller=AdminProducts&id_product=4166&updateproduct&token=ab71b6dce85c4141537dbce24a8d265f" "Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36" 94.249.147.76 - - [28/Jan/2015:12:05:54 +0100] "GET /img/p/3/5/6/4/3564-small_default.jpg HTTP/1.1" 200 1534 "http://example.com/admin321/index.php?controller=AdminProducts&id_product=4166&updateproduct&token=ab71b6dce85c4141537dbce24a8d265f" "Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36" 94.249.147.76 - - - [28/Jan/2015:12:05:50 +0100] "GET /admin321/ajax-tab.php?id_product=4166&id_category=0&token=ab71b6dce85c4141537dbce24a8d265f&tab=AdminProducts&action=addImage&ajax=1&qqfile=10922792_770871722981755_3411772313965864367_n.jpg HTTP/1.1" 500 - "http://example.com/admin321/index.php?controller=AdminProducts&id_product=4166&updateproduct&token=ab71b6dce85c4141537dbce24a8d265f" "Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36" 94.249.147.76 - - I also incrased memory limit in my cpanel to 512 MB. I have no idea why this problem still occurs. Could you tryto help me again please? Link to comment Share on other sites More sharing options...
tomerg3 Posted January 30, 2015 Share Posted January 30, 2015 This looks like an access log rather than error log Link to comment Share on other sites More sharing options...
szkrin Posted February 2, 2015 Author Share Posted February 2, 2015 [28-Jan-2015 12:12:50 ] PHP Notice: Undefined index: homeSize in /cache/smarty/compile/cd/f1/94/cdf19401eeab84972ec7df180f2f18e74fb63eee.file.blocknewproducts.tpl.php on line 57[28-Jan-2015 12:12:50 ] PHP Notice: Trying to get property of non-object in /cache/smarty/compile/cd/f1/94/cdf19401eeab84972ec7df180f2f18e74fb63eee.file.blocknewproducts.tpl.php on line 57[28-Jan-2015 12:12:50 ] PHP Notice: Undefined index: homeSize in /cache/smarty/compile/cd/f1/94/cdf19401eeab84972ec7df180f2f18e74fb63eee.file.blocknewproducts.tpl.php on line 58[28-Jan-2015 12:12:50 ] PHP Notice: Trying to get property of non-object in /cache/smarty/compile/cd/f1/94/cdf19401eeab84972ec7df180f2f18e74fb63eee.file.blocknewproducts.tpl.php on line 58[28-Jan-2015 12:12:50 ] PHP Notice: Undefined index: produkt in /cache/smarty/compile/d1/52/f2/d152f2eda4a984f7f844bc451283765f4a94a46d.file.product.tpl.php on line 420[28-Jan-2015 12:12:50 ] PHP Notice: Trying to get property of non-object in /home/wodnafaj/bongs.pl/cache/smarty/compile/d1/52/f2/d152f2eda4a984f7f844bc451283765f4a94a46d.file.product.tpl.php on line 420[28-Jan-2015 12:12:50 ] PHP Notice: Undefined index: produkt in /home/wodnafaj/bongs.pl/cache/smarty/compile/d1/52/f2/d152f2eda4a984f7f844bc451283765f4a94a46d.file.product.tpl.php on line 421[28-Jan-2015 12:12:50 ] PHP Notice: Trying to get property of non-object in /cache/smarty/compile/d1/52/f2/d152f2eda4a984f7f844bc451283765f4a94a46d.file.product.tpl.php on line 421 Maybe this one then? Link to comment Share on other sites More sharing options...
tomerg3 Posted February 2, 2015 Share Posted February 2, 2015 Those seem to be related to the front end Link to comment Share on other sites More sharing options...
szkrin Posted February 3, 2015 Author Share Posted February 3, 2015 [03-Feb-2015 10:33:29 Europe/Warsaw] PHP Fatal error: Uncaught exception 'Exception' with message 'Getting content length is not supported.' in /home/wodnafaj/bongs.pl/classes/FileUploader.php:245Stack trace:#0 /home/wodnafaj/bongs.pl/classes/FileUploader.php(69): QqUploadedFileXhr->getSize()#1 /home/wodnafaj/bongs.pl/controllers/admin/AdminProductsController.php(1302): FileUploaderCore->handleUpload()#2 /home/wodnafaj/bongs.pl/classes/controller/AdminController.php(522): AdminProductsControllerCore->ajaxProcessAddImage()#3 /home/wodnafaj/bongs.pl/controllers/admin/AdminProductsController.php(1251): AdminControllerCore->postProcess()#4 /home/wodnafaj/bongs.pl/classes/controller/Controller.php(158): AdminProductsControllerCore->postProcess()#5 /home/wodnafaj/bongs.pl/classes/Dispatcher.php(349): ControllerCore->run()#6 /home/wodnafaj/bongs.pl/admin321/ajax-tab.php(41): DispatcherCore->dispatch()#7 {main}thrown in /home/wodnafaj/bongs.pl/classes/FileUploader.php on line 245 public function getSize() { if (isset($_SERVER['CONTENT_LENGTH'])) return (int)$_SERVER['CONTENT_LENGTH']; else throw new Exception('Getting content length is not supported.'); }I checked variable $_SERVER['CONTENT_LENGTH'] and it's set to 0. Link to comment Share on other sites More sharing options...
tomerg3 Posted February 3, 2015 Share Posted February 3, 2015 Seems like we're getting closer, a quick google search ("CONTENT_LENGTH") came up with http://stackoverflow.com/questions/3664502/servercontent-length-returning-zero-when-uploading-a-file-using-xmlhttpreq Try that, or keep searching for a similar thread / solution Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now