I recently downgraded one of my laptop from 14.04 to 12.04. Reason for downgrading operating system is speed only. 12.04 seems 10x time faster then my experience with 14.04 on my low configuration laptop. As usual I install LAMP stack using tasksel command:
$ sudo apt-get install tasksel
$ sudo apt-get update
$ sudo tasksel install lamp-server
However, this installed PHP version 5.3.10. I google to update php version and followed many suggestions including sudo apt-get update, sudo apt-get dist-upgrade and also installing latest PPA as well.
Also fllowed this answer: Php upgrade from 5.3 to php 5.6 on Ubuntu 12.04
Nothing worked so far and I am here for seeking some help.
Related
I have an Oracle Linux Server. I am trying to install PHP. PHP 5.4 installed on OLS. Is there a way to update to php 7.2? When I run yum install php it installs version 5.4.
UPDATE
I reinstall linux to ubuntu. There is no any problem on ubuntu
sudo yum install oracle-php-release-el7
sudo yum install php
See also: https://yum.oracle.com/oracle-linux-php.html
Please let me know if issuing "apt-get update" command on AWS EC2 ubuntu 14.04 machine upgrades PHP version from 7.1 to 7.2
Well, apt-get update updates the apt-get list of repositories, to update the packages installed by apt-get you should use apt-get upgrade:
# apt-get upgrade php7
or
# apt-get upgrade
You can confirm that with the following command:
sudo apt-get upgrade --dry-run
Based on Linux Man Page:
No action. Perform a simulation of events that would occur but do not
actually change the system.
I am trying to setup phppgadmin and it requires php5-fpm but as I have ubuntu 16.04 and it comes with php 7. So when i try to run install php5-fpm it give me following error:
sudo apt-get install php5-fpm
Package php5-fpm is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'php5-fpm' has no installation candidate
I can't use php7-fpm as phppgadmin requires only php5-fpm. When I run sudo apt-get install php-fpm it installed php7-fpm . I am using nginx as web server. I tried many ppa but none of them worked for me.
TL;DR: If you want to stay with php5, you will need to stay at Ubuntu 14.04 LTS
You can use phpbrew to install older/different php-version, that are not part of the actual package-repositories of ubutu.
phpbrew builds and installs multiple version php(s) in your $HOME directory.
Another way is to modify the sources.list and a repository which still provides php5 packages. But you really should not do that!
You will need to use a PPA to do this. Consider:
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-mbstring php-xdebug libapache2-mod-php5.6
That's PHP5.6, not exactly PHP5-FPM. I don't think FPM is in that PPA but it's a close enough solution. Maybe you can find an FPM PPA but I'm not seeing one at first glance.
I have installed Ubuntu 14.04 LTS and LAMP server. By default the installed version of php had been 5.5, so I had to upgrade to 5.6 according to the manuals on the web .
After the upgrade the GD extension is not working well.
I tried:
sudo apt-get remove -purge php5-gd - to remove and purge the installed extension.
sudo apt-get install php5-gd - to install again.
Then I test the installation and this is the output:
sudo apt-get install php5-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-gd is already the newest version.
Unfortunately I don't see the GD extension in phpinfo page and the test script from the application which I am trying to run also gives me error about GD2.
I have tried almost every suggestion that I found in Google, but find no joy. You are my last hope now. Thank you.
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.