Welcome! Log In Create A New Profile

Advanced

[PHP] Re: White screen - nothing in logs

Posted by Brian Smither 
Brian Smither
[PHP] Re: White screen - nothing in logs
May 06, 2018 07:10PM
With:
/gallery/6/
I get 404. But with:
/gallery/6
I get a page.

So, it seems the trailing slash may be the issue.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Lester Caine
Re: [PHP] Re: White screen - nothing in logs
May 06, 2018 10:10PM
On 06/05/18 18:02, Brian Smither wrote:
> With:
> /gallery/6/
> I get 404. But with:
> /gallery/6
> I get a page.
>
> So, it seems the trailing slash may be the issue.

Case of two errors making things interesting ...

As I said on the other reply, the Apache rewrite is pulling the number
cleanly and passing it, while on the nginx rewrite it was including the
'/'. But the problem is ACTUALLY with the php end which SHOULD simply
filter the number anyway!
http://npc.smallbrook.co.uk/fisheye/view.php?gallery_id=45 works, but
http://npc.smallbrook.co.uk/fisheye/view.php?gallery_id=45/ gives a
white screen.

northwaypc.org.uk/fisheye/view.php?gallery_id=45/ does not give a white
screen, instead redirecting to the gallery home page. Which is a mistake
and I can see why that is not working as expected, but the PHP7 white
screen is still the problem to be solved! If only because someone being
nasty can use the hole to cause problems. It should simply fold back to
a home page when any duff data is supplied :(

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Christoph M. Becker
Re: [PHP] Re: White screen - nothing in logs
May 07, 2018 01:20AM
On 06.05.2018 at 22:01, Lester Caine wrote:

> As I said on the other reply, the Apache rewrite is pulling the number
> cleanly and passing it, while on the nginx rewrite it was including the
> '/'. But the problem is ACTUALLY with the php end which SHOULD simply
> filter the number anyway!

Obviously, that depends on what you do exactly to get/validate/sanitize
the query parameter, and how you handle potential failures.

> http://npc.smallbrook.co.uk/fisheye/view.php?gallery_id=45 works, but
> http://npc.smallbrook.co.uk/fisheye/view.php?gallery_id=45/ gives a
> white screen.

I get “404 Not found” for the latter, which doesn't appear to be a
problem per se.

--
Christoph M. Becker

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jigar Dhulla
Re: [PHP] Re: White screen - nothing in logs
May 07, 2018 07:10AM
On Mon, May 7, 2018 at 4:40 AM Christoph M. Becker <[email protected]>
wrote:

> On 06.05.2018 at 22:01, Lester Caine wrote:
>
> > As I said on the other reply, the Apache rewrite is pulling the number
> > cleanly and passing it, while on the nginx rewrite it was including the
> > '/'. But the problem is ACTUALLY with the php end which SHOULD simply
> > filter the number anyway!
>
> Obviously, that depends on what you do exactly to get/validate/sanitize
> the query parameter, and how you handle potential failures.
>
> > http://npc.smallbrook.co.uk/fisheye/view.php?gallery_id=45 works, but
> > http://npc.smallbrook.co.uk/fisheye/view.php?gallery_id=45/ gives a
> > white screen.
>
> I get “404 Not found” for the latter, which doesn't appear to be a
> problem per se.
>
> --
> Christoph M. Becker
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> ​I generally use below snippet on the first list of php file when I get
white screen, it displays the last error on script shutdown.

function died(){
print_r(error_get_last());
}​
register_shutdown_function('died');


--
https://about.me/jigar?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=edit_panel&utm_content=thumb
Jigar Dhulla
about.me/jigar
https://about.me/jigar?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=edit_panel&utm_content=thumb
Lester Caine
Re: [PHP] Re: White screen - nothing in logs
May 07, 2018 01:10PM
On 07/05/18 00:10, Christoph M. Becker wrote:
>> http://npc.smallbrook.co.uk/fisheye/view.php?gallery_id=45/ gives a
>> white screen.
> I get “404 Not found” for the latter, which doesn't appear to be a
> problem per se.

If the rewrite was messing things up so that it did not find the php
script, then - as was the case initially - the nginx was correctly
saying 404 yet not actually flagging it as an error. But the script
exists for view.php?gallery_id= as a numeric value shows, so the problem
is why is the non-numberic value giving a white screen on PHP7 while it
works on PHP5 ... I'll try adding Jigar's hack to see if I get something
more tangible to trace ...

The website is operational on the whole now, but I've had these sites
running for many years without any white screen problems and had
display_errors=on as an additional level of security so to have them now
not working stably and more of a problem, not being able to establish
quickly why is a pain.

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sorry, only registered users may post in this forum.

Click here to login