Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php dl() for loading extensions is removed from some SAPIs

I'm reading on the dl() function (which lets you load extensions manually), and the php documentation says

WARNING: This function has been removed from some SAPI's in PHP 5.3.

Does anyone know what this means. SAPI seems to mean Server API, but I'm not sure what exactly this means.

like image 220
sameold Avatar asked Dec 23 '25 03:12

sameold


1 Answers

That very page says

The only SAPI's that allow dl() are: CLI, CGI and Embed. Use the Extension Loading Directives instead.

You can determine what sapi you are using with php_sapi_name(). At least for me, running it on the command line returns "cli."

like image 121
Explosion Pills Avatar answered Dec 24 '25 18:12

Explosion Pills



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!