MyBB Community Forums

Full Version: Warning [2] com() has been disabled for security reasons - Line: 7589
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I updated the forum to version 1.8 and I get this error every time I see a discussion. Why?
It seems to be a windows setting, check your php.ini config
(2015-05-26, 10:07 PM)Crazycat Wrote: [ -> ]It seems to be a windows setting, check your php.ini config

how you do ?
i have hosting windows.
contact your web host. it needs to be fixed by them.
(2015-05-27, 12:13 PM).m. Wrote: [ -> ]contact your web host. it needs to be fixed by them.

reply of  my host:
"They do not make any customizations to the configuration of php"
looks like functions.php file is corrupt or it is modified. can you post lines from 7580 to 7600
(2015-05-27, 12:26 PM).m. Wrote: [ -> ]looks like functions.php file is corrupt or it is modified. can you post lines from 7580 to 7600


		elseif(function_exists('mcrypt_create_iv'))
		{
			$output = mcrypt_create_iv($count, MCRYPT_RAND);
		}
		// Try Windows CAPICOM before using our own generator
		elseif(class_exists('COM'))
		{
			try
			{
				$CAPI_Util = new COM('CAPICOM.Utilities.1');
				if(is_callable(array($CAPI_Util, 'GetRandom')))
				{
					$output = $CAPI_Util->GetRandom($count, 0);
				}
			} catch (Exception $e) {
			}
		}
	}

	// Didn't work? Do we still not have enough bytes? Use our own (less secure) rng generator
	if(strlen($output) < $count)
^ that code looks fine. if your host can't change the configuration then its better to move to a better host
The only other solution would be to patch functions.php to use a less secure method for creating the random data.
(2015-05-27, 12:19 PM)Reiofuda Wrote: [ -> ]reply of  my host:
"They do not make any customizations to the configuration of php"

That's a quite bad reply if you literally quoted it. We can't make any customization to their PHP configuration file to enable a function disabled by them for some reason... We could only check whether it's disabled or not and use another function if it is, but that could be said about any function.