PDO connection works from command line, but not through Apache?

前端 未结 4 1190
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-16 17:40

I have a very simple test script:



        
4条回答
  •  旧巷少年郎
    2020-12-16 18:24

    Same issue but different cause here
    My solution was just a simple apt-get install php-mysql away

    Be sure to check for pdo_mysql in your phpinfo()
    Found it on this post : PDOException “could not find driver”

    I wonder why CLI worked in such conditions O_o Maybe something installed incorrectly, or got overriden ? Well, now, it works fine !

提交回复
热议问题