php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: leeron at devunity dot com
New email:
PHP Version: OS:

 

 [2008-04-23 13:17 UTC] leeron at devunity dot com
Description:
------------
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:
---------------
<?php
$path = dirname(__FILE__).'/tmp/';
//checkout svn project
$success = svn_checkout('http://orderpics.googlecode.com/svn/trunk/', $path);
if($success)
{
  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
Files:
.
..
.svn
m.cmd
PicOrdering.py
setup.py
test.py


Actual result:
--------------
on apache's error_log:

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

Patches

Pull Requests

History

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

Can you checkout a CVS copy or grab the patch from http://cvs.php.net/viewvc.cgi/pecl/svn/svn.c?
r1=1.53&r2=1.54

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] scottmac@php.net
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 
CoreDumpDirectory
 [2008-04-23 22:55 UTC] scottmac@php.net
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] scottmac@php.net
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-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 08:01:30 2025 UTC