Php file size

How big (Kb) would you say is the largest size of a php file that should be put on a server before you start breaking it up into smaller pages to keep page access from being too slow?

Hope that is clear…:confused:

The file size is limited more by the effectiveness of the developer to maintain the code within the file, than the ability of PHP to load and execute it. PHP will happily execute a multi-megabyte large script in a single file, you however will go insane navigating around it to edit the bits that you want to change.

Thanks for the replys… it was very helpful

Hi jmick,

PHP settings limit the maximum file size per upload to 4 MB.

create a php5.ini file with the following values:

memory_limit = 96M
post_max_size = 64M
upload_max_filesize = 64M

Second you need to add the following values to the .htaccess file that comes pre packaged with Drupal in your base directory:

memory_limit = 96M
post_max_size = 64M
upload_max_filesize = 64M

Third you need to add to the following code to settings.php file that is located in /sites/default/:

ini_set(‘meemory_limit’, ‘96M’);
ini_set(‘post_max_size’, ‘64M’);
ini_set(‘upload_max_filesize’, ‘64M’);

Doesn’t really matter. By the time the file got to big it would takes ages to upload.