This extension implements PHP bindings for Subversion (SVN), a version control system, allowing PHP scripts to communicate with SVN repositories and working copies without direct command line calls to the svn executable. In this tutorial, I will show you How to install Subversion (SVN) extension working with PHP 5.3.
The first, download & extract latest version of SVN extension, login as root and type the following command
# wget http://pecl.php.net/get/svn-1.0.2.tgz # tar zxvf svn-1.0.2.tgz # cd svn-1.0.2
The second, execute phpize command will generate additional configuration files
# /webserver/php/bin/phpize
Sample output
Configuring for: PHP Api Version: 20090626 Zend Module Api No: 20090626 Zend Extension Api No: 220090626
The next, type the following command to compile the svn extension source
# ./configure # make & make install
If you get an errors like
configure: error: Cannot find php-config. Please use --with-php-config=PATH
To fix it, enter
# ./configure --with-php-config=<path to php-config file>
Or, if you get an error like
checking for svn includes... configure: error: failed to find svn_client.h
To fix it, enter
# yum install subversion subversion-devel neon-devel -y
Sample output
Dependency Installed: apr.x86_64 0:1.3.9-5.el6_2 apr-devel.x86_64 0:1.3.9-5.el6_2 apr-util.x86_64 0:1.3.9-3.el6_0.1 apr-util-devel.x86_64 0:1.3.9-3.el6_0.1 cyrus-sasl-devel.x86_64 0:2.1.23-13.el6_3.1 db4-cxx.x86_64 0:4.7.25-17.el6 db4-devel.x86_64 0:4.7.25-17.el6 gnutls-devel.x86_64 0:2.8.5-10.el6_4.1 libproxy.x86_64 0:0.3.0-4.el6_3 libproxy-bin.x86_64 0:0.3.0-4.el6_3 libproxy-python.x86_64 0:0.3.0-4.el6_3 neon.x86_64 0:0.29.3-2.el6 openldap-devel.x86_64 0:2.4.23-32.el6_4 pakchois.x86_64 0:0.4-3.2.el6 perl-URI.noarch 0:1.40-2.el6 Dependency Updated: gnutls.x86_64 0:2.8.5-10.el6_4.1 openldap.x86_64 0:2.4.23-32.el6_4
Finally, type the following command to enable SVN extension
# echo "extension=svn.so" >> /etc/php.ini
To check SVN extension is loaded, type the following command
# php -i | grep -i svn
Sample output
svn support => enabled svn client version => 1.6.11 svn extension version => 1.0.2
Related Posts:
- How To Setup Iptables Firewall For A Web Server On CentOS
- How Do I Fix “Host is blocked because of many connection error” In MySQL
- How To Start / Shutdown / Reboot Guest Operating Systems With virsh Command On KVM
- Repel port flood by CSF and IPT_Recent
- What is the role of this variables in php.ini file (expose_php – allow_url_fopen – register_globals) ?
- How Do I Block An IP Address On Linux Server ?
- How To Flush The Entire Contents Of Memcache Server
- How Do I Configure Apache Server To Listen Multiple Ports ?
- How To Setup A LAMP Server On Centos 6.0
- Linux Shutdown Command