Re: Win32 Apache and Perl

2001-09-02 Thread Brett W. McCoy

On Sun, 2 Sep 2001, Gunther Birznieks wrote:

> >I stand corrected then!  Does Apache interpret the shebang line before
> >running the script?  I've had problems with Apache *requiring* the correct
> >drive and pathname for other things in its configuration under Win32.
>
> I believe it does. But I am not sure what you mean by "other things in its
> configuration". Are you talking about other things in httpd.conf or other
> things in your Perl script?

httpd.conf -- but we shouldn't get into it too deeply here because we're
going off-topic.  I do so very little with Apache under Win32 anyway (or
much anything with Win32).

-- Brett
  http://www.chapelperilous.net/

What does education often do?  It makes a straight cut ditch of a
free meandering brook.
-- Henry David Thoreau


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Win32 Apache and Perl

2001-09-02 Thread Shannon Murdoch

Thanks Gunther, Brett used too many new jargon-sounding words in one
sentence, but I appreciate his willingness to help.

Simply copying perl.exe to a new directory (c:/usr/bin/) works like a charm!

Now I can use my scripts on all my my hosts (until one decides they want to
use the windoze shebang...!

The plain unix flavor shebang works fine on my Win32 Apache now.
#!/usr/bin/perl

Thanks a million Gunther!

-Shannon

> From: Gunther Birznieks <[EMAIL PROTECTED]>
> Date: Sun, 02 Sep 2001 07:25:31 +0800
> To: "Brett W. McCoy" <[EMAIL PROTECTED]>, Shannon Murdoch
> <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Subject: Re: Win32 Apache and Perl
> 
> At 03:59 PM 9/1/2001 -0400, Brett W. McCoy wrote:
>> On Fri, 31 Aug 2001, Shannon Murdoch wrote:
>> 
>>> Is there any way (I'm sure there is) to make my perl scripts run with the
>>> standard unix shebang instead?
>> 
>> Yes, use Unix. :-)
> 
> So helpful for the Operating System "challenged". :)
> 
>> If you are usig ActiveState, you have to use the Windows way of using
>> pathnames.  If you are using CygWin (which is a POSIX emulation layer for
>> Win32), you can use the Unix-style shebang line with CygWin's version of
>> Perl.
> 
> Brett, are you sure that this is the end of the story?
> 
> The parsing of the shebang line is not purely a function of the Operating
> System layer (as you suggest using CygWin) but is also a function of Apache
> (specificially on Win32). I have tried and was successful with the
> following technique 3 years ago, but I do not know whether such a technique
> will still work.
> 
> The premise is that Apache (on Win32 -- this is a special feature of Win32
> Apache) already understands #!c:\perl\bin\perl.exe. It's actually a *really
> nice* feature because it allows you to enable warnings and taintmode
> without mucking about with the the file association registry stuff -- I
> could go off on a soapbox now about this but I won't.
> 
> But, when I experimented with different things I found that Apache could
> interpret and understand by itself, the following things in Win32:
> 
> a) #!c:\perl\bin\perl
> 
> Taking of .exe works
> 
> b) #!c:/perl/bin/perl
> 
> switching the backslashes representation works.
> 
> c) and a final experiment
> 
> #!/perl/bin/perl
> 
> Shows that Apache understood that it was also installed on the C: drive and
> therefore did not need the pointer to let it know to find Perl there.
> 
> So this would lead us to figuring that #!/perl/bin/perl could be made to
> look like /usr/bin/perl. How? Easy enough I think.
> 
> I basically installed Perl into c:\usr instead of c:\perl so that bin was
> under c:\usr\bin.
> 
> And that worked for me.
> 
> I can't say if this still works but if Apache is doing the interpretation I
> don't see why not. Note that this is an Apache feature -- this won't help
> you with brain dead web servers like IIS that make it really hard to set up
> CGI/Perl. But since the question was specifically about Win32 Apache, I've
> obliged to talk about it.
> 
> One other note is that rather than going through another ActiveState Perl
> install into \usr, I think that you can simply make a copy of perl.exe in
> c:\usr\bin\ and keep your perl distro where it is as the registry or some
> other setting in windows actually knows that the Perl distro for that
> binary is in c:\perl and so this technique can be tried out in an even
> *easier* fashion than my first suggestion.
> 
> Shannon, if you would be so kind, I would be interested to know this
> technique still works if you end up trying it.
> 
> Good Luck,
> Gunther
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Win32 Apache and Perl

