Book Image

Webmin Administrator's Cookbook

By : Michal Karzynski
Book Image

Webmin Administrator's Cookbook

By: Michal Karzynski

Overview of this book

Table of Contents (19 chapters)
Webmin Administrator's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Displaying PHP errors while debugging


While writing code in PHP or installing a downloaded application, you may find yourself staring at a blank browser screen with no hint as to why it isn't working as expected. This is caused by the default PHP configuration that hides error messages from prying eyes. Error messages could reveal information about your server, so this is a good idea in production, but makes resolving problems more difficult. During development, you can enable PHP's friendly error messages by following this recipe.

How to do it...

Follow these steps to execute this recipe:

  1. Let's start by writing a PHP script that will cause an error. The script could contain the following broken code:

    <?php
        echo "Hello World!";
        syntax!error
    ?>
  2. Save the script to a file on your server and navigate to the file's public URL on your web server. If error displaying is turned off, you should see a blank screen.

  3. Navigate to Others | PHP Configuration.

  4. Click Manage in the line corresponding...