Hi, I tried to install Drupal... Earlier I had Drupal on my computer, too and there wasn't problem... But now, when I tried to install Drupal, I saw this message: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 273447 bytes) in /opt/lampp/htdocs/drupal/includes/database.mysqli.inc on line 303
How to repair that?
Thank you very much... I' m not an engineer, I'm a linguist trying to do something :)))

Comments

aries’s picture

You have to raise the memory limit to 16M or more in the php.ini or in the .htaccess .

--
Fehér János aka Aries
http://aries.mindworks.hu

snegulka’s picture

Thanks! Now everything is ok...

outerspace-z’s picture

Hi there,
I am also getting similar error while updating modules or installing mods in drupal 6.2 site. I tried to locate memory limit in .htaccess or settings.php, can't find it. Please help.
Thanks in advance.

aries’s picture

Sometimes you can only raise the limit in your php.ini , sometimes you can
do it with ini_set() in your settings.php . It depends on your PHP security settings.

--
Aries

Babalu’s picture

i became now this error when i want do go under the module list:
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 803097 bytes) in /var/www/web3/html/includes/database.mysqli.inc on line 303

i have today enabled the clean urls with htaccess editing.
can it be that i have to change something in the htaccess ?
after i enabling the google cse module o don't come in the module list without this error

fsirett’s picture

I have looked at this thread and realise I need to raise the memory allocation, and I have looked at the files (in the Drupal folder) and I am not exactly certain how or where to change things. I have looked for other posts to tell me how to do this, but for my sins, none seem to turn up. Is there anybody out there who could give me a little more help?

Let me add I am using Drupal6.5 and have been working with no problems until now. All of my previous problems are well covered in docs and easy to solve, this one is just a little beyond my scope. and I am not certain I understand everything.

-Anti-’s picture

> I have looked at the files (in the Drupal folder)

If you are running a local version of drupal using a WAMP (like XAMPP, uniform, of WAMP5, etc) then there will be a php.ini file in the wamp server's configuration folder.

If you are running drupal on a remote webhost on a shared server, then you won't have access to the php.ini file. You have to ask your host to increase the memory allocation for you. Maybe they'll charge you extra money, and maybe they'll just refuse. Very occasionally, they may have set-up the your hosting service to allow you to use your htaccess file to over-ride the php.ini file, so you can set-it yourself.

fsirett’s picture

I have just found something that looks appropriate in the php4 File and am changing it from 16m to 32. I am going to do the same to the php5 file and see if that works.

I cannot find a specifically config file, so I am assuming the entire thing is config and I am doing he correct thing. If not...

CHeers for your help, I appreciate it.

F

Hmmm, no php5 file. Nope there is a php5.ini file and it seems to have been changed there automatically!

I shall remember how to do this from now on. So many simple solutions that I do not know and are so difficult to figure out properly.

Cheers again

F

Nope, that error persists. I just changed the php5.ini to 64 and the error still repeated. Am I altering the wrong files?

fsirett’s picture

Now I am having some odd happenings in my files. When I save the file, it seems to simply produce another copy of the file. What I am doing is changing everything that even looks like it might have anything to do with php.ini to a 64M memory allocation. Is that normal or am I doing something terrible.

I should mention, this is a local system using XAMPP of the latest persuasion and, in case I have not mentioned it earlier, Drupal 6.5.

I admit to being stumped with this. I thought I had it beat, but I cannot seem to get things working beyond this problem.

I have changed every php.ini file in the Xampp file to a 64M, I have restarted Xampp and I am still coming up with the same error message. Are there any ideas out there? I really do not know enough, so please be as simple as possible.

I have looked again at the ini_set() elements in the settings folder but I cannot see anything that offers up something to change the memory. Is there possibly a command would fit in there? I notice it was mentioned earlier and I thought I might try that if you would be so kind as to offer some guidance.

As an Addendum, one of many, the problem appears not to exist at any point n the usage save when I click on the "modules" segment of the system and then up comes the error. All of the other functions appear to work just fine.

This leads me to believe there is some kind of an extraordinary demand when I go there that is not present when I use Drupal in a normal way.

This may be old news to those of you who know about these things, but it provides some information that duffers like me find valuable when we come across problems and search the posts. We like to see exactly the same symptoms when we are looking for solutions.

As A further addendum, the problem, that has plagued me for nearly fourteen hours, just disappeared again. It is intermittent, but is is debilitating when it comes. It has appeared on occasion, but all I had to do before was click back and try again and it was solved. Now it is a little concerning when it takes up fourteen hours. Happy to have it working again, but it is a problem I would rather solve.

-Anti-’s picture

> As an Addendum, one of many, the problem appears not to exist at any
> point n the usage save when I click on the "modules" segment of the
> system and then up comes the error. All of the other functions appear to work just fine.

That is usual. I think the modules are loaded into memory all at once on that page.
But in normal use, they are only loaded a few at a time.
Something like that, anyway.

How many modules do you have?
Are you using contemplate?
It isn't unusual to have a drupal site with more than 20 modules using >96mb of php memory.
The trouble is finding a webhost who will give you that much for free.

fsirett’s picture

Cheers for that! I shall certainly look out for that problem when I decide on a server. Another thing to worry about.

As for contemplate, yes I did load that one up and I think it may be superseded by Panes and/or View. That is one of the reasons I am doing things this way. When I was looking at Joomla! I loaded up all the extensions that looked useful and tried to run them all at once in order to see what would work and what would fail. I would rather know what I am up against before I go public. Unfortunately, I did that too soon and the entire thing crashed on me. Rather spectacularly, I thought.

I do have a good number of modules on the system, many of which I shall discard sometime soon. I want to now what works and what fights.

I was told the administration menu is also a problem and it is on as well, but I really do not think I am the kind of user that needs the features. Nice idea for those who really need it and know how to keep the site running when things like this crop up. As for me, I am going to learn from my errors and hope this is the last time I will have to bother this forum.

I hope my evidence will save others as well.

Cheers, I now have something else to ask the hosts for the site.

F