webadmin's picture

PHP how to increase the memory limit without approaching hosting provider ?

Coding

Just edit .htaccess file in your Drupal root directory. For example, I added the following two lines.


php_value post_max_size 100M
php_value upload_max_filesize 100M
php_value memory_limit 96M (this is vital for Drupal 6)

# PHP 4, Apache 2.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
php_value post_max_size 100M
php_value upload_max_filesize 200M
php_value memory_limit 96M

# PHP 5, Apache 1 and 2.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
php_value post_max_size 100M
php_value upload_max_filesize 100M
php_value memory_limit 96M