If you are using XAMPP/WAMP, there may be two PHP.ini files (one under the PHP directory and the other under Apache/bin). htaccess to enable a php.ini file.įor some hosts (CrazyDomains) you may need to add the following lines to the php.ini file (if they are not there already): extension=pdo.so extension=pdo_sqlite.so extension=sqlite.so extension=pdo_mysql.so Modifying php.ini in local server environmentsįor MAMP see particularly the "Optional: Adjust PHP's memory limit for scripts" section (note the difference for MAMP Pro). Some hosting services require the following line in. If you cannot make the change yourself, please ask your hosting provider to adjust it for you, or look for a new host that allows more flexibility.įor some hosts renaming php.ini to php5.ini may be necessary. In some shared hosting environments, access to the PHP memory limit setting is restricted. Ini_set('memory_limit', '256M') Shared Hosting Locate the PHP settings section and add the following line at the end of that section: This method will affect only the site using this file. If Drupal is already installed, you can edit sites/default/settings.php. This method will only work if PHP is running as an Apache module. More in sites/default/settings.php # but the following cannot be changed at runtime.Īnd immediately after this add the following line: Look for the section: # Override PHP settings. htaccess file in the Drupal root directory. The next two solutions are more restricted in scope and, in some cases, may be more appropriate choices than affecting all sites.htaccessĮdit the. Some cPanel hosts only accept this method. Simply create the above file and type the following line in it: PHP 5.3+ allows you to change the memory limit by placing a. This will only work if PHP is running as CGI/ in public_html folder (for PHP 5.3 and up) If there is no section already for this, place the above line at the end of the file.Īdd the following line to a php.ini file in your Drupal root folder: Memory_limit = 256M Maximum amount of memory a script may consume (256MB) Make sure you use M to specify the number of megabytes (not MB).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |