|
Bugzilla – Full Text Bug Listing |
| Summary: | apache startup script does not reset $HOME | ||
|---|---|---|---|
| Product: | [openSUSE] SUSE LINUX 10.0 | Reporter: | Dennis Lubert <plasmahh> |
| Component: | Network | Assignee: | Peter Poeml <poeml> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | ||
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | Other | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Dennis Lubert
2005-11-08 18:09:01 UTC
You should read http://httpd.apache.org/docs/2.0/env.html and use SetEnv. From the docs: SetEnv Sets an environment variable, which is then passed on to CGI scripts and SSI pages. Put php is seldom run as cgi, in fact most php software does not work when run as cgi. And when a php script starts some program, these environment settings wont apply, thus using e.g. $HOME from the apache server. This happens e.g. on svn browsing software which runs svn command. The variable with SetEnv makes it to the _SERVER array, but the program started e.g. by system() sees whats in the _ENV array. just set the proper values in the init script. setting a proper home doesnt harm. not only for php stuff but for other cgi based stuff too. Okay, mod_php. You can work around by setting HOME (or other environment variables) in /etc/sysconfig/apache2. For 10.1, we will set HOME to /var/lib/apache2. In addition, we will clean the environment a bit (which might make overriding envvars impossible, depending on how we do it...). downgrading severity PHP doesn't set $_ENV by default. you need to configure variables_order = "EGPCS" to get $_ENV populated or use apache_setenv to set it. This is the expected behaviuor. I have set HOME in rcapache2 now, defaulting to /var/lib/apache2. Submitted to the buildservice, will turn up in 10.3 later. |