英文:
Error comes after updating PHP version in IIS PHP manager
问题
网站在我将PHP版本从v7.4.24更改为v7.4.33后,在IIS PHP管理器中不响应。
错误如下:
PHP致命错误:在E:\inetpub\wwwroot\intranet\includes\database\mysql\database.inc的第56行中未定义的类常量'MYSQL_ATTR_USE_BUFFERED_QUERY'。
堆栈跟踪:
#0 E:\inetpub\wwwroot\intranet\includes\database\database.inc(1745):DatabaseConnection_mysql->__construct()
#1 E:\inetpub\wwwroot\intranet\includes\database\database.inc(1535):Database::openConnection()
#2 E:\inetpub\wwwroot\intranet\includes\database\database.inc(2626):Database::getConnection()
#3 E:\inetpub\wwwroot\intranet\includes\cache.inc(359):db_escape_table()
#4 E:\inetpub\wwwroot\intranet\includes\cache.inc(340):DrupalDatabaseCache->getMultiple()
#5 E:\inetpub\wwwroot\intranet\includes\cache.inc(57):DrupalDatabaseCache->get()
#6 E:\inetpub\wwwroot\intranet\includes\module.inc(762):cache_get()
#7 E:\inetpub\wwwroot\intranet\includes\module.inc(962):module_implements()
#8 E:\inetpub\wwwroot\intranet\modules\system\system.module(2519):module_invoke_all()
#9 E:\inetpub\wwwroot\intranet\includes\theme.inc(798):_system_rebuild_theme_data()
#1 在E:\inetpub\wwwroot\intranet\includes\database\mysql\database.inc的第56行中。
我尝试在PHP.ini文件中添加了PDO extension_dir="path",因为之前未分配目录路径。但结果仍然相同。
英文:
The website is not responding after I change the PHP version from v7.4.24 to v7.4.33 in IIS PHP manager.
The error is as follows:
PHP Fatal error: Uncaught Error: Undefined class constant 'MYSQL_ATTR_USE_BUFFERED_QUERY' in E:\inetpub\wwwroot\intranet\includes\database\mysql\database.inc:56
Stack trace:
#0 E:\inetpub\wwwroot\intranet\includes\database\database.inc(1745): DatabaseConnection_mysql->__construct()
#1 E:\inetpub\wwwroot\intranet\includes\database\database.inc(1535): Database::openConnection()
#2 E:\inetpub\wwwroot\intranet\includes\database\database.inc(2626): Database::getConnection()
#3 E:\inetpub\wwwroot\intranet\includes\cache.inc(359): db_escape_table()
#4 E:\inetpub\wwwroot\intranet\includes\cache.inc(340): DrupalDatabaseCache->getMultiple()
#5 E:\inetpub\wwwroot\intranet\includes\cache.inc(57): DrupalDatabaseCache->get()
#6 E:\inetpub\wwwroot\intranet\includes\module.inc(762): cache_get()
#7 E:\inetpub\wwwroot\intranet\includes\module.inc(962): module_implements()
#8 E:\inetpub\wwwroot\intranet\modules\system\system.module(2519): module_invoke_all()
#9 E:\inetpub\wwwroot\intranet\includes\theme.inc(798): _system_rebuild_theme_data()
#1 in E:\inetpub\wwwroot\intranet\includes\database\mysql\database.inc on line 56
I tried adding PDO extension_dir="path" in PHP.ini file as there was no path assigned to the directory earlier. But the results were same.
答案1
得分: 0
- 检查你的php.ini配置文件。
- 寻找这些行并确保它们没有被注释掉:extension=pdo_mysql。
- 另一个方法是更新Drupal。
英文:
- check your php.ini configuration file.
- Look for lines and make sure they are not commented extension=pdo_mysql
- other this is to update the drupal
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论