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

Feature Request: Latest server response #265

Closed
geri777 opened this issue Mar 7, 2016 · 18 comments
Closed

Feature Request: Latest server response #265

geri777 opened this issue Mar 7, 2016 · 18 comments
Labels
enhancement Feature request good first issue Should be easy to fix! help wanted
Projects

Comments

@geri777
Copy link

geri777 commented Mar 7, 2016

I would like to suggest a feature in the backend to view the latest server output.
In best case it should be 2 buttons: "latest positive server output" and "latest error server output".
This would help a lot to find out why an alert was triggert - and it would even be more helpful for the setup, if you have redirects etc.
The output log should contain the raw response, including headers.

@geri777 geri777 changed the title Feature Request: Last server output Feature Request: Latest server output Mar 7, 2016
@geri777 geri777 changed the title Feature Request: Latest server output Feature Request: Latest server response Mar 7, 2016
@sadortun sadortun added the enhancement Feature request label Apr 30, 2016
@sadortun sadortun modified the milestone: 3.3 Apr 30, 2016
@sadortun sadortun added the good first issue Should be easy to fix! label Jun 2, 2016
@TimZ99 TimZ99 added this to To do in V3.3 Mar 30, 2018
@TimZ99
Copy link
Member

TimZ99 commented Mar 30, 2018

Looking at the logs will do the job, but I will add the date to the server info. 😃

Last check;
Last online;
Last error;
Last raw error output.

@TimZ99 TimZ99 moved this from To do to In progress in V3.3 Mar 30, 2018
@TimZ99
Copy link
Member

TimZ99 commented Apr 25, 2018

It's not ready for testing!
9c8b7e4
The output collection needs to be written!

@TimZ99 TimZ99 removed this from the 3.3 milestone Apr 27, 2018
@TimZ99 TimZ99 removed this from Currently worked on by team in V3.3 Apr 27, 2018
@TimZ99 TimZ99 added this to To do in V3.4 Apr 27, 2018
@pekiZG
Copy link

pekiZG commented Jul 4, 2018

@TimZ99 What's the status of this?

@TimZ99
Copy link
Member

TimZ99 commented Jul 4, 2018

I must admit that I forgot about it. This is the latest version.

If you have time, could you write the part to collect the raw data?

@pekiZG
Copy link

pekiZG commented Jul 4, 2018

Sure,
Ill have time over the weekend :)

If I have any questions ill ping you here

@TimZ99
Copy link
Member

TimZ99 commented Jul 4, 2018

Great! Keep me posted, I will also be working on the project this week.

@pekiZG
Copy link

pekiZG commented Jul 4, 2018

I just saw that you are using gitter; tty there \o/

@TimZ99
Copy link
Member

TimZ99 commented Jul 4, 2018

👍

@geri777
Copy link
Author

geri777 commented Jul 4, 2018

Thank you for getting back on this feature suggestion. Much appreciated!!

@TimZ99
Copy link
Member

TimZ99 commented Jul 4, 2018

You're welcome ;)

@TimZ99 TimZ99 moved this from To do to In progress in V3.4 Jul 4, 2018
@pekiZG
Copy link

pekiZG commented Jul 7, 2018

ok, after a little bit of poking :)

@TimZ99 I see you already did:
Last check;
Last online;

only thing left is;
Last error;
Last raw error output.

Can some one give me the context of that?

Is the last error HTTP STATUS ERROR, TEXT ERROR, TIMEOUT ERROR, etc... or something else;

and last raw error output? what is that?

@pekiZG
Copy link

pekiZG commented Jul 7, 2018

@TimZ99 this can be used to get a better understanding of an error;
http://php.net/manual/en/function.curl-strerror.php

I'm still missing what's the raw error output?

@pekiZG
Copy link

pekiZG commented Jul 7, 2018

@geri777 can you give us more explanation?

@pekiZG
Copy link

pekiZG commented Jul 12, 2018

OK, i think i have done it;
No biggie, i just don't know if it's what @geri777 had in mind

@pekiZG
Copy link

pekiZG commented Jul 12, 2018

Only problem; the way it's done now I don't think you can get the "raw" response

@pekiZG
Copy link

pekiZG commented Jul 12, 2018

curl_exec is being used with CURLOPT_RETURNTRANSFER option enabled.

it returns mixed
http://php.net/manual/en/function.curl-exec.php

Returns TRUE on success or FALSE on failure. However, if the CURLOPT_RETURNTRANSFER option is set, it will return the result on success, FALSE on failure.

Meaning that complete check has to be done in a different way to ger the "raw" response;

currently you only get "raw" response on SUCCESS;

@TimZ99 when you see this, if you have time ping me on Gitter

@pekiZG
Copy link

pekiZG commented Jul 13, 2018

@TimZ99 I really don't see a way of getting a body or a headers if curl_exec() fails.

It just returns FALSE; only thing that you can get when that happens is a error message via curl_error().
http://php.net/manual/en/function.curl-error.php

--
I also see a way to simplify getting of http status code in case of success via curl_getinfo()
http://php.net/manual/en/function.curl-getinfo.php

https://httpstatuses.com/

@TimZ99
Copy link
Member

TimZ99 commented Aug 28, 2018

I think I'm done. https://github.com/phpservermon/phpservermon/tree/feature/265 Could you guys check if you agree with me?

@TimZ99 TimZ99 moved this from In progress to Done in V3.4 Aug 29, 2018
@TimZ99 TimZ99 moved this from Done to Needs review in V3.4 Aug 29, 2018
@TimZ99 TimZ99 moved this from Needs review to In progress in V3.4 Aug 29, 2018
V3.4 automation moved this from In progress to Done Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request good first issue Should be easy to fix! help wanted
Projects
No open projects
V3.4
  
Done
Development

No branches or pull requests

4 participants