Image orientation changes after upload

2 posts by 2 authors in: Forums > CMS Builder
Last Post: August 19, 2016   (RSS)

By JeremyHarrison - August 17, 2016

Hi,

i'm having the same issue as others have mentioned before with residual exif data causing dramas and changjng the rotation of images after upload.

The site is running the latest version of CMS-B and I've followed the instructions suggested here - http://www.interactivetools.com/forum/forum-posts.php?postNum=2238420#post2238420 - namely changing fixJpegExifOrientation to true.

We're getting the memory issue that was expected, returning this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 12096 bytes) in /hermes/walnaweb13a/b756/moo.3pigs/aplicaCMS/lib/image_functions.php on line 152

Does anyone have any ideas?

Cheers,

Jeremy

By gregThomas - August 19, 2016

Hi Jeremy, 

This happens because rotating an image in PHP is quite memory intensive, and by default CMS Builder limits how much memory it uses to 128MB. But you can increase the amount of memory the server has access to by editing aplicaCMS/lib/init.php on line 179:

ini_set('memory_limit', '128M'); // raise memory limit (if allowed)

change this line so CMS Builder has access to 1024 MB of memory instead:

ini_set('memory_limit', '1024M'); // raise memory limit (if allowed)

Thanks,

Greg

Greg Thomas







PHP Programmer - interactivetools.com