You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Robert Nikander <ro...@encodia.biz> on 2007/03/17 01:41:44 UTC

[users@httpd] SetEnv Path for CGI scripts Windows XP

Hi,

I'm running Apache 2.2 on Windows, and I'm trying to run some CGI 
scripts.  They appear to be failing because the path environment 
variable isn't set right.  When I put "SetEnv Path c:\somedir" in an 
.htaccess file, apache appears to ignore it.  The path var that gets 
passed to cgi scripts doesn't change.  Also, if I change the path 
environment variable in the Windows control panel, and restart apache, 
apache is still using the old path, which is bizarre.   Any ideas?

Rob

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SetEnv Path for CGI scripts Windows XP

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Sorry, I misread your question.

Apache uses the path info of the user that the Apache Service will 'run as'
and the systemwide path.  Note that system path changes will only affect
services after a system reboot.

You cannot use SetEnv for the purpose you stated.


William A. Rowe, Jr. wrote:
> See running apache for windows 'as a service' and the -n config
> option.  It retains this information (startup flags) in the registry.
> 
> 
> Robert Nikander wrote:
>> Hi,
>>
>> I'm running Apache 2.2 on Windows, and I'm trying to run some CGI
>> scripts.  They appear to be failing because the path environment
>> variable isn't set right.  When I put "SetEnv Path c:\somedir" in an
>> .htaccess file, apache appears to ignore it.  The path var that gets
>> passed to cgi scripts doesn't change.  Also, if I change the path
>> environment variable in the Windows control panel, and restart apache,
>> apache is still using the old path, which is bizarre.   Any ideas?
>>
>> Rob
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>>
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SetEnv Path for CGI scripts Windows XP

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
See running apache for windows 'as a service' and the -n config
option.  It retains this information (startup flags) in the registry.


Robert Nikander wrote:
> Hi,
> 
> I'm running Apache 2.2 on Windows, and I'm trying to run some CGI
> scripts.  They appear to be failing because the path environment
> variable isn't set right.  When I put "SetEnv Path c:\somedir" in an
> .htaccess file, apache appears to ignore it.  The path var that gets
> passed to cgi scripts doesn't change.  Also, if I change the path
> environment variable in the Windows control panel, and restart apache,
> apache is still using the old path, which is bizarre.   Any ideas?
> 
> Rob
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org