The php.ini
Apache is usually different from php.ini
which they see in php, if you manually installed php and apache you must configure in httpd.conf the parameter PHPIniDir
, assuming your php is in C:
.
If it is PHP5:
LoadModule php7_module "C:/php/php5apache2_4.dll"
PHPIniDir "C:/php/php.ini"
If it is PHP7:
LoadModule php7_module "C:/php/php7apache2_4.dll"
PHPIniDir "C:/php/php.ini"
I believe that usually the dlls php5apache2_4.dll
and php7apache2_4.dll
see in TS version of PHP, I believe in NTS does not contain, but I am not sure (I will review this information).
Read more about TS and NTS on Thread Safe(TS) and Non Thread Safe(NTS) - What are they, what’s the difference?
Being Apache for Windows with Apache2handler you need to download the PHP Thread Safe
on the link: http://windows.php.net/download/, if you already have php correct ignore this step.
If you know the way PHPIniDir "...."
then look for it and edit the extensions ;
the front of the line shall be similar to this:
extension=php_mbstring.dll
extension=php_exif.dll; Must be after mbstring as it depends on it
;extension=php_memcache.dll
;extension=php_mysql.dll
extension=php_mysqli.dll
So after this it is necessary to restart Apache, if installed manually will depend on the type of installation.
If you have no control panel but have installed as a service you can try the command:
cd C:\Apache24\bin
httpd -k restart
If it doesn’t work it’s because it’s not a service, then maybe you installed Apache Service Monitor, you can restart it for it:
If nothing goes right, then try to log out of windows, or restart windows.
For those who use Xampp can use the own dashboard, click Stop next to Apache and then click Start:
What version of PHP?
– Woss
You’ve cleared the line
extension=php_mysqli.dll
? reinserted the apache?– rray
Yes, I took ; out of the way in 2 php.ini
;On windows:
extension_dir = "C:/PHP/ext"
– Alguek
Restarted (Restart) Xampp/Wamp/easyphp/apache after uncommenting?
– Guilherme Nascimento
@Guilhermenascimento I did the manual installation of Apache and Php, I didn’t use Xampp pq I couldn’t even turn on Apache for it
– Alguek