在更新 IIS PHP 管理器中的 PHP 版本后出现错误。

huangapple go评论120阅读模式
英文:

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

  1. 检查你的php.ini配置文件。
  2. 寻找这些行并确保它们没有被注释掉:extension=pdo_mysql。
  3. 另一个方法是更新Drupal。
英文:
  1. check your php.ini configuration file.
  2. Look for lines and make sure they are not commented extension=pdo_mysql
  3. other this is to update the drupal

huangapple
  • 本文由 发表于 2023年8月10日 17:01:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/76874173.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定