Ok, so I noticed in all four CB files that had instances of memory_limit this code was present:
[code:1]
$memMax = trim( @ini_get( 'memory_limit' ) );
if ( $memMax ) {
$last = strtolower( $memMax{strlen( $memMax ) - 1} );
switch( $last ) {
case 'g':
$memMax *= 1024; //Should be something like 1024*1024*1024;
case 'm':
$memMax *= 1024; //Should be something like 1024*1024;
case 'k':
$memMax *= 1024;
}
if ( $memMax < 16000000 ) {
@ini_set( 'memory_limit', '16M' );
}
if ( $memMax < 32000000 ) {
@ini_set( 'memory_limit', '32M' );
}
if ( $memMax < 48000000 ) {
@ini_set( 'memory_limit', '48M' );
}
}
[/code:1]
For some reason it seems like it wants to round up the memory setting, but it does the math wrong and seems quite obfuscated. I made the replacements above in each of the four files, but I am still getting a memory error when I click on the CB Subs plugin. I'm afraid this may be present in some variation in the CB Subs plugin files, but as they are encoded I haven't a clue.
The memory error I'm getting now: Fatal error: Out of memory (allocated 25427968) (tried to allocate 41 bytes) in /home/macros/public_html/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/cbpaidsubscriptions.class.php on line 0
This indicates that my memory is being set at 24M by some script. I've dumped the initial $memtest variable in the script above and it came out as 38M which is my current setting. It's set correctly in php.ini and I usually am allocated that except for when I try to run the CB Subs plugin in the back end.
Maybe this thread belongs in the CB Subs forum, so if it does please move it I just don't want to cross post this.
Please someone in the know help!
Post edited by: chuckbone, at: 2010/03/14 05:27
Post edited by: chuckbone, at: 2010/03/14 05:34