Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-8327 now.

Install white-screens if dl() is undefined (fix completed in vcs)

For one reason or another the dl() function is not defined in my build of PHP5.3.0RC2 (Even though, I'm pretty sure that the CGI SAPI is supposed to explicitly register it.)

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

Changed ticket severity from "Uncategorised/normal" to "Severe"

Action performed by Kellanved (Former Team Member) on May 16th 2009, 23:18

Changed ticket status from "New" to "Awaiting team input"

Action performed by ToonArmy (Development Team Member) on May 17th 2009, 02:25

Posted by ToonArmy (Development Team Member) on May 17th 2009, 02:25

Simple fix.
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?

Assigned ticket to user "ToonArmy"

Action performed by Acyd Burn (Server Manager) on May 19th 2009, 10:35

Posted by Kellanved (Former Team Member) on May 19th 2009, 10:56

That's true.

Edited post #156915

Action performed by nickvergessen (Development Team Member) on May 20th 2009, 09:38

Changed ticket status from "Awaiting team input" to "Reviewed"

Action performed by Acyd Burn (Server Manager) on May 20th 2009, 10:21

Linked ticket with changeset: r9518

Action performed by ToonArmy (Development Team Member) on May 20th 2009, 12:37

Changed ticket status from "Reviewed" to "Fix completed in SVN"

Action performed by ToonArmy (Development Team Member) on May 20th 2009, 13:02

Ticket details

Related SVN changesets