Standard modifications to Drupal's default .htaccess


/ Published in: Apache
Save to your folder(s)

This is a replacement for the default PHP settings in Drupal's .htaccess file. Increasing the memory_limit, max_post_size etc. prevents a lot of errors, especially when using image modules.


Copy this code and paste it in your HTML
  1. # Override PHP settings. More in sites/default/settings.php
  2. # but the following cannot be changed at runtime.
  3.  
  4. # PHP 4, Apache 1.
  5. <IfModule mod_php4.c>
  6. php_value magic_quotes_gpc 0
  7. php_value register_globals 0
  8. php_value session.auto_start 0
  9. php_value mbstring.http_input pass
  10. php_value mbstring.http_output pass
  11. php_value mbstring.encoding_translation 0
  12. php_value memory_limit 96M
  13. php_value post_max_size 32M
  14. php_value upload_max_filesize 32M
  15. php_value max_input_time 180
  16. </IfModule>
  17.  
  18. # PHP 4, Apache 2.
  19. <IfModule sapi_apache2.c>
  20. php_value magic_quotes_gpc 0
  21. php_value register_globals 0
  22. php_value session.auto_start 0
  23. php_value mbstring.http_input pass
  24. php_value mbstring.http_output pass
  25. php_value mbstring.encoding_translation 0
  26. php_value memory_limit 96M
  27. php_value post_max_size 32M
  28. php_value upload_max_filesize 32M
  29. php_value max_input_time 180
  30. </IfModule>
  31.  
  32. # PHP 5, Apache 1 and 2.
  33. <IfModule mod_php5.c>
  34. php_value magic_quotes_gpc 0
  35. php_value register_globals 0
  36. php_value session.auto_start 0
  37. php_value mbstring.http_input pass
  38. php_value mbstring.http_output pass
  39. php_value mbstring.encoding_translation 0
  40. php_value memory_limit 96M
  41. php_value post_max_size 32M
  42. php_value upload_max_filesize 32M
  43. php_value max_input_time 180
  44. </IfModule>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.