[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] CGI How To?



Please forgive me if this seems a bit basic for the list members, but you
are all I have.

I downloaded CGI.pm and useing fetch I uploaded it and tryit.cgi to the
UNIX server. Fetch has a number of options (text, wrapped text, MacBinary
II, Raw Data, Binhex, AppleSingle). I hope text was the correct format.

As per my ISPs instructions I put the CGI.pm and the tryit.cgi in the
usr/home/username/public_html/cgi_bin directory. I then went to my browser
and tried to open the
http://www.navnet.net/cgi-bin/cgiwrap/username/tryit.cgi and got a number
of errors. Somehow I think that I uploaded it in the wrong format or I have
to change the first line of the script to reflect the non standard cgi
location. If you want to check out my ISPs instructions on CGIs go to
http://www.navnet.net/nwcgiwrap.html

I created a duplicate of the tryit.cgi and renamed it try_it.cgi changed
the path to CGI.pm by changing the first 2 lines of the script to:

use lib '/usr/home/bobc/public_html/cgi-bin';

use CGI ;

I then ran the script with the "cgiwrapd" to generate errors and got this error

Redirecting STDERR to STDOUT

Environment Variables:
     QUERY_STRING: ''
      SCRIPT_NAME: '/cgi-bin/cgiwrapd'
        PATH_INFO: '/bobc/try_it.cgi'
  PATH_TRANSLATED: '/var/www/docs/bobc/try_it.cgi'
      REMOTE_USER: '<NULL>'
      REMOTE_HOST: 'p2s0.navnet.net'
      REMOTE_ADDR: '204.50.177.60'


Trying to extract user from PATH_INFO.
Retrieved User Name 'bobc'
User Data Retrieved:
   UserID: 'bobc'
   UID: '706'
   GID: '84'
   Home Dir: '/usr/home/bobc'

Script Base Directory '/usr/home/bobc/public_html/cgi-bin'
Trying to extract script from PATH_INFO
        Script Name 'try_it.cgi'
        Script Path '/usr/home/bobc/public_html/cgi-bin/try_it.cgi'

Fixing Environment Variables.

Environment Variables:
     QUERY_STRING: ''
      SCRIPT_NAME: '/cgi-bin/cgiwrapd/bobc/try_it.cgi'
        PATH_INFO: ''
  PATH_TRANSLATED: ''
      REMOTE_USER: '<NULL>'
      REMOTE_HOST: 'p2s0.navnet.net'
      REMOTE_ADDR: '204.50.177.60'

Logging Request (syslog)

UIDs/GIDs Changed To:
   RUID: '706'
   EUID: '706'
   RGID: '84'
   EGID: '84'

Changing Current Directory to '/usr/home/bobc/public_html/cgi-bin'

CGIwrap Error: Script is not executable. Issue chmod 755
/usr/home/bobc/public_html/cgi-bin/try_it.cgi





sorry for all the info but I guess too much is better than too little.

thanks in advance

Bob Callaghan

************************************************************************
***        The nice thing about going to a Drive In, If you          ***
***      didn't like the movie you can always slash the seats!       ***
************************************************************************