If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
FFA Script - Yelp for Help  XML
Forum Index » Support Forum
Author Message
Laura
Newbie

Joined: 18/02/2005 00:51:30
Messages: 4
Offline

Hi cgi gurus,

I've never worked with cgi so bear with me as I muddle through what seems to others a fairly simple thing.

I keep getting an Eternal error message when going to my FFA url
http://mysite.com/cgi-bin/links.pl

I've checked the paths and the links and such in the links.pl file and everything seems to be correct. I've uploaded the file in (or I guess I gave permission to both at 755 and 777) and it hasn't made a difference.

Now, i checked my error log in cpanel and it says "file has no execute permission" Yet when I checked, (I have cuteftp) the execution boxes for owner, group and all users are checked.

I'm at a loss now. My server does support cgi and has perl installed.

Can anyone give a quick CGI for dummies lesson on this?

Thanks in Advance
laura

ps- Does the links.pl file stay a .pl file or should the extention be changed to .cgi ?
ET
Graduate

Joined: 21/02/2003 22:17:48
Messages: 179
Offline

Okay.... chmod to 755 (don't leave at 777)

the http://yoursite.com/cgi-bin/links.pl is only for the form action portion of the add a site page

To actually get inside of your script (admin) you need
typed into the URL From there you type in the password you choose for your site.

file has no execute permission
would mean that you have not set the chmod correctly. rwxr-xr-x

the very first line sometimes needs to be

I peeked inside your links directory and noticed that there are instructions for a modified version of the ffa-links instructing you to call it cgi and using ?mode=admin_menu for the admin portion - so if you downloaded a modified version of the original FFALinks, then it may be that you need to contact the person who made the mods since I will not know what mods were done to the script....

And a friendly suggestion, you might want to edit out your url out of your post when you get done with getting help here so that you are not sending an open invitation to hackers....

---------------
Laura
Newbie

Joined: 18/02/2005 00:51:30
Messages: 4
Offline

Hi ET,

Thank you for your help and the heads up changing my server info on the board. I can't believe I committed such a blunder.

Now, back to the script. I'm still having that internal server error. So something I did was not right. It's probably a simple thing that I'm not seeing (sort like html when you leave out something minute and it alters the look of the page)

So I deleted all the files to start afresh. You're right, there were two scripts and I think I got them mixed up each other. I didn't look carefully at them, as first glance they looked exactly the same.

If you can bear with me again, let me break down these paths one by one.

I got the path of the perl program from my cpanel.
So I think I'm ok on that.

1)Now, there is a box right underneath that. Inside the box, There is an Admin link. I didn't know if that was an example or if I should actually edit it.

If I do edit it; Where the path of url has www.host.com Do I change it to the path to http://mysite.com/cgi-bin/links.pl?admin=enter ?

(My confusion comes from the interplay of words.
In one url it will have
www.host.com
in others it will have mysite.com
and another it has localhost.com)

2)To the next step:
under the box, comes the the "url of script"
I havethe cgiurl as http://mysite.com/cgi-bin/links.pl
(do I need a trailing "/" ? )

I noticed the directions in the next couple
url paths, the directions specifically tell the user NOT
to use the trailing "/" So I didn't know if the firist url (url of script required the trailing "/")

3) base url to all link files without trailing "/"
(link url) has http://localhost/links
Do I leave it as "localhost" or I to I change it to
http://mysite.com/links

4) (this one is the most confusing to me of all)
base directory to all link files from the server root without trailing "/"
has
/home/user/public_html/cgi-bin/links.pl

is the "user" my login name?
The one I login to my cpanel/ftp ?

( I warned you these were dummy questions!)

5) default index page of your choice
index url: http://mysite.com/links/ffabusiness.html or whatever html page, I want to point to in the links page?

6) The counter log file just has
links_id.txt
Do I leave it as it is or do I change it the direct path: http://mysite.com/links/links_id.txt

7) on the addlink html page
is it : action="http://localhost/cgi-bin/links.pl

or do I change it to:
http://mysite.com/cgi-bin/links.pl

then, of course, upload it to my server using chmod 755 and -rwxr-xr-x

I think that is it

I do really appreciate you taking the time of your day to help!

Thanks again!

Laura
ET
Graduate

Joined: 21/02/2003 22:17:48
Messages: 179
Offline

Okay - let's see if we can break this down for you.

In the top portion where you see a lot of ### that is the "explain" portion of the script - Take note - if a line begins with # in perl or cgi, that is a comment line similar to // in php or javascript. (***Exception to this is the very top line with the #!/usr/.... - that is an instruction line required for perl and cgi)

So these lines are just examples.

Here is where you begin to personalize the script for your site

will be
You ask if it needs a trailing / - No, do not include a trailing /

then

would become

with "links" being the directory where you are putting your FFA files


Now this is where most people get confused - it is not www.nameofyoursite.com it is the document_root of your site and it is not trying to get you to your cgi-bin - it is the root to your html pages.

