Loading a PHP extension from a script using dl ()

I am going to buy a (cheap) hosting space using apache / php 5 / mysql. Because it's cheap, I don't have direct control over php.ini and downloading extensions.

My question is: can I load the extension by putting the .dll file in my space and using the dl() php function? Can the host disable this feature to avoid loading the user extension this way?

+1
source share
3 answers

Yes, it can be disabled through the enable_dl and safe_mode php.ini settings (which will almost certainly be the case, since otherwise you could, for example, upload your own code to the web server process).

And this is in addition to setting disable_functions , which can disable anything.

+2
source

the host can disable any function in php from php.ini. in fact, I would be surprised if the host left this feature.

0
source

Since you are talking about a DLL, you intend to get a Windows hosting server with PHP, however it is better to check it with the hosting company, because dl () will probably be disabled.

Smaller hosting companies may be more convenient with the addition of extensions that you may need.

0
source

All Articles