The Subversion (SVN) extension implements PHP bindings for Subversion, a version control system, allowing PHP scripts to communicate with SVN repositories and working copies without direct command line calls to the svn executable.
To install this extension, run the following commands as your server's root user:
sudo apt-get -y install gcc make autoconf libc-dev pkg-config sudo apt-get -y install libsvn-dev sudo pecl5.X-sp install svn
When prompted with:
Please provide the prefix of Subversion installation [autodetect] : Please provide the prefix of the APR installation used with Subversion [autodetect] :
just press enter both times; do not type a prefix (that is, allow autodetect).
Once installed, create a configuration file for the extension and restart PHP by running the following commands as root:
sudo bash -c "echo extension=svn.so > /etc/php5.X-sp/conf.d/svn.ini" sudo service php5.X-fpm-sp restart
The SVN extension does not currently work with PHP 7. If you attempt to install it on PHP 7, you will encounter errors building the extension. As soon as the extension is updated to work with PHP 7, you will be able to install it.
To uninstall this extension, as root run the commands:
sudo rm /etc/phpX.Y-sp/conf.d/svn.ini sudo peclX.Y-sp uninstall svn
Next, restart PHP-FPM with the command:
sudo service phpX.Y-fpm-sp restart