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

Apache doesn't restart after PHP Upgrade

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
scristi
Posts: 30
Joined: Thu Jun 22, 2017 11:20 pm

Apache doesn't restart after PHP Upgrade
  • Quote

Post by scristi » Tue Aug 27, 2019 5:06 am

Hello,

I had several problems with the "native" 5.6 version of PHP. So I decided upgrade to PHP 7.2, and went ok and now I have:

Code: Select all

# php -v
PHP 7.2.21 (cli) (built: Jul 30 2019 15:00:44) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
After that, Apache doesn't start:

Code: Select all

# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: [Tue Aug 27 00:47:39 2019] [warn] module ruid2_module is already loaded, skipping
Syntax error on line 17 of /home/admin/conf/web/server.maindomain.com.httpd.conf:
Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
                                                           [FAILED]
The string inside this line:

Code: Select all

php_admin_value open_basedir /home/admin/web/server.maindomain.com/public_html:/home/admin/tmp
Any idea how can I fix it?

Thanks in advance for any help
Top

scristi
Posts: 30
Joined: Thu Jun 22, 2017 11:20 pm

Re: Apache doesn't restart after PHP Upgrade [SOLVED]
  • Quote

Post by scristi » Tue Aug 27, 2019 4:44 pm

Just with this code:

Code: Select all

yum install mod_php
And voila
Top

baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

Re: Apache doesn't restart after PHP Upgrade
  • Quote

Post by baijianpeng » Wed Sep 04, 2019 4:13 am

I met the same problem after I upgraded PHP from default 5.6.40 to 7.2.22 today:

Code: Select all

[root@localhost ~]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service
Job for httpd.service failed because a configured resource limit was exceeded. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@localhost ~]# systemctl status httpd -l
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/httpd.service.d
           └─limits.conf
   Active: failed (Result: resources)

Sep 04 12:04:49 localhost.localdomain systemd[1]: httpd.service failed to run 'start' task: Read-only file system
Sep 04 12:04:49 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
Sep 04 12:04:49 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Sep 04 12:04:49 localhost.localdomain systemd[1]: httpd.service failed.
Sep 04 12:10:17 localhost.localdomain systemd[1]: httpd.service failed to run 'start' task: Read-only file system
Sep 04 12:10:17 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
Sep 04 12:10:17 localhost.localdomain systemd[1]: httpd.service failed.
[root@localhost ~]# 
I also tried the solution provided by @scristi above:

Code: Select all

[root@localhost ~]# yum install mod_php
Loaded plugins: fastestmirror
Cannot open logfile /var/log/yum.log
Package php-7.2.22-1.el7.remi.x86_64 already installed and latest version
Nothing to do
What should I do to solve this problem?

Thank you.
Top

sysdop
Posts: 88
Joined: Fri Dec 08, 2017 1:46 am
Contact:
Contact sysdop
Website Skype

Os: CentOS 6x
Web: nginx + php-fpm
Re: Apache doesn't restart after PHP Upgrade
  • Quote

Post by sysdop » Wed Sep 04, 2019 7:16 am

baijianpeng wrote: ↑
Wed Sep 04, 2019 4:13 am
quote
You need to go to /etc/httpd/conf.d and delete or rename the php.conf as well as /etc/httpd/conf.modules.d and delete or rename the file similar to php.conf. Then you run yum reinstall php and restart apache.
Top

baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

Re: Apache doesn't restart after PHP Upgrade
  • Quote

Post by baijianpeng » Wed Sep 04, 2019 7:47 am

hi, sysdop, thank you for helping me.

Maybe I have something different from the topic starter post. Please notice that there is a statement in my system message:
Read-only file system
I have no idea why my server turned into "Read-only" after I reboot the server.

In order to make this easy to understand, I want to describe briefly my whole process:

1. I was playing on Windows 10 with Virtualbox.
2. Install CentOS 7 latest minimal ISO on Virtualbox.
3. "yum update" and then install VestaCP.
4. upgrade default php5 to php72.
5. install some php modules (yum install php-opcache php-memcache php-pecl-jsond-devel php-pecl-apcu php-pecl-imagick)
6. reboot.

After step 5, I can open the VestaCP webpage, but after step 6, I can no longer open it. When I check the status of Apache, I got error messages which I had quoted above.

Now, I tried to make a new directory in root folder, I got following message:

Code: Select all

[root@localhost ~]# mkdir /delete
mkdir: cannot create directory ‘/delete’: Read-only file system
I had installed and tested with VestaCP on Virtualbox for many times, never saw such a problem. So I am completely lost now, I can not understand why the system became "Read-only file system".
Top

sysdop
Posts: 88
Joined: Fri Dec 08, 2017 1:46 am
Contact:
Contact sysdop
Website Skype

Os: CentOS 6x
Web: nginx + php-fpm
Re: Apache doesn't restart after PHP Upgrade
  • Quote

Post by sysdop » Wed Sep 04, 2019 11:05 am

Please check to find the fix of this issue

https://www.google.com/search?q=virtual ... ile+system

Is external from VestaCP.
Top


Post Reply
  • Print view

6 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
 

 

cron

Login  •  Register

I forgot my password