Jump to content

Some errors are not shown(log/browser), just a blank page


Recommended Posts

Hi all,

 

I recently started rewriting some code from an existing open source project.

 

I noticed now, for the second time, that I got errors in a php file(the php file with errors was required_once into the main file) however they were not shown.

note however that other errors seem to be shown properly in the browser and are logged.

 

The behavior I get is that the page gets executed, the required page is loaded, and at the point that the statement is reached that is incorrect (for example calling a function that is not declared) it stops silently. Only the part that ran and sent output to the client is shown. Nothing is in the browser or in the logs about the error :S

 

Eventually I found out by using XDebug to step through the code.

At a certain function it just stopped.

 

Anyone an idea what is wrong?

Link to comment
Share on other sites

Also take a look at the page source. Sometimes error messages get hidden because of the HTML or CSS surrounding them.

And see that phpinfo() lists the right php.ini settings. Might be that they're overwritten somewhere, or maybe you were looking at the wrong file.

 

There are some kinds of errors that you can't catch. Can't recover from. It's been a while since I've done PHP but I'm pretty sure that calling a non-existant function is one of those.

Link to comment
Share on other sites

Also take a look at the page source. Sometimes error messages get hidden because of the HTML or CSS surrounding them.

And see that phpinfo() lists the right php.ini settings. Might be that they're overwritten somewhere, or maybe you were looking at the wrong file.

 

There are some kinds of errors that you can't catch. Can't recover from. It's been a while since I've done PHP but I'm pretty sure that calling a non-existant function is one of those.

 

This morning a friend of mine used a simple piece of code.

He got errors for non-existing functions that are called in a page that is required-in.

Got to look further. I'll try and see if omitting any html output is messing things up.

In my friends case he had no issues when using html code. (I only use very basic html to put a form there, and after that html table)

 

I am pretty sure it is the correct page I am using as I changed the configuration to log to /var/log/php.log

and normally errors are logged in there.

 

Thanks anyway for your suggestion.

I'll post back if I have an update or fix the issue.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.