|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #57910 Ensure SystemDrive and SystemRoot env vars are set
Submitted: 2007-11-13 22:00 UTC Modified: 2011-10-05 21:30 UTC
From: Assigned:
Status: No Feedback Package: svn (PECL)
PHP Version: 5_2 CVS-2007-11-13 OS: Windows Vista
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-11-13 22:00 UTC]
On Windows Vista, the Subversion extension fails spectacularly if the SystemDrive and SystemRoot environment variables are not set properly. When accessed via command line, these variables exist, but Apache, by default, strips them out. The Subversion extension should be responsible for re-constituting them.

Relevant links:

Reproduce code:
On Windows Vista, attempt to use SVN functions via Apache

Expected result:
Subversion functions work as normal

Actual result:
Subversion segfaults


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-14 01:44 UTC] alan at akbkhome dot com
can you not add them to the apache config

Looks like a nasty kludge to stick in the extension..
 [2007-11-14 10:11 UTC]
I also believe that this should be configured in Apache; other 
apps and scripts also rely on those variables.
 [2007-11-14 13:37 UTC]
I'm changing this to a documentation problem. I think that this should:

1. Be fixed in Subversion so that the environment variables are not necessary (and also that libsvn doesn't segfault when this happens), or
2. Have the environment variables passed by Apache. PassEnv is more appropriate, but both work.

However, currently, when these environment variables are missing, the extension segfaults with no indication as to what went wrong (except that php_svn.dll is at fault). I would recommend:

1. Clearly documenting the requisite environment variables in the manual (something I can do)
2. Try to have the extension fail more gracefully in such cases, perhaps detecting when Windows Vista is running but the environment variables are not present

A user can even set the variables using putenv(), but they need to know they have to do so. It took me a while to figure out why calling php-cgi via command line worked, while Apache failed.
 [2008-06-30 20:56 UTC]
Can you see if the segfault still persists, pretty sure this is now corrected.

Regarding the error with the vars missing, I think this is down to Windows internals rather than subversion itself.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 06:01:38 2024 UTC