Knowledge Base

PHP

Get solutions and answers to your PHP development questions here.

What is PHP?

Are you new to web development? Have you heard about PHP and wonder what it's all about? Read this article first.

PHP script basics

Can I use short tags in my PHP scripts? What are the correct file permissions for my PHP scripts? If you're new to Webhost.Berlin or PHP development in general, get answers to these essential questions and more here.

Viewing PHP settings

You can use the phpinfo() function to view detailed information about the PHP environment, configuration settings, and more.

Changing PHP settings and versions

How you change the PHP version and settings depends on the type of hosting account that you have. Read this article for everything you need to know.

Custom php.ini files

You can use php.ini files to customize a wide range of PHP settings for your web site. Learn how here.

Using php.ini directives

The directives in php.ini files allow you to control many settings for your web site. For example, you can control error logging, specify time zone information, and more.

Custom .htaccess files for PHP settings

If you have a managed VPS or Discount Dedicated Server, you can use .htaccess files to customize a wide range of PHP settings for your web site. Learn how here.

Using PHP directives in custom .htaccess files

These articles explain how to set various PHP directives in an .htaccess file. For example, you can control error logging, specify time zone information, and more. Please note that these articles only apply to managed VPS or Discount Dedicated Server accounts.

Run PHP scripts from cron jobs

Learn how to run PHP scripts from cron jobs using the PHP command-line interpreter. This method is faster and more efficient than using curl or wget to run a PHP script.

Using PHP to send e-mail messages

There are several ways you can send e-mail messages from your hosting account by using PHP. Learn more in this article.

PHP include paths

There are several ways you can set the include path in PHP. Learn about them here.

Using alternate PHP versions

In addition to the default PHP version, you can choose from among several alternate versions to run on your web site. Learn how to set up and run these alternate PHP versions here.

PEAR packages

PEAR packages are reusable PHP code libraries that you can use in your own projects. Learn how to install and configure them here.

Determine if a PHP function is available

You can use the function_exists() function to determine if a particular PHP function is available for your web site.

‘500 Internal Server Error’ while running PHP

There are several reasons why visitors to your web site might receive "500 Internal Server Error" messages. Learn about these causes and how to minimize them here.

‘String could not be parsed as XML’ error message in PHP

When you try to parse XML data in a PHP script file, you may receive a "String could not be parsed as XML" error message. This article describes some possible causes and ways to troubleshoot the problem.

Using the Exif extension in PHP

Webhost.Berlin's shared servers include PHP support for processing Exif (Exchangeable image file format) data. Learn how to use this extension here.

Common issues after PHP upgrade

This article discusses some issues that may occur after a PHP upgrade on a shared server, and ways to resolve them.

Using a custom php.ini file for cPanel cron jobs

Depending on how PHP scripts are invoked, they often use different php.ini files to run in different environments. This article demonstrates how to use a custom php.ini file that you can use with cron jobs set up in cPanel.

Using PHP sessions

This article discusses PHP sessions -- what they are, when to use them, and how to implement them.

ionCube PHP Loader support

Learn about ionCube PHP Loader support on Webhost.Berlin servers.

Specifying the MySQL character set in PHP

Learn how to specify the character set when you use the MySQL Improved (mysqli) PHP extension or PDO (PHP Data Objects) to connect to a MySQL database.

‘Unable to allocate memory for pool’ error message in PHP

When you try to view a page running PHP, you may receive an "Unable to allocate memory for pool" error message. This article describes how to resolve this issue.

Optimizing Symfony using APC

Learn how to optimize your Symfony PHP framework code on a managed VPS using APC (Alternative PHP Cache).

Using the internationalization extension in PHP

The PHP internationalization (intl) extension enables you to display locale-specific information for a wide variety of countries and regions. Learn more in this article.

Installing composer

Learn how to install and configure composer, a PHP dependency manager.

Determining if APC is installed on a server

Learn how to determine if the Alternative PHP Cache (APC) is installed on your server. Please note that not all hosting packages support APC.

Using the MailChimp API with PHP

The MailChimp API (application programming interface) enables you to work with a MailChimp account programmatically. This article demonstrates how to use the API with PHP.

‘Allowed memory size exhausted’ error message in PHP

When you try to view a PHP-enabled page, you may receive an "Allowed memory size of bytes exhausted" error message. This article describes how to resolve this issue.

Using ionCube Loader with different PHP versions

Learn how to use ionCube Loader with different PHP versions on your account.