Paul
Paul

Reputation: 9541

Fatal error: Allowed memory size, but it shouldn't be

I'm porting an installation of Joomla, and I'm getting this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 116 bytes) in

in \wwwroot\libraries\joomla\error\exception.php on line 117

I've tried upping the limit, but that doesn't help (well, it wouldn't, it's only trying to allocated 116 bytes)

Any ideas?

Upvotes: 1

Views: 9865

Answers (8)

OscarGarcia
OscarGarcia

Reputation: 2114

It's a very old question, but I had the same problem right now and I want to share the solution (other answer didn't help me).

If you are porting your joomla instalation you need to check all packages related with PHP in source and destination hosts.

If you are using debian based linux you need to type in both of them:

dpkg -l | grep "^ii  php5\?-"

And test that there is the same packages installed. If not, you can type this on source host:

echo $(dpkg -l | grep "^ii  php5\?\-" | cut -d " " -f 3)

Copy the result and paste it on destination host (if you are using an SSH client, for example):

apt-get install php-mail-mime ... (lot of packages) ... php5-curl

Or you can try this:

apt-get install $(ssh source_host dpkg -l | grep "^ii  php5\?\-" | cut -d " " -f 3)

Check that source_machine is correct (and use root@source_host or another_user@source_host if needed).

Restart apache2 server (it's not necessary, but it's for safe):

service apache2 restart

And check again.

If you are using windows check enabled extensions after and before migration (upload a "info.php" file to test them) and change php.ini according. Later restart apache2 service as administrator using services.msc or command line:

net apache2 stop
net apache2 start

I noticed the mistake when installing again from start and failed requirements checking.

Hope this will be useful to people with same problem.

Upvotes: 0

jstats
jstats

Reputation: 596

This issue can also arise if you have memcache enabled and you don't have the memcache client installed.

If this is the case, just pecl install memcache (make sure the extension is then enabled accordingly in your php.ini) and restart apache and you should be good to go.

Upvotes: 2

Gianpiero Fasulo
Gianpiero Fasulo

Reputation: 1

To solve that I went to the backend and checked the debug for the site.

I saved the configuraztion and the site now works.

Upvotes: 0

ninja
ninja

Reputation: 11

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 40 bytes) in /home/site/public_html/libraries/joomla/error/exception.php on line 117

What I did (thanks to a couple of fragmented suggestions is change the line on 117 to the following

$this->backtrace = debug_print_backtrace();

Upvotes: 1

tylerl
tylerl

Reputation: 30867

Another possibility that I've run in to is that one of your MySQL tables could be crashed. As odd as it sounds, that sometimes manifests itself this way.

Simply run mysqlcheck -rA to check and repair all of your mysql tables.

Upvotes: 0

Paul
Paul

Reputation: 9541

It looks like there was some problem with the joomla core files - as taking a fresh copy and overriding the index.php with a fresh copy, all is good now. Weird!

Upvotes: 1

Nev Stokes
Nev Stokes

Reputation: 9799

I've usually encountered errors like this when doing image manipulation with GD. As Yogesh suggests adding a line to up the memory limit has solved it for me. For example:

ini_set('memory_limit', '128M');

Upvotes: 2

Nik
Nik

Reputation: 4075

Check Your memory_limit parameter in your php.ini.

It is exceeding that limit.

Change it to your requirement and then try.

Hope this helps.

Upvotes: 0

Related Questions