2001-09-02 Thread Shannon Murdoch

Thanks Gunther, Brett used too many new jargon-sounding words in one
sentence, but I appreciate his willingness to help.

Simply copying perl.exe to a new directory (c:/usr/bin/) works like a charm!

Now I can use my scripts on all my my hosts (until one decides they want to
use the windoze shebang...!

The plain unix flavor shebang works fine on my Win32 Apache now.
#!/usr/bin/perl

Thanks a million Gunther!

-Shannon

> From: Gunther Birznieks <[EMAIL PROTECTED]>
> Date: Sun, 02 Sep 2001 07:25:31 +0800
> To: "Brett W. McCoy" <[EMAIL PROTECTED]>, Shannon Murdoch
> <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Subject: Re: Win32 Apache and Perl
> 
> At 03:59 PM 9/1/2001 -0400, Brett W. McCoy wrote:
>> On Fri, 31 Aug 2001, Shannon Murdoch wrote:
>> 
>>> Is there any way (I'm sure there is) to make my perl scripts run with the
>>> standard unix shebang instead?
>> 
>> Yes, use Unix. :-)
> 
> So helpful for the Operating System "challenged". :)
> 
>> If you are usig ActiveState, you have to use the Windows way of using
>> pathnames.  If you are using CygWin (which is a POSIX emulation layer for
>> Win32), you can use the Unix-style shebang line with CygWin's version of
>> Perl.
> 
> Brett, are you sure that this is the end of the story?
> 
> The parsing of the shebang line is not purely a function of the Operating
> System layer (as you suggest using CygWin) but is also a function of Apache
> (specificially on Win32). I have tried and was successful with the
> following technique 3 years ago, but I do not know whether such a technique
> will still work.
> 
> The premise is that Apache (on Win32 -- this is a special feature of Win32
> Apache) already understands #!c:\perl\bin\perl.exe. It's actually a *really
> nice* feature because it allows you to enable warnings and taintmode
> without mucking about with the the file association registry stuff -- I
> could go off on a soapbox now about this but I won't.
> 
> But, when I experimented with different things I found that Apache could
> interpret and understand by itself, the following things in Win32:
> 
> a) #!c:\perl\bin\perl
> 
> Taking of .exe works
> 
> b) #!c:/perl/bin/perl
> 
> switching the backslashes representation works.
> 
> c) and a final experiment
> 
> #!/perl/bin/perl
> 
> Shows that Apache understood that it was also installed on the C: drive and
> therefore did not need the pointer to let it know to find Perl there.
> 
> So this would lead us to figuring that #!/perl/bin/perl could be made to
> look like /usr/bin/perl. How? Easy enough I think.
> 
> I basically installed Perl into c:\usr instead of c:\perl so that bin was
> under c:\usr\bin.
> 
> And that worked for me.
> 
> I can't say if this still works but if Apache is doing the interpretation I
> don't see why not. Note that this is an Apache feature -- this won't help
> you with brain dead web servers like IIS that make it really hard to set up
> CGI/Perl. But since the question was specifically about Win32 Apache, I've
> obliged to talk about it.
> 
> One other note is that rather than going through another ActiveState Perl
> install into \usr, I think that you can simply make a copy of perl.exe in
> c:\usr\bin\ and keep your perl distro where it is as the registry or some
> other setting in windows actually knows that the Perl distro for that
> binary is in c:\perl and so this technique can be tried out in an even
> *easier* fashion than my first suggestion.
> 
> Shannon, if you would be so kind, I would be interested to know this
> technique still works if you end up trying it.
> 
> Good Luck,
> Gunther
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Win32 Apache and Perl and IIS

2001-09-01 Thread Ryan Davis

I set this up on a Win98 machine a few months ago, and I there is a place in
the Apache httpd.conf to choose whether a shebang line is interpreted or if
Perl's location is taken from the registry:

