Was this helpful with installing the PHP SVN module when the pecl install method failed?

  • Yes

    Votes: 1 100.0%
  • No

    Votes: 0 0.0%
  • N/A

    Votes: 0 0.0%

  • Total voters
    1

cPanelSteven

Technical Analyst
Staff member
Oct 20, 2009
10
1
128
Recently it was noticed that the command "pecl install svn" just doesn't work for some reason. This could be because the module's header file needs to be updated in order to be compatible with the system's version of svn.

All hope is not lost though. I found an easy workaround for the issue on github which should allow the module to get installed successfully.

Disclaimer : If you aren't familiar with running commands via SSH as the root user you should consult with your systems administrator or datacenter for additional help. The below commands can only be performed as the root user or a system level administrator account.

First ensure you have installed SVN via yum.

Code:
yum install subversion subversion-devel
Keep in mind that the below steps are tailored to PHP version 5.6 with EasyApache 4.

Code:
cd /usr/local/src
git clone https://github.com/aholmes/php-svn
cd php-svn
/opt/cpanel/ea-php56/root/usr/bin/phpize 
./configure --with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config
make
make install
Next enable it :

Code:
cd /opt/cpanel/ea-php56/root/etc/php.d
echo extension=svn.so > svn.ini
You can test if the module is loaded by running this command :

Code:
/opt/cpanel/ea-php56/root/usr/bin/php -i |grep -i svn
It should show the below output indicating that the module has been successfully installed.

Code:
/opt/cpanel/ea-php56/root/etc/php.d/svn.ini, 
SVN revision => $Id: 14b80e175ed4d5bf11c890e1f30ea8225935b16c $ 
svn svn support => enabled 
svn client version => 1.7.14 
svn extension version => 2.0
To apply the above steps to other PHP versions with EA4 you would need to do the following assuming you've already cloned the git repository from the above steps.

Code:
cd /usr/local/src/php-svn 
make clean
( replace $xx with your php version below. EA4 php versions are indicated with the two digit version starting with major version then minor version. An example of this would be $xx = 56 for php version 5.6)

Code:
/opt/cpanel/ea-php$xx/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php$xx/root/usr/bin/php-config
make 
make install
Next enable it ( remember to replace $xx with your php version ) :

Code:
cd /opt/cpanel/ea-php$xx/root/etc/php.d
echo extension=svn.so > svn.ini
Should be all set at this point.

Best Regards,
 
  • Like
Reactions: cPanelMichael