Install Apache/PHP 5.3.10 on Fedora 16/15, CentOS/Red Hat (RHEL) 6.2/5.7
This guide shows howto install Apache HTTP Server (httpd) with PHP 5.3.10 and following modules on Fedora 16/15/14/13/12, CentOS 6.2/6.1/6/5.7 and Red Hat (RHEL) 6.2/6.1/6/5.7 systems.
- APC (php-pecl-apc) – APC caches and optimizes PHP intermediate code
- 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-mysql) – 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-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.3.10
1. Change root user
su - ## OR ## sudo -i
2. Install Remi repository
Fedora
## Remi Dependency on Fedora rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm ## Fedora 16 ## rpm -Uvh http://rpms.famillecollet.com/remi-release-16.rpm ## Fedora 15 ## rpm -Uvh http://rpms.famillecollet.com/remi-release-15.rpm ## Fedora 14 ## rpm -Uvh http://rpms.famillecollet.com/remi-release-14.rpm ## Fedora 13 ## rpm -Uvh http://rpms.famillecollet.com/remi-release-13.rpm ## Fedora 12 ## rpm -Uvh http://rpms.famillecollet.com/remi-release-12.rpm
CentOS and Red Hat (RHEL)
## Remi Dependency on CentOS 6 and Red Hat (RHEL) 6 ## rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm ## CentOS 6 and Red Hat (RHEL) 6 ## rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm ## Remi Dependency on CentOS 5 and Red Hat (RHEL) 5 ## rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm ## CentOS 5 and Red Hat (RHEL) 5 ## rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
3. Install Apache (httpd) Web server and PHP 5.3.10
Fedora 16/15/14/13/12, CentOS 6.2/6.1/6/5.7 and Red Hat (RHEL) 6.2/6.1/6/5.7
yum --enablerepo=remi install httpd php php-common
4. Install PHP 5.3.10 modules
Select what you need: APC, CLI, PEAR, PDO, MySQL, PostgreSQL, MongoDB, SQLite, Memcache, Memcached, GD, MBString, MCrypt, XML
Fedora 16/15/14/13/12, CentOS 6.2/6.1/6/5.7 and Red Hat (RHEL) 6.2/6.1/6/5.7
yum --enablerepo=remi install php-pecl-apc php-cli php-pear php-pdo php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml
5. Start Apache HTTP server (httpd) and autostart Apache HTTP server (httpd) on boot
/etc/init.d/httpd start ## use restart after update ## OR ## service httpd start ## use restart after update chkconfig --levels 235 httpd on
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.
<?php phpinfo(); ?>
7. Check created page with browser
Access following address, with your browser. http://localhost/test.php

