On Debian (Squeeze), I need to upgrade from PHP 5.3 to PHP 5.5.
I tried those commands :
apt-get update; apt-get install php5;
also adding :
echo "deb http://packages.dotdeb.org squeeze all" >> /etc/apt/sources.list
echo "deb-src http://packages.dotdeb.org squeeze all" >> /etc/apt/sources.list
But nothing change, it's still PHP 5.3. Any ideas ? Thanks
I don't think that Dotdeb has PHP 5.5 for Debian 6 Squeeze. The latest version I can see is 5.4.
They have PHP 5.5 only for Debian 7 Wheezy.
Not many people have squeeze now. Did you try http://forums.debian.net/viewtopic.php?f=30&t=108694? They advice
apt-get install php5 -t squeeze-php54 -s
I would try squeeze-php55, and if it works, then without -s
Related
I have a virtual website in an ubuntu 18.04 server that is written in Laravel9 and it needs php version 8.0.2 or higher. The error looks like this in the browser:
Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2".
In the system I have PHP 7.4.29 (cli) but can't change that due to other virtual sites who need 7.4.
How do I get php 8.1 to the Laravel9 site so it works?
Ok, found out that what was needed was a composer command:
composer install --ignore-platform-reqs
So now no error anymore. Now I have other things to worry about, but thats Laravel stuff.
My other sites works ok despite php 8.1 now.
Thanks any way for your help.
If using Debian/Ubuntu:
apt -y install software-properties-common
add-apt-repository ppa:ondrej/php
apt -y install php8.1
CentOS:
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm
dnf remove php* -y
dnf module list reset php -y
dnf module enable php:remi-8.1
dnf install php
I recently restored my personal test server with a completely fresh install of Debian 8.
The Service Provider where I purchased the Virtual Server, has only the Debian 8 option. So there is currently no possibility to upgrade to stretch or buster (9 and 10).
I need to install at least PHP 7.2 on my server to meet the requirements for the project and I'm having a hard time accomplishing that. As www.dotdeb.org seems to be discontinued I am wondering what package source I should add for PHP 7.2. All I found googling around was when dotdeb was still providing 7.2 packages.
My sources.list looks like this:
deb http://debian.mirror.serverloft.de/debian/ jessie main contrib non-free
deb http://debian.mirror.serverloft.de/debian-security/ jessie/updates main contrib non-free
deb http://packages.dotdeb.org jessie all
deb https://packages.sury.org/php/ jessie main
deb-src http://packages.dotdeb.org jessie all
but when I do
apt-get uptate
apt-get install php 7.2
I get
E: Unable to locate package php7.2
E: Couldn't find any package by regex 'php7.2'
Maybe there is no such option anymore and I have to change the provider to get a higher Debian version?
You can install the php 7.2 or later in debian jessie. But you need to follow some steps for getting this. The main reason is debian platform has been stopped the sury package service for jessie. Please check this link https://packages.sury.org/php/dists/
Now you know, it's not have the jessie support.
Okay Now we start the process of php 7.2 installation
Open /etc/apt/sources.list and add deb http://ftp.de.debian.org/debian stretch main.
It helps to get the stretch repos for the supporting dependencies of php 7.2
$ sudo apt update
$ sudo nano /etc/apt/sources.list.d/php.list.
then add deb https://packages.sury.org/php/ stretch main. this is also a stretch repo
$ sudo apt update
Now the php needs the updation of libncurses5 >= 6
check the current available version of libncurses5
$ sudo apt search libncurses5 //it shows you the libncurses5 as 6.0
$ sudo apt install libncurses5
$ sudo apt-get install php7.2 php7.2-readline php7.2-cli php7.2-fpm
$ sudo apt install php7.2-common php7.2-mysql php7.2-xml php7.2-xmlrpc php7.2-curl php7.2-gd php7.2-imagick php7.2-dev php7.2-imap php7.2-mbstring php7.2-opcache php7.2-soap php7.2-zip php7.2-intl -y
check unix socket is found in /var/run/php
Now you found php7.2-fpm.sock in this directory
Last step. just start the php service: $ sudo service php7.2-fpm start
Now you check the status and version of php $ sudo service php7.2-fpm status && $ php -v
Hurray. you got the newest version of php. Thanks a lot
Note: Don't forget to stop the previous service for php in your machine
I've got PHP 8.0 from this all-in-one bundle: https://bitnami.com/stack/lapp/installer
It does not depend on Linux distro
short question - how to install php7.1 on OS X Sierra and keep 5.6 as default.
I only want to run php 7.1 in terminal using php7 - and when using php the original 5.6 should be used ...
thanx in advance
tom
There are a number of ways to achieve this. I would install PHPBrew, since that allows you install as many PHP versions as you want without touching the system's PHP version.
I would also install Homebrew as it's likely there will be dependencies you need to resolve with specific extensions.
Another option would be to install PHP7 via Homebrew and alias it to php7. Or you could compile it from source. However, if you plan on having one or more PHP versions readily available alongside the system version then PHPBrew is probably the most flexible option.
Install PHP 5.6:
brew install php56
Install PHP 7.0:
php70
Switch to php5.6 in terminal:
brew unlink php70
brew link php56
Switch to php7.0 in terminal:
brew unlink php56
brew link php70
Source: Switching PHP version on mac with homebrew
maybe someone other is searching for a very clean solution too - here is what finally worked for me perfectly. this is based on the hints and tips from matthew daly and surfer 190 - thanx again!
takes just 5 minutes - here we go ...
first install xcode command line tools (just 160mb instead 4.5gb):
xcode-select --install
then install homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
short test if anything up to here is fine:
brew doctor
install php 7.1:
brew install php71
i found that some have problems with the above direct php install - this resolves these problems - and then try again the php install:
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
make a symlink to the original php-binary that came with osx:
ln -s /usr/bin/php /usr/local/bin/php5
here is the result - now php 7.1 is the default php version - and using php5 will use the old php-binary that came with your osx preinstalled:
php -v
php5 -v
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.
I run my web application in nginx server with php-fpm version on debian wheezy, inside a docker container.
I update my php version to 5.6.1.
RUN echo "deb http://packages.dotdeb.org wheezy all" >> /etc/apt/sources.list
RUN echo "deb-src http://packages.dotdeb.org wheezy all" >> /etc/apt/sources.list
RUN echo "deb http://packages.dotdeb.org wheezy-php56 all" >> /etc/apt/sources.list
RUN echo "deb-src http://packages.dotdeb.org wheezy-php56 all" >> /etc/apt/sources.list
RUN wget http://www.dotdeb.org/dotdeb.gpg
RUN apt-key add dotdeb.gpg
RUN apt-get update
RUN apt-get install -y nginx php5-fpm php5-mysqlnd php5-cli supervisor
If I do the following commands inside my container, version is ok and seems correctly updated:
php -v // 5.6.6
/usr/sbin/php5-fpm -v // 5.6.6
But if I go to my document root and do phpinfo(), the php version is wrong in Core -> PHP version (5.4.36, the default one with debian:wheezy). More nginx version output is wrong too.
Any ideas ?
Run the following command.
If apache
sudo service apache2 restart
If nginx
sudo service nginx restart
After you install any server modules, it is a good habit that you restart your apache,nginx.
All right, it was a "docker-compose" misunderstanding.
I needed to do a docker-compose up -d to rebuild, recreate and restart my services.