Common Sources of Errors in Scripts

Article translated by machine

This text is a machine translation. A revised version is planned.

Your self-written script or the just installed CMS does not run as expected or a blank or white page is displayed? We have compiled the most frequent sources of errors for you.

Error in CMS configuration (WordPress, Joomla etc.)

A common source of errors are incorrect or incomplete information in the configuration file of the CMS.

Example 1: Wrong database name in the wp-config.php of a Wordpress installation.

define('DB_NAME', 'dbo123456789');
define('DB_USER', 'dbo123456789');
define('DB_PASSWORD', '123456789');
define('DB_HOST', 'db123456789.db.1und1.de');

Error analysis: This part of the configuration files contains the access data of your database. Instead of db123456789, the database name was not entered under DB_NAME, but the user name dbo123456789. This causes the error message "Can't connect to database" when Wordpress is started.

Example 2: The same error as in example 1, but this time in the configuration.php of a Joomla installation.

public $host = 'db123456789.db.1und1.de';
public $user = 'dbo123456789';
public $password = '123456789';
public $db = 'dbo123456789'; 

Syntax errors in self-programmed web pages and scripts

Example: Password protection

AuthType Basic
AuthName "Passwortgeschützter Bereich - Nur für geladene Gäste"
AuthUserFile /kunden/homepages/12/d123456789/falscherpfad/.htpasswd
ErrorDocument 404 /404/fail.html

Error analysis: There is no.htpasswd file in the /wrong path/ folder.

Application and hosting package incompatibility

Examples:

 

  • Wrong PHP settings
  • ASP files in Linux contracts
  • Different database versions

php.ini directives were not enabled in the php.ini file

Example: Accessing External URLs

In a php.ini

allow_url_fopen = on

is not set. Thus, the attempt to access an external URL fails.

Achieving/exceeding the given script limits

Example: Exceeding the storage limit

An application requires more than 64 MB of memory, but runs or attempts to run with less memory. The script limit is reached and an HTTP error message 500 is issued.