Enable Remote Connection to Apache HTTP Server (httpd) –> Open Web server Port (80) on Iptables Firewall (as root user again)
1. Edit /etc/sysconfig/iptables file:
nano -w /etc/sysconfig/iptables
2. Add following line before COMMIT:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
3. Restart Iptables Firewall:
service iptables restart ## OR ## /etc/init.d/iptables restart
4. Test remote connection
Access following address, with your browser. http://your.domain/test.php
More reading:
Related posts:
- LAMP on Fedora 16/15, CentOS/Red Hat (RHEL) 6.2/5.7 – (Linux, Apache, MySQL, PHP)
- Install MySQL 5.5.20 on Fedora 16/15, CentOS/Red Hat (RHEL) 6.2/5.7
- Install Zend Framework on Fedora 16/15, CentOS/Red Hat (RHEL) 6.2/5.7
- Install Memcached on Fedora 16/15, CentOS/Red Hat (RHEL) 6.2/5.7
- Apache Userdir with SELinux on Fedora 16/15, CentOS/RHEL 6.2/5.7
76 Comments
Leave a Comment
Trackbacks/Pingbacks
- 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 [...]
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
When I tried to execute the first rpm command to access the remi repository, I got:
[jrosen@localhost ~]$ rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
Retrieving http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
error: skipping http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm - transfer failed - Unknown or unexpected error
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
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!
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.
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.
Hi Don,
What operating system do you use?
Did you added and enabled remi repository?
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!
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?
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.
Could you post full error message from /var/log/httpd/error_log file?
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
Hi Hoddie54,
Try update MySQL with following command:
And then try installation again…
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?
Hi sebastiang,
Try following:
yum --enablerepo=remi search perl-DBD-MySQLWhat is output?
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
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.
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
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
Hi Marco,
Could you post output of following command:
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
Hi Blair,
First is good to know what is in your global exclude list?
... Excluding Packages in global exclude list Finished ...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.
Adding the folowing line below “:OUTPUT ACCEPT [0:0]” seems to remove the error:
:RH-Firewall-1-INPUT - [0:0]I gotta say I actually can see the test.php but the rule in the firewall launches till the error.
When i try to create a PHP test page, i just got blank page??
Hi Ar,
Do you get any errors on /var/log/httpd/error_log or any SELinux warnings?
I am getting the following errors :
It happens when trying to install the php-mysql (that i need a *lot*) :P
thanks!
Hi tiagoh,
Did you setup remi repository?
And did you enabled it when you trying to install php-mysql?
who can install httpd on fedora 15, without yum
Hi kreshan,
So do you want to install httpd without yum on Fedora 15?
remove old version before..
yum remove php php-common
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!!
Hi CentOS_dude,
Try following iptables rule instead:
Hye JR, thanks for the update. Your code worked without any problems.
Hi, I was wondering how am I supposed to test the remote connection. Is the URL literally http://your.(mydomainnamehere)/test.php ?? or is the your not supposed to be there?? or how exactly do I go about testing the remote connection, BTW everything else worked perfect thank you for helping everyone out.
Hi Henry,
You could test it easily from some other machine. Set up Apache and then create test page, open firewall port and just test it… :) URL is that what you have specified on local network server.local.lan or some real domain name, like http://www.if-not-true-then-false.com.
Thanks.
It works so nice.
disculpe la pregunta lo que pasa es que quiero instalar el wordpress en centos 5.5 y me piden php5.2.4 i386 y noce donde puedo encontrar
noce si me puedan enviar un link de los repositorios ok
gracias
thanks, somewhat i was having touble with php-mysql but this seemed to do the trick. Very to the point
[root@root ~]# /etc/init.d/httpd restart
Restarting httpd (via systemctl): Job failed. See system logs and ‘systemctl status’ for details.
[FAILED]
WHAT SHOULD I DO????
Hi Laukik,
Please post first output of following commands:
[root@root ~]# uname -a
Linux root 3.1.0-7.fc16.i686.PAE #1 SMP Tue Nov 1 20:53:45 UTC 2011 i686 i686 i386 GNU/Linux
[root@root ~]# systemctl status httpd.service
httpd.service – The Apache HTTP Server (prefork MPM)
Loaded: loaded (/lib/systemd/system/httpd.service; enabled)
Active: failed since Thu, 29 Dec 2011 21:55:48 +0530; 4min 29s ago
Process: 2575 ExecStart=/usr/sbin/httpd $OPTIONS -k start (code=dumped, signal=SEGV)
CGroup: name=systemd:/system/httpd.service
[root@root ~]# uname -a
Linux root 3.1.0-7.fc16.i686.PAE #1 SMP Tue Nov 1 20:53:45 UTC 2011 i686 i686 i386 GNU/Linux
[root@root ~]# systemctl status httpd.service
httpd.service – The Apache HTTP Server (prefork MPM)
Loaded: loaded (/lib/systemd/system/httpd.service; enabled)
Active: failed since Thu, 29 Dec 2011 21:55:48 +0530; 4min 29s ago
Process: 2575 ExecStart=/usr/sbin/httpd $OPTIONS -k start (code=dumped, signal=SEGV)
CGroup: name=systemd:/system/httpd.service
[root@root ~]# grep httpd /var/log/messages
Dec 28 21:51:22 root httpd[2682]: httpd: Could not reliably determine the server’s fully qualified domain name, using fe80::227:eff:fe39:3127 for ServerName
Dec 28 21:51:22 root kernel: [ 1430.410455] httpd[2682]: segfault at d ip 005e59f5 sp bf9bcc10 error 4 in mod_perl.so[5c9000+33000]
Do you need mod_perl?
whats mon_perl?
mod_perl is An embedded Perl interpreter for the Apache HTTP Server.
You have mod_perl package installed, some reason? And mod_perl have bug on Fedora 16 which prevent your httpd starting and cause segfaults.
Actually according to bug report it should be fixed if you update to latest version of mod_perl, so try following (as root):
yum update mod_perl*Then try to start httpd again…please let me know if it’s still not working? :)
Hello Plz help me for change port 80 to 8088
founf below error
Failed to start apache :
Starting httpd: httpd: apr_sockaddr_info_get() failed for connect
httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
(13)Permission denied: make_sock: could not bind to address [::]:8088
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:8088
no listening sockets available, shutting down
Unable to open logs
[FAILED]
Hi daven patel,
Do you run httpd start command as root user?
Please post output of following command:
Help me…
I’m use lampp & Install httpd. What can proceed smoothly without conflicts?
Hi Nurul,
Sorry, but I didn’t understand what is problem, if you use lampp (or lamp)? So you already have httpd?
I have installed RHEL 6.2 but the php packages that are available from their “@rhel-x86_64-server-6″ package does not contain mbstring.
Mgmt says we should only user rhel packages and not anyone else’s.
How can we install the php-mbstring then?
Installed Packages
php.x86_64 5.3.3-3.el6_1.3 @rhel-x86_64-server-6
php-cli.x86_64 5.3.3-3.el6_1.3 @rhel-x86_64-server-6
php-common.x86_64 5.3.3-3.el6_1.3 @rhel-x86_64-server-6
php-gd.x86_64 5.3.3-3.el6_1.3 @rhel-x86_64-server-6
php-ldap.x86_64 5.3.3-3.el6_1.3 @rhel-x86_64-server-6
php-mysql.x86_64 5.3.3-3.el6_1.3 @rhel-x86_64-server-6
php-odbc.x86_64 5.3.3-3.el6_1.3 @rhel-x86_64-server-6
php-pdo.x86_64 5.3.3-3.el6_1.3 @rhel-x86_64-server-6
php-pear.noarch 1:1.9.4-4.el6 @rhel-x86_64-server-6
php-pecl-apc.x86_64 3.1.3p1-1.2.el6.1 @rhel-x86_64-server-6
php-pecl-memcache.x86_64 3.0.5-3.el6 @rhel-x86_64-server-6
php-pgsql.x86_64 5.3.3-3.el6_1.3 @rhel-x86_64-server-6
php-soap.x86_64 5.3.3-3.el6_1.3 @rhel-x86_64-server-6
php-xml.x86_64 5.3.3-3.el6_1.3 @rhel-x86_64-server-6
php-xmlrpc.x86_64 5.3.3-3.el6_1.3 @rhel-x86_64-server-6
thanks
Larry
Hi Larry,
Could you post output of following command:
HI !
Thanks for the tutorial ! would you please tell me how to enable or install pdo_mysql driver in php 5.3.9 in linux centos 6 64bit.
Hi jules,
You are welcome! :)
To enable/install pdo_mysql following packages should be enough:
yum install httpd php php-common php-pdo php-mysqlSimply check it from phpinfo() or test use pdo_mysql.
Please let me know, if you have some problems? :)
Hi JR !
Thanks. I still have some problem with my php .
When i run a script with pdo sqlite code ,
it shows
“ERROR: Could not connect:could not find driver”
[root@localhost ~]# php -v
PHP 5.3.9 (cli) (built: Jan 10 2012 19:59:29)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
and
[root@localhost ~]# rpm -qa php\*php-sqlite-5.3.9-1.el6.remi.x86_64
phpMyAdmin-3.4.9-1.el6.remi.noarch
php-xml-5.3.9-1.el6.remi.x86_64
php-cli-5.3.9-1.el6.remi.x86_64
php-pecl-memcached-1.0.2-9.el6.remi.x86_64
php-5.3.9-1.el6.remi.x86_64
php-mcrypt-5.3.9-1.el6.remi.x86_64
php-pdo-5.3.9-1.el6.remi.x86_64
php-pecl-igbinary-1.1.1-2.el6.remi.x86_64
php-pecl-mongo-1.2.7-1.el6.remi.x86_64
php-pgsql-5.3.9-1.el6.remi.x86_64
php-pecl-memcache-3.0.6-2.el6.remi.x86_64
php-mysql-5.3.9-1.el6.remi.x86_64
php-gd-5.3.9-1.el6.remi.x86_64
php-common-5.3.9-1.el6.remi.x86_64
php-pecl-apc-3.1.9-3.el6.remi.x86_64
php-mbstring-5.3.9-1.el6.remi.x86_64
php-pear-1.9.4-3.el6.remi.noarch
php-devel-5.3.9-1.el6.remi.x86_64
will you please help me !because i would like to do my final project with sqlite .
Install php-sqlite also with:
If you have web project then restart web server and try again… :)
hi JR!
ithink php-sqlite is already installed but still asking for the driver
it still complain
ERROR: Could not connect:could not find driver
what can i do ?
Hi jules,
Could you post output of following command:
Did you restart your web server?
Could you check your phpinfo, is pdo_sqlite enabled?
Hello JR !
this the output of the command
[root@aca800a0 ~]# rpm -qa php\* |sort
php-5.3.9-1.el6.remi.x86_64
php-cli-5.3.9-1.el6.remi.x86_64
php-common-5.3.9-1.el6.remi.x86_64
php-devel-5.3.9-1.el6.remi.x86_64
php-gd-5.3.9-1.el6.remi.x86_64
php-mbstring-5.3.9-1.el6.remi.x86_64
php-mcrypt-5.3.9-1.el6.remi.x86_64
phpMyAdmin-3.4.9-1.el6.remi.noarch
php-mysql-5.3.9-1.el6.remi.x86_64
php-pdo-5.3.9-1.el6.remi.x86_64
php-pear-1.9.4-4.el6.noarch
php-pecl-apc-3.1.9-3.el6.remi.x86_64
php-pecl-igbinary-1.1.1-3.el6.x86_64
php-pecl-memcache-3.0.6-2.el6.remi.x86_64
php-pecl-memcached-1.0.2-9.el6.remi.x86_64
php-pecl-mongo-1.2.7-1.el6.remi.x86_64
php-sqlite-5.3.9-1.el6.remi.x86_64
php-xml-5.3.9-1.el6.remi.x86_64
in the phpinfo page, i checked pdo-sqlite is enabled this way
pdo_sqlite
PDO Driver for SQLite 3.x enabled
SQLite Library 3.7.6.3
but still complain could not find the driver . Please help me .
Thanks jules!
Really strange, because everything looks ok, then next thing is check your code…and maybe even try to reproduce your error on another system…
So could you please post some code snippet, which should work?
this my code :
Project 11-1: Validating Form Input
div.error{
color: red;
font-weight: bolder;
}
div.success{
color: green;
font-weight: bolder;
}
Project 11-1:Validating Form Input
Enter Book Details
<?php
//display input validation error
function getInputError($key,$errArray) {
if(in_array($key,$errArray)){
return "ERROR: Invalid data for field ‘$key’”;
}else {
return false;
}
}
$inputErrors=array();
$submitted=false;
//if form submitted
//validate form input
if(isset($_POST['submit'])){
$submitted=true;
$valid=array();
//validate title
if(!empty($_POST['title'])) {
$valid['title']=htmlentities(trim($_POST['title']));
} else {
$inputErrors[]=’author’;
}
//validate author name
if(!empty($_POST['author'])&& preg_match(“/^[a-zA-Z\s.\-]+$/”,$_POST['author'])){
$valid['author']=htmlentities(trim($_POST['author']));
}
else {
$inputError[]=’author’;
}
//validate ISBN
if(!empty($_POST['isbn']) && preg_match(‘/^(97(8|9))?\d{9}(\d|X)$/’,$_POST['isbn'])){
$valid['isbn']=htmlentities(trim($POST['isbn']));
}
else {
$inputError[]=’isbn’;
}
//validate price
if(!empty($_POST['price']) && is_numeric($_POST['price']) && $_POST['price'] >0){
$valid['price']=htmlentities(trim($_POST['price']));
}else {
$inputErrors[]=’price’;
}
}
//if form not submitted
//or if validation errors exist
//redisplay form
if(($submitted==true && count($inputErrors)>0)|| $submitted==false){
?>
Title :
<input type="text" size="25" name="title" value="”/>
Author :
<input type="text" size="25" name="author" value="”/>
ISBN :
<input type="text" size="25" name="isbn" value="”/>
Price :
<input type="text" size="25" name="price" value="”/>
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}catch(PDOException $e){
die(“ERROR: Could not connect:”.$e->getMessage());
}
//create and execute INSERT query
try{
$title=$pdo->quote($valid['title']);
$author=$pdo->quote($valid['author']);
$isbn=$pdo->quote($valid['isbn']);
$price=$pdo->quote($valid['price']);
$sql=”INSERT INTO books(title,author,isbn,price) VALUES($title,$author,$isbn,$price)”;
$ret=$pdo->exec($sql);
echo’SUCCESS:Record saved !’;
} catch(Exception $e){
echo’ERROR:’.$e->getMessage().”;
}
unset($pdo);
}
?>
Hi jules,
Here is some code missing here:
Hi JR !
the whole code is
Project 11-1: Validating Form Input
div.error{
color: red;
font-weight: bolder;
}
div.success{
color: green;
font-weight: bolder;
}
Project 11-1:Validating Form Input
Enter Book Details
<?php
//display input validation error
function getInputError($key,$errArray) {
if(in_array($key,$errArray)){
return "ERROR: Invalid data for field ‘$key’”;
}else {
return false;
}
}
$inputErrors=array();
$submitted=false;
//if form submitted
//validate form input
if(isset($_POST['submit'])){
$submitted=true;
$valid=array();
//validate title
if(!empty($_POST['title'])) {
$valid['title']=htmlentities(trim($_POST['title']));
} else {
$inputErrors[]=’author’;
}
//validate author name
if(!empty($_POST['author'])&& preg_match(“/^[a-zA-Z\s.\-]+$/”,$_POST['author'])){
$valid['author']=htmlentities(trim($_POST['author']));
}
else {
$inputError[]=’author’;
}
//validate ISBN
if(!empty($_POST['isbn']) && preg_match(‘/^(97(8|9))?\d{9}(\d|X)$/’,$_POST['isbn'])){
$valid['isbn']=htmlentities(trim($POST['isbn']));
}
else {
$inputError[]=’isbn’;
}
//validate price
if(!empty($_POST['price']) && is_numeric($_POST['price']) && $_POST['price'] >0){
$valid['price']=htmlentities(trim($_POST['price']));
}else {
$inputErrors[]=’price’;
}
}
//if form not submitted
//or if validation errors exist
//redisplay form
if(($submitted==true && count($inputErrors)>0)|| $submitted==false){
?>
Title :
<input type="text" size="25" name="title" value="”/>
Author :
<input type="text" size="25" name="author" value="”/>
ISBN :
<input type="text" size="25" name="isbn" value="”/>
Price :
<input type="text" size="25" name="price" value="”/>
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}catch(PDOException $e){
die(“ERROR: Could not connect:”.$e->getMessage());
}
//create and execute INSERT query
try{
$title=$pdo->quote($valid['title']);
$author=$pdo->quote($valid['author']);
$isbn=$pdo->quote($valid['isbn']);
$price=$pdo->quote($valid['price']);
$sql=”INSERT INTO books(title,author,isbn,price) VALUES($title,$author,$isbn,$price)”;
$ret=$pdo->exec($sql);
echo’SUCCESS:Record saved !’;
} catch(Exception $e){
echo’ERROR:’.$e->getMessage().”;
}
unset($pdo);
}
?>
Do you still think the code is missing ?
Hi jules,
Your code is still missing end of if block, start of try-catch block and connection to SQLite3 database…
I decide to write PHP / PDO / SQLite3 example code to you… :)
You can run it command line…it also shows howto to use prepared statements… :)
i copied pasted the code on my bluefish then when i run the page , it said
SQLSTATE[HY000] [14] unable to open database file
Any idea on how to handle this please ! i am really tired of reinstalling php with no solution
Sounds permission problem. So if you save this file example with name sqlite-example.php to /tmp directory and run on command line with following command (you need php-cli package):
Is it working then?
Yeah ! thanks JR ! it s working , but would u mind to help me if possible so as it can work in /var/www/html/sqlite-example.php?
Okay so code is working normally and your PHP / PDO / SQLite is working normally. It sounds definitely permission problem. Do php file with following content:
Run it…do you get any errors? Or do you get test.txt file, with “test test 2″ content?
yeah !
it displays :
Warning: fopen(test.txt): failed to open stream: Permission denied in /var/www/html/file.php on line 2 Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/www/html/file.php on line 3 Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/www/html/file.php on line 4 Warning: fclose() expects parameter 1 to be resource, boolean given in /var/www/html/file.php on line 5
So then try following as root (this is just test setup, no production use):
Then modify your php code to following, (keep php code same location):
Try again…is it working then? :)
Hi, thank you so much for posting this tutorial and helping people with this issue:
I have MySQL 5.0 and I needed at least PHP 5.2, so I did this:
$ yum –enablerepo=remi install php php-pdo php-xml php-pear php-mhash php-mcrypt php-gd
And it all works fine with no errors. But I also need php-mysql, and it throws errors
$ yum –enablerepo=remi install php-mysql
So this results in errors because, I think, it depends on MySQL 5.5. So I try upgrading MySQL, like this:
$ yum –enablerepo=remi update mysql-\*
This is what it looks to update:
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
mysql x86_64 5.5.20-1.el5.remi remi 7.4 M
mysql-devel x86_64 5.5.20-1.el5.remi remi 173 k
mysql-server x86_64 5.5.20-1.el5.remi remi 13 M
Installing for dependencies:
mysql-libs x86_64 5.5.20-1.el5.remi remi 1.1 M
mysqlclient15 x86_64 5.0.67-1.el5.remi remi 1.3 M
Transaction Summary
================================================================================
Install 2 Package(s)
Upgrade 3 Package(s)
Total size: 23 M
And I get these errors:
Transaction Check Error:
file /usr/bin/mysql_find_rows from install of mysql-5.5.20-1.el5.remi.x86_64 c
onflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/bin/mysqlaccess from install of mysql-5.5.20-1.el5.remi.x86_64 confl
icts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/man/man1/my_print_defaults.1.gz from install of mysql-5.5.20-1
.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/man/man1/mysql.1.gz from install of mysql-5.5.20-1.el5.remi.x8
6_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/man/man1/mysql_config.1.gz from install of mysql-5.5.20-1.el5.
remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/man/man1/mysql_find_rows.1.gz from install of mysql-5.5.20-1.e
l5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/man/man1/mysql_waitpid.1.gz from install of mysql-5.5.20-1.el5
.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/man/man1/mysqlaccess.1.gz from install of mysql-5.5.20-1.el5.r
emi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/man/man1/mysqladmin.1.gz from install of mysql-5.5.20-1.el5.re
mi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/man/man1/mysqldump.1.gz from install of mysql-5.5.20-1.el5.rem
i.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/man/man1/mysqlshow.1.gz from install of mysql-5.5.20-1.el5.rem
i.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /etc/my.cnf from install of mysql-libs-5.5.20-1.el5.remi.x86_64 conflicts
with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.5.20-1.e
l5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.5.20-1.
el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/charsets/cp1251.xml from install of mysql-libs-5.5.20-1.
el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.5.20-1.el5
.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/danish/errmsg.sys from install of mysql-libs-5.5.20-1.el
5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/dutch/errmsg.sys from install of mysql-libs-5.5.20-1.el5
.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/english/errmsg.sys from install of mysql-libs-5.5.20-1.e
l5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/estonian/errmsg.sys from install of mysql-libs-5.5.20-1.
el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/french/errmsg.sys from install of mysql-libs-5.5.20-1.el
5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/german/errmsg.sys from install of mysql-libs-5.5.20-1.el
5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/greek/errmsg.sys from install of mysql-libs-5.5.20-1.el5
.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-libs-5.5.20-1
.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/italian/errmsg.sys from install of mysql-libs-5.5.20-1.e
l5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/japanese/errmsg.sys from install of mysql-libs-5.5.20-1.
el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/korean/errmsg.sys from install of mysql-libs-5.5.20-1.el
5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-libs-5.5.2
0-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-libs-5.5.20-1
.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.5.20-1.el
5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.5.20-
1.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.5.20-1.
el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.5.20-1.e
l5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.5.20-1.e
l5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.5.20-1.el
5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.5.20-1.e
l5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/swedish/errmsg.sys from install of mysql-libs-5.5.20-1.e
l5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.5.20-1
.el5.remi.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.i386
This seems to say that I have MySQL 5.0 i386 installed even though I’m on a 64-bit system, and remi wants to give me 64 bit.
Do you have any idea what I should do?
Thank you.
Hi Buttle Butkus,
Could you post output of following commands:
Hi JR ! thanks alot ! It worked
Best Regards ,
Jules
Hi jules,
You are welcome! Nice to hear that you got it working… :)
Hi, JR, thanks so much for your quick response. Perhaps you guessed what my problem is. But I fixed it before I saw your post. I thought checked this:
$ rpm -qa | grep mysqlBut I guess I didn’t.
Somehow, I had both the i386 and x86_64 packages for mysql installed.
When I ran STATUS query it showed x86_64 in mysql. So I gave up and decided to remove mysql altogether and start over with remi’s install.
When I ran:
$ yum remove mysql\*All of a sudden it was asking me to confirm removal of packages that included both architectures.
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
mysql i386 5.0.77-4.el5_6.6 installed 7.9 M
mysql x86_64 5.0.77-4.el5_6.6 installed 8.1 M
mysql-devel i386 5.0.77-4.el5_6.6 installed 5.6 M
mysql-devel x86_64 5.0.77-4.el5_6.6 installed 6.3 M
mysql-server x86_64 5.0.77-4.el5_6.6 installed 22 M
Removing for dependencies:
exim x86_64 4.63-10.el5 installed 3.4 M
perl-DBD-MySQL x86_64 3.0007-2.el5 installed 328 k
redhat-lsb i386 4.0-2.1.4.el5 installed 21 k
redhat-lsb x86_64 4.0-2.1.4.el5 installed 22 k
Then all I had to do was this:
$ yum remove mysql.i386And it removed 2 packages (mysql.i386 and mysql-devel.i386). redhat-lsb.i386 is still there and I guess I should remove it too.
After that, installation worked fine of MySQL 5.5 was fine. I just wonder if I really needed to do it in order to have PHP 5.3.9 including php-mysql. Oh well. Too late now. I am fully upgraded.
Yes, some reason you had both MySQL’s 32-bit and 64-bit installed, but removing wrong one is the solution… :)
Excellent to hear that you got it working!