[sf-perl] Perl host porting

Kevin Frost biztos at mac.com
Thu Dec 18 12:56:08 PST 2008


Are you using shared hosting?  Sounds like it based on the permission  
issue, which reminds me of the good/bad old days of suidperl.

If so you should consider using a virtual private server.  Then you  
get your setup right once, document that for yourself, and you're set  
long into the future.  Plus you can move up to bigger things, Perl- 
wise, without having to change your existing stuff, for thou art root.

VPS options are really cheap these days, and for as big a site as you  
have it's best to be in full control.  I use Vpslink and also Amazon,  
I'm sure others would have recommendations too.

Anyway the 777 thing is usually done to prevent other users modifying  
or erasing your files.  So it's actually a good thing, and your  
previous host was probably too lax.

You may be able to change the CGI file extensions locally  
with .htaccess, eg allow .cgi for just your stuff even if globally  
they look for .pl.

And yeah, porting between shared hosts is a pain, and not just for  
perl.  Every hosting company has its own beautiful snowflake of a  
"standard" configuration.

-- frosty

(via iphone)


On Dec 18, 2008, at 12:34 PM, Dan Boger <dan at peeron.com> wrote:

> Aside from mismatch module versions, and paths, it should be fairly  
> simple to port a script from host a to b.  My guess is that the web  
> server configuration is different between the two hosts though.   
> Sounds like in your old host, the extension for execcgi was both .pl  
> and .cgi, while on the new one it's only cgi?
>
> I'm sure there are other differences, I suggest you compare the two  
> configs.
>
> Dan
>
> On Thu, Dec 18, 2008 at 12:29 PM, Walt Sanders <wsanders at pacificwebdesign.org 
> > wrote:
> Am I the only one finding Perl porting to different web hosts a  
> problem?
>
> I have one rather large website with about 400 pages, containing  
> much user interaction handled with probably 50 or 60 perl.cgi  
> programs scattered about in many directories.  It all works  
> beautifully.
>
> I recently thought to move the entire site to a different web host  
> (for speed, cost and developer services improvements).  I actually  
> thought I could just move it all and tweak a few paths possibly and  
> be done.  So I tried putting up a few directories to see if  
> everything will work ok.  Aaaaugh!  Perl won't work.
>
> First I find that permission must be precisely 755 instead of the  
> previous 777 (this baffles me).  Then only .pl instead of .cgi. or  
> both.  Ok, irritating, but not a big problem (I didn't ask them to  
> reset it).  But then only some of the perl programs would run.
>
> Investigating, I start finding oddities like: program A works,  
> program B doesn't.  I replace 100% of the content of program A with  
> 100% of the content of program B, and program A then works fine.  I  
> then rename program A to program B and it works fine.  OK, that one  
> is fixed (not a clue as to why).  Hmmmmm.  If I take the original  
> program B and simply change the name to program A (gotta work,  
> right?), it doesn't work.
>
> I could list a dozen similarly silly tweaks that eventually got  
> about half of the perl programs working, none of them having to do  
> with the programming itself!  I then tried to port to a 3rd large  
> web host, thinking the 2nd host had some strange settings on its  
> Apache server.  There I found the same problem of very curious  
> idiosyncrasies and curious illogical tweaks to make most of the Perl  
> work, albeit different ones and none of it sensible.
>
> I'm wondering if I live alone in my own little world of "stay the  
> hell away from perl if you want a peaceful life".  On the first  
> host, I had found perl to be wonderfully easy to program, totally  
> reliable, and generally rock solid in the field.  This is a sad  
> development.  Can anyone enlighten me a little as to what is going on?
>
> I don't really want to change languages, Walt.
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
>
>
>
> -- 
> Dan Boger
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20081218/20e0df75/attachment.html>


More information about the SanFrancisco-pm mailing list