Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

counter help please

Status
Not open for further replies.

Doob

Technical User
Oct 19, 2003
2
US
I apologize for asking what may be simpleton questions but here goes:

1. Can I direct a script to another server that I know will work? (A
friends site page will have path link, my site will have counter cgi file)

--------------------------------

Directory is:

cgi-bin
htdocs

2. Path is ../cgi-bin/counter.cgi ? i.e.
<!--#exec cgi=&quot;/../cgi-bin/counter.pl&quot;-->


------------------------------------

3. I need to use this next line (directory directory will be in htdocs)

so this: $data_dir = &quot;/path/to/a/data/directory/&quot;;

is this: $data_dir = &quot;/directory/&quot;; ?

4. I'm using leap ftp. How can I find if the server has perl? The html
files go in several directories up from the root. My friend said to &quot;just
make a cgi-bin&quot; but it doesn't work after cgi-files are uploaded there. I
chmod directory and cgi to 755. I know problems could very well be me, but
I'm trying...alas.

Thanks for any help,

John
 
1) SSI's are local only. Although you can call a CGI via SSI that uses LWP to retrieve information from another server. I have done that in extreme circumstances.

2)You skipped 2

3) ??

4) You want to create cgi-bin above the html directory. cgi-bin lives outside webspace when it is implemented.
 
Thanks. I was a bit unclear.

2. Path is ../cgi-bin/counter.cgi ? i.e.
<!--#exec cgi=&quot;/../cgi-bin/counter.pl&quot;-->

If I go up a directory to the cgi-bin from where the HTML page is, is it /cgi-bin to call it or ../cgi-bin?

3. I need a directory named 'directory'. It will be a directory in public_html.

so to get this right: $data_dir = &quot;/path/to/a/data/directory/&quot;;

is this: $data_dir = &quot;/directory/&quot;; ?

Thanks again,

John
 
2. /cgi-bin/ is a 'magic' apache path that is setup via the ScriptAlias command. So use <!--#exec cgi=&quot;/cgi-bin/counter.pl&quot;-->

3. $data_dir = &quot;/directory/&quot;; is incorrect
You can use

$data_dir = &quot;directory/&quot;;
or
$data_dir = &quot;/path/to/a/data/directory/&quot;;

Perl will run it as absolute or relative to the Operating System.

I would use the fully qualified path.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top