我正在尝试使用 php 中的 svn 并尝试过这个到目前为止没有任何成功:(
(尝试安装pecl svn扩展)
sudo /Applications/XAMPP/xamppfiles/bin/pecl install svn
我为以下选择自动检测:
Please provide the prefix of Subversion installation [autodetect] :
Please provide the prefix of the APR installation used with Subversion [autodetect] :
该命令的最后输出是:
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
服务器重新启动并测试一个简单的功能给我这个错误:
Fatal error: Call to undefined function svn_log()
phpinfo 也没有列出 svn 扩展名,我在 apache 错误日志中看到以下内容:
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