试图让 PDO 加载

trying to get PDO to load

我正在尝试让 PDO 加载到 PHP7.2 apache 服务器 (aws)

我一直运行陷入这些错误

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/5.5/modules/pdo.so' - /usr/lib64/php/5.5/modules/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/5.5/modules/pdo_mysql.so' - /usr/lib64/php/5.5/modules/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 

另外 php 抛出此错误:

PHP Warning: ob_start(): function 'mb_output_handler' not found or invalid function name in /var/app/ondeck/laravel/core.php on line 32

我不确定为什么服务器抛出这些错误,我在 php 配置

   extension=pdo.so
      extension=pdo_mysql.so

我希望它将 pdo 加载到 php 7 中,除非这些 commands/extensions 已经过时并且 php7 需要一些新的东西?

更新:我可以分享的其余配置文件,请注意我没有写原始代码:

     yum -y install \
  php72-fpm

  # Make sure php is on for server reboot
  chkconfig php-fpm on

  # Add some extra settings for php
  cat > /etc/php-fpm.d/extra.conf <<EOF
  [www]
  request_terminate_timeout=600s

  ; Connections
  pm.max_children = 60
  pm.start_servers = 30
  pm.min_spare_servers = 30
  pm.max_spare_servers = 30
  pm.max_requests = 100
  EOF

  # replace the web user in the php-fpm conf file
  sed -i.bak 's/user = apache/user = webapp/g' /etc/php-fpm.d/www.conf

  # Add this to /etc/httpd/conf.d/phpfpm.conf
  # Pass requests into php-fpm
  cat > /etc/httpd/conf.d/phpfpm.conf <<EOF
  <IfModule proxy_module>
    ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/public_html/ timeout=600
  </IfModule>
  EOF

  # Remove contents of the 10-php.conf file (loads php_mod for apache)
  cat > /etc/httpd/conf.modules.d/10-php.conf <<EOF
  EOF

  # Remove the 2 lines of php variables that use the php5_mod
  sed -i.bak 's/php_value session.save_handler "files"//g' /etc/httpd/conf.d/php.conf
  sed -i.bak 's/php_value session.save_path    "\/var\/lib\/php\/session"//g' /etc/httpd/conf.d/php.conf

  # restart php
  service php-fpm restart

  service httpd graceful

您正在尝试通过 PHP 5.5 从路径 /usr/lib64/php/5.5/ 加载模块,但是您 运行 PHP 7.x。这不起作用,因此您需要安装正确的模块。

我相信你还没有安装所需的 PHP 模块:

sudo apt-get install php7.2-mysql

sudo service apache2 restart