Gossamer Forum
Home : Products : Others : Fileman :

no cgi-bin, internal server error

Quote Reply
no cgi-bin, internal server error
Hello, I'm eager to try fileman out having seen it on a friend's system, but I'm having a few problems getting going:

- Firstly, I don't have a cgi-bin folder in my FTP. I do have a folder called cgi though, so...

- Having substituted the cgi-bin for cgi, I followed the instructions, and ran the install.cgi program, but I got a 500 internet server error.

in my cgi folder, there's 2 other files that were there originally: gdform.cgi and gdformssl.cgi.

I'm on a linux hosting system that's configured exactly like go-daddy, it has pearl installed.

What should I do? Please don't suggest changing hosting, that is not an option.
Quote Reply
Re: [Brenty] no cgi-bin, internal server error In reply to
Hi,

You may want to check the path to perl at the top of install.cgi. By default, I believe it is #!/usr/local/bin/perl, but your path could well be #!/usr/bin/perl.

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] no cgi-bin, internal server error In reply to
Thanks for your reply Andy, however, the path was already #!/usr/bin/perl

Here's the first line of the install.cgi file:

Code:
#!/usr/bin/perl


Here's the hosting documentation regarding Pearl and cgi paths:

Quote:

By default, you can publish your PERL files using one of the following file paths:
  • /home/content/u/s/e/username/html/file.pl
  • FTP to /file.pl
  • For hosting config 2.0, you can use any directory.

NOTE: You must specify execute permissions on the file before it will work.
If you have a CGI/Perl or Java enabled account, the system path to our Perl interpreter is:
#!/usr/bin/perl
CGI binaries must end in .cgi or .pl and must be in the /cgi directory for you to use. You cannot use /cgi-bin/ with our hosting system.
Example of a Test PERL Script
#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "Greetings user.\n";


I have uploaded the .cgi file in ASCII mode, and the DAT file in Binary mode. I've also set the permission of the install.cgi file to 755

I'm fairly proficient in php/html/csss, but this Pearl is a complete unknown to me. Just out of interest, I coped the code for the example given using notepad, called it greeting.cgi, uploaded it to the cgi folder, and got a 500 internal server error when I ran it from the browser. I have no idea what I'm doing. Frown

Last edited by:

Brenty: Aug 24, 2007, 4:20 AM
Quote Reply
Re: [Brenty] no cgi-bin, internal server error In reply to
Hi,

If you don't mind sending over FTP access and the URL it should be accessed on, I don't mind having a quick look for you. Chances are, if I can't get it working - then somethings up with your server =) (I've been installing/writing/customizing Perl scripts for almost 8 years now =))

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] no cgi-bin, internal server error In reply to
PM sent with FTP connection details. Many thanks for doing this.

Forgot to mention in the PM, login details are case sensitive, but you probably guessed that. Wink
Quote Reply
Re: [Brenty] no cgi-bin, internal server error In reply to
Hi,

I've just replied to your PM.

In short, your server doesn't seem to be accepting .cgi scripts. .pl works fine, but thats not a lot of good in this case =)

Good luck with getting your host to enable it (I tried adding an AddHandler line into a .htaccess file, but that didn't work - most likely because local .htaccess files are disabled on your host)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] no cgi-bin, internal server error In reply to
AH, I see, yes, I tried the greeting example file, with .pl as you had uploaded, and it does indeed work.

I'll contact hosting support and see what they say or better still can actually do.

What we've determined so far is that Pearl is working, but the cgi extension ain't performing right.

Perhaps all is not lost yet.

Many thanks again, I'll post an update as soon as I can.
Quote Reply
Re: [Brenty] no cgi-bin, internal server error In reply to
Hi,

No problem.

BTW, its Perl, not Pearl :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] no cgi-bin, internal server error In reply to
Im back with an update:

After a load of back and forth with technical support, they concluded that CGI was indeed working with my server, it was my configuration within the software that was wrong.

They posted a test file, which shows some difference in the configuration:

Code:
#!/usr/bin/perl -T

# File must be owned by the same user id/group of the ftp user.
# These lines will output error that would normally go to the error_log
# to the web browser.
# Also make sure that you have the file permissions set to 711
# ..but only if CGI::Carp is installed
#
use CGI;
use CGI::Carp qw(fatalsToBrowser set_message warningsToBrowser);
use CGI qw(:standard);
print header();
warningsToBrowser(1);
set_message("Somewhere, a CPU a crying.");
# A header must be sent to the browser before output
# for non-parsed output (text/html is parsed as html):
# print "Content-type: text/plain\n\n";
#
#print "Content-type: text/html\n\n";
# this is also handled via:
# print header();
print "Hello from CGI, the site is processing CGI without issues at this time.\n";


The first thing I notice is that there's a -T at the end of the first line!

This test script now works outside of the CGI folder, and runs as a .CGI application

The question now is, how do I integrate the above configuration into the install.cgi? I've added:
Code:
#!/usr/bin/perl -T

# File must be owned by the same user id/group of the ftp user.
# These lines will output error that would normally go to the error_log
# to the web browser.
# Also make sure that you have the file permissions set to 711
# ..but only if CGI::Carp is installed
#
use CGI;
use CGI::Carp qw(fatalsToBrowser set_message warningsToBrowser);
use CGI qw(:standard);
print header();
warningsToBrowser(1);
set_message("Somewhere, a CPU a crying.");
in place of the first line, I don't get any errors when I run install.cgi, but then again, I don't get anything else, just a blank screen and "Done" at the browser footer.

Where do I go from here?