maximebf / php-debugbar

Debug bar for PHP
phpdebugbar.com
MIT License
4.18k stars 399 forks source link

Not getting it to work with apache userdirecroty #442

Open jpedrot opened 4 years ago

jpedrot commented 4 years ago

Hi,

Is PHPDebubar supposed to work in a setup with Apache Userdirectories?

The apache logs shows 404

"GET /vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/css/font-awesome.min.css HTTP/1.1"

Is there anyway I can change that href without hacking the source directly? I would expect to see

"GET /~UserName/vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/css/font-awesome.min.css HTTP/1.1"

Is this a config setting?

I know one should not run php for userdirs but, this its a disposable VM

jpedrot commented 4 years ago

The file JavascriptRenderer.php has a $baseUrl variable. Its in : vendor/maximebf/debugbar/src/DebugBar

$ diff JavascriptRenderer.php.org JavascriptRenderer.php
95c95
<             $baseUrl = '/vendor/maximebf/debugbar/src/DebugBar/Resources';
---
>             $baseUrl = 'vendor/maximebf/debugbar/src/DebugBar/Resources';

Makes it work for me.