WAMP phpmyadmin css problem

I have installed WAMP 1.6.1 on my new laptop (CoreDuo Dell) and I've installed this package on 7 computers now, with no issues.  For some reason on this laptop, the phpMyAdmin installation is throwing the following PHP error to the log:

Warning: require_once(./libraries/common.lib.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\phpmyadmin\css\phpmyadmin.css.php on line 7

Fatal error: require_once() [function.require]: Failed opening required './libraries/common.lib.php' (include_path='.;C:\php5\pear') in C:\wamp\www\phpmyadmin\css\phpmyadmin.css.php on line 7

The result is purely asthetic.  phpMyAdmin seems unable to process it's dynamic CSS calls in phpmyadmin.css.php and what the browser renders appears to be an un-stylized version of phpMyAdmin.

I have attached a screenshot here:  http://www.jookyworld.com/files/phpmyadmin.jpg

All the pretty tabs are gone, and the layout is horrible making it painful to navigate and browse.  Functionally it works, but it's just plain ugly and not very user friendly.  I have tried everything from reinstallation to renaming the directories to specifying the doc_root in php.ini (thought maybe that WAMP was having an issue with it's aliasing).  The only clue I have to the problem is that on the index.php page located in the root web directory of the installation (by default c:\wamp\www\index.php).  Usually when this file is run, you would get the contents of the root directory, but for some reason I see the contents of the following directory (c:\wamp\apache2).  

Here is the code from that index.php file:  http://jookyworld.com/files/index.txt

Where lines 180-200 (copy and paste the code into dreamweaver) spit out what is supposed to be the root web directory but instead results in the apache2 directory.  I had read where possibly apache server was compressing the phpmyadmin.css.php file using gzip and that was causing issue, but I don't know enough about Apache server to use anything I found concerning that.

Ahh the price of beauty.  Thanks in advance.
Who is Participating?
A few things to check:
File permissions on all files and directories are ok?  

Trying copying all files from a known working system, to the directory on this pc causing the issue.  Possible file corruption somewhere?

Re-download the installer and try again.

When you uninstall/remove, make sure the php.ini file in the c:\windows directory is removed as well.
c2techAuthor Commented:
I checked file permissions on the directories, they match a working system.  I did try the copy/replace from a working system and got the same result.  I also tried a new installer.

Since this is a WAMP pre-packed system, it puts the php.ini file into c:\wamp\Apache2\bin\  and I did make sure that those folder were removed before the reinstall.  I confirmed this location using phpinfo().  I also went thru the registry and removed any "wamp" specific entries.  

I'm thinking this is an Apache/PHP issue, and I am unfamiliar with Apache.  In Win2K3, you append your working PHP folder to the "Path" in Environment Variables.  Are you aware of the Apache equivalent?  This may help trouble shoot.  I thought maybe it would be found in the httpd.conf file, but I didn't see anything out of order.

Thank you for the response.  I hope this additional information helps someone.
c2techAuthor Commented:
It is important to note that the entire installation functions properly: ie, it handles PHP files properly, MySQL functions  and other server duties.  There is simply a lack of CSS handled by the phpmyadmin.css.php file that is throwing the error.  The phpmyadmin.css.php is a php file that dynamically generates the CSS based on user selected preferences.  The first 5 lines of the offending file are as follows:

/* $Id: phpmyadmin.css.php,v 2.83 2006/01/14 20:20:13 cybot_tm Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:


The location of the phpmyadmin.css.php file: c:\wamp\www\phpmyadmin\css
The location of the file (common.lib.php):      c:\wamp\www\phpmyadmin\libraries

As you can see it is chdir one level up and then looking for the file.  I tried integrating the level change in the require_once call, and had no effect.  I could however change the call to an absolute address(http://localhost/phpmyadmin/libraries/common.lib.php) with success, but ultimately this led to a spaghetti code effect where every file accessed after that needed absolute referencing.  Maybe this will help.
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

c2techAuthor Commented:
I found a work around.  Rather than fighting the horse to water, I brought the water to the horse.  The index file indicated above led me to believe that the phpmyadmin.css.php file felt it was in c:\wamp\Apache2 so I coded the chdir call to reflect that change:


Now CSS works.  This is kind of a dirty workaround, as it appears my server is still telling PHP files that the root is c:\wamp\Apache2 when it should be c:\wamp\www   : I confirmed that the httpd.conf variable DocumentRoot was equal to the www path, and that the ServerRoot was the Apache2 path.  Not knowing much about Apache, I changed the ServerRoot variable to match the DocumentRoot variable, and of course this brought the server down.

Perhaps a moderator could move this to the WebServers category, since I have apparently targeted the problem, and found a cheap workaround.  I hope this info helps someone else in the future, and feel free to take a crack at a more robust fix for points.
c2techAuthor Commented:
I also changed the line 194 in the provided index.php to read:


where before it was just "."

I'm thinking this whole thing is just some unique glitch, since I've had no problems with WAMP server before.
Interesting on why the path's would be messed up on this 1 system though.

c2techAuthor Commented:
If you have any ideas as to something in Apache or PHP files that specify the root directory, other than the one's I've already listed, let me know, I'd still like to solve this issue in a cleaner manner.

Thanks for checking back.
See if these are set correctly in httpd.conf:

// this is the default root of apache, where conf, error, dtdocs reside
ServerRoot "C:/Program Files/Apache Group/Apache2"  

// the root of the web server
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"

// This should be changed to whatever you set DocumentRoot to.
<Directory "C:/Program Files/Apache Group/Apache2/htdocs">

Other than that, you may want to run this by the experts in the Apache section, see if they know the answer.

What fixed this, or did you get this fixed (just curious...)??
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.