#takes Perl location from registry:
ScriptInterpreterSource registry

#takes Perl location from shebang line
ScriptInterpreterSource script

Also, there were some grumblings about getting Perl to work with IIS.
Simple solution: get Win32 Apache and use that as your home server.

HTH
Ryan


- Original Message -
From: "Gunther Birznieks" <[EMAIL PROTECTED]>
To: "Brett W. McCoy" <[EMAIL PROTECTED]>
Cc: "Shannon Murdoch" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Saturday, September 01, 2001 11:05 PM
Subject: Re: Win32 Apache and Perl


> At 11:16 PM 9/1/2001 -0400, Brett W. McCoy wrote:
> >On Sun, 2 Sep 2001, Gunther Birznieks wrote:
> >
> > > I can't say if this still works but if Apache is doing the
interpretation I
> > > don't see why not. Note that this is an Apache feature -- this won't
help
> > > you with brain dead web servers like IIS that make it really hard to
set up
> > > CGI/Perl. But since the question was specifically about Win32 Apache,
I've
> > > obliged to talk about it.
> >
> >I stand corrected then!  Does Apache interpret the shebang line before
> >running the script?  I've had problems with Apache *requiring* the
correct
> >drive and pathname for other things in its configuration under Win32.
>
> I believe it does. But I am not sure what you mean by "other things in its
> configuration". Are you talking about other things in httpd.conf or other
> things in your Perl script?
>
> If the httpd.conf, I can say that one thing that Win32Apache hates is
> spaces in directories. Or at least it did 3 years ago. I really haven't
> used Win32Apache recently. I tend to use Netscape under Windows because it
> is nicer than IIS and I can test both Velocigen and PerlEx for accelerated
> Perl. I used Linux and Solaris to test mod_perl  and Speedy::CGI stuff.
>
> If you are talking about problems with the perl script running under
> Apache, then I would require more detail about what you meant by a problem
> before venturing a guess as to what might have been wrong.
>
> Later,
> Gunther
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Win32 Apache and Perl

2001-09-01 Thread Gunther Birznieks

At 11:16 PM 9/1/2001 -0400, Brett W. McCoy wrote:
>On Sun, 2 Sep 2001, Gunther Birznieks wrote:
>
> > I can't say if this still works but if Apache is doing the interpretation I
> > don't see why not. Note that this is an Apache feature -- this won't help
> > you with brain dead web servers like IIS that make it really hard to set up
> > CGI/Perl. But since the question was specifically about Win32 Apache, I've
> > obliged to talk about it.
>
>I stand corrected then!  Does Apache interpret the shebang line before
>running the script?  I've had problems with Apache *requiring* the correct
>drive and pathname for other things in its configuration under Win32.

I believe it does. But I am not sure what you mean by "other things in its 
configuration". Are you talking about other things in httpd.conf or other 
things in your Perl script?

If the httpd.conf, I can say that one thing that Win32Apache hates is 
spaces in directories. Or at least it did 3 years ago. I really haven't 
used Win32Apache recently. I tend to use Netscape under Windows because it 
is nicer than IIS and I can test both Velocigen and PerlEx for accelerated 
Perl. I used Linux and Solaris to test mod_perl  and Speedy::CGI stuff.

If you are talking about problems with the perl script running under 
Apache, then I would require more detail about what you meant by a problem 
before venturing a guess as to what might have been wrong.

Later,
Gunther



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Win32 Apache and Perl

2001-09-01 Thread Shannon Murdoch

Yes, Apache interprets the shebang line before running the script- the
script needs to point to the OS-dependant path to Perl before it will run.

-Shannon


> I stand corrected then!  Does Apache interpret the shebang line before
> running the script?  I've had problems with Apache *requiring* the correct
> drive and pathname for other things in its configuration under Win32.
> 
> -- Brett
> http://www.chapelperilous.net/
> 
> I'll burn my books.
> -- Christopher Marlowe
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Win32 Apache and Perl

2001-09-01 Thread Brett W. McCoy

On Sun, 2 Sep 2001, Gunther Birznieks wrote:

