why adminer.css is not reflecting even after restart the apache?

507 views Asked by At

I installed adminer in Ubuntu 22.10 using CLI and it was working successfully in http://localhost/adminer. Now I want to change the theme. Adminer file location (usr/share/adminer). Here I added adminer.css file from here and it was not working in my web browser.

I tried these command for restart the web sever

sudo service apache2 reload
sudo service apache2 restart

Also , I cleared the caches as well but it was not reflecting in the browser.

2

There are 2 answers

1
sluhtie On

Had the same issue. What I did is, I removed the default adminer installation using apt remove adminer -y. Then I downloaded the newest version of adminer from https://www.adminer.org/ and placed the .php file into my default web folder (located at /var/www/html) such as the adminer.css file I have downloaded.

0
Taka On

On Debian 12 here.  The adminer package installs the initial config in /etc/adminer which is what httpd is redirected to access when /adminer is accessed in your web server from the web browser.  It confused me for a while too with the documentation available, and also httpd redirects don't work like symbolic links on the file system, so accessing /adminer/adminer.php throws a 404 error.

The single conf.php in /etc/adminer does all the magic from there and includes /usr/share/adminer for processing.  In fact, that's the only file after /adminer/ that can be accessed directly from your web browser.  Due to all this, from your browser's perspective, the adminer.php is technically in the same place as the conf.php.

Therefore, the correct place for adminer.css is in /etc/adminer.  No need to restart any services or clear any caches, just refresh your web page and voila! The new theme/design will take effect.

This also makes sense if you consider packaging and file hierarchy conventions: the end user/administrator should normally not need to make edits to /usr/share data, for example, as any changes risk getting overwritten when packages are updated.