LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-02-2009, 05:54 AM   #1
chilali
LQ Newbie
 
Registered: Aug 2009
Posts: 6

Rep: Reputation: 0
Unhappy Need help with CGI scripts for default directory path for website in Perl 5.8.8


Good Morning everyone!

I really need help. I have been trying to create CGI scripts for a default directory to my website. Basically, I have a Linux based web hosting site, created a domain name and my page reads 'directory has no index file.' The web host site doesn't provide that type of support.

I am a newbie to server side programming, as in three days newbie. I have tried every softwhere-side trick I can think of to do this, including using a remote ftp to try create a shell scripts. That did not work.

I don't understand how this works. Can someone please provide some help with the code I would need to use to make this work?

There are a full list of modules available on the server. I just don't know how to use them. Everything I have been finding on the internet are the files to download Perl which I can't use. I just need to code to write to my /cgi-bin/ to make my site work.

Please help!

Thanks.
Mia
 
Old 08-02-2009, 10:55 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
If your web site is hosted by a ISP, then they may not allow access to the cgi-bin (or whatever their site uses) directory. If they do allow users to access a cgi-bin directory, then they probably document the method to use for accessing it.
--- rod.
 
Old 08-02-2009, 11:39 AM   #3
chilali
LQ Newbie
 
Registered: Aug 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Question Linux Site Administrator help

I am the website administrator. I purchased a domain name and I am hosting that domain but I can't set up the index file. I have never functioned on this side before. I have the directory paths, access to the cgi bins and everything I need. I even tried writing it in .xml, saving it as a .php file and trying to force it to load. That did not work, despite the fact that the hosting site read the .php file for Wordpress and allowed me to load that.

I have done the research for Perl and Python but I have found anything that puts it all together and I know that is what I am missing. What are the scripts that I need to specify the path to my web directory? I know that it is more than one file.

index.py
index.htaccess
XXXXX.py (that creates yourscript.cgi)
yourscript.cgi or yourscript.pl
/*<--whatever I am missing to get me to here -->
index.html


With the exception of .htaccess, I have no idea what on earth to write in these files.

This is what I need help with!

Mia
 
Old 08-03-2009, 12:20 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Try this: http://httpd.apache.org/docs/2.0/howto/cgi.html
 
Old 08-03-2009, 06:30 AM   #5
chilali
LQ Newbie
 
Registered: Aug 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Thumbs up Thanks Chris

I noticed people are still reading this post so I wanted to respond. When no one answered the question after a few hours, I began to wonder if I was thinking about the question incorrectly. After searching through pages of error logs, I found my answer. The question that I should have been asking was what SSI commands should I use to create a directory path in Linux.

I read the Apache docs before joining this site but I still didn't understand how to pull it together. I am hosting on fatcow and the site stated you needed to have an .shtml file but I had no idea what to include in the file, like this statement for example:

<!--#exec cgi="cgi-bin/footer.cgi"-->

It took me awhile, but I get it. I had to dump my files and start over but I am getting there. I wanted to post this for the next newbie who is facing the same problem.

Mia
 
  


Reply

Tags
perlscript



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problems in running cgi/perl scripts... raymond Linux - General 17 02-09-2010 04:06 AM
How to run perl scripts outside cgi-bin? xpucto Linux - Server 3 04-20-2007 02:23 AM
How can I run a perl and cgi scripts in my apache.?. ethnicme Programming 6 07-21-2006 04:02 AM
Of Perl CGI scripts and Sendmail Chrax Programming 2 06-06-2005 04:21 PM
Running Perl/CGI scripts hso_sof Linux - Newbie 3 08-22-2003 10:26 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration