|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58173 Apache Bus error (10) on PHP-SVN calls
Submitted: 2008-04-23 13:17 UTC Modified: 2008-07-01 07:51 UTC
From: leeron at devunity dot com Assigned:
Status: Closed Package: svn (PECL)
PHP Version: 5.2.5 OS: Mac OS 10.5
Private report: No CVE-ID: None
 [2008-04-23 13:17 UTC] leeron at devunity dot com
I've using darwin, so it's basically "the same" as running on freeBSD. 

When I run a php containing calls to SVN functions using the php cli *it works fine*, but browsing to the same script on the apache server will cause a bus error. 

Reproduce code:
$path = dirname(__FILE__).'/tmp/';
//checkout svn project
$success = svn_checkout('', $path);
  if ($handle = opendir($path)) 
     echo "Directory handle: $handle\n";
     echo "Files:\n";

     while (false !== ($file = readdir($handle))) 
        echo "$file\n";

Expected result:
(1) files added to tmp/ dir.
(2) ouput:
Directory handle: Resource id #4

Actual result:
on apache's error_log:

[notice] child pid 272 exit signal Bus error (10)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-23 18:50 UTC]
I think i've fixed this issue in CVS a few weeks ago.

Can you checkout a CVS copy or grab the patch from

It's hard to test this sort of thing since it can be down to the environment the Apache process runs as.
 [2008-04-23 22:28 UTC] leeron at devunity dot com
Thanks for the quick reply :)
Tried compiling the latest source from CVS.
No luck, still getting the same error.
 [2008-04-23 22:47 UTC]
What apache are you running?

The default system one or one from macports?

Could you possibly try to get a backtrace of the crash? You 
may need to start Apache in single user mode and set a 
 [2008-04-23 22:55 UTC]
Are you sure your phpinfo page shows 0.4-dev at the version 
number for the svn extension?

When I try your sample script with apache frm macports I get 
the following:

Warning: svn_checkout() [function.svn-checkout]: svn 
error(s) occured 13 (Permission denied) Can't make directory 
'/Users/scott/www/tmp': Permission denied in 
/Users/scott/www/bug.php on line 8
 [2008-04-24 07:07 UTC] leeron at devunity dot com
I'm using the macports apache, not the default leopard apache.
And yes, my phpinfo says "svn extension version 	0.4.0-dev". 
The error message you're getting is probably due to the fact that you don't have a 'tmp' directory on th same path as the php script.
I'll try and get the backtarace.
 [2008-06-30 20:51 UTC]
Can you try the latest release which is 0.4.1, pretty sure all segfaults are fixed now.
 [2008-07-01 07:23 UTC] leeron at devunity dot com
That's great to hear! 
But my problem was already solved by re-installation of some 
packages with the help of you and Alan. :)
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Nov 27 23:03:15 2021 UTC