I am trying to install a third-party PHP extension (.so) in PHP 5.3.6-13 on Ubuntu 11.10 and use it in a web environment. The vendor documentation suggests using the dl() function to dynamically load the library.
When I try to execute my sample code, I find that dl() not available (Fatal error: call to undefined function dl ()), because the dl() function is deprecated in PHP 5.3. But there is an enable_dl configuration rule in php.ini, and other sources say that I should use dl () by simply changing the php.ini variables ( enable_dl=On , safe_mode=Off , not specified in disable_functions ) and restarting apache. When I try to do this, dl() is still undefined.
So, I go into the PHP 5.3 SAPI change notes and find this:
The dl () function is now disabled by default and is now available only in the CLI, CGI and embeds SAPI.
Does this mean that dl() not only "disabled by default" in PHP 5.3+ using web-based SAPI, but actually "completely unavailable no matter what I do, even when changing PHP configuration settings" ? This is what it seems to me, since I cannot get dl() to work no matter what I configure.
To clarify: I can change php.ini and download the extension directly, so itβs not a question of how to make the extension work, but of the dl() function and its state in PHP 5.3+. If it is no longer available under any circumstances, I want to inform the supplier so that they can update their documentation. But if it should be accessible, and I just missed something, I would also like to hear it.
jonathanm
source share