Thursday, 12 March 2009

Cheap Hosting Part II

In an earlier post I described how I was running out of memory in PHP using a moderate set of Drupal contributed modules.

It turns out I was able to increase the PHP memory on my HostPapa hosted site. The method to use it to add the following line to Drupal's "settings.php" file in each site's "files" directory:
ini_set('memory_limit',             '48M');
Or if the line already exists, make sure the amount is '48M'.

One of the problems I think I had earlier is not changing the right settings.php file. I have multiple sites in multiple sub-domains, because the main purpose of this host is to do proofs-of-concept for clients. I probably thought changing the settings.php file didn't work because I changed the wrong one.

Suppose you installed Drupal under public_html. You have to change settings.php in public_html/sites/default to change the memory limit on your main domain (for example, "example.com"). For a sub-domain "test.example.com", you have to change settings.php in public_html/sites/test.example.com. And so on for any other sub-domains you have.

No comments:

Post a Comment