The CCCC Webmaster wrote:Hi,
I was wanting to add some perl scripts to our "thecccc" page. I've looked though the documentation I could find, but I didn't manage to find the perl path for the server. Could you let me know what it is?
Thanks,
Christine
Perl path?
-
- Site Admin
- Posts: 303
- Joined: Thu 29 Dec 2005 23:22
- Location: Axbridge, Somerset, UK
Perl path?
Dave Cooke
BCA IT Working Party, BCA Web Services, National Cave Registry Co-ordinator, CSCC Webmaster
BCA IT Working Party, BCA Web Services, National Cave Registry Co-ordinator, CSCC Webmaster
-
- Site Admin
- Posts: 303
- Joined: Thu 29 Dec 2005 23:22
- Location: Axbridge, Somerset, UK
Hi Christine,
it is /usr/bin/perl
However, I created a quick perl script to check all is OK and it failed!
I could easily have overlooked something OR there is a problem with the
server's support for perl.
I think it is unlikely you're the first site to use perl, however if you continue
to get un-explained problems let me know and I'll investigate more.
it is /usr/bin/perl
However, I created a quick perl script to check all is OK and it failed!
I could easily have overlooked something OR there is a problem with the
server's support for perl.
I think it is unlikely you're the first site to use perl, however if you continue
to get un-explained problems let me know and I'll investigate more.
Dave Cooke
BCA IT Working Party, BCA Web Services, National Cave Registry Co-ordinator, CSCC Webmaster
BCA IT Working Party, BCA Web Services, National Cave Registry Co-ordinator, CSCC Webmaster
-
- Site Admin
- Posts: 303
- Joined: Thu 29 Dec 2005 23:22
- Location: Axbridge, Somerset, UK
Perl works fine. I spent a little more time and spotted a permission error I had made.
I found a useful guide to getting your first Perl script to run. See Running 'Hello World' as a CGI Script
I found a useful guide to getting your first Perl script to run. See Running 'Hello World' as a CGI Script
Dave Cooke
BCA IT Working Party, BCA Web Services, National Cave Registry Co-ordinator, CSCC Webmaster
BCA IT Working Party, BCA Web Services, National Cave Registry Co-ordinator, CSCC Webmaster
-
- Site Admin
- Posts: 303
- Joined: Thu 29 Dec 2005 23:22
- Location: Axbridge, Somerset, UK
Hi Christine,
I'm not a perl programmer but that sound plausible.
Use 'getcwd' to confirm you current working directory. See http://perldoc.perl.org/Cwd.html
Use 'chdir' to move to a different directory. See http://perldoc.perl.org/functions/chdir.html
Note there are two possible paths to the same location and I'm not sure which the above will use. You'll have to experiment.
The first is relative to the servers root directory and the other is relative to the start of your webspace.
I'm not a perl programmer but that sound plausible.
Use 'getcwd' to confirm you current working directory. See http://perldoc.perl.org/Cwd.html
Use 'chdir' to move to a different directory. See http://perldoc.perl.org/functions/chdir.html
Note there are two possible paths to the same location and I'm not sure which the above will use. You'll have to experiment.
The first is relative to the servers root directory and the other is relative to the start of your webspace.
Dave Cooke
BCA IT Working Party, BCA Web Services, National Cave Registry Co-ordinator, CSCC Webmaster
BCA IT Working Party, BCA Web Services, National Cave Registry Co-ordinator, CSCC Webmaster
Thanks for the reply
I did dir/ls the current working directory:
(http://thecccc.org.uk/hello3.pl)
c:/inetpub/wwwroot
.
..
iisstart.htm
images
pagerror.gif
postinfo.html
_private
_vti_cnf
_vti_inf.html
_vti_log
_vti_pvt
_vti_script
_vti_txt
But I don't recognize the structure. So, the question is, what root directory do the cccc files live in?
Christine
I did dir/ls the current working directory:
(http://thecccc.org.uk/hello3.pl)
c:/inetpub/wwwroot
.
..
iisstart.htm
images
pagerror.gif
postinfo.html
_private
_vti_cnf
_vti_inf.html
_vti_log
_vti_pvt
_vti_script
_vti_txt
But I don't recognize the structure. So, the question is, what root directory do the cccc files live in?
Christine
-
- Site Admin
- Posts: 303
- Joined: Thu 29 Dec 2005 23:22
- Location: Axbridge, Somerset, UK
OK, having played with it for a bit I've come to the conclusion there is something weird going on in FastHosts setup. It does not seem to be standard - no surprise there!
The quickest route to a solution might be to transfer your site to our Linux server - at some point I need to do this anyway since we will be turning off the windows server.
Would that be OK?
Also see http://british-caving.org.uk/wiki/doku. ... g_transfer for more info about transferring.
The quickest route to a solution might be to transfer your site to our Linux server - at some point I need to do this anyway since we will be turning off the windows server.
Would that be OK?
Also see http://british-caving.org.uk/wiki/doku. ... g_transfer for more info about transferring.
Dave Cooke
BCA IT Working Party, BCA Web Services, National Cave Registry Co-ordinator, CSCC Webmaster
BCA IT Working Party, BCA Web Services, National Cave Registry Co-ordinator, CSCC Webmaster
-
- Site Admin
- Posts: 303
- Joined: Thu 29 Dec 2005 23:22
- Location: Axbridge, Somerset, UK
This is FastHosts answer: http://www.fasthosts.co.uk/knowledge-ba ... icle_id=86
This code will return that:
This code will return that:
Code: Select all
$webroot = substr ($ENV{'PATH_TRANSLATED'}, 0, length
($ENV{'PATH_TRANSLATED'}) - (length
($ENV{'PATH_INFO'})+(length("htdocs"))));
print $webroot;
Last edited by David Cooke on Wed 03 Aug 2011 19:08, edited 1 time in total.
Dave Cooke
BCA IT Working Party, BCA Web Services, National Cave Registry Co-ordinator, CSCC Webmaster
BCA IT Working Party, BCA Web Services, National Cave Registry Co-ordinator, CSCC Webmaster