17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 55644 Views |
-
Problems accessing security groups

1 February 2008 at 4:58pm
I can't seem to access security groups or delete them. The error I get is below:
Fatal error: Access to undeclared static property: Controller::$db in /home/vanguardhr/www/sapphire/core/Object.php(315) : eval()'d code on line 1
-
Re: Problems accessing security groups

5 February 2008 at 8:24pm
Exact same issue here. The details page is just blank. If I set display_errors = On in php.ini I can see the same error.
Fatal error: Access to undeclared static property: Controller::$db in
/home/vhosts/mayarowlett.com/v2.2.1/sapphire/core/Object.php(315) : eval()'d code on line 1I can however see/use the tree control on the left hand side. create and delete groups happens OK.
We are probably missing some feature of php, that has been the root of my SS problem(s) so far. So I am going down that road for now. Mo later.
-
Re: Problems accessing security groups

7 February 2008 at 7:30pm Last edited: 7 February 2008 7:34pm
mmilo, do you have PHP v5.1.2? My openSuSE v10.1 server does.
Apparently SS does NOT play well with that version.From /sapphire/core/Object.php (about line 315):
function uninherited($name, $builtIn = false) {
// Copy a built-in value into our own array cache. PHP's static variable support is shit.
if($builtIn) {
$val = $this->stat($name);
$val2 = null;
try {
// The reflection doesn't work properly in 5.1.2
if(phpversion() == '5.1.2') {
$val2 = eval('return ' . get_parent_class($this) . "::\$$name;");
} else {
$reflection = new ReflectionClass(get_parent_class($this));
$property = $reflection->getProperty($name);
$val2 = $property->getValue();
}
} catch(Exception $exc) {
// do nothing.. the property doesn't exists!
}
return ($val != $val2) ? $val : null;
}return isset(Object::$uninherited_statics[$this->class][$name]) ? Object::$uninherited_statics[$this->class][$name] : null;
}So, changing installed version of PHP is one fix... Trying to grok the code for a workaround.
JF -
Re: Problems accessing security groups

7 February 2008 at 8:24pm
It was easier for me to update to php v5.2.0 on openSuSE v10.1:
Add this repo: http://repos.opensuse.org/server:/php/SUSE_Linux_10.1/
run YaST, software->install locations.
Add URL, OK Finish.
Then Software->Software Management
Alt+S (search) for php, see that the available version is 5.2.0 (installed = 5.1.2).
Update php, uninstall php-mysqli (I didn't seem to need it, and it is provided in the new rpm).
the rcapache2 restart had weirdness, so I actually rebooted just to be sure.
run php -v (or php5 -v) on command line to verify version.I can view the security page now. Good luck!
-
Re: Problems accessing security groups

5 March 2008 at 5:38am
I had this problem. Unfortunately, I do not have the option of upgrading 5.1.2 on my hosting provider. However, I have come up with this workaround:
if(phpversion() == '5.1.2') {
if (property_exists ( get_parent_class($this), $name)) {
$val2 = eval('return ' . get_parent_class($this) . "::\$$name;");
}The test for property_exists stops this eval from happening when the property does not exist, therefore stopping the problem occurring.
| 55644 Views | ||
|
Page:
1
|
Go to Top |

