Gossamer Forum
Home : General : Perl Programming :

New at Perl and need help

Quote Reply
New at Perl and need help
Hi! I got interested in perl recently as a result of thr great database script offered in this site. I have installed perl on my computer which is running on Windows 98. The reason why I wanted to install perl on my computer even though it is not my server is that I can check the scripts before uploading them onto the web. This saves me my internet time.

However, I realised after install perl on my computer, I still can't run the default.cgi of DBMan. It keeps giving me this error: "This script must be called form the web using the Get or Post request."

I know I install my perl correctly as I can run the example scripts from a perl book I bought.

Can someone please enlighten me on this? If this problem sounds dumb, I'm sorry but I really would like to learn more about perl.

Thanks.

Julian

Quote Reply
Re: New at Perl and need help In reply to
You need to install a web server on your machine to run the application correctly as it is a CGI. For windows, Xitami is a good and easy to maintain web server for testing.
http://www.xitami.com
Move your files into the web server's directories and make sure you have the right properties set on them for CGIs to execute.
-- Gordon


s/(\d{2})/chr($1)/ge + print if $_ = '8284703280698276687967';
Quote Reply
Re: New at Perl and need help In reply to
I prefer Apache for Windows.

Regards,

Eliot Lee
Quote Reply
Re: New at Perl and need help In reply to
Thank you all for your reply. I was hoping that I don't need to logon to the web to test out cgi files. Guess I was wrong.

I was just wondering if I change the extension of the file to .pl, would that help? I tried doing it but got the same result. Is there any way I can test out the script by not installing them on a web server?

Thanks.

Julian

Quote Reply
Re: New at Perl and need help In reply to
What stand alone server are you using???

You should be able to configure Apache and Ximati to execute .cgi files.

Regards,


Eliot Lee
Quote Reply
Re: New at Perl and need help In reply to
vampy, if you install web server software on your home computer, you can run the scripts without logging onto the internet. You still use your browser, but all of the files are on your computer. You use localhost instead of www.server.com when you access the scripts.

I found that Xitami was easier to configure than Apache myself.

JPD
Quote Reply
Re: New at Perl and need help In reply to
In Reply To:
I found that Xitami was easier to configure than Apache myself.
I totally concur JP - Xitami is a breeze to set up even for the most novice user.

easy does it
Quote Reply
Re: New at Perl and need help In reply to
Just wanted to know where can I get the software that you mentioned. And about the installation of the software, is it going to be idiot-proof? Cos' I really don't know much about configuring a local server.

Thank you all for your replies.

Julian


Quote Reply
Re: New at Perl and need help In reply to
http://www.xitami.com/

"We live in a dot com world..."

Tongue

Regards,

Eliot Lee
Quote Reply
Re: New at Perl and need help In reply to
Thanks. I have download the file and have installed it. Now the problem is that when I run the cgi script, it doesn't go to the log on page as usual. I also can't use flock. Is that usual? I'm using ActivePerl.



Julian
Quote Reply
Re: New at Perl and need help In reply to
In Reply To:
I also can't use flock. Is that usual?
YES...Windows 95 and 98 Servers CANNOT use flock...that is correct.

But since you are ONLY one accessing, writing, etc. to the files in your stand alone server...you really don't need a mechanism for "protecting" your files from being corrupted by multiple users accessing your files.

Regards,

Eliot Lee
Quote Reply
Re: New at Perl and need help In reply to
Thanks for telling me that but a problem still exist. I can't seem to go to to the logon screen or signup form. It keeps showing the main menu which only has 2 options: Home and Logoff

Is there something I should have confirgured in the scripts or the Xtami software?

Julian
Quote Reply
Re: New at Perl and need help In reply to
Sounds like a user permission problem (malformatted permissions in the default.cfg file) in DBMAN rather than your server configurations.

Regards,

Eliot Lee
Quote Reply
Re: New at Perl and need help In reply to
I thought so too and I downloaded the working scripts from my webpage and change the directory of my perl to that of the directory found on my stand alone computer but it still doesn't work.

Julian
Quote Reply
Re: New at Perl and need help In reply to
In Reply To:
I thought so too and I downloaded the working scripts from my webpage and change the directory of my perl to that of the directory found on my stand alone computer but it still doesn't work.
You also need to change the $db_script_path to point to your local ABSOLUTE PATH. You also need to change the $db_cgi_url and $db_script_url variables in the default.cfg file.

Regards,


Eliot Lee
Quote Reply
Re: New at Perl and need help In reply to
My perl directory is C:\perl\bin What should I change the variables to then?



Julian
Quote Reply
Re: New at Perl and need help In reply to
*sigh*

You are confusing variable PATHS and your Perl Path....

The PATHS for the variables I mentioned need to be set like the following:

Code:

$db_script_path = "C:/Apache/Web/cgi-bin/dbman";


Do you understand now???

Regards,

Eliot Lee
Quote Reply
Re: New at Perl and need help In reply to
I don't know too much about Xitami. And, where can you get Apache for Windows? Excuse my ignorance :~B

Quote Reply
Re: New at Perl and need help In reply to
In Reply To:

And, where can you get Apache for Windows?


http://www.apache.org

Regards,

Eliot Lee
Quote Reply
Re: New at Perl and need help In reply to
Try this thread you may find it usefull,
http://www.gossamer-threads.com/...ew=&sb=&vc=1

Bob
http://totallyfreeads.com