0
如果我創建的PHP文件,並在瀏覽器中與以下內容打開它不工作:連接mysql命令行
<?php
var_dump(function_exists("mysqli_connect"));
我收到:
bool(true)
但是當我做它的ssh命令行
php -r 'var_dump(function_exists("mysqli_connect"));'
我收到:
bool(false)
這是爲什麼?我可以使用mysqli_connect/mysql_connect從瀏覽器操作我的網站,但不能在SSH上。
我想更新我的PHPBB 3.0〜3.1 PHPBB via the command line:
php ./bin/phpbbcli.php db:migrate --safe-mode
但正如你看到的,我不能。輸出是:
PHP Fatal error: SQL ERROR [ mysqli ]<br /><br />mysqli_connect function does not exist, is mysqli extension installed? []<br /><br />An sql error occurred while fetching this page. Please contact an administrator if this problem persists. in /zzzzzzzzz/phpbb/db/driver/driver.php on line 855
當然,我的phpbb 3.0板在mysqli上運行良好。有人能幫助我嗎?