Category Archives: PHP Configuration

Learn how to configure php here

How to Install Ming Support for PHP in Linux

When you need to work with Flash in PHP, you have to install Ming. Ming is an open source library that allows you to deal with flash from command line. We will use it for our PHP scripts. First of all, we need to download the library from Sourceforge. Link that you can find on php.net leads to… Read More »

How To Install Zend Optimizer on Any Linux Server

Recently I’ve seen many solutions on how to install Zend Optimizer using custom build script in Directadmin. I’d like to show you how to install it on almost any linux server using usual linux commands. First of all, let’s download it from Zend server (they require to register in order to obtain this link. wget http://downloads.zend.com/optimizer/3.2.8/ZendOptimizer-3.2.8-linux-glibc21-i386.tar.gz Then we’ll… Read More »

Home to Disable PHP Safe Mode and open_basedir in Directadmin

Sometimes you need to remove limits that are automatically added by DirectAdmin. For example, you are not allowed to include files from anywhere but your home directory, you cannot use CURLOPT_FOLLOWLOCATION in php and so on. The first case is the result of open_basedir protection. If you’re not running a hosting service and all sites are yours, it… Read More »

How to Find Your php.ini file location

Often you need to make changes to your php.ini file. If you run locate php.ini, you will find some files, but this search won’t guide you to the correct one. You need one php.ini file that is used by current server configuration. Only changes that are applied there will be propagated to your php configuration. But how to… Read More »

How To Enable Register Globals in PHP Without Access to php.ini

Sometimes you need to use the variables passed to script avoiding usage of superglobal arrays. If you are on shared hosting, you won’t have access to your php.ini file and won’t be able to change register_globals setting. A simple function will help you to do this. <? /** * function to emulate the register_globals setting in PHP *… Read More »

Installing PHP On A Clean Server

If you just got a clean server without PHP installed and you are trying to do this, you might receive the following error: configure: error: no acceptable cc found in $PATH. This means you don’t have c compiler installed. Just type in yum install gcc and install all the necessary libs. Then you might receive the following message… Read More »

Iconv Encoding List And PHP Usage

Iconv functions are often used in PHP when you have problems with character encoding. When you have non-latin chars in the text you work with, you might have problems with storing them, writing into database, etc. It becomes useful when you use several different encodings and when you need to store or output some text into a single… Read More »

How To Install Freetype Support for Your PHP Installation

Today we’ll add Freetype support for your PHP installation. You might need it if you work with GD library and if you want to add text on pictures. Let’s do it together. Starting PuTTY… Let’s install Freetype devel first. You can do that by issuing the following command: yum install freetype-devel. Now we need to configure PHP. Let’s… Read More »

How to Enable dba Support in PHP

This time I will show you how to add dba support to php. This is usually necessary when you’re planning to work with big databases and MySQL is not a good idea for any reason. First of all, you should have root access to your server or VPS, in order to reconfigure PHP and to reboot Apache when… Read More »