I am trying to install php5.6 into my ubuntu 14.04 server.
Using following link
https://tecadmin.net/install-php5-on-ubuntu/
Using following Commands.
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php5.6
but getting following error.
"Unable to locate package php5.6"
"Couldn't find ant package by regex'php5.6' "
Please provide solution.
It was removed from repository. You can`t install it from ondrej/php repository
Ubuntu 14.04 (Trusty), PHP 5.6 and PHP 7.0 going away See also: Ubuntu 14.04 LTS reached end-of-life
Related
While installing php-fpm it shows an error:
E: Unable to locate package php7.3
E: Unable to locate package php7.3-fpm
Please tell me, how to solve this issue.
I am using Ubuntu 16.04 LTS server.
PHP 7.3 may not be available in Ubuntu 16.04 default repo, you need to add third party repo. I have used ondrej repo quiet often and it works great.
Run the below commands:
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.3
You will need sudo permission to run the above commands.
My machine is running on ubuntu 16.04 and I have installed php 5.6, but when I am trying to run to install php5-phalcon, it returns error that package not found.
Following is command that I ran
sudo apt-get install php5-phalcon
It returns following output
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5-phalcon
You need to add the correct repository in first...
curl -s "https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh" | sudo bash
sudo apt-get install php5-phalcon
# Ubuntu 16.04+, Debian 9+
sudo apt-get install php7.0-phalcon
(From https://phalconphp.com/en/download/linux)
After trying few methods, found that php5.6-phalcon is not available for ubuntu 16.04, following are steps to install php7.0-phalcon :
curl -s "https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh" | sudo bash
# Ubuntu 16.04+, Debian 9+
sudo apt-get install php7.0-phalcon
I have installed MongoDB PHP driver on Ubuntu 14.04 using this command
sudo apt-get install php5-mongo
and it installed the driver but an older version which is 1.4, the problem is I need latest one, which is 1.6. I already tried this command.
sudo apt-get install php5-mongodb
but getting error no package found. Can someone help installing latest mongodb php driver on ubuntu 14.04
I followed this link as well and installed pecl extension but nothing worked http://zacvineyard.com/blog/2013/02/the-easy-way-to-install-the-mongodb-php-driver-on-ubuntu-1204
Thanks.
Try using:
sudo apt-get install php5-dev php5-cli php-pear -y
sudo pecl install mongo
As shown here: http://blog.programster.org/debian-8-install-mongodb-php-driver/ (I've tested on ubuntu 14 and it worked)
I want to Install php 5.3 or 5.4 on Ubuntu 16.04 Xenial and Apache.
A tutorial points me to use PPA but they are not helping me in what I need.
I know that PHP 5.3 and 4 are obsolete but I need this for a project and is this possible? If yes then please teach me how in a step by step procedure with Apache2.
you can use this package ppa:sergey-dryabzhinsky/php53 to install php 5.3, i managed with this package on ubuntu 16.
sudo add-apt-repository ppa:sergey-dryabzhinsky/php53
sudo apt-get update
sudo apt-get install php5
Before installing PHP 5.4 you need to read this notice:
Security support for PHP 5.4 has ended. You are using this repository knowing that there might be and probably are unfixed security vulnerabilities. Please upgrade to PHP 5.6 or PHP 7.0 as found in the main repository: ppa:ondrej/php
After understanding the risks , to install PHP 5.4 ,add the PPA to your sources.list:
sudo add-apt-repository ppa:ondrej/php5-oldstable
sudo apt-get update
Install it:
sudo apt-get install -y php5
To be safe , the PHP 5.6 version can be installed as follows:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0
sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart
Update
All version prior to PHP 5.6 are unsupported
This page lists the end of life date for each unsupported branch of PHP. If you are using these releases, you are strongly urged to upgrade to a current version, as using older versions may expose you to security vulnerabilities and bugs that have been fixed in more recent versions of PHP.
*reference for PHP 5.6 downgrade from PHP 7
Install add-apt-repository
sudo apt-get install python-software-properties
Add repository for PHP 5
sudo add-apt-repository -y ppa:ondrej/php
Update
sudo apt-get update
Install php5-fpm
sudo apt-get install php5.6-fpm
Move files
sudo mv /usr/bin/php /usr/bin/php7
sudo mv /usr/bin/php5.6 /usr/bin/php
Check PHP version
php -v
Restart Apache
sudo service apache2 restart
Try to use php version switcher: phpbrew.
Supported versions
While this may not answer your problem, but PHP-5 can be installed on ubuntu 14.04 (I have tried on Amazon EC2)
You can use
sudo apt‐get install php5 libapache2‐mod‐php5 php5‐mcrypt
sudo service apache2 restart
This will install 5.5.9 as on 25-Apr-2017.
I had LAMP Server installed on Ubuntu 12.10 with PHP 5.3. I had to remove it so i used this link.
Now I am trying to install LAMP with PHP 5.4 or higher using the ondrej ppa but i end up installing 5.3.10 again and again. I install using the below commands :
for 5.5 i tried,
sudo add-apt-repository ppa:ondrej/php5
and for 5.4 i tried,
sudo add-apt-repository ppa:ondrej/php5-oldstable
and then the regular update and install
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5
However in the end when i run php -v i see that the version installed is 5.3.10-1ubuntu3.19
I have tried restarting the web server. still noting changes. I dont know where it is going wrong.