> I can't say if this still works but if Apache is doing the interpretation I
> don't see why not. Note that this is an Apache feature -- this won't help
> you with brain dead web servers like IIS that make it really hard to set up
> CGI/Perl. But since the question was specifically about Win32 Apache, I've
> obliged to talk about it.

I stand corrected then!  Does Apache interpret the shebang line before
running the script?  I've had problems with Apache *requiring* the correct
drive and pathname for other things in its configuration under Win32.

-- Brett
  http://www.chapelperilous.net/

I'll burn my books.
-- Christopher Marlowe


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Win32 Apache and Perl

2001-09-01 Thread Shannon Murdoch

Thanks Gunther, Brett used too many new jargon-sounding words in one
sentence, but I appreciate his willingness to help.

Simply copying perl.exe to a new directory (c:/usr/bin/) works like a charm!

Now I can use my scripts on all my my hosts (until one decides they want to
use the Windows shebang...!)

The plain unix flavor shebang works fine on my Win32 Apache now.
#!/usr/bin/perl

Thanks a million Gunther!

-Shannon

> From: Gunther Birznieks <[EMAIL PROTECTED]>
> Date: Sun, 02 Sep 2001 07:25:31 +0800
> To: "Brett W. McCoy" <[EMAIL PROTECTED]>, Shannon Murdoch
> <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Subject: Re: Win32 Apache and Perl
> 
> At 03:59 PM 9/1/2001 -0400, Brett W. McCoy wrote:
>> On Fri, 31 Aug 2001, Shannon Murdoch wrote:
>> 
>>> Is there any way (I'm sure there is) to make my perl scripts run with the
>>> standard unix shebang instead?
>> 
>> Yes, use Unix. :-)
> 
> So helpful for the Operating System "challenged". :)
> 
>> If you are usig ActiveState, you have to use the Windows way of using
>> pathnames.  If you are using CygWin (which is a POSIX emulation layer for
>> Win32), you can use the Unix-style shebang line with CygWin's version of
>> Perl.
> 
> Brett, are you sure that this is the end of the story?
> 
> The parsing of the shebang line is not purely a function of the Operating
> System layer (as you suggest using CygWin) but is also a function of Apache
> (specificially on Win32). I have tried and was successful with the
> following technique 3 years ago, but I do not know whether such a technique
> will still work.
> 
> The premise is that Apache (on Win32 -- this is a special feature of Win32
> Apache) already understands #!c:\perl\bin\perl.exe. It's actually a *really
> nice* feature because it allows you to enable warnings and taintmode
> without mucking about with the the file association registry stuff -- I
> could go off on a soapbox now about this but I won't.
> 
> But, when I experimented with different things I found that Apache could
> interpret and understand by itself, the following things in Win32:
> 
> a) #!c:\perl\bin\perl
> 
> Taking of .exe works
> 
> b) #!c:/perl/bin/perl
> 
> switching the backslashes representation works.
> 
> c) and a final experiment
> 
> #!/perl/bin/perl
> 
> Shows that Apache understood that it was also installed on the C: drive and
> therefore did not need the pointer to let it know to find Perl there.
> 
> So this would lead us to figuring that #!/perl/bin/perl could be made to
> look like /usr/bin/perl. How? Easy enough I think.
> 
> I basically installed Perl into c:\usr instead of c:\perl so that bin was
> under c:\usr\bin.
> 
> And that worked for me.
> 
> I can't say if this still works but if Apache is doing the interpretation I
> don't see why not. Note that this is an Apache feature -- this won't help
> you with brain dead web servers like IIS that make it really hard to set up
> CGI/Perl. But since the question was specifically about Win32 Apache, I've
> obliged to talk about it.
> 
> One other note is that rather than going through another ActiveState Perl
> install into \usr, I think that you can simply make a copy of perl.exe in
> c:\usr\bin\ and keep your perl distro where it is as the registry or some
> other setting in windows actually knows that the Perl distro for that
> binary is in c:\perl and so this technique can be tried out in an even
> *easier* fashion than my first suggestion.
> 
> Shannon, if you would be so kind, I would be interested to know this
> technique still works if you end up trying it.
> 
> Good Luck,
> Gunther
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Win32 Apache and Perl

