cdaniel.marques Posted July 26, 2013 Share Posted July 26, 2013 Hello everyone, I have one site running on version 1.3.6, and i'm having trouble upload product images since a while. What happens is, when i search one image and click save, shows no error, just an empty page. In FTP folder the image does not appear. Any help, or direction for what i can do. Thanks! Link to comment Share on other sites More sharing options...
vekia Posted July 26, 2013 Share Posted July 26, 2013 empty page? you mean white blank page? Link to comment Share on other sites More sharing options...
cdaniel.marques Posted July 26, 2013 Author Share Posted July 26, 2013 (edited) Empty Like So: http://imageshack.us/a/img13/5413/kc0h.jpg Preview Page (with no image) http://img706.imageshack.us/img706/2514/g8wu.png Edited July 26, 2013 by cdaniel.marques (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted July 26, 2013 Share Posted July 26, 2013 okay so it mean that you've got some parse script error related to the php in this case i suggest you to run store under debug mode, just turn error reporting, then you will probably see some errors instead "blank" page 1 Link to comment Share on other sites More sharing options...
cdaniel.marques Posted July 26, 2013 Author Share Posted July 26, 2013 I will try, and let you know. Thanks in advance. Link to comment Share on other sites More sharing options...
cdaniel.marques Posted July 26, 2013 Author Share Posted July 26, 2013 (edited) The error: exec() has been disabled for security reasons in /home/xxxxx/public_html/onlineshop/images.inc.php on line 90 Tried changing the permissions of images.inc.php to 777, without sucess Here's Line 90 is: $mimeType = trim(exec('file -b --mime-type '.escapeshellarg($file['tmp_name']))); Lines 78 to 97: /* Try 4 different methods to determine the mime type */ if (function_exists('finfo_open')) { $const = defined('FILEINFO_MIME_TYPE') ? FILEINFO_MIME_TYPE : FILEINFO_MIME; $finfo = finfo_open($const); $mimeType = finfo_file($finfo, $file['tmp_name']); finfo_close($finfo); } elseif (function_exists('mime_content_type')) $mimeType = mime_content_type($file['tmp_name']); elseif (function_exists('exec')) { $mimeType = trim(exec('file -b --mime-type '.escapeshellarg($file['tmp_name']))); if (!$mimeType) $mimeType = trim(exec('file --mime '.escapeshellarg($file['tmp_name']))); if (!$mimeType) $mimeType = trim(exec('file -bi '.escapeshellarg($file['tmp_name']))); } if (empty($mimeType) OR $mimeType == 'regular file') $mimeType = $file['type']; Edited July 26, 2013 by cdaniel.marques (see edit history) Link to comment Share on other sites More sharing options...
tomerg3 Posted July 26, 2013 Share Posted July 26, 2013 Looks like exec() function was disabled on your server, in such cases, it's unlikely the host will enable it. Try deleting the following part of the code elseif (function_exists('exec')) { $mimeType = trim(exec('file -b --mime-type '.escapeshellarg($file['tmp_name']))); if (!$mimeType) $mimeType = trim(exec('file --mime '.escapeshellarg($file['tmp_name']))); if (!$mimeType) $mimeType = trim(exec('file -bi '.escapeshellarg($file['tmp_name']))); } Link to comment Share on other sites More sharing options...
cdaniel.marques Posted July 26, 2013 Author Share Posted July 26, 2013 It worked, problem solved Thanks! 1 Link to comment Share on other sites More sharing options...
vekia Posted July 26, 2013 Share Posted July 26, 2013 hello thanks for the quick fix, im going to mark this thread as [solved] and to close it. if you've got any other questions - feel free to create new topics best regards Link to comment Share on other sites More sharing options...
Recommended Posts