Can't Execute dl()
Posted by: Len_Jacobson (---.98.16.72.dynamic.ip.windstream.net)
Date: April 05, 2012 10:10PM

I am using a third-party product (WHMCS) that requires the PHP function 'dl()', which dynamically loads extensions. In the PHP manual, there is a message that says "This function has been removed from some SAPIs in PHP 5.3."

When I tried to execute the installation code of WHMCS, it failed with a message: "Call to undefined function dl() in ...".

In the 'php.ini' file, I saw that the parameter, 'enable_dl', is 'Off'. I changed that to 'On', but still the 'dl()' function is undefined.

Can someone please help me past this problem?

Thank you.

Options: ReplyQuote
Re: Can't Execute dl()
Posted by: toivo (---.belrs5.nsw.optusnet.com.au)
Date: April 07, 2012 06:56AM

Which php.ini file did you modify? The correct php.ini file is in the bin subfolder of the version of Apache you are running.

You need to restart the Apache service before the change takes effect.

Options: ReplyQuote
Re: Can't Execute dl()
Posted by: Len_Jacobson (---.static.optonline.net)
Date: April 08, 2012 05:36PM

I do believe I modified the correct version of 'php.ini'. As evidence, when I then executed 'phpinfo()', I did see that the parameter, 'enable_dl', was now 'On'. Isn't that clear proof that I had modified the correct 'php.ini'?

And, yes, I did restart the Apache server.

But please answer this question: Do you believe that if the parameter, 'enable_dl', is 'On', that I should have been able to use the 'dl()' function?

Thanks much.

Options: ReplyQuote
Re: Can't Execute dl()
Posted by: toivo (---.belrs5.nsw.optusnet.com.au)
Date: April 09, 2012 12:52PM

You have obviously modified the correct php.ini file.

According to the PHP manual, "The default is to allow dynamic loading, except when using safe mode. In safe mode, it's always impossible to use dl()."

On the other hand, dynamic loading is not supported in multi-threaded PHP, and Wampserver is multi-threaded. If you display or log PHP warnings, you should see the message, similar to this example from a different product: [serverfault.com]

toivo
Sydney, Australia

Options: ReplyQuote


Sorry, only registered users may post in this forum.