dongshuzhuo5659 2013-06-29 11:39
浏览 62

在服务器上启用PDO,或者不使用laravel?

i have laravel based cms, when i try to put it on our server it says: Class 'PDO' not found

So i tried to just write a small script with just a new pdo object, same result. The server doesnt belong to our company, so i dont have access to php.ini etc. I have access to cpanel, but php options are only for reference there, i cant change them( dont see pdo in there anyways).

I have to finish the cms, and make it work, but i m complete noob in servers-related stuff. :(

I am right now at weekend, so cant call the support\etc for the server. Is there anything i can do now to enable PDO? i found an article on google how to enable it from cpanel whm, but it doesnt look like my cpanel at all.

p.s. is this usually a problem to get the server company enable extensions like pdo\mysqli\etc? is this normal they only have basic mysql? seems very weird to me, its like basics for DB, and working with basic mysql only, which is much more prone to injections is simply not safe and costs x10 work hours to make programmers write own db class when there is great free stuff like pdo\mysqli...this is stupid as hell, for a PAID hosting...

  • 写回答

1条回答 默认 最新

  • dsvjmc0907 2013-06-29 14:09
    关注

    As you are having cPanel, The best and easy way is to enable the extension with easyapache

    log in to server via ssh

    /scripts/easyapache

    Don't forget to run that in screen

    screen -S test

    Then enable the PDO extension for the php.

    If you are not expert with easyapache back end, then try from WHM. here are the steps

    • Login to WHM
    • Click Apache Update
    • Click Start Customizing Based on Profile
    • Select an Apache version
    • Click Next Step
    • Select PHP 5
    • Click Next Step
    • Select a version of PHP 5
    • Click Next Step
    • Click Exhaustive Options List button
    • Scroll down to the check box labeled PDO ( Two pdo Options to be checked )
    • Click Save and Build

    Both will work in the same way. I hope this will resolve your issue.

    评论

报告相同问题?

悬赏问题

  • ¥15 Qt下使用tcp获取数据的详细操作
  • ¥15 idea右下角设置编码是灰色的
  • ¥15 全志H618ROM新增分区
  • ¥20 jupyter保存图像功能的实现
  • ¥15 在grasshopper里DrawViewportWires更改预览后,禁用电池仍然显示
  • ¥15 NAO机器人的录音程序保存问题
  • ¥15 C#读写EXCEL文件,不同编译
  • ¥15 MapReduce结果输出到HBase,一直连接不上MySQL
  • ¥15 扩散模型sd.webui使用时报错“Nonetype”
  • ¥15 stm32流水灯+呼吸灯+外部中断按键