UseBB Community

UseBB support, discussion and development

[FIXED] ini_set() disabled for security

Post Reply

Page: 1

Author Post
Member
Registered: May 2005
Posts: 26
Quote
An error was encountered. We apologize for any inconvenience.

In file db_mysql.php on line 49:

E_WARNING - ini_set() has been disabled for security reasons


greetings ScanX
« Last edit by Dietrich on Mon Dec 12, 2005 1:55 pm. »
Member
Registered: Mar 2005
Posts: 184
Location: Hungary
This looks like a wrong server setup for me.
_______________
Long Live Rock n' Roll!
Member
Registered: May 2005
Posts: 26
Security is nothing wrong. ;)
Other boards will still running with this serversetup.
Member
Registered: Mar 2005
Posts: 184
Location: Hungary
I am not that PHP expert, but disabling ini_set is paranoid.
_______________
Long Live Rock n' Roll!
Member
Registered: May 2005
Posts: 26
May be. Say that to my provider. And as said, other boards run without problems.
Developer
Registered: Apr 2004
Posts: 2230
Location: Belgium
Moved to bug reports.

UseBB tries to set some PHP settings to avoid problems. If ini_set() gives an error, it will show this as a General Error.

The solution is to filter this error in the error handler. Will be put in CVS.
Developer
Registered: Apr 2004
Posts: 2230
Location: Belgium
Fixed in CVS. Thanks for reporting.

To apply this fix to 0.7:

- Open sources/functions.php
- Find
		//
// Don't show various errors on PHP5
//
if ( intval(substr(phpversion(), 0, 1)) > 4 ) {

$ignore_warnings = array(
'var: Deprecated. Please use the public/private/protected modifiers',
'Trying to get property of non-object',
);
if ( in_array($error, $ignore_warnings) )
return;

}

- After, add:
		//
// Ignore these warnings
//
$ignore_warnings = array(
'ini_set() has been disabled for security reasons',
);
if ( in_array($error, $ignore_warnings) )
return;

- Save and close.

Post Reply

Page: 1

UseBB Community is powered by UseBB 1 Forum Software