php.net |  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: ezyang@php.net Assigned:
Status: No Feedback Package: svn (PECL)
PHP Version: 5_2 CVS-2007-11-13 OS: Windows Vista
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ezyang@php.net
New email:
PHP Version: OS:

 

 [2007-11-13 22:00 UTC] ezyang@php.net
Description:
------------
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:

http://article.gmane.org/gmane.comp.version-control.subversion.subclipse.devel/2109


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

Expected result:
----------------
Subversion functions work as normal

Actual result:
--------------
Subversion segfaults

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

http://httpd.apache.org/docs/1.3/mod/mod_env.html#setenv

Looks like a nasty kludge to stick in the extension..
 [2007-11-14 10:11 UTC] wez@php.net
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] ezyang@php.net
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] scottmac@php.net
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-2019 The PHP Group
All rights reserved.
Last updated: Tue Mar 26 04:01:27 2019 UTC