phpMyAdmin CSS/theme not displayed
This little bug is a pain, but luckily only shows up on certain configs…
So far, it seems to be an issue that only surfaces with Apache2.0 and PHP5, on Windows.. and is caused by the chdir(..) call - the main one being phpmyadmin.css.php. Change the “..” to your root directory, and all should be solved.
BTW - it has nothing to do with ./ syntax being used in phpMyAdmin.
January 9th, 2007 at 11:48 am
This is the only mention I’ve found of this bug, I guess not many of us use Windows+Apache+PHP5.
I found three files with this call in phpMyAdmin v2.9.1.1. These were in css\phpmyadmin.css.php, setup.php and test\theme.php. I changed the (..) to “apachedocumentroot”/phpmyadmin and the themes are still not displayed correctly. Using php 5.2.0 w/ the installer from php.net, apache 2.2.3 and Windows 2K3 server.
Any ideas?
January 12th, 2007 at 5:23 pm
the only thing I can think of is to check that you’re using the right slashes in your path - ie: D:\docroot\phpmyadmin vs: D:/docroot/phpmyadmin.
BTW.. check the $cfg['PmaAbsoluteUri'] value in your config.inc.php…
March 24th, 2007 at 6:29 pm
I found that my phpMyAdmin was not displayed correctly. It was not totally without CSS: but only a part of it showed. It followed an upgrade to my PHP installation (Windows XPSP2 + Apache 2.0.59 + PHP 5.2.1).
I finally found that i didn’t changed session path, and Apache was not able to create session files. I solved that, and the display problem disappeared too.
May 29th, 2007 at 11:08 am
Thanks for being apparently the only site on the web that has spotted this problem.
IIS6 & PHP 5.1.1 NO GOOD. Your solution does not work either. The chdir function, which in my 10 years of php coding I have never used, doesn’t seem to be the only problem. On the main page it doesn’t even include the phpmyadmin.css.php file at all. I looked at the sessions, but they are working fabulously. What’s with the “./” stuff? I have always used “../” for dropping back one level and used “/” to drop to the root. Does that “./” actually work?
At this point I’m going to need to start tracing the code. I’m sure glad it is free since I have to now spend so much time making it actually work.
May 29th, 2007 at 11:09 am
Oh, it does include it in a css tag… of course.
May 29th, 2007 at 11:52 am
FINALLY! Thanks to the answer to this problem from 2005: http://forums.kayako.com/archive/index.php/t-5819.html
The problem is not the “..” it is the fact that for some completely unknown reason PHP requires permissions to a directory one level lower than the one you need to access for the chdir to work. Smells like bug to me… specifically dung beetle in a stock yard.
May 29th, 2007 at 12:00 pm
heh.. thanks for coming back to drop the link to the solution. Yeah, certainly doesn’t sound much like a PHP ‘feature’ ;o)
June 22nd, 2007 at 8:57 pm
Ok, dunno if I had the exact same problem as this, but phpMyAdmin was coming up pretty funky looking, and my google search yielded this page firstmost. Thing is I’m on linux. The problem here was the php session.save_path needed permissions of 777. All is well now.
June 26th, 2007 at 5:00 am
in php5, when you use chdir you have to put a / at the end for the function to work
August 8th, 2007 at 5:23 am
I have meet the same problem because PHP session is not correct defined.
Now I ave fix session path and theme is correctly displayed
TX
January 16th, 2008 at 10:38 am
Had the same problem as TC (no CSS in linux). Just wanted to confirm that for me too the solution was to locate php.ini, grep the save_path and then chmod 777 the directory it pointed to. Everything is fine now.