How to check if PDO support is enabled in my Apache Installation?

前端 未结 3 449
余生分开走
余生分开走 2021-01-19 12:02

I am using a shared hosting through CIPL.in. They use cpanel. I am trying to deploy a ZEND app on my website. However it keeps giving the error.

An error oc         


        
相关标签:
3条回答
  • 2021-01-19 12:23
    if (!defined('PDO::ATTR_DRIVER_NAME')) {
    echo 'PDO unavailable';
    }
    elseif (defined('PDO::ATTR_DRIVER_NAME')) {
    echo 'PDO available';
    }
    

    I hope this works

    0 讨论(0)
  • 2021-01-19 12:38

    The configure command in your PHP output shows:

    '--disable-pdo'
    

    so I think it's safe to assume that they haven't enabled it.

    0 讨论(0)
  • 2021-01-19 12:46

    Does this application want Pdo_Mysql? If so you may be able to use the Mysqli adapter instead - it depends on the software but it's possible.

    In the area where you set your database connection details, there's probably an option called 'adapter'. Try setting its value to 'mysqli'

    0 讨论(0)
提交回复
热议问题