PHP DL Function

PHPphp.ini

Is allowing dynamic extension loading dangerous for some reason?

I ask because I need it to include the pecl oauth.so extension to make the Google Adwords PHP SDK work using dl().

I've tried all other alternatives but just can't get it to work:

http://php.net/manual/en/function.dl.php

enable_dl is set to off by default inside my php.ini, I enabled it, restarted apache and it works. If it's safe to use why is it disabled by default? I'm the only user with access to the server and it will be hosting a web application.

Any advice would be helpful!

Best Answer

It's disabled by default because a lot of LAMP configurations are on shared environments that might or might not like their users loading random extensions without administrators permissions.

You seem to know what you are doing, so there should be no security risk unless you will be using the same configuration on a server web server where you have untrustworthy users.