Archive for the tag 'Handling'

SBDavid

PHP Error Handling and Logging

PHP Error Handling and Logging

Display_startup_errors

Even when display_errors is on, errors that occur during PHP’s startup sequence are not displayed. It’s strongly recommended to keep display_startup_errors off, except for debugging.

These are functions dealing with error handling and logging. They allow you to define your own error handling rules, as well as modify the way the errors can be logged. This allows you to change and enhance error reporting to suit your needs.

With the logging functions, you can send messages directly to other machines, to an email (or email to pager gateway!), to system logs, etc., so you can selectively log and monitor the most important parts of your applications and websites.

The error reporting functions allow you to customize what level and kind of error feedback is given, ranging from simple notices to customized functions returned during errors.

User-Level PHP Handling Customization

When PHP 4 and PHP 5 are both enabled and served using the CGI, DSO, or suPHP configurations, cPanel lets the user select the default PHP version that processes .php files for all domains assigned to that account.

This interface is available in cPanel’s X3 theme under Software/Services >> PHP Configuration. Available settings are PHP 4, PHP 5, and System Default.

The chosen value is reflected in the .htaccess file in the user’s home directory. If a user requires file extensions other than .php to be processed by the selected version of PHP, add those file extensions after .php to the AddHandler line in the .htaccess file.

SBDavid

Apache PHP Request Handling in Cpanel

Apache PHP Request Handling in Cpanel

Cpanel PHP’s main configuration file is located at /usr/local/apache/conf/php.conf
The php.conf file is called by the Apache configuration file (httpd.conf) by means of an include command.

WHM provides an interface that can assist you in configuring PHP. It is located in Service Configuration >> Apache Configuration >> PHP and SuExec Configuration. You are also able to access a command line interface that provides the same options through the following script:

/usr/local/cpanel/bin/rebuild_phpconf

Reference: http://cpanel.net