This is a weird one. I'm running a lamp setup on centos 7 with php 5.4 and mysql 8. Last night I was developing perfectly fine. When I woke up this morning I got errors of the database driver missing. Reloaded apache, it cannot find the module. I check the php modules folder and sure enough it's missing! pdo_mysql.so or something like that I think. I checked apache's error log and I saw the following line about 20k times with the same timestamp (ms was different but all at 2:22:33)
[Sun Dec 13 02:22:33.869440 2020] [:error] [pid 8569] [client ::1:50366] PHP Notice: Undefined index: method in /var/www/html/methods.php on line 302, referer: http://localhost/ssl.php
ssl.php is just a page that displays info for reporting and the error makes no sense since the query is valid and has been working fine. There is also nothing setup that would call this page repeatedly like this, it's refreshed manually.
It's probably a simple fix of just redownloading the module, except I have to be in the office to connect to our repo (no vpn for this laptop) I guess I'm not really looking for a solution here but more of an explanation how any of this could've happened?
find / -xdev -mtime -1 -ls
and so on. Plus check output oflast
,cat /var/log/messages
, root shell history.../var/www/html/methods.php
? It could be an error that manifests itself only in certain conditions. I don't think anybody can help you with that without the source code. By the way, if you suspect foul play (I would, since no normal web interaction would remove a module) you should consider the server compromised.