How to enable MySQLi extension for PHP in htaccess? Is it even possible to enable PHP extensions through htaccess file?
            Asked
            
        
        
            Active
            
        
            Viewed 6,661 times
        
    0
            
            
        - 
                    Please provide some more context to allow others to give relevant answers and rate answers accordingly. Are you on a shared hosting server? Do you have (shell) access to the server? – Symen Timmermans Apr 28 '11 at 11:37
2 Answers
1
            
            
        You don't.
Mysqli should be installed as a PHP-module and loaded through php.ini. 
Assuming you use a debian-related Linux distribution, this can be done by issuing apt-get install php5-mysqli.
If this is not an option, please read the PHP documentation on this module and follow the steps described there.
 
    
    
        Aron Rotteveel
        
- 81,193
- 17
- 104
- 128
1
            
            
        The extension= directive is only valid in the central php.ini, it cannot be set from within .htaccess files.
At best you could load it manually in your PHP script:
<?php
   dl("mysqli.so");
Only works until PHP 5.2
 
    
    
        mario
        
- 144,265
- 20
- 237
- 291
- 
                    
- 
                    Like mentioned, per `php.ini`. Better yet, by [not using mysql_*](http://stackoverflow.com/questions/12859942/why-shouldnt-i-use-mysql-functions-in-php) anymore. – mario Jul 21 '15 at 12:46
 
    