Freelance projects

Saturday, September 24, 2011

ERROR This file is too complex to render- SWF only supports 65536 shapes at once

error occurred while converting pdf2swf .... 


There is a very simple fix : add "-s poly2bitmap" to the options

With the added options "-s poly2bitmap" (which means converts pdf graphics to bitmaps) allows the transformation to complete successfully, so maybe we could add this option by default. 



source

Fatal error: Maximum execution time of 60 seconds exceeded


set_time_limit($seconds)
If $second is set to 0, no time limit is imposed. Note that you should be cautious with removing the time limit altogether. You don't want any infinite loops slowly eating up all server resources. A high limit, e.g. 180 is better than no limit.
Alternatively, you can adjust the time setting just for certain functions and resetting the time limit after the time critical code has run, e.g.
$default = ini_get('max_execution_time');
set_time_limit(1000);
... some long running code here ...
set_time_limit($default);
or
In .htaccess you can set these values:
php_value max_execution_time 1000000
php_value max_input_time 1000000

Thursday, September 15, 2011

Increasing User File Upload Limits Using php.ini on Your Linux Server

NOTE: The location of your php.ini file can vary, depending on your operating system/control panel combination. If you are using Fedora 4 with Parallels Plesk Panel, for example, this file is in the following location: /etc/php.ini

If you are using a different operating system and/or control panel, you can find the location of your php.ini file by running the following from your command line:

php -i | grep php.ini
There are two variables within your php.ini file that are responsible for managing user file uploads.

post_max_size This variable determines the maximum amount of data that PHP will accept in a single form submission using the POST method. Its default value is 8 MB, as shown below:
post_max_size = 8M
upload_max_filesize This variable limits the size of an individual file uploaded to your site. Its default value is 2 MB, as shown below:
upload_max_filesize = 2M
An increase in the value of these variables expands user file upload limits.

NOTE: After making changes to php.ini, you must perform an httpd restart for them to take effect. This is accomplished by running the following from your command line:

/etc/init.d/httpd restart