Really Messed Things Up - Multiple Issues

So I really messed things up. I installed everything and things seems to be working except I was having issues with MariaDB so I decided to install MySQL. I also decided to add newer versions of PHP. Well things are just all screwed up.

Here is what I am getting as far as errors.

  1. When I check configuration it says this:
    AH00526: Syntax error on line 496 of /etc/httpd/conf/httpd.conf:
    Wrapper /home/xxxxxxxxxxx/fcgi-bin/php7.4.fcgi cannot be accessed: (2)No such file or directory

  2. Apache Web Server is down. I can not restart it.

  3. MySQL Error: DBI connect failed : Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

CentOS Linux 7.9.2009
Webmin 1.990
Virtualmin 6.17

I am the one that messed things up as I really had no business touching things but… I did…

Any help would be appreciated!

One problem at a time, please. It’s overwhelming to try to address a bunch of unrelated issues.

So, I’m going to pick one issue and call this topic about that one issue.

1 and 2 are the same issue. So, let’s start there.

Did you run Re-check Configuration in Virtualmin after making changes to the available PHP versions? You need to.

Did you install mod_php when installing those other PHP versions? (Are you sure?) You should not have done so, as it breaks all other execution modes, though usually in ways different from this. If you installed mod_php you need to uninstall it, you do not want it, you do not need it, it is extremely resource-intensive, and it breaks all of the good/safe ways to run PHP. It is in the package named php or phpVERSION-php on CentOS.

Re-check config will actually fail, I guess, since you’ve also broken Mariadb, so make a new topic for Mariadb and we’ll sort that one out, too.

Ok so I don’t know if mod_php was installed.

When I Re-Check Configuration this is the error I get:
AH00526: Syntax error on line 496 of /etc/httpd/conf/httpd.conf:
Wrapper /home/evolveddownloads/fcgi-bin/php7.4.fcgi cannot be accessed: (2)No such file or directory

I am sorry but I do not know how to check if the mod_php is installed. I am not a Linux expert by any means. If you tell me how more explicitly I can perform the tasks though.

I’m not sure how this particular situation occurred. It’s new to me. To get Apache running again, you can probably comment out the offending line in http.conf. (line 496, apparently). But, if every domain is broken, there might be many such lines, and commenting out one will just make the others show up.

I guess that’s the first step, though. So, edit http.conf find line 496 and put a # in front of it to comment it out. Then try Re-check Configuration in Virtualmin or just run apachectl configtest from the command line.

Did you, perhaps have PHP 7.4 installed before and then uninstall it while making your changes?

And, to check for mod_php, if there is a file named php.conf or 10-php.conf or similar (anything saying php) in /etc/httpd/conf.modules.d, you almost certainly have installed mod_php. Or, if you have a libphpX.so in /etc/httpd/modules, you have mod_php installed. You’ll need to uninstall it using your package manager. I can’t tell you the exact command because I can’t guess the exact package name; you’ve installed multiple PHP versions, I don’t know which one(s).

Please be careful when installing random software from the internet. At the very least if you’re not pretty familiar with your package manager and your OS, it’s probably not worth the risk.

Ok so commented out those out and ran re-check configuration and now we get all the way to MySQL with no errors.

MySQL does not appear to be installed and running on your system,

When I go to the MySQL server section in Virtualmin I see this:

The full MySQL error message was : DBI connect failed : Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

Redirecting to /bin/systemctl start mariadb.service
Failed to start mariadb.service: Unit not found.

Please start a new topic for MySQL/Mariadb. I’ll follow up there.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.