51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

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

英文:

Error comes after updating PHP version in IIS PHP manager

问题 {#heading}

网站在我将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 {#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

赞(4)
未经允许不得转载:工具盒子 » 在更新 IIS PHP 管理器中的 PHP 版本后出现错误。