You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "s_i@tiscali.fr" <s_...@tiscali.fr> on 2006/03/01 10:51:11 UTC

Re: [users@httpd] OS Env variables - TMP

Tx for the tip, this module is exactly what i am looking for. The pb is that it does not seem  to be working on windows problem, unfortunately!!! Going through some sites, I was wondering if mod_perl would do the job as well, i.e. reading the full config file and replacing, using regular expressions, relevant part of it. I however did not find anything related to that.

I think my last solution, if I cannot find any easy way, would be to use windows batch script, which I hate for its akward syntax.

Thanks a lot

---------- Initial Header -----------

From      : "William A. Rowe, Jr." <wr...@rowe-clan.net>
To          : users@httpd.apache.org
Cc          : 
Date      : Tue, 28 Feb 2006 15:52:52 -0600
Subject : Re: [users@httpd] OS Env variables - TMP

Apache doesn't perform environment expansion from the core distribution.

Look at mod_macro, see if anyone's ported this to apache 2.x for your
purposes.  Portable syntax is '$SystemRoot' (or '$(SystemRoot)' - either
is sans ' tic marks in actual use.)

s_i@tiscali.fr wrote:
> Tx for your answer. I actually tried this solution before with %tmp% window env variable, but did not work, nor with %systemroot". I tried to do that for the directive:
> PidFile %temp%/apache.pid
> 
> Error message i get is:
> "fopen: no such file or directory
> Apache.exe: could not log pid to file /apache/%systemroot%/temp"
> 
> Major problem:
> 1. "/apache" is prepended which i do not want, therefore the full path is wrongly interpreted
> 
> If any answer to that, thanks to let me know.
> 
> Regards,
> Sébastien
> 
> ---------- Initial Header -----------
> 
> From      : <Ol...@unilog.de>
> To          : <us...@httpd.apache.org>
> Cc          : 
> Date      : Tue, 28 Feb 2006 14:09:12 +0100
> Subject : RE: [users@httpd] OS Env variables - TMP
> 
> 
> On attempt on Windows Systems 
>  %SystemRoot%\temp
> 
> Greets 
> Oliver
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: s_i@tiscali.fr [mailto:s_i@tiscali.fr]
> Gesendet: Di 28.02.2006 11:29
> An: users
> Betreff: [users@httpd] OS Env variables - TMP
>  
> Hello,
> 
> In my attempt to ship Apache as a standlone server on a CD-ROM to run a Web-based application, I would need to access my OS environment variables from httpd.conf, since i would like to access TEMP directory on any computer (at least Windows-based computers). Any idea how to achieve that?
> Thanks for your help
> 
> -------------- ALICE HAUT DEBIT : TRIPLE PLAY A 29,95 EUR/MOIS -------------- 
> Découvrez vite ALICEBOX : avec le modem WIFI, profitez de l'ADSL, de la TELEPHONIE et en exclusivité de la TELEVISION ! 
> Bénéficiez aussi de la hotline gratuite 24h/24 ! Soumis à conditions. Pour en profiter cliquez ici http://abonnement.aliceadsl.fr
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 
> 
> -------------- ALICE HAUT DEBIT : TRIPLE PLAY A 29,95 EUR/MOIS -------------- 
> Découvrez vite ALICEBOX : avec le modem WIFI, profitez de l'ADSL, de la TELEPHONIE et en exclusivité de la TELEVISION ! 
> Bénéficiez aussi de la hotline gratuite 24h/24 ! Soumis à conditions. Pour en profiter cliquez ici http://abonnement.aliceadsl.fr
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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



-------------- ALICE HAUT DEBIT : TRIPLE PLAY A 29,95 EUR/MOIS -------------- 
Découvrez vite ALICEBOX : avec le modem WIFI, profitez de l'ADSL, de la TELEPHONIE et en exclusivité de la TELEVISION ! 
Bénéficiez aussi de la hotline gratuite 24h/24 ! Soumis à conditions. Pour en profiter cliquez ici http://abonnement.aliceadsl.fr





---------------------------------------------------------------------
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] OS Env variables - TMP

Posted by Khai Doan <kh...@hotmail.com>.
To use environment variable in httpd.conf:

${SERVERROOT}

This works for me.  I am running apache 2 on linux fedora core 2.

Khai


