Spurious SAFE MODE warnings in DB_DataObject
| From: | Ken Restivo | Date: | Wed, 31 May 2006 11:10:31 +0000 |
| Subject: | Spurious SAFE MODE warnings in DB_DataObject | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-24208@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm getting spurious SAFE MODE complaints in DB_DataObject 1.7.15 on PHP 4.3.10-16.
Merely an annoyance on my test system here, except that this error will be fatal on my ISP who runs
a completely locked-down ultra-strict SAFE MODE supermax high-security prison over there. Any hint
of SAFE MODE is punishable by instant death: this just won't work there.
The error is:
[Wed May 31 03:57:42 2006] [error] PHP Warning: parse_ini_file(): SAFE MODE Restriction in effect.
The script whose uid/gid is 1001/33 is not allowed to access /u4/kens/ki/proj/coop/web/reports owned
by uid/gid 0/0 in /u4/kens/ki/proj/coop/web/includes/object-config.php on line 29
That error is complete bullshit. The mentioned files and directories are owned by 1001/33. *None* of
them are owned by 0/0, as it claims. It is lying to me. That makes me sad.
The code in object-config.php at which this fails is merely:
function parseIniFile($filename)
{
$config = parse_ini_file($filename,TRUE);
foreach($config as $class=>$values) {
$options = &PEAR::getStaticProperty($class,'options');
$options = $values;
}
// to hack around dbobject trashing settings
global $_DB_DATAOBJECT_FORMBUILDER;
$_DB_DATAOBJECT_FORMBUILDER['CONFIG'] =
$config['DB_DataObject_FormBuilder'];
}
The $filename is 'settings/foo-dbobj.ini'. Yes, that file is 1001/33 too. For those who
don't recognise the uid 33, it is the Debian www-data user, which is what Apache is running as.
1001 is my shell uid.
- -ken
- --
- ---------------
The world's most affordable web hosting.
http://www.nearlyfreespeech.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFEfXmne8HF+6xeOIcRAl9YAKDbWNbPLPMZslLHbcxxuI+7kf74zgCeMb56
qyEL5ui9rsD0jnmfb/mouq4=
=7N2g
-----END PGP SIGNATURE-----