Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

TP3 Undefined class constant 'MYSQL_ATTR_INIT_C..

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Phpinfo (); there is a Configuration File (php.ini) and Loaded Configuration File which takes precedence over the former! If the latter is empty, the former prevails; this is where apache reads the php.ini, not under the php installation directory. The value of Loaded Configuration File can be modified by the parameter phpinidir of httpd.conf.

In Thinkphp3.2, configure the constant to connect to mysql in the config.php of common

However, it shows:

Undefined class constant 'MYSQL_ATTR_INIT_COMMAND

This is mostly due to the failure to connect to the php_pdo_mysql.dll extension of ext in the PHP directory

Httpd.conf in apache can read the location of php.ini

But the php.ini loading extension is easy to ignore. Line 734 of php.ini in php5.6 has

Expand the directory under windows, remove the semicolon, and then write down the location of the ext extension

Notice what is in the path? Of /

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report