dbennett006 Posted July 22, 2010 Share Posted July 22, 2010 Hi,Not sure if this should be here but wasnt too sure where to put it. I've searched the forums and i canot find the answer. I've had prestashop for a couple of months and have uploaded over 100 product images and manufacturer images to the site with no problem. Then today i tried to change the homepage editor logo and when i clicked upload the BO page disappears, leaving only the menus at the top, no confirmation to say it listed or the image was successful. I have since overridden that by putting the image i want in the editorial module.But now when I've just tried to upload a picture for a product and it does the same thing. All the menus stay and the rest of the page disappears. this also happens when i try to change the category picture.I've changed all permissions to 777 and still to no availThe only things that have changed since are: I've used the CSV import (and export module) I've had an SSL certificate installed, and I've installed an image module (when the user goes over the picture it magnifys it) I believe this to be the cause but I'm not sure how to fix itThank you for your help in advance Link to comment Share on other sites More sharing options...
rocky Posted July 23, 2010 Share Posted July 23, 2010 My guess is that you are uploading an image that is too big, which is causing the memory limit to be exceeded. You can edit config/config.inc.php and temporarily change 'display_errors' from 'off' to 'on' so that you get an error message instead of a blank area. Post the error message here. Link to comment Share on other sites More sharing options...
dbennett006 Posted July 23, 2010 Author Share Posted July 23, 2010 My guess is that you are uploading an image that is too big, which is causing the memory limit to be exceeded. You can edit config/config.inc.php and temporarily change 'display_errors' from 'off' to 'on' so that you get an error message instead of a blank area. Post the error message here. Thank you for trying to help, I've put errors on andtried again and this is what I getWarning: exec() has been disabled for security reasons in /home/compuhub/public_html/images.inc.php on line 82Not sure what that means??just had a look at the file and the code between lines 79 and 88 are as followselseif (function_exists('mime_content_type')) $mime_type = mime_content_type($file['tmp_name']); elseif (function_exists('exec')) $mime_type = trim(exec('file -b --mime-type '.escapeshellarg($file['tmp_name']))); if (empty($mime_type) || $mime_type == 'regular file') $mime_type = $file['type']; if (($pos = strpos($mime_type, ';')) !== false) $mime_type = substr($mime_type, 0, $pos); // is it a picture ? return $mime_type && in_array($mime_type, $types); Link to comment Share on other sites More sharing options...
rocky Posted July 23, 2010 Share Posted July 23, 2010 It's a server configuration issue. You should ask your host to enable exec() on your server. Link to comment Share on other sites More sharing options...
jonny5 Posted November 19, 2010 Share Posted November 19, 2010 Since I do not have access to my php.ini file (shared hosting account) and some functions have been disabled in the file. And as I understand it I cannot enable functions that have been disabled by using a custom php.ini file I chose I different method. The issue is in the images.inc.php file located in the root of prestashop line 82the exec() function is the issue yeah....Notice that it is in a series of if statements. I guess that because it exists but is disabled that, when the function function_exists is called in the if statement, it tries to use it in the image upload process. Since it is in an if statement it would seem to me it is not required and that another method will be used if not. This is all some what speculative and I only looked at the code for a few minutes but anyway....I just deleted this whole elseif and it all seems to work fine. I haven't tested extensively but I can upload images now and everything seems oki.e. delete elseif (function_exists('exec')) $mime_type = trim(exec('file -b --mime-type '.escapeshellarg($file['tmp_name'])));or you could try changing it to... elseif (is_callable('exec')) $mime_type = trim(exec('file -b --mime-type '.escapeshellarg($file['tmp_name'])));if you are uncomfortable with deleting this statement. I have not tested this I just understand that is_callable will take disabled functions in php.ini into consideration :) Link to comment Share on other sites More sharing options...
rocky Posted November 26, 2010 Share Posted November 26, 2010 This bug has been fixed in PrestaShop v1.4 Alpha 3. The file images.inc.php has been rewritten so that exec() isn't used if it isn't available. Link to comment Share on other sites More sharing options...
kevinjoyjoy Posted November 27, 2010 Share Posted November 27, 2010 Awesome - was having the same issues, and reconfigging my server wasn't fixing it. 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