First of all, you can use
php -m
from the command line to check which extensions are included.
If mysql is not listed, it means it is not enabled / not loaded - which is probably the case here.
Then you will want to use
php --ini
to check which .ini / files are read by PHP.
Once you know which php.ini used, you will have to edit it and add something like this:
; configuration for php MySQL module extension=mysql.so
To download the mysql extension.
Depending on your distribution, the file may be .ini for the extension (for example, Ubuntu does this).
If so, you can also create a new .ini file ( mysql.ini for example) next to the others, and put the two lines that I placed in this new file.
Pascal martin
source share