Jump to content

Recommended Posts

Posted (edited)

Hi,

 

I'm trying to install a link script where I can add a link and submit it and it will automatically update the page for me.

 

Here is the error I get after I thought I had it setup properly, http://www.kaulaiscool.com/cgiexample.gif

 

the submit html file is listed here

http://www.kaulaiscool.com/links/links.html

 

and the cgi file is located in

http://www.kaulaiscool.com/scgi-bin/

and the contents can be read

http://www.kaulaiscool.com/links.txt

 

and a readme if anyone needs it

http://www.kaulaiscool.com/readme.txt

 

 

If someone could take a look maybe and see what I am doing wrong?

I tried it in /cgi-bin with the same effect.

And all the files added were set to the correct chmod listed in the readme

I dont know anything about this sorta stuff...

;)

Edited by Kaula
Posted

While I'm not a cgi expert, stand by...I'm sure one of our resident scripting guru's will be along shortly to look at your issue.

 

In the meantime, where did you get this script? Does the author have any instructions/comments on the site you got the script from? I'd start looking there.

Posted

The first entry "links/links.html" is incorrect.

 

According to the instructions:

>$filename = "/server/path/to/links.html";
Path Location of your links.html file.

 

It should be "/home/yourcPanelname/public_html/links/links.html"

 

Also, your database variable is wrong:

 

It should be:

"/home/yourcPanelname/public_html/database.txt"

 

Make sure you upload all these files in ASCII mode and not Binary and set the permissions accordingly.

 

HTH

Posted

Your submit file tries to run the script at www.kaulaiscool.com/scgi-bin/links.cgi It seems that file does not exist. Do you really have an scgi-bin directory - most use just cgi-bin and it may be a typo.

Posted

Hi! Thanks for your replies.

 

TCH-Steve-

I found it here http://www.scriptarchive.com/links.html

 

TCH-Bruce-

I'll try again to get the paths right

 

TCH-Jim-

Well I had orginally tried it in http://www.kaulaiscool.com/cgi-bin, but couldnt get it to work. While I was pouting around in cpanel I noticed something called SCGI Wrap. I enabled it and it gave me a directory of scgi-bin. Figured I'd give it a try before I posted, but it had the same effect.

 

 

 

I'll try again with your suggestions, wish me luck!

Posted

Ok, I'm pretty sure I've fixed all the path problems. I reuploaded all the files in ascii mode.

http://www.kaulaiscool.com/links/links.html

 

I can enter the url and click add, but it doesnt actually add anything to the list. There is no longer any errors though, like before. Ive taken a look at the code, but I don't know enough about it. Any ideas?

 

 

variables in the cgi file

># Define Variables

$filename = "home/kaulais/public_html/links/links.html";
$linksurl = "http://kaulaiscool.com/links/links.html";
$linkscgi = "http://kaulaiscool.com/scgi-bin/links.cgi";
$linkstitle = "Kaulas Links";
$database = "home/kaulais/public_html/database.txt";

# Done

 

all the links are the same

the submit html file is listed here

http://www.kaulaiscool.com/links/links.html

 

and the cgi file is located in

http://www.kaulaiscool.com/scgi-bin/

and the contents can be read

http://www.kaulaiscool.com/links.txt

 

and a readme if anyone needs it

http://www.kaulaiscool.com/readme.txt

Posted (edited)

I had the database.txt set to 777, like the readme said, but I tried it with 666 also with no effect.

 

No, there hasnt been any errors in the cpanel log since I fixed the paths :(

 

 

a cgi file can run from any folder right?

Edited by Kaula
Posted

Wait the readme says the database.txt needs to be in

 

/path/to/database.txt

 

 

and i have it set as

 

home/kaulais/public_html/database.txt

 

is that right?

Posted

No it should be like this:

 

# Define Variables

 

$filename = "/home/kaulais/public_html/links/links.html";

$linksurl = "http://kaulaiscool.com/links/links.html";

$linkscgi = "http://kaulaiscool.com/scgi-bin/links.cgi";

$linkstitle = "Kaulas Links";

$database = "/home/kaulais/public_html/database.txt";

 

# Done

 

Note the leading "/"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...