Install Apache/PHP 5.6.4 on Fedora 21/20, CentOS/RHEL 7/6.5/5.11

This guide shows howto install Apache HTTP Server (httpd) with PHP 5.6.4 and following modules on Fedora 21/20/19, CentOS 7/6.6/5.11 and Red Hat (RHEL) 7/6.6/5.11 systems.

  • OPcache (php-opcache) – The Zend OPcache provides faster PHP execution through opcode caching and optimization.
  • APCu (php-pecl-apcu) – APCu userland caching
  • CLI (php-cli) – Command-line interface for PHP
  • PEAR (php-pear) – PHP Extension and Application Repository framework
  • PDO (php-pdo) – A database access abstraction module for PHP applications
  • MySQL (php-mysqlnd) – A module for PHP applications that use MySQL databases
  • PostgreSQL (php-pgsql) – A PostgreSQL database module for PHP
  • MongoDB (php-pecl-mongo) – PHP MongoDB database driver
  • SQLite (php-pecl-sqlite) – Extension for the SQLite V2 Embeddable SQL Database Engine
  • Memcache (php-pecl-memcache) – Extension to work with the Memcached caching daemon
  • Memcached (php-pecl-memcached) – Extension to work with the Memcached caching daemon
  • GD (php-gd) – A module for PHP applications for using the gd graphics library
  • XML (php-xml) – A module for PHP applications which use XML
  • MBString (php-mbstring) – A module for PHP applications which need multi-byte string handling
  • MCrypt (php-mcrypt) – Standard PHP module provides mcrypt library support

Install Apache HTTP Server (httpd) and PHP 5.6.4 on Fedora 21/20/19, CentOS / Red Hat (RHEL) 7/6.6/5.11

1. Change root user

2. Install Remi repository

Fedora

CentOS and Red Hat (RHEL)

3. Install Apache (httpd) Web server and PHP 5.6.4

Fedora 21

Fedora 20/19

CentOS 7/6.6/5.11 and Red Hat (RHEL) 7/6.6/5.11

4. Install PHP 5.6.4 modules

Select what you need: OPcache, APCu, CLI, PEAR, PDO, MySQL, PostgreSQL, MongoDB, SQLite, Memcache, Memcached, GD, MBString, MCrypt, XML

More info about PHP APC from PHP APC Configuration and Usage Tips and Tricks.

Fedora 21

Fedora 20/19

CentOS 7/6.6/5.11 and Red Hat (RHEL) 7/6.6/5.11

5. Start Apache HTTP server (httpd) and autostart Apache HTTP server (httpd) on boot

6. Create test PHP page to check that Apache, PHP and PHP modules are working

Add following content to /var/www/html/test.php file.

7. Check created page with browser

Access following address, with your browser. http://localhost/test.php
CentOS 7 running Apache and PHP 5.6.0

Enable Remote Connection to Apache HTTP Server (httpd) –> Open Web server Port (80) on Iptables Firewall (as root user again)

1. CentOS/Red Hat (RHEL) 6.6/5.11

1.1 Edit /etc/sysconfig/iptables file:

1.2 Add following INPUT rule:

1.3 Restart Iptables Firewall:

2. Fedora 21/20/19 and CentOS/RHEL 7

2.1 Add New Rule to Firewalld

2.2 Restart firewalld.service

3. Test remote connection

Access following address, with your browser. http://your.domain/test.php

More reading:

Enable Apache Userdir with SELinux on Fedora 21/20/19/18/17, CentOS 7/6.6/5.11, Red Hat (RHEL) 7/6.6/5.11 >>

Share this post

