Getting Perl to work on WIn98SE machine? HELP

 
Post new topic   Reply to topic    Aprelium Forum Index -> Perl
View previous topic :: View next topic  
Author Message
Skidmark
-


Joined: 06 Apr 2004
Posts: 5

PostPosted: Tue Apr 06, 2004 8:00 am    Post subject: Getting Perl to work on WIn98SE machine? HELP Reply with quote

NEWBIE ALERT! Please read this post. I know it's a quite long but I have tried to include only what I feel is relevant information to describe the problem. :lol:

I have installed a web server on my Win98SE machine using Abyss Web Server X-1. The basic site is running well but now it's time to juice it up with some cgi scripts. The first is to be a guest book so I downloaded a nice one from the net and installed it, after installing PHP and Active Perl on the machine too. I have also configured Abyss to use php.exe and perl.exe via the configuration console.

No joy. The guest book has two html files (the guest book itself and an add entry page) and a cgi script. I modified the file paths in all three files and the links in the html files seem to be working fine. I can navigate successfully to the guest book page and from there I can call up the add entry page too. Thing go wrong when I call up the cgi script to process the filled in form and add it to the guest book page.

The problem is different depending on how I open the add entry page:
1) Opening via 'browse site' option in the Abyss tray icon
Pressing the button to run the add entry cgi script gives a 'HTTP 404 File not found' error.
2) Opening directly by double-clicking the html in explorer (server no longer in the loop?)
Pressing the button to run the add entry cgi script tries to download the script.

I have read much on the subject of file paths but most of the articles seem to refer to UNIX/Linux systems which I would suppose are not applicable on Win98SE. Also I have read many references to file attributes needing to be set (UNIX - chmod). I can appreciate that the cgi script needs to be able to write to the guestbook html file but windows attributes for this file are neither read nor write protected, nor is the file hidden or archive.

Amongst the more confusing information gleaned from the net were references to installing perl. Do I need to configure perl to work with Abyss or just Abyss to work with perl?

What next? Could the problem be file path or attribute related?

Thanks for reading and I would be grateful for any tips you may have. I'm losing sight of the wood for all the trees! :oops:

Relevant paths and settings on my machine are:

Install paths:
Abyss - C:\Program Files\Abyss Web Server\
PHP - C:\Program Files\Php\
Perl - C:\Program Files\Perl\

File paths:
Abyss - C:\Program Files\Abyss Web Server\abyssw.exe
PHP - C:\Program Files\Php\php.exe
Perl - C:\Program Files\Perl\perl.exe
Web site root - D:\www\public_html\
CGI files for site - D:\www\public_html\cgi-bin\
Html files for guest book - D:\www\public_html\info\

Server config settings in Abyss:
Server Root - C:\Program Files\Abyss Web Server\
Document Path - D:\www\public_html\

