0

I'm using SimpleImage (https://github.com/claviska/SimpleImage). I'm trying to edit a big photo: http://srv1.jpg.co.il/4/5401f91f41229.jpg (13312x1671, 3.2mb), and it returns this error after using the overlay() function:

( ! ) Fatal error: Maximum execution time of 50 seconds exceeded in C:\wamp\www\images\simpleimage.php on line 1163

the code in this line is:

$alphacolorxy = imagecolorallocatealpha($src_im, ($colorxy >> 16) & 0xFF, ($colorxy >> 8) & 0xFF, $colorxy & 0xFF, $alpha);

This is after adding those lines to the code:

ini_set('memory_limit', '-1');
ini_set('max_execution_time', '50M');

How can I fix it? I don't sure how it works, but I belive it isn't sending a http request because in the code the url is "pano.jpg" (this is the file name in the folder of the php code).

  • There also a function the set the time limit: http://php.net/manual/en/function.set-time-limit.php There might be some help there. – KIKO Software Aug 30 '14 at 19:46
  • @KIKOSoftware how can I know if the safe mode is on? And what to write in the php.ini (to how much time)? –  Aug 30 '14 at 19:48
  • Normally you would check your server configuration. I use Plesk and safe_mode is set in there. But I guess many other configurations are possible. I found this: http://www.sitepoint.com/forums/showthread.php?236172-How-to-check-if-php-s-safe-mode-is-on – KIKO Software Aug 30 '14 at 19:50

1 Answers1

0
 set_time_limit(0);

That should set the execution time to infinity.

http://php.net/manual/en/function.set-time-limit.php

Chemdream
  • 618
  • 2
  • 9
  • 25