Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Can't have data&html in cgi-bin

Quote Reply
Can't have data&html in cgi-bin
I don't think there are sufficient instructions for setup. As we know most virtual servers are configured in at least three different ways.
1. You can install cgi's anywhere
2. You can only install cgi's in cgi-bin and you can also install your data and html in cgi-bin
3. You can only install cgi's in cgi-bin, but you "cannot" have your html and data files in cgi-bin.

Unfortunately I am in category 3 and since I have installed several scripts successfully (it took me a while to figure out that I cannot have html and datd in my cgi-bin) when I saw the links files I knew right away, I would have a problem with this.

I have tried it twice now without luck. If anyone has had similar problem or have any suggestions please reply.

Hope Alex will have a set of instructions for different configurations when the final is complete and released.

Thanks
Quote Reply
Re: Can't have data&html in cgi-bin In reply to
Sounds like you're using links 1.11.
If so, do a search in the archive for the subject Links Installation and in that thread I give detailed instructions for configuring 1.11 to be used in your type of setup.

--mark

------------------
You can reach my by ICQ at UID# 8602162

Quote Reply
Re: Can't have data&html in cgi-bin In reply to
Hi Mark,

Thanks but I am talking about links2 final, which downloaded a couple of days ago.

In my readme file this is what I find

3. Set permissions:
chmod 755 (-rwxr-xr-x) on all .cgi files.
chmod 666 (-rw-rw-rw-) on all files in the data directory.
chmod 666 (-rw-rw-rw-) on all your template files (if using the online editor).
chmod 777 (drwxrwxrwx) on the hits directory
chmod 777 (drwxrwxrwx) on the ratings directory
chmod 777 (drwxrwxrwx) on the directory where Links pages will be created.

4. Edit links.cfg and set as a minimum:

- PATH to your admin directory, this is a system path, not a URL! If you
get an error message about not finding a file, look at the SCRIPT_FILENAME
variable for clues on the proper path!
$db_script_path = "/alex/links/cgi-bin/admin";
- URL to your admin directory. This should start with 'http://'.
$db_dir_url = "http://localhost/links/cgi-bin/admin";
- URL of where your user cgi is kept. If you kept the default installation,
it will just be one level below the admin directory.
$db_cgi_url = "http://localhost/links/cgi-bin";
- PATH to where your pages are built. This should be a system path, not a URL.
$build_root_path = "/alex/links/pages";
- URL of where your pages are.
$build_root_url = "http://localhost/links/pages";

as you can see if I want to setup the "admin" files in the docs directory, there are no istructions. The problem is that the "admin" directory has a bunch of scripts along with "data" and "templates". If I sepcify the "$db_script_path" and "$db_script_url" and point it either my admin or docs directories it will create a problem.

If you know how to proceed with the setup please reply.

Thanks
Quote Reply
Re: Can't have data&html in cgi-bin In reply to
Well, now I have opened up all the cgi files and changed the path to "full path" and at least I am not getting ERROR 500 on these when I try to call them individually.

The problem is I am still not able to call the "admin.cgi"

Has anyone had a similar setup problem?
Quote Reply
Re: Can't have data&html in cgi-bin In reply to
Links 2.0 final isn't out, only Links2.0 Beta 5. It says a more detailed set of instructions will come out w/ the final release of links 2.0.

I had similar problems, and it was because a path or 2 in the links.cfg file was set incorrectly. I figured this out using 2 separate computers- on tried to download the file, the other gave me an error message. See if you can try and access your admin prog using another computer...make sure you upload in ASCII formatt, and permissions are set correctly.

------------------
Regards,
Brian
mjordn12@aol.com
veggietales.virtualave.net/veggielink/ (MegaLinks2.0)



[This message has been edited by mjordn12 (edited February 22, 1999).]
Quote Reply
Re: Can't have data&html in cgi-bin In reply to
Thanks Brian,
======
I had similar problems, and it was because a path or 2 in the links.cfg file was set incorrectly.
=======
1. Do you mean to say the paths as written in th files by Alex were incorrect or
2. Was it that you didn't specify them properly?

