Forum Moderators: phranque

Message Too Old, No Replies

Win2K hosting/Perl Question

         

NickDaGeek

5:29 pm on Apr 3, 2003 (gmt 0)

10+ Year Member



Hi All

This is going to sound like a stupid question but in a CGI file, you DO still need the path to Perl, right?

My client has recently transferred from a Linux virtual server to a W2K VS ...

I've just spoken with his hosting company's tech support people and they say I DON'T need it the first "Path to Perl" line and can even DELETE it ..

But, that's not right ... is it?

Just on the off-chance anyone can help me, the hosting company is HostDepartment.com ...

Could anyone out there is WebmasterWorld-Land tell me the Perl and Document Root Paths before I lose the rest of what little hair remains! :o\

Many thanks for any/all help ...

Nick

oilman

5:32 pm on Apr 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey Nick - welcome to WebmasterWorld :)

It's true actually - you don't need a path to perl on a Windows host. You can run perl from anywhere. That said there are a some things that don't always work the same. If you are using sendmail in your script you may have to change it to blat for windows. That's the most common issue I've found.

NickDaGeek

10:06 pm on Apr 3, 2003 (gmt 0)

10+ Year Member



Hey oilman

Thanks for that ...

I see what you mean ...

I also spoke with another script "guru" and he said I could just substitute "!#perl" at the top of the CGI files in question, which I did, but without success ...

I'm still getting "500" errors ...

Oh well ...

Thanks anyway ...

Nick

andreasfriedrich

10:25 pm on Apr 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Apache [httpd.apache.org] does use the path to the Perl [perl.com] binary given in the shebang line to locate the Perl [perl.com] binary unless you set the following directive:


ScriptInterpreterSource [httpd.apache.org] registry

Perl [perl.com] will evaluate the shebang line on Win32 and use the switches you set there as well.

Andreas

NickDaGeek

7:34 am on Apr 5, 2003 (gmt 0)

10+ Year Member



Hi andreasfriedrich

Thanks for the reply ...

Are you saying you *do* need the shebang line (I didn't know it was called that! Every day's a school day! :o)

I don't want to start a fight or anything ... I'm just trying to get some scripts running ...

[Nick edges away into a corner]

Best Wishes All

Nick

andreasfriedrich

8:34 am on Apr 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I´m saying that it depends ;-). Apache [httpd.apache.org] does need a way to determine which interpreter should handle a script. On windows you can choose between the windows way, i.e. the file extension is used to look up the interpreter in the registry, and the unix way, which uses the sheebang line.

The latter is the default. When the interpreter binary is in a directory that is in your path then you will not need to specify the path. However, this is not recommended.

To use the windows way you need to enable it as I described in my previous post.

Andreas