HOWTO: Install PHP7.0 or PHP 7.2 on CentOS 7
Re: HOWTO: Install PHP7 on CentOS 7
Whenever this happens, run this command to see what's wrong:
Code: Select all
systemctl status php72-php-fpm.service
pepsi wrote: ↑Sat Mar 17, 2018 4:07 amHello. Thanks for the guide but I'm having some issues. I did all the steps and basically the problem is when I run 'php -v', I get PHP 7.2.X, but my actual websites are still running PHP 5.6 (I'm checking via phpinfo).
To go further, I followed the guide without issue up until where you say to "Start PHP-FPM". But this is what I get when I attempt that:
Do you have any idea what is going wrong? I did this on a fresh VestaCP install on CentOS 7. Can you verify what settings I should have chosen when running vst-install.sh? Like for WEB what should I have picked (nginx + apache, nginx + php-fpm)? I want to be running Apache as the main web server.Code: Select all
[root@server01]# service php72-php-fpm start Redirecting to /bin/systemctl start php72-php-fpm.service Job for php72-php-fpm.service failed because the control process exited with error code. See "systemctl status php72-php-fpm.service" and "journalctl -xe" for details. [root@server01]# [root@server01]# [root@server01]# systemctl status php72-php-fpm.service ● php72-php-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php72-php-fpm.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sat 2018-03-17 04:02:13 UTC; 8s ago Process: 9138 ExecStart=/opt/remi/php72/root/usr/sbin/php-fpm --nodaemonize (code=exited, status=78) Main PID: 9138 (code=exited, status=78) Mar 17 04:02:13 server01 systemd[1]: Starting The PHP FastCGI Process Manager... Mar 17 04:02:13 server01 php-fpm[9138]: [17-Mar-2018 04:02:13] ERROR: Unable to globalize '/etc/php-fpm.d/*.conf' (ret=2) from /etc/opt/remi/php72/php-fpm.conf at line 11. Mar 17 04:02:13 server01 php-fpm[9138]: [17-Mar-2018 04:02:13] ERROR: failed to load configuration file '/etc/opt/remi/php72/php-fpm.conf' Mar 17 04:02:13 server01 php-fpm[9138]: [17-Mar-2018 04:02:13] ERROR: FPM initialization failed Mar 17 04:02:13 server01 systemd[1]: php72-php-fpm.service: main process exited, code=exited, status=78/n/a Mar 17 04:02:13 server01 systemd[1]: Failed to start The PHP FastCGI Process Manager. Mar 17 04:02:13 server01 systemd[1]: Unit php72-php-fpm.service entered failed state. Mar 17 04:02:13 server01 systemd[1]: php72-php-fpm.service failed.
Re: HOWTO: Install PHP7 on CentOS 7
I actually already included that output in my original post you quoted.SS88 wrote: ↑Sat Mar 17, 2018 11:24 amWhenever this happens, run this command to see what's wrong:
Code: Select all
systemctl status php72-php-fpm.service
Re: HOWTO: Install PHP7 on CentOS 7
So you did, sorry!
Is there anything in the /etc/php-fpm.d/ directory?
Is there anything in the /etc/php-fpm.d/ directory?
pepsi wrote: ↑Sat Mar 17, 2018 4:45 pmI actually already included that output in my original post you quoted.SS88 wrote: ↑Sat Mar 17, 2018 11:24 amWhenever this happens, run this command to see what's wrong:
Code: Select all
systemctl status php72-php-fpm.service
Re: HOWTO: Install PHP7 on CentOS 7
That directory actually doesn't exist for me. The closest thing I have is "/etc/php-zts.d". How should I have done the initial setup when installing via the vst-install script, specifically the WEB part? I chose "nginx + apache" because I wanted Apache - does this only work if I chose "nginx + php-fpm" ?
Re: HOWTO: Install PHP7 on CentOS 7
That's correct, nginx + apache does not use php-fpm, that uses phpfcgi.
You need to use nginx + php-fpm
I will update my first post to reflect this.
You need to use nginx + php-fpm
I will update my first post to reflect this.
pepsi wrote: ↑Sat Mar 17, 2018 5:00 pmThat directory actually doesn't exist for me. The closest thing I have is "/etc/php-zts.d". How should I have done the initial setup when installing via the vst-install script, specifically the WEB part? I chose "nginx + apache" because I wanted Apache - does this only work if I chose "nginx + php-fpm" ?
Re: HOWTO: Install PHP7 on CentOS 7
Ah okay, thanks for clarifying. Do you happen to know how to get PHP7 going when I'm wanting to use Apache instead of nginx by chance?
Re: HOWTO: Install PHP7 on CentOS 7
Re: HOWTO: Install PHP7 on CentOS 7
Ok,
If you've not done anything else other than use the install commands, you can just remove this file:
/etc/httpd/conf.modules.d/10-php.conf
And restart apache. Make a backup first!
If you've not done anything else other than use the install commands, you can just remove this file:
/etc/httpd/conf.modules.d/10-php.conf
And restart apache. Make a backup first!
Re: HOWTO: Install PHP7.0 or PHP 7.2 on CentOS 7
You also need to type these commands so the FastCGI templates work:
Code: Select all
rm -f /usr/bin/php-cgi
ln -s /usr/bin/php72-cgi /usr/bin/php-cgi