Skip to content
This repository has been archived by the owner on Feb 17, 2020. It is now read-only.

Optional Installation Instructions

Sidharth Kshatriya edited this page Oct 31, 2016 · 6 revisions

These instructions are optional and are typically only required if you're using an older Linux distribution. Note that these instructions are in addition to the normal Installation Instructions. You should not need to follow any steps here unless directed by the main Installation Instructions.

Building GDB 7.11.1 from source

If GDB 7.11.1 is not available in your package manager then you can easily build it from source:

# get all the packages needed to build GDB
# (command works only on debian/ubuntu based systems)
$ sudo apt-get build-dep gdb -y
$ cd ~
$ git clone git clone git://sourceware.org/git/binutils-gdb.git
$ cd binutils-gdb
$ git checkout gdb-7.11.1-release
# gdb should be installed in your home directory at ~/gdb
$ ./configure --prefix=~/gdb
$ make && make install

Building PHP from source

You need not build PHP from source but if your package manager does not have PHP 7.0 you might need to:

# get all the packages needed to build PHP 7.0
# this also installs mysql-client and server, if not already installed
$ sudo apt-get build-dep php7.0 -y
# We're going to be installing PHP in the home directory (though you can install anywhere else also)
$ cd ~
$ git clone https://github.com/php/php-src.git
$ git checkout PHP-7.0
$ cd php-src
$ ./buildconf
# This configures PHP to be installed in the home directory at ~/php
# This is a basic configuration for development only. Don't use in production!
# You may need to add more options here for your specific requirements
$ ./configure --prefix=/your/home/dir/php --enable-mbstring --with-mysqli --with-pdo-mysql \
--with-zlib --with-gd --with-openssl --enable-debug --with-readline
# This installs php to ~/php and binaries to ~/php/bin (php.ini will be in ~/php/bin)
$ make && make install
# If you'd like to create/inspect the databases you create on mysql through a GUI then you should install phpmyadmin also
# Note: This will install system PHP packages, but dontbug will be working with our custom PHP build and not these since you're installing PHP from source
$ sudo apt-get install phpmyadmin

Installing patched Xdebug from source (For custom PHP 7.0 builds)

Xdebug is required by dontbug. Currently, a small patch needs to applied when building Xdebug. If you're not building PHP 7.0 from source (i.e. using the system packaged PHP 7.0) then please follow these instructions instead.

$ cd ~
$ git clone https://github.com/xdebug/xdebug.git
$ cd xdebug
$ git checkout xdebug_2_4
$ wget https://raw.githubusercontent.com/sidkshatriya/dontbug/master/ext/dontbug/xdebug_2_4.make_extern.dontbug.patch
$ git apply xdebug_2_4.make_extern.dontbug.patch
$ Note that you're using the phpize from your custom build
$ ~/php/bin/phpize
$ Note that you're using php-config from your custom build
$ ./configure --with-php-config=/your-home-dir/bin/php-config --prefix=/your-home-dir/php
$ make && make install

To the php.ini (in ~/php/bin/php.ini), don't forget to add a single line: zend_extension=xdebug.so

You can verify that Xdebug has been installed properly by checking php -v to see the Xdebug version string 2.4.XXX. For example:

$ php -v
PHP 7.0.8-0ubuntu0.16.04.2 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Xdebug v2.4.2-dev, Copyright (c) 2002-2016, by Derick Rethans

Don't proceed unless you get this working.