>From: "s_i@tiscali.fr" <s_...@tiscali.fr>
>Reply-To: users@httpd.apache.org
>To: "users" <us...@httpd.apache.org>
>Subject: Re: [users@httpd] OS Env variables - TMP
>Date: Wed,  1 Mar 2006 10:51:11 +0100
>
>Tx for the tip, this module is exactly what i am looking for. The pb is 
>that it does not seem  to be working on windows problem, unfortunately!!! 
>Going through some sites, I was wondering if mod_perl would do the job as 
>well, i.e. reading the full config file and replacing, using regular 
>expressions, relevant part of it. I however did not find anything related 
>to that.
>
>I think my last solution, if I cannot find any easy way, would be to use 
>windows batch script, which I hate for its akward syntax.
>
>Thanks a lot
>
>---------- Initial Header -----------
>
>>From      : "William A. Rowe, Jr." <wr...@rowe-clan.net>
>To          : users@httpd.apache.org
>Cc          :
>Date      : Tue, 28 Feb 2006 15:52:52 -0600
>Subject : Re: [users@httpd] OS Env variables - TMP
>
>Apache doesn't perform environment expansion from the core distribution.
>
>Look at mod_macro, see if anyone's ported this to apache 2.x for your
>purposes.  Portable syntax is '$SystemRoot' (or '$(SystemRoot)' - either
>is sans ' tic marks in actual use.)
>
>s_i@tiscali.fr wrote:
> > Tx for your answer. I actually tried this solution before with %tmp% 
>window env variable, but did not work, nor with %systemroot". I tried to do 
>that for the directive:
> > PidFile %temp%/apache.pid
> >
> > Error message i get is:
> > "fopen: no such file or directory
> > Apache.exe: could not log pid to file /apache/%systemroot%/temp"
> >
> > Major problem:
> > 1. "/apache" is prepended which i do not want, therefore the full path 
>is wrongly interpreted
> >
> > If any answer to that, thanks to let me know.
> >
> > Regards,
> > Sébastien
> >
> > ---------- Initial Header -----------
> >
> > From      : <Ol...@unilog.de>
> > To          : <us...@httpd.apache.org>
> > Cc          :
> > Date      : Tue, 28 Feb 2006 14:09:12 +0100
> > Subject : RE: [users@httpd] OS Env variables - TMP
> >
> >
> > On attempt on Windows Systems
> >  %SystemRoot%\temp
> >
> > Greets
> > Oliver
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: s_i@tiscali.fr [mailto:s_i@tiscali.fr]
> > Gesendet: Di 28.02.2006 11:29
> > An: users
> > Betreff: [users@httpd] OS Env variables - TMP
> >
> > Hello,
> >
> > In my attempt to ship Apache as a standlone server on a CD-ROM to run a 
>Web-based application, I would need to access my OS environment variables 
>from httpd.conf, since i would like to access TEMP directory on any 
>computer (at least Windows-based computers). Any idea how to achieve that?
> > Thanks for your help
> >
> > -------------- ALICE HAUT DEBIT : TRIPLE PLAY A 29,95 EUR/MOIS 
>--------------
> > Découvrez vite ALICEBOX : avec le modem WIFI, profitez de l'ADSL, de la 
>TELEPHONIE et en exclusivité de la TELEVISION !
> > Bénéficiez aussi de la hotline gratuite 24h/24 ! Soumis ŕ conditions. 
>Pour en profiter cliquez ici http://abonnement.aliceadsl.fr
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
> >
> >
> > -------------- ALICE HAUT DEBIT : TRIPLE PLAY A 29,95 EUR/MOIS 
>--------------
> > Découvrez vite ALICEBOX : avec le modem WIFI, profitez de l'ADSL, de la 
>TELEPHONIE et en exclusivité de la TELEVISION !
> > Bénéficiez aussi de la hotline gratuite 24h/24 ! Soumis ŕ conditions. 
>Pour en profiter cliquez ici http://abonnement.aliceadsl.fr
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
>
>-------------- ALICE HAUT DEBIT : TRIPLE PLAY A 29,95 EUR/MOIS 
>--------------
>Découvrez vite ALICEBOX : avec le modem WIFI, profitez de l'ADSL, de la 
>TELEPHONIE et en exclusivité de la TELEVISION !
>Bénéficiez aussi de la hotline gratuite 24h/24 ! Soumis ŕ conditions. Pour 
>en profiter cliquez ici http://abonnement.aliceadsl.fr
>
>
>
>
>
>---------------------------------------------------------------------
>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