Enable PHP File Extension Info - runtime

1

I'm using a library called Intervention / Image in Laravel 4.2. On a certain page I use this library to cut images, but it is not doing so because it requires me to enable or install this extension.

On the localhost it works, on the not server.

But I do not have access to the PHP.INI from the server.

Can you enable this DLL in real time?

    
asked by anonymous 23.06.2015 / 16:32

1 answer

4

At run time to enable an extension you should use dl :

dl('/path/fileinfo.so');

But I'm pretty sure this will not work because of the permission level of the users.

  

As per @bfavaretto - Warning : The dl function has been removed in some SAPIs in PHP 5.3.

You can try to use .htaccess and add this to the file (I've never used this):

<IfModule mod_php5.c>
php_extension fileinfo.so
</IfModule>
    
24.06.2015 / 19:07