Cannot update to php 5.4 - AWS ec2 - php

I was having php5.3 and httpd2.2 on my instance. Now I need to upgrade to php 5.4.
I am following these instructions :
http://codingsteps.com/install-apache-2-4-php-5-4-php-apc-on-amazon-ec2-with-amazon-linux/
I have sudo yum remove all the conflicts and now the remaining two are:
Error: httpd24-tools conflicts with httpd-tools-2.2.29-1.4.amzn1.x86_64
Error: httpd24 conflicts with httpd-2.2.29-1.4.amzn1.x86_64
But if I run for example :
[ec2-user#ip-172-31-44-86 ~]$ sudo yum install -y httpd24 php54
...
--> Finished Dependency Resolution
Error: httpd24-tools conflicts with httpd-tools-2.2.29-1.4.amzn1.x86_64
Error: httpd24 conflicts with httpd-2.2.29-1.4.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[ec2-user#ip-172-31-44-86 ~]$
EDIT :
I am trying to remove them :
sudo yum remove httpd-tools-2.2.29-1.4.amzn1.x86_64
But I get that :
Loaded plugins: priorities, update-motd, upgrade-helper
No Match for argument: httpd-tools-2.2.29-1.4.amzn1.x86_64
No Packages marked for removal
What should I do?

This might be a day late and a dollar short but this worked for me.
sudo yum remove httpd* php*
sudo yum install httpd24 php54
https://forums.aws.amazon.com/thread.jspa?messageID=465912

You have to remove your old version of httpd prior to installing the new version.
yum remove httpd-tools-2.2.29-1.4.amzn1.x86_64 httpd-2.2.29-1.4.amzn1.x86_64

I had the same problem installing PHP55 devel package.
I've solved uninstalling httpd and PHP again and installing with this command:
sudo yum install -y httpd24 php55 php55-common php55-devel
Note that if you try to install httpd and php, and later php-devel, you get
Error: httpd24-tools conflicts with httpd-tools-2.2.29-1.4.amzn1.x86_64
Error: php55-common conflicts with php-common-5.3.29-1.7.amzn1.x86_64
Error: php55-cli conflicts with php-cli-5.3.29-1.7.amzn1.x86_64
Error: httpd24 conflicts with httpd-2.2.29-1.4.amzn1.x86_64
Error: php55 conflicts with php-5.3.29-1.7.amzn1.x86_64
I hope this solution help you. I found my inspiration in: PHP install on clean Amazon Linux AMI
PD: Sorry about my english

Related

php71 conflict with php70 after disabling php71 repo

I am attempting to install php-zip (PHP 7.0) but am encountering:
Error: php71w-common conflicts with php-common-7.0.23-1.el7.remi.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I've...
disabled all remi-php repos except for remi-php70.
execute sudo yum clean all
execute sudo yum install php-zip, sudo yum install php70-zip as well as sudo yum install php70w-zip.
All result in:
Resolving Dependencies
--> Running transaction check
---> Package php71w-common.x86_64 0:7.1.8-2.w7 will be installed
--> Processing Conflict: php71w-common-7.1.8-2.w7.x86_64 conflicts php-common < 7.1
--> Finished Dependency Resolution
Ah, webtatic was once in use and presented the conflict. I resolved my problem with:
sudo yum-config-manager --disable webtatic webtatic-archive webtatic-testing remi-php54 remi-php71
sudo yum clean all

php-bcmatch installation on php7 running amzon linux os

I am trying to install php-bcmath on amazon os
sudo yum install php-bcmath
But i got the following error
Finished Dependency Resolution
Error: php70-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Also i have tried with sudo yum install php-bcmath --skip-broken but the same error will be returned
It seems you have installed php70 in your system and default php version provided by os is php 5.3
Try this to install bcmath one of below command will work.
sudo yum install php70-php-bcmath
or
sudo yum install php70-bcmath
Hopen this will help.

Installing PHP56 Mongo Driver in my ec2 (centos/linux) instance

I want to install mongo driver manager as given here http://php.net/manual/en/mongodb.installation.pecl.php
Mongo is already running. pecl is not there in my instance. you can find my phpinfo here
Please guide me through the necessary steps.
EDIT
I have installed pecl,, now I suppose I have to install php-devel but I am getting the following error
Error: httpd24-tools conflicts with httpd-tools-2.2.31-1.8.amzn1.x86_64
Error: php56-cli conflicts with php-cli-5.3.29-1.8.amzn1.x86_64
Error: httpd24 conflicts with httpd-2.2.31-1.8.amzn1.x86_64
Error: php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
Error: php56 conflicts with php-5.3.29-1.8.amzn1.x86_64
Was able to install pecl using the following list of commands in php-5.6 ec2
sudo yum install php-pear
sudo yum install php56-devel
sudo yum install gcc
sudo yum install openssl-devel
sudo pecl install mongodb

Error install pecl/raphf and propro

I have updated php5.5 to php7.0.
I try to run this commande :
pecl install pecl/raphf
But I obtain this error :
Parse error: syntax error, unexpected 'new' (T_NEW) in /usr/share/php/PEAR/Frontend.php on line 91
How I can install :
pecl install pecl/raphf
pecl install pecl/propro
Try update PEAR:
$ wget http://pear.php.net/go-pear.phar
$ php go-pear.phar
Original Answer in GitHub Issue
I solving my problem :
I have unistalled php 7.0.5, and installed php 5 for get old pear version.
apt-get install php-pear
pear clear-cache
pear upgrade pear-1.10.0
Then, I am re-installed php7.0.5
It work !
Pear 1.10.0 supports php7. Upgrade your pear.
http://pear.php.net/package/PEAR/download/1.10.0
I solved my similar problem on Centos7.x for root user:
I'm remove default package:
yum remove php-pear
Next i'm install package for php7.x (for example php7.1) and default package:
yum -y install php71-php-pear && yum -y install php-pear
After install i'm find my php71-pear directory and create symlink instead of default php-pear:
find / -type d -name 'pear'
...
/opt/remi/php71/root/usr/share/doc/pear
/opt/remi/php71/root/usr/share/pear
/opt/remi/php71/root/usr/share/tests/pear
...
mv /usr/share/pear /usr/share/pear_5
ln -s /opt/remi/php71/root/usr/share/pear /usr/share/pear
Profit...
pecl -V
PEAR Version: 1.10.7
PHP Version: 7.1.5
Zend Engine Version: 3.1.0
You don't need uninstall PHP 7. You can edit /usr/bin/pear and set php=/usr/bin/php5. Then update PEAR.
I have install both php env like php5.6 and php7.1
Try update PEAR:
$ wget http://pear.php.net/go-pear.phar
$ php go-pear.phar

Install php-devel

I would like to install php-devel on my server(CentOS 6.5).
yum install php-devel
However, I encountered the following error.
Error: php54-cli conflicts with php-cli-5.3.3-40.el6_6.x86_64
Error: php54 conflicts with php-5.3.3-40.el6_6.x86_64
Error: php54-common conflicts with php-common-5.3.3-40.el6_6.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Could you tell me how to solve this problem?
It's because you have to chose between packages 5.4 and 5.3
i'll suggests to do :
yum remove php.*
sudo yum install php53-common php5-devel php5-cli

Categories