232 Comments

  1. Thanks! Works :)

    One more addition:
    If you are getting the message:
    “Starting httpd: httpd: Could not reliably determine the server’s fully qualified domain name, using ::1 for ServerName” when you try to restart httpd, you can give a name to the server in /etc/httpd/conf/httpd.conf file:
    ServerName theNAMEyouCHOOSE:80

    also you should set
    UseCanonicalName On

    Best,
    Jozsef

    Reply
  2. When I tried to execute the first rpm command to access the remi repository, I got:

    I notice that this thread is relatively recent so I was surprised that something may have broken in the past couple of weeks.

    Thanks,

    Jon

    Reply
    • And just to clarify, I have been doing other yum/rpm commands all night and they have all worked fine, so it doesn’t appear to be an Internet connectivity thing or anything (and yes, I tried doing another command after this one failed and that worked as well, and I tried this several times, always failing, including on other machines.)

      Thanks!

      Reply
      • Hi Jon,

        I tested this and found the problem. Epel repository has been updated to 5-4 release and now 5-3 release is removed, so the following command should work:

        I updated this and other guides too, thank you for your attention.

        Reply
  3. i keep getting the error
    No package php-pear available.
    No package php-pdo available.
    No package php-mysql available.
    No package php-pgsql available.
    No package php-pecl-memcache available.
    No package php-gd available.
    No package php-mbstring available.
    No package php-mcrypt available.
    No package php-xml available.

    Reply
    • Hi Don,

      What operating system do you use?

      Did you added and enabled remi repository?

      Reply
  4. When i try to create a PHP test page, I get an error message saying I do not have permission to access the html file. How can I unlock the permission? All other internet resources are not giving me a clear command. Would really appreciate it!

    Reply
    • Hi mk,

      Could you post exact error message from browser and apache(httpd) error log (/var/log/httpd/error_log)?
      And could you also check, do you get any SELinux warning?

      Reply
      • I get the same error on Fedora 14
        I was getting a SELinux warning but I changed the servername and Canonical as you suggested in a comment and it seems to have stopped. Now I get a 500 error.

        Reply
        • Could you post full error message from /var/log/httpd/error_log file?

          Reply
  5. I got the following error
    Running CentOS 5.5

    Transaction Check Error:
    file /etc/my.cnf from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/danish/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/dutch/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/english/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/estonian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/french/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/german/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/greek/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/italian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/japanese/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/korean/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/swedish/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.x86_64
    file /etc/my.cnf from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/danish/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/dutch/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/english/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/estonian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/french/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/german/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/greek/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/italian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/japanese/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/korean/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/swedish/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386
    file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.1.54-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_5.4.i386

    Reply
    • Hi Hoddie54,

      Try update MySQL with following command:

      And then try installation again…

      Reply
  6. Trying to install MySql on RHEL 5.5, I get the following when I run “yum –enablerepo=remi install mysql mysql-server”:

    Loaded plugins: rhnplugin, security
    This system is not registered with RHN.
    RHN support will be disabled.
    Setting up Install Process
    Resolving Dependencies
    –> Running transaction check
    —> Package mysql.x86_64 0:5.1.55-1.el5.remi set to be updated
    –> Processing Dependency: mysql-libs = 5.1.55-1.el5.remi for package: mysql
    –> Processing Dependency: libmysqlclient_r.so.16(libmysqlclient_16)(64bit) for package: mysql
    –> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: mysql
    –> Processing Dependency: libmysqlclient.so.16()(64bit) for package: mysql
    –> Processing Dependency: libmysqlclient_r.so.16()(64bit) for package: mysql
    —> Package mysql-server.x86_64 0:5.1.55-1.el5.remi set to be updated
    –> Processing Dependency: perl-DBD-MySQL for package: mysql-server
    –> Running transaction check
    —> Package mysql-libs.x86_64 0:5.1.55-1.el5.remi set to be updated
    —> Package mysql-server.x86_64 0:5.1.55-1.el5.remi set to be updated
    –> Processing Dependency: perl-DBD-MySQL for package: mysql-server
    –> Finished Dependency Resolution
    mysql-server-5.1.55-1.el5.remi.x86_64 from remi has depsolving problems
    –> Missing Dependency: perl-DBD-MySQL is needed by package mysql-server-5.1.55-1.el5.remi.x86_64 (remi)
    Error: Missing Dependency: perl-DBD-MySQL is needed by package mysql-server-5.1.55-1.el5.remi.x86_64 (remi)
    You could try using –skip-broken to work around the problem
    You could try running: package-cleanup –problems
    package-cleanup –dupes
    rpm -Va –nofiles –nodigest
    The program package-cleanup is found in the yum-utils package.
    #

    Any advice or help to offer so I can get mysql running?

    Reply
    • Hi sebastiang,

      Try following:

      What is output?

      Reply
  7. Hi JR,

    I get similar error to what sebastian gets when I tried to install php.
    I am using rhel 6 stable/newer version. Apache and mysql servers are installed.
    When I tried yum enablerepo remi search php
    it lists php but when I tried to install php with the command yum enablerepo remi install php
    it gives me an error.

    Any information on this?

    Shank

    Reply
    • Hi shashank,

      Btw, you could update your remi repo to RHEL 6 version with following command:

      Then try again. And please post error messages what you get on installation?

      I added this Remi RHEL 6 repo also to guide.

      Reply
      • Hi JR,

        Yes, I updated the remi with version 6 when I checked the figured it out and installed it from the remi repository.

        I resolved my issue by updating mysql with the version I downloaded one from remi. When I replaced the rhel 6 version mysql with remi version…My php-common libcurl.so:3 error went away and I was able to install php.

        Thank you for the tutorial. It was really helpful.

        Shank

        Reply
      • Hi JR.

        I am trying to install php-imap on the remi release.

        But run against some issues, and i am not that expert. Can you help me to solve this issue.

        Thanks.

        Resolving Dependencies
        –> Running transaction check
        —> Package php-imap.x86_64 0:5.1.6-27.el5_5.3 set to be updated
        –> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-imap
        –> Processing Dependency: libc-client.so.1()(64bit) for package: php-imap
        –> Running transaction check
        —> Package libc-client.x86_64 0:2004g-2.2.1 set to be updated
        —> Package php-imap.x86_64 0:5.1.6-27.el5_5.3 set to be updated
        –> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-imap
        –> Finished Dependency Resolution
        php-imap-5.1.6-27.el5_5.3.x86_64 from updates has depsolving problems
        –> Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-imap-5.1.6-27.el5_5.3.x86_64 (updates)
        Error: Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-imap-5.1.6-27.el5_5.3.x86_64 (updates)
        You could try using –skip-broken to work around the problem
        You could try running: package-cleanup –problems
        package-cleanup –dupes
        rpm -Va –nofiles –nodigest

        Reply
        • Hi Marco,

          Could you post output of following command:

          Reply
  8. I followed the instructions to add the new repositories but here’s what I get:

    # yum –enablerepo=remi install httpd php
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * addons: mirrors.versaweb.com
    * base: mirrors.usc.edu
    * epel: mirrors.solfo.com
    * extras: centos.promopeddler.com
    * remi: iut-info.univ-reims.fr
    * updates: mirror.5ninesolutions.com
    Excluding Packages in global exclude list
    Finished
    Setting up Install Process
    No package httpd available.
    No package php available.
    Nothing to do

    I’m using CentOS 5.5 — do you have any idea why this isn’t working

    Reply
    • Hi Blair,

      First is good to know what is in your global exclude list?

      Reply
  9. Sorry, Im a newbie in this… I’m trying to install Apache following your guide but I gotta error message after adding the instruction of

    Adding following line before COMMIT:

    -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT

    After restart the iptables I gotta the following error message

    iptables: Flushing firewall rules: [ OK ]
    iptables: Setting chains to policy ACCEPT: filter [ OK ]
    iptables: Unloading modules: [ OK ]
    iptables: Applying firewall rules: iptables-restore: line 13 failed [FAILED]

    And I’d no access to the file test.php through the browser.
    Some ideas?
    Thanx in advance.

    Reply
    • Adding the folowing line below “:OUTPUT ACCEPT [0:0]” seems to remove the error:

      Reply
  10. I gotta say I actually can see the test.php but the rule in the firewall launches till the error.

    Reply
  11. When i try to create a PHP test page, i just got blank page??

    Reply
    • Hi Ar,

      Do you get any errors on /var/log/httpd/error_log or any SELinux warnings?

      Reply
  12. I am getting the following errors :

    –> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-mysql
    —> Package php-pdo.i386 0:5.1.6-27.el5_5.3 set to be updated
    –> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-pdo
    —> Package php-pecl-memcache.i386 0:2.2.6-1.el5 set to be updated
    –> Processing Dependency: php-zend-abi = 20050922 for package: php-pecl-memcache
    —> Package php-pgsql.i386 0:5.1.6-27.el5_5.3 set to be updated
    –> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-pgsql
    —> Package php-xml.i386 0:5.1.6-27.el5_5.3 set to be updated
    –> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-xml
    –> Finished Dependency Resolution
    php-xml-5.1.6-27.el5_5.3.i386 from base has depsolving problems
    –> Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-xml-5.1.6-27.el5_5.3.i386 (base)
    php-pecl-memcache-2.2.6-1.el5.i386 from epel has depsolving problems
    –> Missing Dependency: php-zend-abi = 20050922 is needed by package php-pecl-memcache-2.2.6-1.el5.i386 (epel)
    php-pdo-5.1.6-27.el5_5.3.i386 from base has depsolving problems
    –> Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-pdo-5.1.6-27.el5_5.3.i386 (base)
    php-devel-5.1.6-27.el5_5.3.i386 from base has depsolving problems
    –> Missing Dependency: php = 5.1.6-27.el5_5.3 is needed by package php-devel-5.1.6-27.el5_5.3.i386 (base)
    php-gd-5.1.6-27.el5_5.3.i386 from base has depsolving problems
    –> Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-gd-5.1.6-27.el5_5.3.i386 (base)
    php-pgsql-5.1.6-27.el5_5.3.i386 from base has depsolving problems
    –> Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-pgsql-5.1.6-27.el5_5.3.i386 (base)
    php-mysql-5.1.6-27.el5_5.3.i386 from base has depsolving problems
    –> Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-mysql-5.1.6-27.el5_5.3.i386 (base)
    php-mcrypt-5.1.6-15.el5.centos.1.i386 from extras has depsolving problems
    –> Missing Dependency: php-api = 20041225 is needed by package php-mcrypt-5.1.6-15.el5.centos.1.i386 (extras)
    php-mbstring-5.1.6-27.el5_5.3.i386 from base has depsolving problems
    –> Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-mbstring-5.1.6-27.el5_5.3.i386 (base)
    Error: Missing Dependency: php-api = 20041225 is needed by package php-mcrypt-5.1.6-15.el5.centos.1.i386 (extras)
    Error: Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-mbstring-5.1.6-27.el5_5.3.i386 (base)
    Error: Missing Dependency: php = 5.1.6-27.el5_5.3 is needed by package php-devel-5.1.6-27.el5_5.3.i386 (base)
    Error: Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-pgsql-5.1.6-27.el5_5.3.i386 (base)
    Error: Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-xml-5.1.6-27.el5_5.3.i386 (base)
    Error: Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-mysql-5.1.6-27.el5_5.3.i386 (base)
    Error: Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-gd-5.1.6-27.el5_5.3.i386 (base)
    Error: Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-pdo-5.1.6-27.el5_5.3.i386 (base)
    Error: Missing Dependency: php-zend-abi = 20050922 is needed by package php-pecl-memcache-2.2.6-1.el5.i386 (epel)
    You could try using –skip-broken to work around the problem
    You could try running: package-cleanup –problems
    package-cleanup –dupes
    rpm -Va –nofiles –nodigest

    It happens when trying to install the php-mysql (that i need a *lot*) :P

    thanks!

    Reply
    • Hi tiagoh,

      Did you setup remi repository?

      And did you enabled it when you trying to install php-mysql?

      Reply
  13. who can install httpd on fedora 15, without yum

    Reply
    • Hi kreshan,

      So do you want to install httpd without yum on Fedora 15?

      Reply
  14. remove old version before..

    yum remove php php-common

    Reply
  15. Thanks so much for this tutorial. It worked with one exception. I found the solution in the comments:

    “Sorry, Im a newbie in this… I’m trying to install Apache following your guide but I gotta error message after adding the instruction of

    Adding following line before COMMIT:

    -A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT

    After restart the iptables I gotta the following error message

    iptables: Flushing firewall rules: [ OK ]
    iptables: Setting chains to policy ACCEPT: filter [ OK ]
    iptables: Unloading modules: [ OK ]
    iptables: Applying firewall rules: iptables-restore: line 13 failed [FAILED]

    And I’d no access to the file test.php through the browser.
    Some ideas?
    Thanx in advance.

    Reply
    Diederik Veelo
    Posted May 27, 2011 at 2:02 PM
    Adding the folowing line below “:OUTPUT ACCEPT [0:0]” seems to remove the error:

    :RH-Firewall-1-INPUT – [0:0]”

    Again, keep up the good work. It really helps people like me!!

    Reply
    • Hi CentOS_dude,

      Try following iptables rule instead:

      Reply
      • Hye JR, thanks for the update. Your code worked without any problems.

        Reply

Trackbacks/Pingbacks

  1. Install Apache (httpd) and PHP 5.3.3 on Fedora 13, CentOS/RHEL 5.5/6 « apache - [...] PeÅ‚ny artykuÅ‚ na: Install Apache (httpd) and PHP 5.3.3 on Fedora 13, CentOS/RHEL 5.5/6 [...]
  2. Configuring PHP, Apache and Squirrelmail - [...] scripting language. Take a look at this. https://www.digitalocean.com/communi...ck-on-centos-6 http://www.if-not-true-then-false.co...-red-hat-rhel/ & [...]

Submit a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">