barbushin / php-console

Handle PHP errors, dump variables, execute PHP code remotely in Google Chrome
https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef
MIT License
1.34k stars 283 forks source link

Sub-domains support #48

Open barbushin opened 10 years ago

barbushin commented 10 years ago

Add PhpConsole\Connector::setBaseDomain($domain) so authorization credentials and client/server cookies must be initialized to be available for all sub-domains.

huafu commented 10 years ago

Thanks @barbushin. If I have time before you I'll digg into this, but I didn't look enough in the actual code to help quickly so I'm not sure I'll get to wok on this quickly

huafu commented 10 years ago

I think tho here the problem are not only the cookies. What if I have a cross-domain enabled server on api.someserver.com and my frontend is at ui.anotherserver.com. There is no way to set a cookie for ANY domain ;-)

barbushin commented 10 years ago

I understand. So for now there is only one workaround - open all that domains in browser tab. PHP Console will initialize connection, so then it will works with any AJAX requests.

huafu commented 10 years ago

Well as I explained in the issue #47 doing that does not resolve the issue even temporally :-s

huafu commented 10 years ago

Ha, I got it, I am using Lagger and had ALSO php-console... Lagger seems to be too old :cry: and not compatible with the new php-console... Is Lagger kept by side? If yes, what do you suggest me to use instead?

barbushin commented 10 years ago

Yes, Lagger is very old :) but you can use it with PHP Console. There will be no conflict. Also, if you want to use something more new, I can send you my last Lagger modification. It's more lightweight and flexible. I'll send it to you on email today, and share on GitHub soon.

huafu commented 10 years ago

That'd be cool. I have to not hide you that I began to look into monolog, tho it's a bit heavy, but I am interested by the browser console, the Rollbar, file logging, and some other modules like the computed handlers, ...