drsxzut183207938
2014-06-30 12:19 阅读 82
已采纳

Wordpress安装PHP错误

THis is the update I get when I run the following command 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

I'm trying to install Wordpress on a RHEL Machine. I initially had gotten mySQL up and running and then realized that my PHP was version 5.1.6. I added another repo, installed PHP 5.3 and removed the old php packages.

The error I get on a browser when I open localhost/wp-admin/install.php is:

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

I have the package php-mysql.x86_64 installed and I can't figure out what the problem is. I don't know what to do! Any help would be greatly appreciated.

Thanks.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • 已采纳
    dpc57092 dpc57092 2014-07-17 05:01

    So, I figured this out. The latest php version was installed. I was using 64 Bit RHEL and the libraries were in the /usr/lib64 folder instead of the /usr/lib folder. Once I changed that bit in the php.ini file, it ran like a charm. :)

    点赞 评论 复制链接分享
  • duandeng7132 duandeng7132 2014-06-30 12:26

    Install required PHP libraries. RHEL installation command ( with all required modules for 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
    

    Install EPEL repos to update to latest 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 installation process for other versions - How to Enable EPEL Repository for RHEL/CentOS 7.x/6.x/5.x

    EDIT 1:

    In order to disable other repositories, see and edit .repo files in /etc/yum.repos.d/ directory and set enabled=1 to enabled=0. After all don't forget to run:

    yum clean all 
    
    点赞 评论 复制链接分享

相关推荐