|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-08-14 06:22 UTC] rowan at sad dot ukrd dot com
[2008-09-02 08:10 UTC] scottmac@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 13:00:01 2025 UTC |
Description: ------------ Hello. I am running Apache on CentOS 64-bit (2.2.3-11.el5_1.centos.3.x86_64) with PHP (5.2.6). I have a PHP script, which creates a repository using svn_repos_create, then sets up authentication details using svn_auth_set_parameter and finally checks out the new repo with svn_checkout. The function calls are consecutive, so they come one after another. For some reason, this function seg faults on the checkout stage. In an attempt to debug this, I have tried running svn_auth_set_parameter calls with svn_checkout not being carried out AND vice versa. In both situations there is no segmentation fault. Also, if carried out separately, i.e. if svn_repos_create is carried out and then svn_checkout is carried out later (by making another server request) seg fault doesn't occur. I don't know much about how SVN API works internally so I assumed that it might be a good idea to make the script sleep for a few seconds after repository creation just to see what happens. Unfortunately, that didn't help either. The code works in CLI... Its just in Apache its a problem for some reason. Reproduce code: --------------- print "Create new repo\n"; $r = svn_repos_create('/var/www/svn/my_test_repo'); var_dump($r); /** set up permissions for our new repo **/ $newline = "\n"; $acfp = fopen('/var/www/svn/access/.svn_access', 'w') or die('Opening access filed miserably failed...'); fwrite($acfp, '[my_test_repo:/]'); fwrite($acfp, '' . $newline); fwrite($acfp, 'admin = rw'); fclose($acfp); /** ok, now we can access our new repo **/ print "Set up authentication\n"; svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_USERNAME, 'admin'); svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_PASSWORD, 'svnpasstest2222'); mkdir('my_test_wc'); $result = svn_checkout('http://localhost/svn/my_test_repo', 'my_test_wc'); var_dump($result); if($result === TRUE) print "Successful!\n"; ?>