Run a search on the forum to find out more about this document root and how to find it if you don't know what it is for your site - I can create an easy php or a perl page for you to find it, if you still need help with it.

Next, this provides the "entry" page for your FFA links page after a new link is added - you can choose any of the html pages in the batch (I want to point out that the ffa- is important but you can change the business.html names of the pages - but there are extra things that also need to be done to match everything up)



This is left just the way it is - it the text file contained in your links directory used for counting/sorting the sites as they add their links.

And last -
7) on the addlink html page
is it : action="http://localhost/cgi-bin/links.pl

or do I change it to:
http://mysite.com/cgi-bin/links.pl

Yep, you want to tell the form where to find your perl program.

One last note - be sure to change 123 to a new password (keeping the quotes) for your own security.


That should get you going

---------------
Laura
Newbie

Joined: 18/02/2005 00:51:30
Messages: 4
Offline

Thanks ET for your help. I made sure everything was per your instructions.

Would you believe that after I carefully entered the required into that I was STILL getting that dreaded Internal Error? I knew something I did or something was left out but I just couldn't see it. I checked my cpanel error log again and the still "can't execute" message was displayed. I kept checking the chmod to see if it was at 755 and the command display was at -rwxr-xr-x . It was, but what was wrong? I finally figure it out! (it was indeed something simple and easily corrected )

I had tagged the folder cgi-bin on my server, with the chmod 755 before I uploaded the links.pl to the server. I thought you protect the folder and everything inside had that 'protection" I only figured out my error , when gazing at the other cgi files on my server , that all the other cgi files were the -rwxr-xr-x and not the links.pl that I uploaded. Now, I know that you right click on the file, set the permission on each l files once they are uploaded on your server! Well, there is a lesson learned.

I'm glad that you went over all the line by lines with me as it was important to know the paths, make sure they were correct. I've learned a lot that way. Trial and error and a good teacher makes for progress and a more confident student!

Now that I'm in the Admin console,
I'm not sure what to add in the imput boxes (or whatever you call them).

"title" is that the Title of the Home page (FFA site)
or for each individual page?


"entry id" Not a clue as to what that is

"selected page" don't know what to do with that (it has 'default" in it)

"action" not sure what to do with that

"password" need to change it

"jump to pages" I know it takes you to those FFA pages

Again, thank you very much!
I couldn't have asked for better support!

Laura
ET
Graduate

Joined: 21/02/2003 22:17:48
Messages: 179
Offline

Yay! Success after a challenge is always a great high

Laura wrote:
Now that I'm in the Admin console,
I'm not sure what to add in the imput boxes (or whatever you call them).

"title" is that the Title of the Home page (FFA site)
or for each individual page?

"entry id" Not a clue as to what that is

"selected page" don't know what to do with that (it has 'default" in it)

"action" not sure what to do with that

"password" need to change it

"jump to pages" I know it takes you to those FFA pages

Again, thank you very much!
I couldn't have asked for better support!

Laura


Glad to be able to help you and that you were able to keep your cool enough to get this far.

Most of the admin section will make more sense once you begin to get links added to your links pages. The boxes will fill in as you have something to work with. And to delete any of the links, there is a security factor in that you need to type in your password again.

Have fun with your new script

---------------
Laura
Newbie

Joined: 18/02/2005 00:51:30
Messages: 4
Offline

ET wrote:
Glad to be able to help you and that you
were able to keep your cool enough to get this far.


I'm glad you were able to help me too!
As for keeping my cool, thanks. But you
should have seen me when I first got
into HTML and putting together tables.

After awhile, you get to a point that it's not worth
throwing tantrums, as it usually works out in the end.
you might as well enjoy the journey and
make it a learning experience.


Have fun with your new script


I will! Thanks again for all your help (and patience)!!

Laura~
VinceC
Newbie
[Avatar]

Joined: 29/10/2008 02:41:30
Messages: 1
Offline

Hello

I've been reading this conversation but I'm unclear about
Code:
# base directory to all link files from the server root without trailing "/"
$base_dir = "/home/usr/you/links";

Now this is where most people get confused - it is not www.nameofyoursite.com it is the document_root of your site and it is not trying to get you to your cgi-bin - it is the root to your html pages.


Would "home" be "public_html?
Would "usr" be "mysitename"?
Would "you" be "foldername"?
Would "links" be the final link?

This is all new to me. I'm so used to just uploading webpages so the coding part is my downfall.

Would I also have to move the CGI-Bin outside of my ffalinks folder?

here's my site path http://www.mysitename.com/ffalinks

Would I want it to start as http://www.mysitename.com/ffalinks/links/ffa-business.html (example)

I'm also a little confused about how to get to the Admin Panel.

I don't seem to have an Admin file anywhere.

Would this be on the "addlink.html" page?

Any help would be appreciated.

Vince Cannon
[WWW]
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

No your path is something like c:/users/blah/htdocs/ffa_links or /home/blah/public_html/ffa_links

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum