Setting environment manually PHP 5.4 - Linux

Á

Álvaro Moura

Last updated on Jul 6, 2026

Manually Configuring Php on Debian-based distros

First edit the sources.list file:

sudo nano /etc/apt/sources.list


Add the following line to the end of the file:

deb-src http://packages.dotdeb.org all wheezy

Update your system:

sudo apt-get update

Install php

sudo apt-get install php5 php5-dev

Accept the installation of the dependencies.

Check php version by:
php-v

To enable the extensions:

mssql:
sudo apt-get install php5-mssql

postgresql:
sudo apt-get install php5-pgsql


mysql:
php5-mysql sudo apt-get install


sqlite:
sudo apt-get install php5-sqlite

firebird:
sudo apt-get install php5-interbase

odbc:
sudo apt-get install php5-odbc

Enabling GD library:
sudo apt-get install php5-gd

Do not forget to delete the php functions in disable_functions option to enable them.

Accept the installation of the dependencies.

Enabling ZendGuardLoader:
Download the file at the end of the tutorial.
At the end of the php.ini file add:

[Zend]
zend_extension =
zend_loader.enable = 1
zend_loader.disable_licensing = 0
zend_loader.license_path =

restart apache:
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start

Remember to perform the procedure below to enable the implementation of zendid:
ZendId

Web server:
/var/www/

ZendGuardLoader.so