In most Linux distros there is no PHP 5.6 release atm. So if you want to use PHP 5.6 you have to compile it yourself and re-compile Apache to add a PHP 5.6 support.
So there are 2 ways I know to install PHP 5.6 in your Linux:
- Install it from https://launchpad.net/~ondrej/+archive/ubuntu/php5-5.6
- Download the source of PHP, XDebug and Apache and compile it.
The first way is what I recommend to do if you never works with Linux (or works a bit but actually doesn’t know a lot about compiling and terminal).
The second way is harder than the first way so you should know some basics of working with Terminal in Linux distros.
This guide can be different for the distros which I not mentioned.
First step: you should download the latest PHP 5.6 release from php.net
Next extract the source to a folder (in my case:
Now you should download the source of Apache2 from httpd.apache.org (I’m downloaded Apache 2.4 - the latest release atm)
You should extract it to the same directory (in my case:
~/web-server/apache2/), but it’s not so important, it’s just convenient.
So now download the Xdebug source from xdebug.org
Extract the source to the same directory (in my case:
~/web-server/xdebug/) (I’m already said why you should do that ;))
Install this packages:
libtool: 1.4.x+ (but NOT 1.4.2!)
bison: 1.28 (recommended), 1.35 or 1.75
Go to the directory with the source of Apache. (
cd ~/web-server/apache2in your terminal).
Execute this command in the terminal
sudo make install. When it’s done Apache will be placed into
/usr/local/apache2/(by default, you can change it to your own directory, just look at available options of
- If you didn’t install the packages which I asked to install in “Compiling Apache” - please install it.
- Go to the directory with the source of PHP.
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli(if you want to compile php with PDO supporting - see
sudo make install. PHP will be placed into
/usr/local/lib/php/(again - you can change this directory, see
php.ini-developmentfrom the folder with the source to
sudo cp php.ini-development /usr/local/lib/php.ini)
- Open httpd.conf (placed in
/usr/local/apache2/conf/) and check if this line exists:
LoadModule php5_module modules/libphp5.so. If they aren’t - add it.
- Add this to the end of your httpd.conf:
<FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch>
##The final step: configuring and installing Xdebug.
- Go to the directory with the source of XDebug
./configure && sudo make
sudo cp modules/xdebug.so /usr/local/lib/php/extensions/xdebug-ext/
php.iniand past this line to the end of the file:
zend_extension = /usr/local/lib/php/extensions/xdebug-ext/xdebug.so
- Go to the terminal, execute
php -iand copy the output of this command.
- Go to http://xdebug.org/wizard.php, past the output and press the button.
- Follow the steps you see after pressing the button “Analyse my phpinfo() output”
In Komodo go to
Preferences - Languages - PHP.
- Set the interpreter:
- Set the
Note: since Komodo 9 PHP 5.6 is a default PHP interpreter for Komodo PHP Debugging. So you able to skip changing the interpreter and
php.ini for Komodo but if you debugging an applications which uses MySQL - you have to change
php.ini to your configured for MySQL
Note 2: I edited this topic a lot because I wrote it when my English was very terrible. Now it should looks better than older version. If you find any mistakes/errors or faced with a problems while following this guide - please notice me about that in this topic by @mentioning me.