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

01-04-2009, 10:37 AM
|
|
Contributing Member
|
|
Join Date: 08-16-08
Posts: 451
|
|
|
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));
|

01-04-2009, 11:15 AM
|
|
Contributing Member
|
|
Join Date: 08-16-08
Posts: 451
|
|
|
Problem appeared after my host installed PHP 5.2.8 (from PHP 5.2.7)
|

01-04-2009, 11:46 AM
|
 |
Super Moderator
|
|
Join Date: 02-10-07
Location: Central Kentucky
Posts: 10,078
|
|
|
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.
|

01-04-2009, 12:01 PM
|
|
Contributing Member
|
|
Join Date: 08-16-08
Posts: 451
|
|
|
thanks, i sent them an email
|

01-04-2009, 12:19 PM
|
 |
Contributing Member
Latest Blog: None
|
|
Join Date: 02-23-08
Posts: 1,714
|
|
|
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
|

01-04-2009, 12:24 PM
|
|
Contributing Member
|
|
Join Date: 08-16-08
Posts: 451
|
|
how do i do that? is this to do on a script or on server
|

01-04-2009, 12:32 PM
|
 |
v7n Mentor
Latest Blog: None
|
|
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
|
|
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!
|

01-04-2009, 01:59 PM
|
|
Contributing Member
|
|
Join Date: 08-16-08
Posts: 451
|
|
thank you all!
they have managed to fix the problem
|

01-05-2009, 08:47 AM
|
 |
v7n Mentor
Latest Blog: None
|
|
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
|
|
|
How did you fix it?
__________________
█ Izzmo
█ Coding Guru Extraordinaire
█ ZeroWeb Hosting & Design - Customizable hosting for every type of user!
|

01-05-2009, 10:12 AM
|
|
Contributing Member
|
|
Join Date: 08-16-08
Posts: 451
|
|
Quote:
Originally Posted by Newbe
thank you all!
they have managed to fix the problem 
|
The hosting service fixed it
|

01-05-2009, 10:14 AM
|
|
Contributing Member
Latest Blog: None
|
|
Join Date: 09-28-08
Location: New Hampshire, USA
Posts: 3,851
|
|
Quote:
Originally Posted by Izzmo
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.
|

01-05-2009, 12:04 PM
|
|
Contributing Member
|
|
Join Date: 08-16-08
Posts: 451
|
|
ok tny
i will try that
and sory, i have no idea how they fixed it
|

01-05-2009, 12:09 PM
|
|
Contributing Member
Latest Blog: None
|
|
Join Date: 09-28-08
Location: New Hampshire, USA
Posts: 3,851
|
|
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.
|

01-05-2009, 12:14 PM
|
|
Contributing Member
|
|
Join Date: 08-16-08
Posts: 451
|
|
|
that's great info!
thank you my friend
|

01-05-2009, 02:43 PM
|
 |
v7n Mentor
Latest Blog: None
|
|
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
|
|
Quote:
Originally Posted by dWhite
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!
|

01-12-2009, 01:31 AM
|
|
Contributing Member
|
|
Join Date: 08-16-08
Posts: 451
|
|
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');
|

01-12-2009, 05:32 AM
|
 |
Super Moderator
|
|
Join Date: 02-10-07
Location: Central Kentucky
Posts: 10,078
|
|
|
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.
|

01-12-2009, 05:33 AM
|
 |
v7n Mentor
Latest Blog: None
|
|
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
|
|
|
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!
|

01-12-2009, 06:55 AM
|
|
Contributing Member
|
|
Join Date: 08-16-08
Posts: 451
|
|
|
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?
|

01-12-2009, 07:54 AM
|
 |
v7n Mentor
Latest Blog: None
|
|
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
|
|
|
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!
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 12:01 PM.
Powered by vBulletin Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP
|
|
|