Forum Moderators: coopster & phranque

Message Too Old, No Replies

Html in the cgi-bin

how?

         

1goodpuppy

1:05 am on Sep 10, 2003 (gmt 0)

10+ Year Member



I am trying to install a script that calls for the cgi script as well as the html pages it creates to be in the same directory, however when I call one of these pages, I get a 500 error. If I move the pages out of the cgi-bin, I can call them fine, but the scripting won't work( creating new links and the like) any suggestions?

mack

1:48 am on Sep 10, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Are you refering to links 2 directory management script?

Mack.

Mr Anonymous

2:00 am on Sep 10, 2003 (gmt 0)

10+ Year Member



It might be that your server is set to parse all files in the "cgi-bin" directory as a .cgi / .pl file. If that is the case, why don't you talk to your server host or administrator to have him fix it.

1goodpuppy

2:04 am on Sep 10, 2003 (gmt 0)

10+ Year Member



no that isn't the script, it's called Where.

I don't think I can talk them into that. It's netfirms. I do have 2 other hosting accounts I could try it on. Thanks

Visit Thailand

2:50 am on Sep 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you CHMOD it?

1goodpuppy

1:42 am on Sep 11, 2003 (gmt 0)

10+ Year Member



Chmod what? The HTML or the script? Inside or out side of the bin?

I chmoded all files as the instructions said. If you know of a trick that might work, I'm willing to listen.

JollyK

10:22 pm on Sep 12, 2003 (gmt 0)

10+ Year Member



Best bet (I think) is to change the path to the HTML files in the script, and just put the HTML files outside the cgi-bin. As long as the HTML files and the cgi are on the same server, it shouldn't matter where they are in relation to each other. You just have to make sure to tell the CGI script where the HTML files are. (If the script is looking for a file called "filename.html" or "./filename.html" then you should be able to just edit it so that it looks for "../filename.html" or "/path/to/your/html/files/filename.html" instead.)

If your server is set up to think of everything in the cgi-bin as being a CGI, then you won't be able to have HTML files in there generally.

MonkeeSage

7:29 am on Sep 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If it is an Apache host, try adding an ascii file to the cgi-bin directory named .htaccess, containing this line...

AddType text/html html

...any files with the ".html" extension should work from the cgi-bin directory after that.

Jordan