Forum
Images upload issue, thumbnails don't display ( ImagineMagick fault? )
Hi there,
I'm facing a strange issue with an image upload at blog posts. When uploading a new image via Assets, there is no thumbnail created and the Assets only contain a name reference to the file. This issue happened when the website was migrated from one hosting to another. I guess that might be something to do with either permissions or php image processing. Thanks for shedding any light on that.
HOSTING A ( All works fine )
Perch: 2.8.13, PHP: 5.6.8, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $, with PDO
Server OS: Linux, litespeed
Installed apps: content (2.8.13), assets (2.8.13), categories (2.8.13), perch_blog (4.6), perch_cm (1.0.1), perch_forms (1.8.3), perch_members (1.3), perch_twitter (3.5.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_members', 'perch_twitter', 'perch_forms', 'perch_blog', );
PERCH_LOGINPATH: /cms
PERCH_PATH: /test/public_html/cms
PERCH_CORE: /test/public_html/cms/core
PERCH_RESFILEPATH: /test/public_html/cms/resources
Image manipulation: GD
PHP limits: Max upload 128M, Max POST 32M, Memory: 128M, Total max file upload: 32M
Resource folder writeable: Yes
HTTP_HOST: test.com
DOCUMENT_ROOT: /test/public_html
REQUEST_URI: /cms/core/settings/diagnostics/
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php
HOSTING B ( Issues with images )
Perch: 2.8.13, PHP: 5.3.3-7+squeeze19, MySQL: 5.1.73, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.13), assets (2.8.13), categories (2.8.13), perch_blog (4.6), perch_cm (1.0.1), perch_forms (1.8.3), perch_members (1.3), perch_twitter (3.5.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_members', 'perch_twitter', 'perch_forms', 'perch_blog', );
PERCH_LOGINPATH: /cms
PERCH_PATH: /test/www/cms
PERCH_CORE: /test/www/cms/core
PERCH_RESFILEPATH: /test/www/cms/resources
Image manipulation: GD Imagick
PHP limits: Max upload 25M, Max POST 25M, Memory: 250M, Total max file upload: 25M
Resource folder writeable: Yes
DOCUMENT_ROOT: /test/www
HTTP_HOST: metatroncapital.eu
REQUEST_URI: /cms/core/settings/diagnostics/
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php
Does the main image file get uploaded?
It does. Although the thumbnail is not visible neither at post nor at the Assets. The file has 355 attribute instead of 765 (PERCH_CHMOD_FILES: 765) when uploaded if that changes anything. Only the main image works.
Do you have the option of updating to a current version of PHP?
Not at the faulty server I'm afraid. Also, when I have added PERCH_CHMOD_FILES: 765 to my config.php at the server A, I managed to replicate the issue and received following PHP error at the CMS:
Warning: getimagesize(/home/testserver/public_html/cms/resources/image.png): failed to open stream: Permission denied in /home/testserver/public_html/cms/core/lib/PerchImage.class.php on line 308 Warning: finfo_file(/home/testserver/public_html/cms/resources/image.png): failed to open stream: Permission denied in /home/testserver/public_html/cms/core/lib/PerchImage.class.php on line 402 Warning: getimagesize(/home/testserver/public_html/cms/resources/image.png): failed to open stream: Permission denied in /home/testserver/public_html/cms/core/lib/PerchFieldTypes.class.php on line 970 Warning: finfo_file(/home/testserver/public_html/cms/resources/image.png): failed to open stream: Permission denied in /home/testserver/public_html/cms/core/lib/PerchImage.class.php on line 402
Permissions are a likely cause, yes. Unfortunately it's one of those things that you need to get right on the server - it's not something I can do from the software.