oacis
09-02-2008, 12:35 AM
Has anyone successfully installed the JanRain OpenID library here at FutureQuest?
The library tries to determine which XML parser to use with the following:
function Auth_Yadis_getSupportedExtensions()
{
return array(
'dom' => array('classname' => 'Auth_Yadis_dom',
'libname' => array('dom.so', 'dom.dll')),
'domxml' => array('classname' => 'Auth_Yadis_domxml',
'libname' => array('domxml.so', 'php_domxml.dll')),
);
}
/**
* Returns an instance of a Auth_Yadis_XMLParser subclass based on
* the availability of PHP extensions for XML parsing. If
* Auth_Yadis_setDefaultParser has been called, the parser used in
* that call will be returned instead.
*/
function &Auth_Yadis_getXMLParser()
{
global $__Auth_Yadis_defaultParser;
if (isset($__Auth_Yadis_defaultParser)) {
return $__Auth_Yadis_defaultParser;
}
$p = null;
$classname = null;
$extensions = Auth_Yadis_getSupportedExtensions();
// Return a wrapper for the resident implementation, if any.
foreach ($extensions as $name => $params) {
if (!extension_loaded($name)) {
foreach ($params['libname'] as $libname) {
if (@dl($libname)) {
$classname = $params['classname'];
}
}
} else {
$classname = $params['classname'];
}
if (isset($classname)) {
$p = new $classname();
return $p;
}
}
if (!isset($p)) {
trigger_error('No XML parser was found', E_USER_ERROR);
} else {
Auth_Yadis_setDefaultParser($p);
}
return $p;
}
There is a call to the PHP function dl() in function &Auth_Yadis_getXMLParser() shown above. The application dies right at the call to dl()--highlighted in blue in the above code block. Nothing shows up in the error log. The PHP configuration at FutureQuest has enable_dl set to OFF. I'm assuming this is the reason it dies. I tried using ini_set() to turn it ON without success.
I've also seen that dl() is not supported in all web servers and is deprecated in PHP 5.
Is there another method of determining the XML parser that should be used?
Thanks for your help.
-- Wayne
The library tries to determine which XML parser to use with the following:
function Auth_Yadis_getSupportedExtensions()
{
return array(
'dom' => array('classname' => 'Auth_Yadis_dom',
'libname' => array('dom.so', 'dom.dll')),
'domxml' => array('classname' => 'Auth_Yadis_domxml',
'libname' => array('domxml.so', 'php_domxml.dll')),
);
}
/**
* Returns an instance of a Auth_Yadis_XMLParser subclass based on
* the availability of PHP extensions for XML parsing. If
* Auth_Yadis_setDefaultParser has been called, the parser used in
* that call will be returned instead.
*/
function &Auth_Yadis_getXMLParser()
{
global $__Auth_Yadis_defaultParser;
if (isset($__Auth_Yadis_defaultParser)) {
return $__Auth_Yadis_defaultParser;
}
$p = null;
$classname = null;
$extensions = Auth_Yadis_getSupportedExtensions();
// Return a wrapper for the resident implementation, if any.
foreach ($extensions as $name => $params) {
if (!extension_loaded($name)) {
foreach ($params['libname'] as $libname) {
if (@dl($libname)) {
$classname = $params['classname'];
}
}
} else {
$classname = $params['classname'];
}
if (isset($classname)) {
$p = new $classname();
return $p;
}
}
if (!isset($p)) {
trigger_error('No XML parser was found', E_USER_ERROR);
} else {
Auth_Yadis_setDefaultParser($p);
}
return $p;
}
There is a call to the PHP function dl() in function &Auth_Yadis_getXMLParser() shown above. The application dies right at the call to dl()--highlighted in blue in the above code block. Nothing shows up in the error log. The PHP configuration at FutureQuest has enable_dl set to OFF. I'm assuming this is the reason it dies. I tried using ini_set() to turn it ON without success.
I've also seen that dl() is not supported in all web servers and is deprecated in PHP 5.
Is there another method of determining the XML parser that should be used?
Thanks for your help.
-- Wayne