Re: Testing Perl on a Web Page

2003-11-28 Thread Jeff Westman
"R. Joseph Newton" <[EMAIL PROTECTED]> wrote:

> Try this:
> 
> 
> 
> 
>  Joseph's first Perl-based form 
> 
> 
> 
> 
> Name  
> Rank  
> Serial Number  
> 
> 
> 
> 
> Then use CGI to get the parameters.
> 
> perldoc CGI

I got a '405 error', resource not available.  I guess I'll just have to
switch ISPs :)

Thanks,

-Jeff

__
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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



Re: Testing Perl on a Web Page

2003-11-26 Thread R. Joseph Newton
Jeff Westman wrote:

>
> Everything makes sense and I appreciate your answering me.  Now, I assume the
> script has to be executable  so I will need telnet access.  I tried
> (instead) to use a perl script I have that does ftp (including site->chmod)
> -- assuming I can't telnet.  Anyway, I use this script all the time for work
> and I CAN connect to my ISP from Unix and list files. but when I tried
> running the "equivalent" perl script I have, it wouldnt even let me log in
> (but did connect at least).  Is this a firewall problem?  And if so, why
> would native FTP still work?  (again, I was only using perl/ftp to do a
> chmod).
>
> I'll call my ISP to get other questions answered.
>
> Thanks again,
>
> Jeff

That is a pretty big leap, involving file permissions, etc.  You should
definitely telnet into your directory.  Some FTP clients can be really srewy when
handling chmod.  System commands will work much better over telnet.  You can also
test the Perl installation much more easily that way.  One thing I've done in
this situation is to make a sister directory to the one in which I have my CGI
script, and make it group writable [chmod 660].  Then, presuming your web server
runs with group permissions, it, [and all your neighbors on the ISP, maybe] can
write to files in this directory.

basedir
   cgi
  myscript.cgi
   priv
  secret.dat

This is pretty rudimentary security, but it can at least help you get your foot
in the water.

I'd also suggest doing some simple CGI first, before you start doing work that
would require permissions beyond those given to world.  One problem at a time.

Joseph


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



Re: Testing Perl on a Web Page

2003-11-26 Thread R. Joseph Newton
Jeff Westman wrote:

> Dan Muey <[EMAIL PROTECTED]> wrote:
>
>
> Perfect!  Exactly what I was looking for.  I can deal with the
> paths/permissions/etc.  I'm just trying to figure out how to get started.
> Oh, would I call this inside a web page with a 

RE: Testing Perl on a Web Page

2003-11-26 Thread Dan Muey
> > 
> > > Thanks again...!
> > 
> > No sweat!
> 
> Everything makes sense and I appreciate your answering me.  
> Now, I assume the script has to be executable  so I will 
> need telnet access.  I tried
> (instead) to use a perl script I have that does ftp 
> (including site->chmod)
> -- assuming I can't telnet.  Anyway, I use this script all 
> the time for work and I CAN connect to my ISP from Unix and 
> list files. but when I tried running the "equivalent" 
> perl script I have, it wouldnt even let me log in (but did 
> connect at least).  Is this a firewall problem?  And if so, 
> why would native FTP still work?  (again, I was only using 
> perl/ftp to do a chmod).
> 
> I'll call my ISP to get other questions answered.

All those ar egood questions specific to your isp.
You don't have to telnet or ssh in to chmod you can do it 
in any ftp client. (Perl, WS-FTP, Etc)
If you ftp it up in binary it won't work and the chmod has 
to be an proper value to mak eit execuatble.
Perhaps the  script you have uses a module not installed on 
the other server, who knows? Wll besdies your isp I mean :)

DMuey
> 
> Thanks again,
> 
> Jeff
> 
> 
> 
> __
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
> -- 
> 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: Testing Perl on a Web Page

2003-11-26 Thread Jeff Westman
Dan Muey <[EMAIL PROTECTED]> wrote:

> > > > Hello There,
> > > > 
> > > > I would like to see if my ISP has perl available if one
> > > > wanted to incorporate perl into a web page.  Is there a quick 
> > > > and dirty web page I can upload to my ISP to test if perl is
> > > Try this:
> > > 
> > > test.cgi
> > > #!/usr/bin/perl -w
> > > 
> > > use strict;
> > > use CGI 'header';
> > > print header();
> > > print "/usr/bin/perl Is VERSION $]";
> > > 
> > > - Ftp in ascii
> > > - chmod to 755
> > > 
> > > However this is assuming:
> > > - Perl is at /usr/bin/perl
> > > - it's on a unix server
> > > - 755 is what it needs to be
> > > - .cgi is the extension you need
> > > - you're user is allowed
> > > 
> > > All of which is basically what you're trying to find out.
> > > I'd just call your isp and say:
> > > - What is the path to Perl?
> > > - How do I upload/execute Perl scripts in my webspace?
> > > 
> > > HTH
> > 
> > Perfect!  Exactly what I was looking for.  I can deal with 
> > the paths/permissions/etc.  I'm just trying to figure out how 
> > to get started. 
> > Oh, would I call this inside a web page with a 

RE: Testing Perl on a Web Page

