MSSQL 集成 RHEL 与 Apache 2 和 PHP 版本 7.0.30

MSSQL 集成 RHEL 与 Apache 2 和 PHP 版本 7.0.30

一切一直运行正常,直到我的客户决定在不询问我的情况下使用 yum 更新所有内容。

我已经安装sqlsrv.sopdo_sqlsrv.so/etc/php.d/

PHP -m 显示两个模块都已加载,命令行也是如此phpinfo.php

命令行 php 运行良好,可以毫无问题地连接到 MSSQL DB

问题在于

我的测试脚本吐出了 apache 中加载的模块-(sqlsrv 不在其中)显然抱怨它无法加载库

----------------------Extensions--------------
Array ( [0] => Core [1] => date [2] => libxml [3] => openssl [4] => pcre [5] => zlib [6] => filter [7] => hash [8] => Reflection [9] => SPL [10] => session [11] => standard [12] => apache2handler [13] => bz2 [14] => calendar [15] => ctype [16] => curl [17] => dom [18] => exif [19] => fileinfo [20] => ftp [21] => gd [22] => gettext [23] => gmp [24] => iconv [25] => json [26] => mysqli [27] => PDO [28] => pdo_mysql [29] => pdo_sqlite [30] => Phar [31] => posix [32] => shmop [33] => SimpleXML [34] => sockets [35] => sqlite3 [36] => sysvmsg [37] => sysvsem [38] => sysvshm [39] => tokenizer [40] => xml [41] => wddx [42] => xmlreader [43] => xmlwriter [44] => xsl [45] => zip [46] => Zend OPcache )
 ----------------------Extensions--------------
Fatal error: Uncaught Error: Call to undefined function sqlsrv_connect() in /var/www/html/db-test.php:26 Stack trace: #0 {main} thrown in /var/www/html/db-test.php on line 26

phpinfo.php(下图)显示正确/etc/php.ini,但它也扫描线程安全 .inis 并且没有显示sqlsrv.so已加载。

来自 apache 的 phpinfo.php

知道为什么 apache 没有加载我的库吗/etc/php.d/*.so

相关内容