Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamically loading php exstension without dl() function?

Is that possible and if it is, how to do that? I'm asking because dl() function is not available to me and because PHP team is abandoning this function from further versions.

Please do not answer "Use the Extension Loading Directives instead" - that is exactly the part which I do not understand how and I would like to/I'm asking about.

like image 756
greenV Avatar asked Apr 09 '26 22:04

greenV


1 Answers

The function has been removed from all SAPIs other than CLI and Embedded as of PHP 5.3. SAPIs are the interface between PHP and a web server / the CLI / etc.

It is no longer possible to load extensions at run-time in some cases. There are no other options available to you if you find your current SAPI does not support runtime extension loading.

If you need an extension loaded reliably, you should do so in the proper place in the system configuration. No amount of saying "that is not the answer I want" will change reality.

like image 75
Charles Avatar answered Apr 11 '26 14:04

Charles



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!