2003-11-26 Thread Dan Muey
> Dan Muey <[EMAIL PROTECTED]> wrote:
> 
> > > Hello There,
> > > 
> > > I would like to see if my ISP has perl available if one
> > > wanted to incorporate perl into a web page.  Is there a quick 
> > > and dirty web page I can upload to my ISP to test if perl is
> > Try this:
> > 
> > test.cgi
> > #!/usr/bin/perl -w
> > 
> > use strict;
> > use CGI 'header';
> > print header();
> > print "/usr/bin/perl Is VERSION $]";
> > 
> > - Ftp in ascii
> > - chmod to 755
> > 
> > However this is assuming:
> > - Perl is at /usr/bin/perl
> > - it's on a unix server
> > - 755 is what it needs to be
> > - .cgi is the extension you need
> > - you're user is allowed
> > 
> > All of which is basically what you're trying to find out.
> > I'd just call your isp and say:
> > - What is the path to Perl?
> > - How do I upload/execute Perl scripts in my webspace?
> > 
> > HTH
> 
> Perfect!  Exactly what I was looking for.  I can deal with 
> the paths/permissions/etc.  I'm just trying to figure out how 
> to get started. 
> Oh, would I call this inside a web page with a 

RE: Testing Perl on a Web Page

2003-11-26 Thread Bob Showalter
Jeff Westman wrote:
> Hello There,
> 
> I would like to see if my ISP has perl available if one wanted to
> incorporate perl into a web page.  Is there a quick and dirty web
> page I can upload to my ISP to test if perl is available and works ? 
> I would also like to see what version of perl is running ?
> 
> Could someone post something here that I can run ?

How about something like:

  #!/usr/bin/perl
  print "Content-Type: text/plain\r\n\r\n";
  print $^X, "\n";
  system $^X, '-V';

Upload to a cgi directory and make executable.

This will print current Perl configuration if perl is installed at the
canonical location. If it's a Windows server you might need to name the
script with .pl or some such.

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



RE: Testing Perl on a Web Page

2003-11-26 Thread Jeff Westman
Dan Muey <[EMAIL PROTECTED]> wrote:

> > Hello There,
> > 
> > I would like to see if my ISP has perl available if one 
> > wanted to incorporate perl into a web page.  Is there a quick 
> > and dirty web page I can upload to my ISP to test if perl is
> Try this:
> 
> test.cgi
> #!/usr/bin/perl -w
> 
> use strict;
> use CGI 'header';
> print header();
> print "/usr/bin/perl Is VERSION $]";
> 
> - Ftp in ascii
> - chmod to 755
> 
> However this is assuming:
> - Perl is at /usr/bin/perl
> - it's on a unix server
> - 755 is what it needs to be
> - .cgi is the extension you need
> - you're user is allowed
> 
> All of which is basically what you're trying to find out.
> I'd just call your isp and say:
> - What is the path to Perl?
> - How do I upload/execute Perl scripts in my webspace?
> 
> HTH

Perfect!  Exactly what I was looking for.  I can deal with the
paths/permissions/etc.  I'm just trying to figure out how to get started. 
Oh, would I call this inside a web page with a 

RE: Testing Perl on a Web Page

2003-11-26 Thread Dan Muey
> Hello There,
> 
> I would like to see if my ISP has perl available if one 
> wanted to incorporate perl into a web page.  Is there a quick 
> and dirty web page I can upload to my ISP to test if perl is
Try this:

test.cgi
#!/usr/bin/perl -w

use strict;
use CGI 'header';
print header();
print "/usr/bin/perl Is VERSION $]";

- Ftp in ascii
- chmod to 755

However this is assuming:
- Perl is at /usr/bin/perl
- it's on a unix server
- 755 is what it needs to be
- .cgi is the extension you need
- you're user is allowed

All of which is basically what you're trying to find out.
I'd just call your isp and say:
- What is the path to Perl?
- How do I upload/execute Perl scripts in my webspace?

HTH

DMuey

> available and works ?  I would also like to see what version 
> of perl is running ?
> 
> Could someone post something here that I can run ?  
> 
> TIA

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



Re: Testing Perl on a Web Page

2003-11-26 Thread Wiggins d Anconia


> Hello There,
> 
> I would like to see if my ISP has perl available if one wanted to
incorporate
> perl into a web page.  Is there a quick and dirty web page I can
upload to my
> ISP to test if perl is available and works ?  I would also like to see
what
> version of perl is running ?
> 
> Could someone post something here that I can run ?  
> 
> TIA
> 

This is a tougher question than just "can someone post a page to cehck
for Perl" as that "page" would have to interact with the underlying
system in some way, namely checking for a perl executable, and testing
to see if it can be fired by the current user.  Probably two of the
easiest ways to do this is with either a) a server parsed html page that
contains a #exec cmd include that will run an arbitrary command such as
'which perl' or even just 'perl -v' but then your question has only
changed into "Does my ISP support server side includes, and exec'd
includes on top of that?  What extension do I need to use for said
server parsed pages? etc." or 2) fire up a quick PHP page (assuming you
can answer the question, does my ISP offer PHP support?) that will check
the system for the above requirements using whatever PHP's 'system' like
function is.  But at that point the problem still hasn't been reduced to
anything but "what is the right question to be asking my ISP?" which is
probably the best answer, why not just ask the ISP your questions?  If
they can't or won't answer the questions then you should be asking
yourself when you are switching ISPs.

http://danconia.org

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