Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'error handling'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 3 results

  1. 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 ( ) )
  2. I've been working through the book and really enjoying it. I'm thrown by the Contact Form example in the Ajax chapter. What it seems to be doing seems stupid, so I'm wondering whether I'm misunderstanding. The handleAjaxRequest function is defined on p. 458. It seems to specify that in case of an error, we submit the form again. The anonymous function that is called if the user clicks the submit button is defined on p. 459. It sends the Ajax request to the server. So if something goes wrong, we just try again? I thought perhaps we would send the form in a non-Ajaxy way, or something? Regards, Rick
  3. Hey there. On pages 52 (where the script is displayed) and 56 (where the steps are outlined), in the error handling function, a conditional checks to see whether the error type is either E_NOTICE or E_STRICT. If they are, Larry suggests "no message error should be printed, as the error is likely not interfering with the operation of the page". Since PHP 5 the E_STRICT constant has had a value of 2048, so the conditional should check whether $e_number equals 2048 for this type of error. Shouldn't then the conditional printed in the book: if (($e_number != E_NOTICE) && ($e_number < 2048)) { be rewritten to: if (($e_number != E_NOTICE) && ($e_number != 2048)) { Why would we want to check for a smaller than 2048 error code value? In case an E_STRICT error occurred the page would still display the generic error message.
×
×
  • Create New...