PHP7 and Komodo

Komodo and PHP7

If you’ve missed the fact that PHP7 has been released - well… PHP7 has been released.

This tutorial should help you configure PHP7 for Komodo debugging in Debian-based distros.

First, we need to setup PHP7. I didn’t want to compile it myself and there are no reasons to do it until you want to use it with Apache.
To install PHP7, I’ll use a PPA repository.
Run these commands:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0 php7.0-dev

Then download xDebug:

git clone git://github.com/xdebug/xdebug.git
cd xdebug

Now we should compile the xdebug.so file.

There are the commands to do it:

phpize
./configure --enable-xdebug
make
sudo cp modules/xdebug.so /usr/lib/php/20151012/`
# note that /usr/lib/php/20151012 could not exist for you, you should place
# xdebug.so in the folder with your other .so's files.

Now create /etc/php/7.0/cli/conf.d/20-xdebug.ini with the following content:

zend_extension=xdebug.so

(Note you can use absolute path to xdebug.so)

Now you should have xDebug installed (to check it, run php -v and if you see something like with Xdebug v2.4.0RC4, Copyright (c) 2002-2016, by Derick Rethans, then you’ve installed xDebug successfully!)

Now go to Komodo Preferences - Languages - PHP.

Set the interpreter to /usr/bin/php, and use /etc/php/7.0/cli/php.ini for the Path to alternate PHP configuration file preference.

Then Komodo should check if you have everything for debugging. If everything is fine, you’ll see the “Successfully configured for local PHP debugging.” message.

There are some limitations in CodeIntel and syntax checking for now, I’ve reported about them as well, but main features of PHP7 works fine in Komodo:

Feel free to ask any questions!

1 Like

At least on a vanilla Debian, the Dotdeb Repositories are another valuable source for PHP Packages.

1 Like

Yeah, you can use any repositories to install PHP7.