The awaited latest version of the PHP 7.4 was released on 28th Nov, 2019. It comes with a lot of new features such as
Typed Properties
Arrow Func...
For further actions, you may consider blocking this person and/or reporting abuse
Good job.
Switched to PHP 7.4 yesterday. Ended up having a "MySQL server gone away" error when working with Laravel. Weirdly enough, the fix was to change MySQL authentication method to
caching_sha2_password
.MySQL 8.X uses caching_sha2_password as the default authentication mechanism.
I still had it on
auth_socket
as authentication mechanism (after I reinstalled MySQL).Hi,
I am not an expert and having trouble updating to PHP 7.4 from 7.2.
I have a VPS, Apache-NGINX-Varnish, CentOS 7.7 and CWP Pro.
I did the steps to install:
sudo yum -y install dl.fedoraproject.org/pub/epel/epel...
sudo yum -y install rpms.remirepo.net/enterprise/remi-...
yum --enablerepo=remi-php74 install php
yum --enablerepo=remi-php74 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt
sudo yum-config-manager --enable remi-php74
At this point php 7.4 seems to be installed, however php -v still returns 7.2 and CWP also shows the old version.
What else do I need to do to with Apache/NGINX?
Server version: Apache/2.4.6 (CentOS)
Server MPM: prefork
I tried this:
sudo apt install libapache2-mod-php7.4
sudo: apt: command not found
Thanks.
Try
sudo dnf -y install dnf-utils
andsudo dnf module install php:remi-7.4
I use yum, not dnf.
I already ran this:
sudo yum -y install yum-utils
Package yum-utils-1.1.31-52.el7.noarch already installed and latest version
Nothing to do
Also I just remembered that my server is running on php-cgi, not php-fpm
I have no experience with CGI.
Hello, Petter. I have the same trouble with updating PHP on CWP. Can you possibly write me if you finded the solution?
hahahaha it's like TypeScript systax
If you are a macOS user, ServBay.dev is worth to try. You don't need to spend some time or couple of days to setup anything. Just download it and you can use it immediately. You can run multiple PHP versions simultaneously and switch between them effortlessly.
Honestly, this tool has greatly simplified my PHP development and is definitely worth trying!
Php is looking a bit more like typescript with all the typing and arrow functions! Thanks for writing
Very cool stuff. I haven't coded anything real in PHP in about a decade but I'm thinking about putting something together just for fun. Thanks for the article!
Do post about what you build.
php7.4-fpmpackage -> php7.4-fpm package
also, would be cool if you would publish how all these new features would change our code!
Thanks for finding the typo. I plan on writing about it shortly.
Hi pushkar, can you tell me how can I install ziparchive on php 7.4? i am running virtuamin on centos 7.
I am not that familiar with virtuamin, but I think it should be same as installing any other packages. Try installing as you usually do. The ziparchive is available in php-zip.
How do you installed xdebug?
I used the pear package to install Xdebug.
Thank you for the article. There is a tiny mistake here (php7.3):
sudo apt install php7.4-curl php7.4-json php7.4-gd php7.4-mbstring php7.4-intl php7.4-bcmath php7.4-bz2 php7.3-readline php7.3-zip
Thanks for letting me know. I'll update.