Apache doesn't restart after PHP Upgrade
Apache doesn't restart after PHP Upgrade
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:
After that, Apache doesn't start:
The string inside this line:
Any idea how can I fix it?
Thanks in advance for any help
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
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]
Code: Select all
php_admin_value open_basedir /home/admin/web/server.maindomain.com/public_html:/home/admin/tmp
Thanks in advance for any help
Re: Apache doesn't restart after PHP Upgrade [SOLVED]
Just with this code:
And voila
Code: Select all
yum install mod_php
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
Re: Apache doesn't restart after PHP Upgrade
I met the same problem after I upgraded PHP from default 5.6.40 to 7.2.22 today:
I also tried the solution provided by @scristi above:
What should I do to solve this problem?
Thank you.
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 ~]#
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
Thank you.
Re: Apache doesn't restart after PHP Upgrade
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.
-
- Posts: 301
- Joined: Tue Dec 22, 2015 2:06 pm
Re: Apache doesn't restart after PHP Upgrade
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:
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:
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".
Maybe I have something different from the topic starter post. Please notice that there is a statement in my system message:
I have no idea why my server turned into "Read-only" after I reboot the server.Read-only file system
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
Re: Apache doesn't restart after PHP Upgrade
Please check to find the fix of this issue
https://www.google.com/search?q=virtual ... ile+system
Is external from VestaCP.
https://www.google.com/search?q=virtual ... ile+system
Is external from VestaCP.