2001-09-01 Thread Gunther Birznieks

At 03:59 PM 9/1/2001 -0400, Brett W. McCoy wrote:
>On Fri, 31 Aug 2001, Shannon Murdoch wrote:
>
> > Is there any way (I'm sure there is) to make my perl scripts run with the
> > standard unix shebang instead?
>
>Yes, use Unix. :-)

So helpful for the Operating System "challenged". :)

>If you are usig ActiveState, you have to use the Windows way of using
>pathnames.  If you are using CygWin (which is a POSIX emulation layer for
>Win32), you can use the Unix-style shebang line with CygWin's version of
>Perl.

Brett, are you sure that this is the end of the story?

The parsing of the shebang line is not purely a function of the Operating 
System layer (as you suggest using CygWin) but is also a function of Apache 
(specificially on Win32). I have tried and was successful with the 
following technique 3 years ago, but I do not know whether such a technique 
will still work.

The premise is that Apache (on Win32 -- this is a special feature of Win32 
Apache) already understands #!c:\perl\bin\perl.exe. It's actually a *really 
nice* feature because it allows you to enable warnings and taintmode 
without mucking about with the the file association registry stuff -- I 
could go off on a soapbox now about this but I won't.

But, when I experimented with different things I found that Apache could 
interpret and understand by itself, the following things in Win32:

a) #!c:\perl\bin\perl

Taking of .exe works

b) #!c:/perl/bin/perl

switching the backslashes representation works.

c) and a final experiment

#!/perl/bin/perl

Shows that Apache understood that it was also installed on the C: drive and 
therefore did not need the pointer to let it know to find Perl there.

So this would lead us to figuring that #!/perl/bin/perl could be made to 
look like /usr/bin/perl. How? Easy enough I think.

I basically installed Perl into c:\usr instead of c:\perl so that bin was 
under c:\usr\bin.

And that worked for me.

I can't say if this still works but if Apache is doing the interpretation I 
don't see why not. Note that this is an Apache feature -- this won't help 
you with brain dead web servers like IIS that make it really hard to set up 
CGI/Perl. But since the question was specifically about Win32 Apache, I've 
obliged to talk about it.

One other note is that rather than going through another ActiveState Perl 
install into \usr, I think that you can simply make a copy of perl.exe in 
c:\usr\bin\ and keep your perl distro where it is as the registry or some 
other setting in windows actually knows that the Perl distro for that 
binary is in c:\perl and so this technique can be tried out in an even 
*easier* fashion than my first suggestion.

Shannon, if you would be so kind, I would be interested to know this 
technique still works if you end up trying it.

Good Luck,
   Gunther



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Win32 Apache and Perl

2001-09-01 Thread Brett W. McCoy

On Fri, 31 Aug 2001, Shannon Murdoch wrote:

> Is there any way (I'm sure there is) to make my perl scripts run with the
> standard unix shebang instead?

Yes, use Unix. :-)

If you are usig ActiveState, you have to use the Windows way of using
pathnames.  If you are using CygWin (which is a POSIX emulation layer for
Win32), you can use the Unix-style shebang line with CygWin's version of
Perl.

-- Brett
  http://www.chapelperilous.net/

"In the fight between you and the world, back the world."
 --Frank Zappa



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Win32 Apache and Perl

2001-09-01 Thread Shannon Murdoch

Hi all,
I'm trying to set up a localhost Apache server to test my scripts on before
launching on to the web, but am seeming always to need to put the win32
shebang (#!C:\perl\bin\perl.exe) at the start of scripts instead of the
usual unix one (#!/usr/bin/perl) to make them work.

Is there any way (I'm sure there is) to make my perl scripts run with the
standard unix shebang instead?

Thanks!


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Win32 Apache and Perl

2001-09-01 Thread Shannon Murdoch

Hi all,
I'm trying to set up a localhost Apache server to test my scripts on before
launching on to the web, but am seeming always to need to put the win32
shebang (#!C:\perl\bin\perl.exe) at the start of scripts instead of the
usual unix one (#!/usr/bin/perl) to make them work.

Is there any way (I'm sure there is) to make my perl scripts run with the
standard unix shebang instead?

Thanks!


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]