Jump to content
Larry Ullman's Book Forums

Recommended Posts

Operating System: Windows 7

Server: Apache 2.4.7 / XAMPP 1.8.3

PHP Version 5.5.6

Browsers: Google Chrome Version 33.0.1750.117; Firefox 26.0

 

Chapter 8 - Error Handling and Debugging: Creating Custom Error Handlers (p. 253-257)

 

I created the error handler as indicated in the book. When tested on browsers the result I get are empty arrays after the error message. I also used the original code downloaded from the text's downloadable content resource and got the same empty arrays. Is this what I should expect? The only difference I see from the book example is the MAC operating system. When I change the value of the 'LIVE' constant to TRUE, I get the correct display of apology message with hidden detailed errors, exactly as in the book. Below is the message with empty arrays when 'LIVE' constant is set to FALSE:

 

Testing Error Reporting

 

An error has occured in script 'C:\Users\file\handle_errors.php' on line 51: Undefined variable: var

Array

(

    [_GET] => Array

        (

        )

 

    [_POST] => Array

        (

        )

 

    [_COOKIE] => Array

        (

        )

 

    [_FILES] => Array

        (

        )

 

)

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...

×
×
  • Create New...