Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 01-04-2009, 10:37 AM
Contributing Member
 
Join Date: 08-16-08
Posts: 451
iTrader: 3 / 100%
Fatal error: Allowed memory

Hi, this is the error i get in my pligg site. It's an open source script. I have no idea about php, so can anyone help me please?

Code:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 41418752 bytes) in /home/tarok/add-article.info/libs/ez_sql_core.php on line 374
This is the link 374

$result_cache = unserialize(file_get_contents($cache_file));
__________________
All about situational leadership | Play free online games on 321games.net
 
Reply With Quote
  #2 (permalink)  
Old 01-04-2009, 11:15 AM
Contributing Member
 
Join Date: 08-16-08
Posts: 451
iTrader: 3 / 100%
Problem appeared after my host installed PHP 5.2.8 (from PHP 5.2.7)
__________________
All about situational leadership | Play free online games on 321games.net
 
Reply With Quote
  #3 (permalink)  
Old 01-04-2009, 11:46 AM
ScriptMan's Avatar
Super Moderator
 
Join Date: 02-10-07
Location: Central Kentucky
Posts: 11,803
iTrader: 4 / 100%
Your script used all the available memory. This is a setting in the Apache and php files. Most likely nothing you can over ride. Perhaps the host had Max_memory set higher under the old version.

You might ask them to take a look if the script worked before.
__________________
SEO does not mean Spam Everywhere Online
Scriptman's Playhouse || Ramblings from an old man
 
Reply With Quote
  #4 (permalink)  
Old 01-04-2009, 12:01 PM
Contributing Member
 
Join Date: 08-16-08
Posts: 451
iTrader: 3 / 100%
thanks, i sent them an email
__________________
All about situational leadership | Play free online games on 321games.net
 
Reply With Quote
  #5 (permalink)  
Old 01-04-2009, 12:19 PM
entrabnetworks's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 02-23-08
Posts: 1,713
iTrader: 0 / 0%
Upgrade your memory limit... average is 16mb-32mb
__________________
Bulk Email Software - Serving 20,000+ happy customers w/ our Email Software.
Webmaster Forums - Profitable Webmaster Forums for Webmasters around the world. :D
 
Reply With Quote
  #6 (permalink)  
Old 01-04-2009, 12:24 PM
Contributing Member
 
Join Date: 08-16-08
Posts: 451
iTrader: 3 / 100%
how do i do that? is this to do on a script or on server
__________________
All about situational leadership | Play free online games on 321games.net
 
Reply With Quote
  #7 (permalink)  
Old 01-04-2009, 12:32 PM
Izzmo's Avatar
v7n Mentor
Latest Blog:
None

 
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
iTrader: 1 / 100%
Sometimes, if your host allows it, you can override this in a .htaccess file like:

Code:
php_flag memory_limit "8M"
If not, your host may able to give you a custom php.ini file for your site.
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
 
Reply With Quote
  #8 (permalink)  
Old 01-04-2009, 01:59 PM
Contributing Member
 
Join Date: 08-16-08
Posts: 451
iTrader: 3 / 100%
thank you all!

they have managed to fix the problem
__________________
All about situational leadership | Play free online games on 321games.net
 
Reply With Quote
  #9 (permalink)  
Old 01-05-2009, 08:47 AM
Izzmo's Avatar
v7n Mentor
Latest Blog:
None

 
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
iTrader: 1 / 100%
How did you fix it?
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
 
Reply With Quote
  #10 (permalink)  
Old 01-05-2009, 10:12 AM
Contributing Member
 
Join Date: 08-16-08
Posts: 451
iTrader: 3 / 100%
Quote:
Originally Posted by Newbe View Post
thank you all!

they have managed to fix the problem
The hosting service fixed it
__________________
All about situational leadership | Play free online games on 321games.net
 
Reply With Quote
  #11 (permalink)  
Old 01-05-2009, 10:14 AM
dWhite's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 09-28-08
Location: New Hampshire, USA
Posts: 4,099
iTrader: 5 / 100%
Quote:
Originally Posted by Izzmo View Post
How did you fix it?
They probably increased the limit on server-side. However, for future references you could try ini_set() command to overrride the setting in php.ini.
 
Reply With Quote
  #12 (permalink)  
Old 01-05-2009, 12:04 PM
Contributing Member
 