If it is no.1 then would you by any chance recall which ones were wrong.

I've got to get this sucker working soon.

Thanks
Quote Reply
Re: Can't have data&html in cgi-bin In reply to
mjordn12,

Quote:
Links 2.0 final isn't out, only Links2.0 Beta 5. It says a more detailed set of instructions will come out w/ the final release of links 2.0.

The 2.0 final was released on Feb 11. Check the Links Announcements forum (URL of 216.169.107.32/scripts/forum/resources/Forum1/HTML/000010.html ).

------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/


[This message has been edited by Bobsie (edited February 22, 1999).]
Quote Reply
Re: Can't have data&html in cgi-bin In reply to
That's what I thought, I found a post from alex here for a link which said it was final. However, he also mentioned that he is working on the documentation part and the final, final will be released in another 2 weeks.

I hope the final will have better instructions. He also mentioned that he will have a windows interface to configure the script from your browser. Anyone know more about this or how the heck I can get mine working for now?
Quote Reply
Re: Can't have data&html in cgi-bin In reply to
socrates,

The final IS out, only the documentation is still being written.

Quote:
1. You can install cgi's anywhere
2. You can only install cgi's in cgi-bin and you can also install your data and html in cgi-bin
3. You can only install cgi's in cgi-bin, but you "cannot" have your html and data files in cgi-bin.

I have never heard of (in reference to # 2 and 3) html in a cgi-bin directory except when a cgi script loads the html document. I have, however, heard of putting cgi scripts in web directories.

I also have never heard of not being able to include data files in a cgi directory. There is no way a server could restrict that since, from the server's point of view, a file is a file. It has no way of knowing which is a script and which is not.

What you need to do is put your cgi, pl, pm, and data files in the cgi directory, exactly as is the directory structure when you extract Links v2.0 from the archive. The html (the "pages" directory -- you can rename that to anything you want) goes in your root web directory, not your cgi directory.

For example, here is the directory/url structure on my system:

Quote:
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/home/bobsie/cgi/goodstuff/admin";
$db_dir_url = "http://www.orphanage.com/cgi-bin/goodstuff/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://www.orphanage.com/cgi-bin/goodstuff";

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/home/bobsie/web/goodstuff";
$build_root_url = "http://www.orphanage.com/goodstuff";

I created a directory called "goodstuff" (instead of links) under my cgi directory. Under that directory is my backup, data, header, footer, HTML, LWP, and templates directories.

I also have a "goodstuff" directory (instead of "pages") under my web directory where all the html pages are built by Links.

You should be able to set yours up in a similar manner. This is pretty much a "standard" on any ISP that allows cgi.

I hope this helps.

------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/



[This message has been edited by Bobsie (edited February 23, 1999).]
Quote Reply
Re: Can't have data&html in cgi-bin In reply to
 
Quote:
I have never heard of (in reference to # 2 and 3) html in a cgi-bin directory except when a cgi script loads the html document.

Sad but true, some ISP's have set things up so:

http://www.server.com/cgi-bin/links/index.html

is perfectly ok. What's the point of a cgi-bin? Yikes..

Cheers,

Alex
Quote Reply
Re: Can't have data&html in cgi-bin In reply to
Thanks Bobsie and Alex. What I have done now is to install all the admin files in my docs directory instead of the cgi-bin (I would have liked them to be in the cgi-bin for security purposes) and it is working. I have my cgi files in the bin. I also had to change all the paths (full) to get the cgi's working.
======
Bobsie said,
I created a directory called "goodstuff" (instead of links)
======
I was calling mine sites(I already had a directory named links) instead of links, I don't know if this had anything to do with the setup going wrong, now I am calling it links.

Anyway it is working now.

I greatly appreciate your replies.