perftools / xhgui

Web interface for XHProf profiling data can store data in MongoDB or PDO database
1.65k stars 343 forks source link

xhgui front-end malformed page rendering after installation #130

Closed khosro closed 9 years ago

khosro commented 9 years ago

I have downloaded xhgui after following steps in README.md , i fortunately can profile my application,but xhgui front-end does not render well.I took two screenshots from first page of xhgui as follows :

1

2

I do not know why front-end does not rendered well?

markstory commented 9 years ago

Are they any 404 requests or javascript errors on the page?

khosro commented 9 years ago

@markstory , no there is not any CSS or JS error or 404 requests.I check it with "Chrome's Inspect Element". I am not sure but maybe there was a problem in installing with "php install.php" command ,but i did not get any error when i run this command.I again run this command,but do not get any error. Still seeking what problem was?

markstory commented 9 years ago

The two calendars at the bottom of the page make me think that some of the CSS either isn't being loaded or being interpreted properly.

khosro commented 9 years ago

The following lines are when i type "php install.php" :

Downloading composer.
 #!/usr/bin/env php
All settings correct for using Composer
Downloading...

Composer successfully installed to: /var/www/xhgui-master/composer.phar
 Use it: php composer.phar

 Installing dependencies.
 Loading composer repositories with package information
 Updating dependencies
   - Installing slim/slim (2.3.1)
    Loading from cache

   - Installing slim/views (0.1.0)
    Loading from cache

 - Installing twig/twig (v1.13.1)
   Loading from cache

 - Installing pimple/pimple (v1.0.2)
   Loading from cache

    Writing lock file
     Generating autoload files

    Checking permissions for cache directory.
     Attempting to set permissions on cache/
   Permissions set on cache/
    You have mail in /var/spool/mail/root
khosro commented 9 years ago

I follow the same steps in Windows and front-end installed properly,but i do not know why in Linux(CentOS) it does not installed properly.

markstory commented 9 years ago

No idea. But given you got it working, I don't think there is an issue with the code.

khosro commented 9 years ago

After digging into loaded CSS files ,bootstrap.min.css loaded incorrectly,I mean when i look at content of bootstrap.min.css file in generated Html page(via Chrome's inspect element) ,its version is "Bootstrap v3.1.1" ,but when i look at /var/www/xhguimaster/webroot/css/bootstrap.min.css ,its version is "Bootstrap v2.2.2". I am really confused.it loaded bootstrap.min.css incorrectly!!!

khosro commented 9 years ago

At last I found problem. The mentioned bootstrap loaded from "/usr/share/httpd/noindex/css/bootstrap.min.css". It seems ,it is a bug in CentOS look at here . OK.After all, i change .htaccess file in xhgui project as follows:

    <IfModule mod_rewrite.c>

    #   ErrorDocument 500 /notConnected.php

        RewriteEngine On
    #   RewriteRule !.(js|css|ico|gif|jpg|png)$ index.php
        RewriteCond %{REQUEST_FILENAME} -s [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d

        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    </IfModule>

And now CSS loads correctly.

And also my VirtualHost configuration is as follows :

Listen 8084
<VirtualHost *:8084>

    DocumentRoot /var/www/xhguimaster/webroot

    <Directory "/var/www/xhguimaster/webroot">

     </Directory>
</VirtualHost>