origin:
If you want to connect to the sql server database in the project, if the mssql extension is not installed, the following error will be reported
At this time, first check whether the following server has the mssql extension installed
At this time, finally use phpinfo on the server to see the following
And pay attention to this php version number
Because my colleague executed php -m on the server before, it showed the mssql extension
as follows
But in fact, the default php -m is the old version and PHP5.6 is used in the project
This will take a look under PHP56
Execute cd /usr/local/php56/bin
Execute php -m and find that there is no mssql extension
Find the cause of the problem and start solving
Because it was installed by compiling at that time, it is now necessary to rewrite the compilation extension
Specific steps
Find the php56 source package installed at that time
cd /user/local/src/php-5.6.4
Because the mssql extension was installed directly because it was in a hurry, there was no screenshot record
Let's take the opcache extension as a test
take a look
The next step is to recompile and install the required extensions.