Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request Headers problem with php 8.1.15 #55

Open
rgilsimoes opened this issue Feb 19, 2023 · 5 comments
Open

Request Headers problem with php 8.1.15 #55

rgilsimoes opened this issue Feb 19, 2023 · 5 comments

Comments

@rgilsimoes
Copy link

After a lot of testing I believe there is a problem when using php 8.1.15.
When setting route to "chromeLogger" and enabling requestHeadersOutput there is always this sequence of errors:

[proxy_fcgi:error] [pid 47499:tid 140439541749504] [client ... ] Premature end of script headers: report_novos_cartoes.php, referer: https://www......eu/.../
[proxy_fcgi:error] [pid 47499:tid 140439541749504] [client ... ] AH01070: Error parsing script headers, referer: https://www....eu/.../

I messed with a lot of buffer sizes and so on, but the only solution was to change to php 8.0.23 and now it is working.

@bkdotcom
Copy link
Owner

bkdotcom commented Mar 8, 2023

I will investigate, but this smells like the headers grew too big for the proxy server
Have you tried ServerLog (http://bradkent.com/php/debug#routeServerLog)

it seems to have been created to address the header size limitations of ChromeLogger...

Essentially the log is written to a json file.. a url to that file is output in the response headers.. A browser plugin then requests the log.

@rgilsimoes
Copy link
Author

Hi @bkdotcom !
I've tried ServerLog but could not get any output from the browser plugin :-/ not too much info about it also.

As far as the size limitations what I've also found was that when setting the max Header Size on bdkDebug the ChromeLogger yields an error saying it could not allocate X Kb for logging.

@bkdotcom
Copy link
Owner

I have updated the documentation for configuring ServerLog output
https://www.bradkent.com/php/debug#routeServerLog

Let me know if that clarifies how to get it up and running

@rgilsimoes
Copy link
Author

Hello @bkdotcom!
I've tried both Server Log chrome extensions and found out the following:
This "ServerLog" extension https://chrome.google.com/webstore/detail/server-log/lophlnbmepajcpfhafaciibembckdpih works fine when you open the related dev panel.

As this "Server Log" extension https://chrome.google.com/webstore/detail/serverlog/ghmhlknahaejhdlobgpaoocmjlhgmcci does not work because it asks for a "key" in order to authenticate to the server.

I've tried added the same key to both php Debug and the extension but it does not seem to work.

@bkdotcom
Copy link
Owner

bkdotcom commented Mar 29, 2023

the "key"used in the 2nd extension is unrelated to PHPDebugConsole's key...
I haven't installed the extension, but it appears it may be optional and used in conjunction with a server-side library by the same author.. the extension passes its key as a x-request-server-log header and his server-side logger checks that value before writing to a log file..

(if the key is required, any value should work with PHPDebugConsole.. as it's doesn't care about it)

That said, I'd recommend the extension that's the easiest to use.

At some point I'd like to try writing my own extension that supports both ServerLog and ChromeLogger and simply writes to the primary console tab...

I will investigate the "could not allocate X Kb for logging" chromelogger issue...

Were you able to get something to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants