We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it by the end of 2024. Read more about it: https://vestacp.com/docs/vesta-2-development
[Solved] How to use PHP 7.3 in Ubuntu 18.04 ? Topic is solved
[Solved] How to use PHP 7.3 in Ubuntu 18.04 ?
Hi,
I have installed php7.3 on my server and by CLI, it is activated :
But on my hosted websites, it's always php7.2 which is used : with a phpinfo(), I can verify this point.
v-rebuild-web-domains CLI command didn't solved the problem
What did I miss ?
I have installed php7.3 on my server and by CLI, it is activated :
Code: Select all
php -v
PHP 7.3.3-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Mar 7 2019 20:31:49) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.3, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.3-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
v-rebuild-web-domains CLI command didn't solved the problem
What did I miss ?
Last edited by Spheerys on Fri Apr 05, 2019 6:56 pm, edited 1 time in total.
-
- Support team
- Posts: 1111
- Joined: Tue Jul 30, 2013 10:18 pm
- Contact:
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: How to use PHP 7.3 in Ubuntu 18.04 ?
Restart apache.
Re: How to use PHP 7.3 in Ubuntu 18.04 ?
I did it (obviously)
Re: How to use PHP 7.3 in Ubuntu 18.04 ?
I tried to remove php 7.2 but apache refuse to restart :
The line 17 is :
Code: Select all
avril 05 10:21:49 domain apachectl[1445]: AH00526: Syntax error on line 17 of /home/admin/conf/web/domain.net.apache2.conf:
avril 05 10:21:49 domain apachectl[1445]: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
avril 05 10:21:49 domain apachectl[1445]: Action 'start' failed.
avril 05 10:21:49 domain apachectl[1445]: The Apache error log may have more information.
avril 05 10:21:49 domain systemd[1]: apache2.service: Control process exited, code=exited status=1
avril 05 10:21:49 domain systemd[1]: apache2.service: Failed with result 'exit-code'.
avril 05 10:21:49 domain systemd[1]: Failed to start The Apache HTTP Server.
Code: Select all
php_admin_value open_basedir /home/admin/web/domain.net/public_html:/home/admin/tmp
-
- Support team
- Posts: 1111
- Joined: Tue Jul 30, 2013 10:18 pm
- Contact:
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: How to use PHP 7.3 in Ubuntu 18.04 ?
Looks like mod_php not configured in apache config.
Re: How to use PHP 7.3 in Ubuntu 18.04 ?
Hummm with the phpinfo(), I have this for the loaded modules :
Edit : I did "a2enmod php7.3 "and I get this result :Loaded Modules core mod_so mod_watchdog http_core mod_log_config mod_logio mod_version mod_unixd mod_access_compat mod_actions mod_alias mod_auth_basic mod_authn_core mod_authn_file mod_authz_core mod_authz_host mod_authz_user mod_autoindex mod_deflate mod_dir mod_env mod_fcgid mod_filter mod_mime prefork mod_negotiation mod_php7 mod_reqtimeout mod_rewrite mod_rpaf-2 mod_ruid2 mod_setenvif mod_socache_shmcb mod_ssl mod_status mod_suexec
But after the apache2 restart, the website are still using php 7.2 !!Considering dependency mpm_prefork for php7.3:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php7.3:
Enabling module php7.3.
To activate the new configuration, you need to run:
systemctl restart apache2
Re: How to use PHP 7.3 in Ubuntu 18.04 ?
OK solved : I had to also disable php7.2 module with :
and restart apache2
Thanks for your help grayfolk :)
Code: Select all
a2dismod php7.2
Thanks for your help grayfolk :)