Bug Allowed Memory Exhausted

Status
Not open for further replies.

FileWarez

Customer
One year later the purchase of vBActivity, I installed this week and I'm receiving this PHP error message while accessing Threads, PMs and everything that uses the "postbit":

Code:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in dbtech/vbactivity/hooks/postbit_display_complete.php on line 306

I've increased the memory limit to 384MB and the error persists.
If it's an server side, can you tell me what to do?
The board has 18k+ ative members, more than 4M posts, but it's a dedicated server, can handle this easily.

PS.: I disabled the plugin postbit_display_complete for now until this be fixed.

Thanks in advance.
 
Could you try disabling all other modifications, leaving only vBActivity enabled, and see if it still happens?
 
Could you try disabling all other modifications, leaving only vBActivity enabled, and see if it still happens?

I did it right now, closed the board, disabled all addons/mods, only vBActivity enabled, and the error message stills.
There's something else to try?
 
Could you please create and PM me with a temporary FTP and AdminCP account?

For security reasons, we recommend you create a new FTP account only for DBTech support, then disable or delete it after we have both confirmed the issue has been solved and there are no further issues.

The same applies to AdminCP accounts; they should ideally be temporary accounts created for us only. If we have created an account on your site already, you can optionally boost that account to Administrator and then de-admin this account once the issue has been solved.

If you use a .htaccess password protection for your AdminCP directory, it is recommended that you create a new authorised user for DBTech and remove this user once the issue has been solved.

Please test any temporary accounts you create to ensure that the FTP account has access to the forum files, and that the AdminCP account can access the administrative controls for the product we are assisting you with.

Ensuring this is all in order before submitting the information will significantly speed up the process of assisting you. We will alert you via PM if there's any issues with the login information you have provided.

When sending the PM, for your security you should also un-tick the "Save a copy in my Sent Items folder" checkbox. When the access details have been received, we will delete the PM from our inbox. Ensuring you have not kept a copy of the PM reduces the risk of security breaches.

Thank you for helping us debug our products and allowing us to assist you, we appreciate it :D
 
Could you please create and PM me with a temporary FTP and AdminCP account?

For security reasons, we recommend you create a new FTP account only for DBTech support, then disable or delete it after we have both confirmed the issue has been solved and there are no further issues.

The same applies to AdminCP accounts; they should ideally be temporary accounts created for us only. If we have created an account on your site already, you can optionally boost that account to Administrator and then de-admin this account once the issue has been solved.

If you use a .htaccess password protection for your AdminCP directory, it is recommended that you create a new authorised user for DBTech and remove this user once the issue has been solved.

Please test any temporary accounts you create to ensure that the FTP account has access to the forum files, and that the AdminCP account can access the administrative controls for the product we are assisting you with.

Ensuring this is all in order before submitting the information will significantly speed up the process of assisting you. We will alert you via PM if there's any issues with the login information you have provided.

When sending the PM, for your security you should also un-tick the "Save a copy in my Sent Items folder" checkbox. When the access details have been received, we will delete the PM from our inbox. Ensuring you have not kept a copy of the PM reduces the risk of security breaches.

Thank you for helping us debug our products and allowing us to assist you, we appreciate it :D

Well, I solved the problem myself, changed the achievement code section in the postbit_display_complete.php hook file for better performance.
The problem has been solved here, thanks anyways.

PS.: Do you have any developer documentation for vBActivity to implement custom types?
 
Well, I solved the problem myself, changed the achievement code section in the postbit_display_complete.php hook file for better performance.
The problem has been solved here, thanks anyways.
Could you please share your customisation so that I can test & implement it in the core product? :)

PS.: Do you have any developer documentation for vBActivity to implement custom types?
PHP:
if (class_exists('VBACTIVITY'))
{
	VBACTIVITY::add_type('yourvarname', 'Your Title', 'yourproductid', '/path/to/vbactivity_type/yourvarname.php');
}

The phpDoc for the add_type function is lackluster, so I amended it:
PHP:
	/**
	* Adds a new type to the mix
	*
	* @param	string	The varname of the type we're adding
	* @param	string	The title of the type we're adding
	* @param	string	The product ID of the product this type belongs to
	* @param	string	The path to the "type" file, beginning with /, relative to forum root
	* @param	boolean	(Optional) Whether this type should have per-forum configuration options
	*
	* @return	string	The exclude SQL string
	*/

For the actual php file, you can just use any of the type files in /dbtech/vbactivity/type/ as a base :)
 
Could you please share your customisation so that I can test & implement it in the core product? :)

On the hook file postbit_display_complete.php, I changed the code section between lines 281 and 322, you can to it better and using only 17 lines. You don't need that do {} while();

The phpDoc for the add_type function is lackluster, so I amended it:
For the actual php file, you can just use any of the type files in /dbtech/vbactivity/type/ as a base :)
Nice, but would be better if it has some admincp interface. Anyways, thanks.
 
On the hook file postbit_display_complete.php, I changed the code section between lines 281 and 322, you can to it better and using only 17 lines. You don't need that do {} while();
I'm sure it could be optimised further, but would it not be easier if you simply posted your changes?
 
I'm sure it could be optimised further, but would it not be easier if you simply posted your changes?
Well, I paid for this, give you the hint, why should I do that? LOL. Anyway, here's the snippet:
PHP:
	/*DBTECH_PRO_START*/
	$achievesToDelete = array();
	foreach ((array)$rewardscache['achievement'] as $rewardid => $reward)
	{
		if($parentid = VBACTIVITY::$cache['achievement'][$reward['featureid']]['parentid'])
		{
			$achievesToDelete[] = $parentid;
		}	
	}
	
	foreach ((array)$rewardscache['achievement'] as $rewardid => $reward)
	{
		if(in_array($reward['featureid'], $achievesToDelete))
		{
			// Unset these
			unset($rewardscache['achievement'][$rewardid]);
		}
	}
	/*DBTECH_PRO_END*/

PS: I've not fully tested this yet.
 
Thanks :) I've tested this locally and it appears to work. I've patched it into the live release, so we'll see if any bug reports crop up, but it seems to do the job :)
 
Status
Not open for further replies.

Legacy vBActivity & Awards

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
1,726
Customer rating
0.00 star(s) 0 ratings
Back
Top