gpt4 book ai didi

php - WordPress 安装 PHP 报错

转载 作者:行者123 更新时间:2023-11-29 00:12:15 25 4
gpt4 key购买 nike

这是我在运行以下命令时获得的更新 php -v

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/curl.so' - /usr/lib/php/modules/curl.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/lib/php/modules/dbase.so' - /usr/lib/php/modules/dbase.so: wrong ELF class: ELFCLASS32 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/fileinfo.so' - /usr/lib/php/modules/fileinfo.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/lib/php/modules/json.so' - /usr/lib/php/modules/json.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/lib/php/modules/mysql.so' - /usr/lib/php/modules/mysql.so: wrong ELF class: ELFCLASS32 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysqli.so' - /usr/lib/php/modules/mysqli.so: wrong ELF class: ELFCLASS32 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo.so' - /usr/lib/php/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/lib/php/modules/pdo_mysql.so' - /usr/lib/php/modules/pdo_mysql.so: wrong ELF class: ELFCLASS32 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_sqlite.so' - /usr/lib/php/modules/pdo_sqlite.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/lib/php/modules/phar.so' - /usr/lib/php/modules/phar.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/lib/php/modules/zip.so' - /usr/lib/php/modules/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0

我正在尝试在 RHEL 机器上安装 Wordpress。我最初启动并运行了 mySQL,然后意识到我的 PHP 是 5.1.6 版。我添加了另一个 repo,安装了 PHP 5.3 并删除了旧的 php 包。

当我打开 localhost/wp-admin/install.php 时,我在浏览器上遇到的错误是:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

我安装了 php-mysql.x86_64 包,但我不知道问题出在哪里。我不知道该怎么办!任何帮助将不胜感激。

谢谢。

最佳答案

安装所需的 PHP 库。 RHEL 安装命令(包含 Wordpress 所需的所有模块):

sudo yum install php-bcmath  php-cli  php-common  php-devel  php-gd  php-imap  php-mbstring  php-mcrypt  php-mysqlnd  php-odbc  php-pdo  php-pear php-pecl-geoip  php-pecl-jsonc  php-pecl-jsonc-devel  php-pecl-zip  php-pgsql  php-process  php-tidy  php-xml  php-xmlrpc

安装 EPEL 存储库以更新到最新的 PHP:

#CentOS 6 64Bit
sudo wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum update php

其他版本的 EPEL repos 安装过程 - How to Enable EPEL Repository for RHEL/CentOS 7.x/6.x/5.x

编辑 1:

为了禁用其他存储库,请查看并编辑 /etc/yum.repos.d/ 目录中的 .repo 文件并设置 enabled=1enabled=0。毕竟不要忘记运行:

yum clean all 

关于php - WordPress 安装 PHP 报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24490017/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com