HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

This has me stumped

TamaTama United Kingdom ✭✭✭

Having recently moved from shared hosting to a dedicated hosting ( due to an increase in traffic ) with a clean php config.

File Upload and any upload of jepg images lead to "You cannot save images of this type (2).", I have spent a while looking into this but have failed to do so accordingly.

The image gets uploaded but won't allow thumbnails

But won't work at all on profile pictures

Fatal Error in Gdn_UploadImage.SaveImageAs();

You cannot save images of this type (2).
The error occurred on or near: /usr/local/apache2/htdocs/dev/forum/library/core/class.uploadimage.php
215:                break;
216:          }
217: 
218:          if (!$SourceImage)
219:             throw new Exception(sprintf(T('You cannot save images of this type (%s).'), $Type));
220: 
221:          // Create a new image from the raw source
222:          if (function_exists('imagecreatetruecolor')) {
223:             $TargetImage = imagecreatetruecolor($Width, $Height);    // Only exists if GD2 is installed
Backtrace:
[/usr/local/apache2/htdocs/dev/forum/plugins/FileUpload/class.fileupload.plugin.php:592] Gdn_UploadImage::SaveImageAs();
[/usr/local/apache2/htdocs/dev/forum/plugins/FileUpload/class.fileupload.plugin.php:592] FileUploadPlugin->UtilityController_Thumbnail_Create();
[/usr/local/apache2/htdocs/dev/forum/library/core/class.dispatcher.php:342] PHP::call_user_func_array();
[/usr/local/apache2/htdocs/dev/forum/index.php:46] Gdn_Dispatcher->Dispatch();
Need Help?
If you are a user of this website, you can report this message to a website administrator.
If you are an administrator of this website, you can get help at the Vanilla Community Forums.
Additional information for support personnel:
Application: Vanilla
Application Version: 2.2.3
PHP Version: 5.5.0
Operating System: Linux
Server Software: Apache/2.4.4 (Unix) PHP/5.5.0
Referer: /dev/forum/discussion/1628/new-forum-feature-reactions
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36
Request Uri: /forum/utility/thumbnail/236/FileUpload/4e/e006f7ea55da0692b92c2528fb1979.jpg
Controller: Gdn_UploadImage
Method: SaveImageAs

However on localhost using the same database and codebase it works fine

Best Answer

Answers

  • TamaTama United Kingdom ✭✭✭

    @hgtonight said:
    I assume you were trying to upload a jpeg, does your dedicated server have GD JPG Support installed/enabled?

    You should be able to find out by echoing gd_info();.

    Thanks hg, I'll report this to the server manager

    UnderDog
Sign In or Register to comment.