Join Date: 08-16-08
Posts: 451
iTrader: 3 / 100%
ok tny

i will try that

and sory, i have no idea how they fixed it
__________________
All about situational leadership | Play free online games on 321games.net
 
Reply With Quote
  #13 (permalink)  
Old 01-05-2009, 12:09 PM
dWhite's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 09-28-08
Location: New Hampshire, USA
Posts: 4,099
iTrader: 5 / 100%
If you need more help on the ini_set() command, check out the official php.net listing of it:

http://us2.php.net/ini_set

You would use it like this:

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

Replace the 50 with however many MB you need to for the script to allocate.
 
Reply With Quote
  #14 (permalink)  
Old 01-05-2009, 12:14 PM
Contributing Member
 
Join Date: 08-16-08
Posts: 451
iTrader: 3 / 100%
that's great info!

thank you my friend
__________________
All about situational leadership | Play free online games on 321games.net
 
Reply With Quote
  #15 (permalink)  
Old 01-05-2009, 02:43 PM
Izzmo's Avatar
v7n Mentor
Latest Blog:
None

 
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
iTrader: 1 / 100%
Quote:
Originally Posted by dWhite View Post
If you need more help on the ini_set() command, check out the official php.net listing of it:

http://us2.php.net/ini_set

You would use it like this:

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

Replace the 50 with however many MB you need to for the script to allocate.
That or like I said previously, .htaccess php_flag measures work well.
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
 
Reply With Quote
  #16 (permalink)  
Old 01-12-2009, 01:31 AM
Contributing Member
 
Join Date: 08-16-08
Posts: 451
iTrader: 3 / 100%
Ok the error is back...

what does this actually means?

now it wants even more memory:

Code:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 133693440 bytes) in /home/tarok/add-article.info/libs/ez_sql_core.php on line 374
Is this memory space on disc? or operative memory? why is it growing like this?

i have tried the htaccess thingy, but don't knoe where to put the ini_set('memory_limit', '50M');
__________________
All about situational leadership | Play free online games on 321games.net
 
Reply With Quote
  #17 (permalink)  
Old 01-12-2009, 05:32 AM
ScriptMan's Avatar
Super Moderator
 
Join Date: 02-10-07
Location: Central Kentucky
Posts: 11,803
iTrader: 4 / 100%
It might be a poorly written script causing the problem.

Does this problem occur only after some of the script features have been used a few time? Some script writers fail to destroy images and close mysql connections both of which can tie up memory.
__________________
SEO does not mean Spam Everywhere Online
Scriptman's Playhouse || Ramblings from an old man
 
Reply With Quote
  #18 (permalink)  
Old 01-12-2009, 05:33 AM
Izzmo's Avatar
v7n Mentor
Latest Blog:
None

 
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
iTrader: 1 / 100%
Well, your host is only allowing you so much RAM to processes PHP functions and go throughout your script.

So, if you go over that, the script is haulted and you get this error.

What are you trying to do, image manipulation?
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
 
Reply With Quote
  #19 (permalink)  
Old 01-12-2009, 06:55 AM
Contributing Member
 
Join Date: 08-16-08
Posts: 451
iTrader: 3 / 100%
it's an open source digg like script called pligg

i have no idea what was going on and i am not doing anything...

i have no idea what is wrong :$ what should i do?
__________________
All about situational leadership | Play free online games on 321games.net
 
Reply With Quote
  #20 (permalink)  
Old 01-12-2009, 07:54 AM
Izzmo's Avatar
v7n Mentor
Latest Blog:
None

 
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
iTrader: 1 / 100%
Well, from the error, it may be doing something with SQL queries.

Maybe it's trying to execute too many queries at once? It's hard to say without actually looking at the code itself.

But I'm pretty sure, from the error anyways, it's calling queries and then trying to process a bunch of them at once.
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML Feed - Fatal error: Call to a member function children() on a non-object jagan Coding Forum 2 08-25-2008 02:22 PM
OpenVZ Error : Cannot allocate memory eukvps Dedicated Servers 0 06-22-2007 01:39 AM
"Method POST not allowed" error east_pole Web Design Lobby 3 02-16-2007 01:57 PM
phpBB - Fatal Error Allowed memory size exhausted Fruit & Veg Coding Forum 3 09-18-2004 12:55 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 09:21 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2014 Escalate Media




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.