Author Message
-

Joined: 06 Oct 2002
Posts: 3
Location: Kidderminster

 Posted: Sun Oct 06, 2002 2:14 pm    Post subject: Making scripts work I have set Abyss Webserver up on my PC in order to test scripts on my website before uploading them to my ISP's server. However, despite following all of the installation instructions to the letter, I cannot get them to work. For example, if you type www.smokin-joe.co.uk/index.html into your browser, the page redirects to a perl script that works properly. On my computer I have a complete copy of my website on drive D: and Abyss set up on drive C:, I have set the documents path of Abyss to the relevant location and typing localhost into my browser gives me the proper page. Typing localhost/index.html returns a blank page, the initial index.html redirects to the script but it just shows a blank page instead of working properly. I have tried setting an alias for the cgi-bin to the scripts directory on drive D: but this doesn't work either. Any suggestions? :?
aprelium
-

Joined: 22 Mar 2002
Posts: 6800

Posted: Sun Oct 06, 2002 10:17 pm    Post subject: Re: Making scripts work

 adavidfrazier wrote: I have set Abyss Webserver up on my PC in order to test scripts on my website before uploading them to my ISP's server. However, despite following all of the installation instructions to the letter, I cannot get them to work. For example, if you type www.smokin-joe.co.uk/index.html into your browser, the page redirects to a perl script that works properly. On my computer I have a complete copy of my website on drive D: and Abyss set up on drive C:, I have set the documents path of Abyss to the relevant location and typing localhost into my browser gives me the proper page. Typing localhost/index.html returns a blank page, the initial index.html redirects to the script but it just shows a blank page instead of working properly. I have tried setting an alias for the cgi-bin to the scripts directory on drive D: but this doesn't work either. Any suggestions? :?

This is not clear enough to give you a suggestion. Have you tried inoking the script locally directly (i.e. typing in the browser http://127.0.0.1/cgi-bin/myscript.pl for example) ? Have you checked that Perl is correctly installed as described in http://www.aprelium.com/abyssws/perl.html ? Have you tested a simple Perl script to see if it works properly ?
_________________
Support Team
Aprelium - http://www.aprelium.com
-

Joined: 06 Oct 2002
Posts: 3
Location: Kidderminster

 Posted: Mon Oct 07, 2002 11:33 am    Post subject: If I put a simple script in the directory C:\Program Files\Abyss WebServer\cgi-bin\ it works. I have installed Perl as instructed on this site. Could it be because the webserver is on drive c: while the script and all of its related files are on drive d: ? The server is in the directory C:\Program Files\Abyss WebServer\ while the script is at D:\Documents\HTML\website\scripts\
aprelium
-

Joined: 22 Mar 2002
Posts: 6800

Posted: Mon Oct 07, 2002 3:48 pm    Post subject:

 adavidfrazier wrote: If I put a simple script in the directory C:\Program Files\Abyss WebServer\cgi-bin\ it works. I have installed Perl as instructed on this site. Could it be because the webserver is on drive c: while the script and all of its related files are on drive d: ? The server is in the directory C:\Program Files\Abyss WebServer\ while the script is at D:\Documents\HTML\website\scripts\

Yes, this is that. The web server will only serve files in the htdocs folder and in the aliased folders (see Aliases in the console).
So add an alias to you D:\Documents\HTML\website\scripts directory or just copy the script in the cgi-bin or htdocs directory.
(By the way, this how web servers work, they will not go and serve what you don't tell them to serve. This is security)
_________________
Support Team
Aprelium - http://www.aprelium.com
-

Joined: 06 Oct 2002
Posts: 3
Location: Kidderminster

 Posted: Mon Oct 07, 2002 6:52 pm    Post subject: I had set an alias, but it still doesn't work. I think it may actually be the script that is the problem, I tried a test script on the D: drive and it worked. The cgi.log has the following line: Can't locate cfg.pl in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at index.pl line 12. line 12 of index.pl says: require "cfg.pl"; cfg.pl is another file in the same directory as the script Any idea where I find @INC so that I can edit it?
aprelium
-

Joined: 22 Mar 2002
Posts: 6800

Posted: Mon Oct 07, 2002 11:04 pm    Post subject:

 adavidfrazier wrote: I had set an alias, but it still doesn't work. I think it may actually be the script that is the problem, I tried a test script on the D: drive and it worked. The cgi.log has the following line: Can't locate cfg.pl in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at index.pl line 12. line 12 of index.pl says: require "cfg.pl"; cfg.pl is another file in the same directory as the script Any idea where I find @INC so that I can edit it?

There is obviously and error in your Perl script. You should put the entire path to cfg.pl in the require statement.
@INC is a special array in Perl that contain the directories it looks in for a required file. See Perl documentation to know more about it.
_________________
Support Team
Aprelium - http://www.aprelium.com
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT + 1 Hour Page 1 of 1

 Jump to: Select a forum Miscellaneous----------------Forum Rules [READ THIS IF YOU ARE A NEW USER]Web SiteAnnouncements Web Technologies----------------PHPPerlASP.NETClassic ASPFastCGI/CGIDatabasesWeb Design Abyss Web Server----------------Powered by AbyssTutorialsNetworking IssuesSSL/CertificatesURL RewritingGeneral QuestionsBug ReportsSuggestions/Ideas Aprelium's Lounge----------------Off Topic Discussions Beta Testing----------------2.5 Beta [Closed]2.14 Beta
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum