Whenever I want to enable/disable modules I am given different errors like the one below. These error messages change every time disable/enable a module.

"Fatal error: Out of memory (allocated 31981568) (tried to allocate 311296 bytes) in /homepages/4/d364988985/htdocs/sites/all/modules/views/modules/node.views_default.inc on line 278"

I have already done the following steps:

  • created a php.ini file with the following line:

    memory_limit = 512M
  • put it into the Drupal root folder

This fixed the major problem of the whole site showing an error.

The host that I am using is 1and1. Is there a way that this can be fixed?

  • Have you contacted the host? What do they say? are all of the error messages regarding memory?
    – Ashlar
    Dec 30 '11 at 16:55
  • I am contacting the host now, and all error messages are regarding memory. Thanks.
    – N dube
    Dec 30 '11 at 17:14

If you are getting that error is because you are probably using a shared host instance at 1and1, and these instances are mostly better for simple static HTML sites of the kind you would create by hand in Dreamwweaver, for example.

If you are hosting a small Drupal site with a few modules, a small database, and a few visitors, then perhaps 1and1's cheapest (shared host) package will suffice. But as your sites grow bigger, shared host packages tend to not cut it (regardless if they are hosted at 1and1, godaddy, dreamhost, etc).

  • Oh I see, thank you for your reply. I am going to install the drupal application that 1and1 offer to see if that does the trick. I had noticed that they had a php.ini file in the modules folder so maybe this could fix my problem? Thanks again.
    – N dube
    Dec 30 '11 at 18:53
  • You can try modifying php.ini, but generally the amount of memory available to your server is something that depends on how much you are paying the host provider. You can increase the memory in php.ini to 1 Gigabyte if you want to, but if 1and1 only guarantees you 128MB, then that's what you get, no matter what you write on php.ini. And if you are on a shared host, memory is not even guaranteed (it's shared amongst multiple users). Dec 30 '11 at 19:09
  • Okay, Thank you for that. After using the package that 1and1 offer, I still see the error message but luckily the modules were enabled regardless. Thanks
    – N dube
    Dec 30 '11 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.