I tried running a web server using php + apache2 + php7 for apache module but unfortunately mysqli extension not include in this php,
so i installed php-mysql package and i already write
extension=mysqli.so to php.ini
When i tried running this script with php command
<?php
$mysqli = mysqli_init();
In terminal it's give me no error
But when i tried running in browser it's give me fatal error
Fatal error: Uncaught Error: Call to undefined function mysqli_init() in /data/data/com.termux/files/usr/share/apache2/default-site/htdocs/test.php:8 Stack trace: #0 {main} thrown in /data/data/com.termux/files/usr/share/apache2/default-site/htdocs/test.php on line 8
did you specify that php.ini file using -c flag to php?
I am using default path of php.ini
$PREFIX/lib/php.ini
I don't think we have a default location for php.ini files.
You'll need to use other methods to manually specify your php.ini -> http://php.net/manual/en/configuration.file.php
Sorry, for false info.
I can confirm that php-mysql doesn't work with apache2.
nginx seems to be working.
Do you get any errors in log files?
i'm sorry but i already remove apache2 packages from termux last night.
Ok, i'll try using nginx.
Please update to php-7.1.12-1 package. php-mysql is built into the php package now, so, you don't need to have an entry for it in your php.ini
Tetew
Most helpful comment
Please update to php-7.1.12-1 package. php-mysql is built into the php package now, so, you don't need to have an entry for it in your
php.ini