php53-common conflicts with php-common

In reference to this thread: https://virtualmin.com/node/21215

Fresh install of CentOS 5.7 on a hosted Server

I'm installing Virtualmin from ssh, via the link provided in my Liciense tab
wget -O install.sh http://software.virtualmin.com/cgi-bin/install.cgi?serial=...

I get an Error during installation: php53-common conflicts with php-common

I run

yum erase php*

According to the system, its removed, with no dependencies, that's both php and php53, so you would think yum does not have any dependencies for php, or it would try to remove those apps as well, so at this point I have one failed attempt to install the script, and I have all dependencies for php removed.

Here are the Repos I have installed


# ls -l /etc/yum.repos.d

CentOS-Base.repo
CentOS-Debuginfo.repo
CentOS-Media.repo
CentOS-Vault.repo
virtualmin-bleed.repo
virtualmin.repo

Unless something in the Virtalmin install script has a dependency for php53, there is but one conclusion I could draw, that yum is not tracking the dependency for php correctly or since CentOS version 5.7 repos, there is php 5.1 and 5.3 (it looks like they skipped 5.2), so it defaults to the latest, which is php53, now the Virtalmin install script implicitly installs 5.1 or 5.2 (since I installed the virtualmin-bleed.repo trying to fix this issue) via yum install php, where php is anything up to 5.3, where for some reason, they abandon all reasoning and went with another naming convention that would allow them to run both php and php53, which in reality does not work by default, and is a bad idea in any event, so lets keep in mind that this is the reason we are having this problem to begin with, so the only way to correct this problem is to make the fix I have suggested, so at this point, I need to make this a feature request or a bug report, and I have to go with the Bug, I can not install this script, under this situation, for what ever reason, so its a bug.

rhdeps=...php php-domxml php-gd php-imap php-mysql php-odbc php-pear php-pgsql php-snmp php-xmlrpc php-mbstring...

now it seems to me that if we add an Argument like:
--php53

we could do this:

add an argument to your case for --php53
around line 57

while [ "$1" != "" ]; do
case $1 in
...
;;
--php53)
php="php53"
...
esac
shift
done

if [ "$php" = "php53" ]; then
rhdeps=...php53 php53-gd
else
rhdeps=...php php-gd
fi

wget -O install.sh http://software.virtualmin.com/cgi-bin/install.cgi?serial=XXXX\&key=XXXX; /bin/sh install.sh --php53

Now I should be able to install this script, since its not forcing me to install both PHP 5.2, and PHP53, lets face it, when 5.4 comes out, then what will you do, this is getting crazy, all I'm asking for is a way around this issue, since it has me at a stand still.

Regardless of why this system wants to install PHP53, this line "rhdeps=...php php-gd" is causing it to install PHP 5.2 at the same time, which isn't going to happen on this system, or any others that require PHP53; but this code change should fix that; its ease and fast to fix.

This is the code changes I propose:


while [ "$1" != "" ]; do
case $1 in
--help|-h)
echo "Usage: `basename $0` [--uninstall|-u|--help|-h|--force|-f|--hostname]"
echo " If called without arguments, installs Virtualmin Professional."
echo
echo " --uninstall|-u: Removes all Virtualmin packages (do not use on production systems)"
echo " --help|-h: This message"
echo " --force|-f: Skip confirmation message"
echo " --hostname|-host: Set fully qualified hostname"
echo
exit 0
;;
--uninstall|-u)
mode="uninstall"
;;
--force|-f|--yes|-y)
skipyesno=1
;;
--php53|-pl)
phpver="php53"
;;
--hostname|--host)
shift
forcehostname=$1
;;
*)
;;
esac
shift
done

# Red Hat-based systems
if [ "$phpver" = "php53" ]; then
rhdeps="bind bind-utils caching-nameserver httpd postfix bind spamassassin procmail perl-DBD-Pg perl-DBD-MySQL quota iptables openssl python mailman subversion mysql mysql-server mysql-devel postgresql postgresql-server rh-postgresql rh-postgresql-server logrotate webalizer php53 php53-xml php53-gd php53-imap php53-mysql php53-odbc php53-pgsql php53-snmp php53-xmlrpc php53-mbstring mod_perl mod_python cyrus-sasl dovecot spamassassin mod_dav_svn cyrus-sasl-gssapi mod_ssl ruby ruby-devel rubygems perl-XML-Simple perl-Crypt-SSLeay"
# Now I do not know about a php53 version of these: php-domxml php-pear, I do see php53-xml so I added it, not sure if its like php-domxml
# Now I do not see php53-pear this is the only issue I see, how do you fix this?
else
rhdeps="bind bind-utils caching-nameserver httpd postfix bind spamassassin procmail perl-DBD-Pg perl-DBD-MySQL quota iptables openssl python mailman subversion mysql mysql-server mysql-devel postgresql postgresql-server rh-postgresql rh-postgresql-server logrotate webalizer php php-domxml php-gd php-imap php-mysql php-odbc php-pear php-pgsql php-snmp php-xmlrpc php-mbstring mod_perl mod_python cyrus-sasl dovecot spamassassin mod_dav_svn cyrus-sasl-gssapi mod_ssl ruby ruby-devel rubygems perl-XML-Simple perl-Crypt-SSLeay"
fi

Status: 
Active

Comments

We're discussing the issue in the thread here -- however, since neither CentOS 5 nor Virtualmin includes a dependency for php 5.3 by default, something else is going on here that's causing the issue.

I'm typing out a response to the forum post now.

I still have this issue with CentOS 6.4, running yum erase -y php-common before install, fixes the issue, it would not hurt to add this to the install script, since it gets installed in the script.