Bug tracker
Install white-screens if dl() is undefined (fix completed in vcs)
I'm going to cross post the rest of this from my blog post:
$install->load() would create an instance of install_install and then load that, which eventually got to the get_available_dbms function call which would then call can_load_dll if a particular DBMS extension was not available. Part of that function is a call to dl() to attempt to load a shared object during runtime.
Only problem is that dl() was not defined and thus it would encounter a fatal error. It wasn’t available in the php-cgi binary I built. Additionally, it wouldn’t display this fatal error because the call is made with error suppression. (I.E: @dl(’stuff’); )
/*So, I added this to code
install/index.php to avoid this problem.*/
if(!function_exists('dl'))
{
function dl($ext)
{
return false;
}
}
So to conclude: phpBB 3.0.4 doesn’t install when dl() is not a defined function.
Comments / History
- Code: Select all
Index: includes/functions_install.php
===================================================================
--- includes/functions_install.php (revision 9511)
+++ includes/functions_install.php (working copy)
@@ -21,7 +21,7 @@
*/
function can_load_dll($dll)
{
- return ((@ini_get('enable_dl') || strtolower(@ini_get('enable_dl')) == 'on') && (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') && @dl($dll . '.' . PHP_SHLIB_SUFFIX)) ? true : false;
+ return ((@ini_get('enable_dl') || strtolower(@ini_get('enable_dl')) == 'on') && (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') && function_exists('dl') && @dl($dll . '.' . PHP_SHLIB_SUFFIX)) ? true : false;
}
/**
Should this wait for 3.0.6?