I have a problem with a Ubuntu 18.04.6 Ubuntu server.
I was trying to fix a problem with phpMyAdmin (a lot of errors appearing on screen, and preventing me to use it, pointing to some authorization error).
What I did is:
- I tried to reinstall phpMyAdmin (failed because of this error
access denied for user 'debian-sys-maint '@' localhost using password 'yes'
)
- I fixed the authorization issue
- I reinstalled phpMyadmin successfully, but was not working (I could the the php code in the browser)
- I realized that something might have happen with apache/php config, and tried to fix it
- I could see
php7.4
module enabled in apache config but trying to restart the service I had an error
- I tried to upgrade and then reinstall php (using `apt-get'), and everything looked ok
- Trying to re-enable php7.4 resulted in an apache error, but enabling php8 instead of php7.4 seemed to be working but...
- Now it I open any website that uses php on my server, I can only see a blank page.
I tried to check the content of the error logs for each website, but they are not updated. I checked `/var/log/php_errors.log but it is empty.
At the moment the server is unusable, and I cannot find any hint on how to solve the problem.
Can someone please point me in the right direction? Maybe it's just a matter of reinstalling everything, but at this point I'm not sure I know what to do.
Thank you in advance.
EDIT
After posting this question I continued playing with it. At the end I completely removed the older versions of php and reinstalled php8, and php8-mysql and a lot of other packages and I've been able to restore the functionality of php and apache.
I also reinstalled phpmyadmin, the installation went ok without any error, but I cannot access it. I found this article https://docs.bitnami.com/general/faq/get-started/access-phpmyadmin/, I suppose that now the only thing missing is enabling the SSH tunnel, I suppose that older versions of phpMyAdmin didn't need this.
EDIT (2)
I've found the apache logs, but I honestly cannot understand them.
When I access /phpmyadmin
on the server, these lines get written:
[Mon Nov 08 08:47:44.650203 2021] [core:error] [pid 16470] [client 31.14.41.57:40086] AH10244: invalid URI path (/cgi-bin/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/bin/sh)
[Mon Nov 08 08:47:44.703164 2021] [core:error] [pid 16474] [client 31.14.41.57:40090] AH10244: invalid URI path (/cgi-bin/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/%%32%65%%32%65/bin/sh)
[Mon Nov 08 08:47:44.755659 2021] [core:error] [pid 16470] [client 31.14.41.57:40092] AH10244: invalid URI path (/icons/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Mon Nov 08 08:47:44.807909 2021] [core:error] [pid 16474] [client 31.14.41.57:40096] AH10244: invalid URI path (/icons/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Mon Nov 08 08:47:44.860247 2021] [core:error] [pid 16470] [client 31.14.41.57:40098] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Mon Nov 08 08:47:44.912659 2021] [core:error] [pid 16474] [client 31.14.41.57:40102] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/.%2e/bin/sh)
[Mon Nov 08 08:47:44.965121 2021] [core:error] [pid 16470] [client 31.14.41.57:40104] AH10244: invalid URI path (/icons/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/bin/sh)
[Mon Nov 08 08:47:45.017634 2021] [core:error] [pid 16474] [client 31.14.41.57:40108] AH10244: invalid URI path (/icons/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/bin/sh)
[Mon Nov 08 08:47:45.070238 2021] [core:error] [pid 16470] [client 31.14.41.57:40110] AH10244: invalid URI path (/cgi-bin/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/bin/sh)
[Mon Nov 08 08:47:45.123221 2021] [core:error] [pid 16474] [client 31.14.41.57:40114] AH10244: invalid URI path (/cgi-bin/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/bin/sh)