I am trying to use svn from php and tried this so far without any success :(
(trying to install pecl svn extension)
sudo /Applications/XAMPP/xamppfiles/bin/pecl install svn
I choose autodetect for following:
Please provide the prefix of Subversion installation [autodetect] :
Please provide the prefix of the APR installation used with Subversion [autodetect] :
the last output from the command is :
Build process completed successfully
Installing '/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/svn.so'
install ok: channel://pecl.php.net/svn-1.0.2
Extension svn enabled in php.ini
server restart and test a simple function give me this error :
Fatal error: Call to undefined function svn_log()
phpinfo does not list the svn extension either and I see following in apache error log :
PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/svn.so' - dlopen(/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/svn.so, 9): no suitable image found. Did find:\n\t/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/svn.so: mach-o, but wrong architecture in Unknown on line 0
After googling I found this way to resolved this :
1) Downloaded the latest svn pecl extension , unziped to it to svn-1.0.1 and cd
to svn-1.0.1
2) executed command sudo phpize
2) executed : sudo MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS='-O3 -fno-common -arch i386 -arch x86_64' LDFLAGS='-O3 -arch i386 -arch x86_64' CXXFLAGS='-O3 -fno-common -arch i386 -arch x86_64' ./configure --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config-5.3.1
3) sudo make
4) sudo make install
Installing shared extensions: /Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/
Done ! now it seems svn extension is loaded peacefully
But I still do now know why pecl install command failed to compile it