Fatal error: Allowed memory size...On first upload

CharacterProfiler.lua file uploading issues

Fatal error: Allowed memory size...On first upload

Postby fezgig » Fri Oct 13, 2006 9:31 am

System Config
What version of the software are you using? -> v1.7.0
What version of PHP are you using? -> 4.4.0
What version of MySQL are you using? -> 4.1.13
Is it your own server or hosted? My own Server Suse 10.0 Server
What version of CharacterProfiler -> rpgo-CharacterProfiler_1.6.3, GuildProfiler -> rpgo-GuildProfiler_1.6.0, and PvPLog -> No (if being used) are you using?
What language is your system, server, WoW server, etc.? -> Eng
If relevant, what version of UniUploader are you using? -> Manually Uploading
If relevant, what version of UniAdmin are you using? -> Not using
A link to your roster can help too depending on the problem. -> http://www.nerdherd.info/roster

Error messages
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 77 bytes) in /srv/www/htdocs/roster/lib/luaparser.php on line 114

I am attaching my php.ini file as well.

In looking at other posts that had to do with uploading issues I believe my problem to be with the:
open_base_dir =
upload_tmp_dir =

but am not positive as I am a novice.
Attachments
characterprofiler.lua
CharacterProfiler.lua
(1020.49 KiB) Downloaded 359 times
Last edited by fezgig on Fri Oct 13, 2006 9:39 am, edited 1 time in total.
User avatar
fezgig
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Fri Oct 13, 2006 8:51 am
Location: Salt Lake City

Re: Fatal error: Allowed memory size...On first upload

Postby fezgig » Fri Oct 13, 2006 9:36 am

Sorry, would not let me attach the php.ini file to this thread.

Not sure how to get it to you so here is the text dealing with both spots:

; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
;open_basedir =

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =


Thank you in advance for taking the time to look at this.
Last edited by fezgig on Fri Oct 13, 2006 9:38 am, edited 1 time in total.
User avatar
fezgig
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Fri Oct 13, 2006 8:51 am
Location: Salt Lake City

Fatal error: Allowed memory size...On first upload

Postby zanix » Fri Oct 13, 2006 12:54 pm

Basically you have a very big CP.lua file, very close to 1mb

This setting in php limits how much memory a script can use
Code: Select all
memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)


The lua parser will consume high amounts of memory the larger the lua file is

You can do one or both of the following
  • Remove some characters from CP.lua
  • Try upping "memory_limit" to 16M or 32M


As for upping "memory_limit", mine is personally set to 16M
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Fatal error: Allowed memory size...On first upload

Postby fezgig » Fri Oct 13, 2006 7:35 pm

Thank you sir,

I changed it from 8M to 32M and it is uploading find now.

I also want to thank you for all your hard work on this project.

It is awesome.
"Together We Will Succeed!"
<img src="http://www.nerdherd.info/roster/addons/siggen/saved/sig-Fezgig.jpg" />
User avatar
fezgig
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Fri Oct 13, 2006 8:51 am
Location: Salt Lake City

Fatal error: Allowed memory size...On first upload

Postby zanix » Sat Oct 14, 2006 1:45 am

Thanks, we appreciate it
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Fatal error: Allowed memory size...On first upload

Postby Skeeziks » Wed Jan 03, 2007 1:04 pm

In what file would I find that line to change the memory size?

Couldn't find a file named php.ini anywhere or any .ini files at all, so I'm guessing it is either named something different or I am really off base.

I am getting the exact same error and I've been over all the roster files and have yet to find where I can change the memory_limit line.
Skeeziks
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Wed Jan 03, 2007 12:40 pm

Fatal error: Allowed memory size...On first upload

Postby zanix » Wed Jan 03, 2007 6:49 pm

php.ini is a config file for php, it will not be in the web docs folder

It will be wherever apache or IIS is configured to look for it
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Fatal error: Allowed memory size...On first upload

Postby fezgig » Thu Jan 04, 2007 12:47 pm

Skeeziks,

I am using Linux OS and mine is kept in the root\etc\ directory.

If you are using a windows OS it may be located somewhere else.

If you search the system for php.ini you should be able to find the locations it resides.

And the section in the php.ini file that I edited is below:


;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 120 ; Maximum amount of time each script may spend parsing request data
memory_limit = 32M ; Maximum amount of memory a script may consume (8MB)



Hope this helps.
"Together We Will Succeed!"
<img src="http://www.nerdherd.info/roster/addons/siggen/saved/sig-Fezgig.jpg" />
User avatar
fezgig
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Fri Oct 13, 2006 8:51 am
Location: Salt Lake City

Re: Fatal error: Allowed memory size...On first upload

Postby Munazz » Thu Jun 05, 2008 9:01 pm

My webhost does not allow me to edit the php.ini file.

However, I am allowed to use ini_set and I have added the following line of code to the /roster/settings.php file:

//Increase the memory limit because this can be a big file
ini_set( 'memory_limit', '24M' );

This is probably not the best place to put this command, and it doesn't check to see if my server lets me do ini_set() calls (but I know it does). Works for me, but in terms of all-user flexibility, it isn't the optimal solution.

Zanix, would you be willing to incorporate this command in the upload pages in a future release?
Image
User avatar
Munazz
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 36
Joined: Mon Jul 31, 2006 7:50 am
Location: Fairfax, VA

Fatal error: Allowed memory size...On first upload

Postby PleegWat » Fri Jun 06, 2008 4:03 am

Proper solution wrote:in pages/update.php, find:

Code: Select all
// Has data been uploaded?
if( (isset($_POST['process']) && $_POST['process'] == 'process') || $update->textmode )
{
 


Add below:

Code: Select all
if( CAN_INI_SET )
{
    
ini_set'memory_limit''24M' );
}
 


However, the actual amount of memory to be set varies per how big the files tend to get, how many concurrent users you're expecting, and how much oomph the server itself has. In other words, we'd also need to add something to select how much memory may be used.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm


Return to Uploading

Who is online

Users browsing this forum: No registered users and 0 guests

cron