CGI Parameters settings in Abyss:
CGI Processing Enabled - Yes
Resolve using WIndow Registry - No
Resolve using script's !# line - No
CGI Interpreters - C:\Program Files\Php\php.exe (for .php and .php3 files) and C:\Program Files\Perl\perl.exe (for .pl and .cgi files)
CGI Paths - /*.php /*.php3 /*.pl /*.cgi and /cgi-bin/*.cgi (the last I added in an attempt to get things working)
Back to top View user's profile Send private message Visit poster's website
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Wed Apr 07, 2004 12:19 am    Post subject: Reply with quote

You said you changed the paths in the configuration of the guestbook to make them work with your site. What paths did you change them to? Chances are, you typed it wrong.

Also, if you click on the html page and then try to use the CGI file, it will try to download the file, because the file isn't being read from Abyss; and Windows is not able to handle CGI scripts.
_________________
Bienvenidos!
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Skidmark
-


Joined: 06 Apr 2004
Posts: 5

PostPosted: Wed Apr 07, 2004 6:20 am    Post subject: Reply with quote

The paths in the CGI script are:
$guestbook = '../info/guestbook.html';
$guestbookurl = 'http://XXX.XXX.XXX.XXX/info/guestbook.html';

The Xs are not filled in as Xs but as my www IP address because I don't have a domain name registered yet. I wouldn't have thought that mattered does it?

Physically guestbook.html is in 'public_html\info' (sub folder of the site root) and the CGI script is in 'public_html\cgi-bin' on the server.

Cheers
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Apr 07, 2004 2:23 pm    Post subject: Reply with quote

Skidmark,

The problem comes from the use of the cgi-bin directory. You must delete the default alias in Abyss (Console > Server conf. > Advanced > Aliases > Delete /cgi-bin ). Do you still get the 404 error now?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Skidmark
-


Joined: 06 Apr 2004
Posts: 5

PostPosted: Wed Apr 07, 2004 8:38 pm    Post subject: Reply with quote

That's cleared up the 404 error problem, thanks.

Now it runs the cgi script but I suspect there's something funny going on with the script. The script starts in the browser but keeps running without producing a result. It sort of hangs.

The machine still works, the OS doesn't hang, but the task manager shows that perl is still running (and won't be killed without a machine reboot) and processor load is at 100%!

Time to play with the script I think.
Back to top View user's profile Send private message Visit poster's website
jmoschetti45
-


Joined: 29 Oct 2003
Posts: 95
Location: MI USA

PostPosted: Thu Apr 08, 2004 2:58 am    Post subject: Reply with quote

Yes, thats a script problem. It should time out though. In the console you can set the script time out time. I reccomend 20-30 seconds. Also, have a look at the cgi.log file in the abyss/logs directory. It might tell you what your script is 'hung up' on.
_________________
http://jmoschetti45.com
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Thu Apr 08, 2004 3:14 am    Post subject: Reply with quote

The only problem I've noticed in short timeouts is in upload scripts. If the file doesn't finish uploading in 30 seconds, it dies!

At least that's what happens to me. I cranked it to 120 seconds (2 minutes) and it finished uploading. (Virtual hosts can fix this problem...)
_________________
Bienvenidos!
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
jmoschetti45
-


Joined: 29 Oct 2003
Posts: 95
Location: MI USA

PostPosted: Thu Apr 08, 2004 4:18 am    Post subject: Reply with quote

I know, thats a minor problem, but when you have about 8 people running 10-15 scripts, and when they get hung up, your server is not in good shape. Its actually been so bad ctrl + alt + del didn't work. Had to push Reset. 120 seems a lot to me but I suppose if you have someone with dial-up connection uploadng something it isnt. Fortunatly I don't use upload scripts, so 30 is perfect for me. I know VHosts will fix that problem. Can't wait for next version!
_________________
http://jmoschetti45.com
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Thu Apr 08, 2004 4:34 am    Post subject: Reply with quote

Yeah, I had to use it because someone wasn't able to use my FTP server. I've stopped though, because I just ran into countless problems.
_________________
Bienvenidos!
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Skidmark
-


Joined: 06 Apr 2004
Posts: 5

PostPosted: Thu Apr 08, 2004 10:57 pm    Post subject: Reply with quote

Well, thanks for all your input guys. The problem has sort of been solved.

I have cgi scripts woking fine. Tested with a simple script then I got a site search script to work too. The problem was with the guest book script I think, perhaps not compatible with Win98? I have a different guest book script on the site now, up and running nicely.

Having visited a few more script sites I notice that a few give information on the OS the script is tested with. I shall obviously have to check this before trying to install a new script. It'll save a lot of time :D

Thanks again.
Back to top View user's profile Send private message Visit poster's website
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Thu Apr 08, 2004 11:52 pm    Post subject: Reply with quote

Usually, the operating system isn't the problem; it is the configuration of the script.
_________________
Bienvenidos!
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Apr 09, 2004 2:23 pm    Post subject: Reply with quote

Skidmark,

The only problem that Win95-98-ME has with some Perl scripts is related to the use of the flock() instruction. If your script uses this instruction, you may have some trouble.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Skidmark
-


Joined: 06 Apr 2004
Posts: 5

PostPosted: Fri Apr 09, 2004 9:03 pm    Post subject: Reply with quote

Flock instructions you say. Until a couple of days ago I thought flocks were only groups of sheep. Well it's no good jumping in at the deep end if you don't know how to swim I suppose :D

I gather from a little searching that the instruction is used to lock a file so only one process can write to it at a time. I can see that could be used by a lot of scripts but I suppose there are more than one way of scripting the same functionality. Thanks for the tip anyway I shall look out for flock commands in scripts that give problems.

Maybe I should try and upgrade to Win2000 but thats asking a bit much from a Pentium200. I'll see how long it keeps going and experiment some more with scripts.

Does anyone have any tips for good sites giving info on security issues with scripts? I gather not all scripts are as safe as all that.

Cheers
Back to top View user's profile Send private message Visit poster's website
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Sat Apr 10, 2004 7:40 pm    Post subject: Reply with quote

If you only use your P200 machine to host a website (and not play games, et cetera), then you probably won't experience a problem with 2000. It is usually XP that sucks the life out of your computer.
_________________
Bienvenidos!
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
diamondblast
-


Joined: 03 Aug 2008
Posts: 3

PostPosted: Thu Aug 21, 2008 3:05 pm    Post subject: Reply with quote

iNaNimAtE wrote:
If you only use your P200 machine to host a website (and not play games, et cetera), then you probably won't experience a problem with 2000. It is usually XP that sucks the life out of your computer.


I read this topic and laugh.
Back then XP was the bad kid I guess.
Now I actually think XP is the best Win out there .... it had it problems but from what we got right now it is the best of worst.
Am I right about it ? Btw I found this sites yellow polyp, offensive coordinator very interesting!!
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Perl All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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


Powered by phpBB phpBB Group