Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

[Solved] How to use PHP 7.3 in Ubuntu 18.04 ? Topic is solved

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
7 posts • Page 1 of 1
Spheerys
Posts: 225
Joined: Tue Dec 29, 2015 12:36 pm

Os: Debian 7x
Web: apache + nginx
[Solved] How to use PHP 7.3 in Ubuntu 18.04 ?
  • Quote

Post by Spheerys » Fri Apr 05, 2019 8:36 am

Hi,

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
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 ?
Last edited by Spheerys on Fri Apr 05, 2019 6:56 pm, edited 1 time in total.
Top

grayfolk
Support team
Posts: 1111
Joined: Tue Jul 30, 2013 10:18 pm
Contact:
Contact grayfolk
Website Facebook Skype Twitter

Os: CentOS 6x
Web: nginx + php-fpm
Re: How to use PHP 7.3 in Ubuntu 18.04 ?
  • Quote

Post by grayfolk » Fri Apr 05, 2019 10:02 am

Restart apache.
Top

Spheerys
Posts: 225
Joined: Tue Dec 29, 2015 12:36 pm

Os: Debian 7x
Web: apache + nginx
Re: How to use PHP 7.3 in Ubuntu 18.04 ?
  • Quote

Post by Spheerys » Fri Apr 05, 2019 10:05 am

I did it (obviously)
Top

Spheerys
Posts: 225
Joined: Tue Dec 29, 2015 12:36 pm

Os: Debian 7x
Web: apache + nginx
Re: How to use PHP 7.3 in Ubuntu 18.04 ?
  • Quote

Post by Spheerys » Fri Apr 05, 2019 5:45 pm

I tried to remove php 7.2 but apache refuse to restart :

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.
The line 17 is :

Code: Select all

        php_admin_value open_basedir /home/admin/web/domain.net/public_html:/home/admin/tmp
Top

grayfolk
Support team
Posts: 1111
Joined: Tue Jul 30, 2013 10:18 pm
Contact:
Contact grayfolk
Website Facebook Skype Twitter

Os: CentOS 6x
Web: nginx + php-fpm
Re: How to use PHP 7.3 in Ubuntu 18.04 ?
  • Quote

Post by grayfolk » Fri Apr 05, 2019 5:54 pm

Looks like mod_php not configured in apache config.
Top

Spheerys
Posts: 225
Joined: Tue Dec 29, 2015 12:36 pm

Os: Debian 7x
Web: apache + nginx
Re: How to use PHP 7.3 in Ubuntu 18.04 ?
  • Quote

Post by Spheerys » Fri Apr 05, 2019 6:49 pm

Hummm with the phpinfo(), I have this for the loaded modules :
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
Edit : I did "a2enmod php7.3 "and I get this result :
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
But after the apache2 restart, the website are still using php 7.2 !!
Top

Spheerys
Posts: 225
Joined: Tue Dec 29, 2015 12:36 pm

Os: Debian 7x
Web: apache + nginx
Re: How to use PHP 7.3 in Ubuntu 18.04 ?
  • Quote

Post by Spheerys » Fri Apr 05, 2019 6:56 pm

OK solved : I had to also disable php7.2 module with :

Code: Select all

a2dismod php7.2
and restart apache2

Thanks for your help grayfolk :)
Top


Post Reply
  • Print view

7 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password