GetDotted Domains

Viewing Thread:
"Freeola CGI script frustration"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Wed 04/02/09 at 00:28
Regular
Posts: 6
I'm having problem getting any CGI scripts to work on a Freeola hosted website.

I recently uploaded a basic, Hello World, script (as test.cgi) - so as to avoid any other technical issues -


#! /usr/bin/perl
print �"Content-type:text/htmlnn";
print �"<html><head><title>My First Script</title></head>nn";
print �"<body>n";
print �"<p>Hello world!</p>n";
print �"</body></html>";


[LATER EDIT - Note that backslashes were removed from n and nn at end of each line ...]

to the cgi-shl directory, chmoded the permissions to 777 but when I access www.mydomain.co.uk/cgi-bin/test.cgi I get a "404 Page Not Found" error.

A directory listing gives me ...

rwxrwxr-x 2 123456 1234 512 Feb 4 00:00 .
drwxrwxr-x 4 123456 1234 512 Oct 21 2001 ..
rwxr-xr-x 1 123456 1234 3480 Oct 21 2001 count.cgi
-rwxr-xr-x 1 123456 1234 26407 Jan 9 2002 formmail.cgi
-rwxrwxrwx 1 123456 1234 193 Feb 4 00:00 test.cgi

I've changed the Userid and Groupid numbers for privacy reasons.

I did try tech support a couple of years ago about this and they said that they couldn't really help with the scripts!!! I decided not to bother further at that time.

Anyone with any thoughts why this might be happening? It's not just that it's a Free Hosted site is it?

Thanks.
Thu 12/02/09 at 23:47
Regular
Posts: 6
Resolved: After an exchange of a few emails with the support team, when I was told again that the symbolic link in the htdocs folder was no longer required, my thanks to Matthew at Freeola for arranging to have the missing/deleted symbolic link recreated anyway. It looks something like ...

cgi-shl -> /freeola/users/6/5/sr0123456/cgi-shl

and now the scripts in the cgi-bin folder work again!
Fri 06/02/09 at 00:55
Regular
Posts: 6
I've just created a new site under one of the Freeola500 domains, and when I look at the htdocs folder, there's a symbolic link there called cgi-shl which is missing from the htdocs folder on the domain with the script problem. Can't work out how to recreate it myself, so guess that's up to Support to do ...
Thu 05/02/09 at 20:06
Regular
Posts: 6
Thanks. I've now created a .htaccess file, with a 404 Page Redirect to a custom page and that works fine, and after browsing through all the old messages on this chat forum resolved why my SSI date display wasn't working (pesky extra space!).

I still get the feeling that there's not a path from cgi-bin to cgi-shl, so maybe I'll call Support and see what they have to say this time. I guess I can refer them to this thread.
Thu 05/02/09 at 00:10
Regular
"But less irrational"
Posts: 13
mountainmad wrote:
> Thanks for the idea. I don't see a .htaccess file, but was able
> to create a .testfile which I do see OK through my ftp client. I
> wonder if that was deleted when I revamped the site? Should that
> be in the main htdocs directory, or at the level above?

A .htaccess file in the htdocs directory will apply to the whole site, although any subdirectory can have its own .htaccess file which will apply to it and all of its subdirectories.

If there's no .htaccess file in the htdocs directory, though, then its absence shouldn't be causing the problem.

Maybe after two years of experience, tech support might be able to help this time?
Wed 04/02/09 at 23:43
Regular
Posts: 6
Thanks for the idea. I don't see a .htaccess file, but was able to create a .testfile which I do see OK through my ftp client. I wonder if that was deleted when I revamped the site? Should that be in the main htdocs directory, or at the level above?
Wed 04/02/09 at 23:09
Regular
"But less irrational"
Posts: 13
There may be a bogus redirect in your .htaccess file in the htdocs directory. Depending on your FTP client, the file may or may not be visible, though.

As for the cgi-shl and cgi-bin directories, they should already be linked behind the scenes, so there's nothing more to be done there.
Wed 04/02/09 at 19:56
Regular
Posts: 6
Thanks for your help.

Apologies about the missing backslashes - I didn't notice that when I copied the script.

I changed the cgi-shl directory permissions to 755, but still get a 404 error. Should there be a symbolic link to point cgi-bin to cgi-shl, though I'd expect that to be a default setting in the server's config file?

drwxrwxr-x 4 123456 1234 512 Oct 21 2001 .
drwxrwxr-x 4 123456 1234 512 Oct 21 2001 ..
drwxr-xr-x 2 123456 1234 512 Feb 4 19:53 cgi-shl
drwxrwxr-x 7 123456 1234 1024 Feb 3 22:33 htdocs

I vaguely recall that before I took over maintaining the website the page counter script did work, and when I uploaded the redesigned site content I must have broken something without realising.

I also tried the other script (I've named it test2.cgi) but still get a 404 with this URL

http://www.glenandmountainguides.co.uk/cgi-bin/test2.cgi

Thanks
Wed 04/02/09 at 14:12
Regular
"But less irrational"
Posts: 13
mountainmad wrote:

> to the cgi-shl directory, chmoded the permissions to 777 but
> when I access www.mydomain.co.uk/cgi-bin/test.cgi I get a
> "404 Page Not Found" error.
>
> A directory listing gives me ...
>
>
> rwxrwxr-x 2 123456 1234 512 Feb 4 00:00 .
> drwxrwxr-x 4 123456 1234 512 Oct 21 2001 ..
> rwxr-xr-x 1 123456 1234 3480 Oct 21 2001
> count.cgi
> -rwxr-xr-x 1 123456 1234 26407 Jan 9 2002
> formmail.cgi
> -rwxrwxrwx 1 123456 1234 193 Feb 4 00:00 test.cgi
>


The recommended permissions for files and directories are 755.

On the VIP servers, 777 for test.cgi gives


Problem Running a Script...

([email protected]). /home/sites/vip....../cgi-bin/test.cgi is world writable


I no longer have access to the old SR servers, so I don't know if they are set up differently to give the same error message, 404, some other error message, or none at all.
Wed 04/02/09 at 08:22
Moderator
"Are you sure?"
Posts: 5,000
Hi - When I try running your script from my free Freeola site I get a '500 Server Error' - so I guess there's a problem with the script.
Where you are seeing a 404 error there must be a typo somewhere...

A quick Google to find a simple CGI script similar to yours for you to test found:

#!/usr/bin/perl
use CGI qw/:standard/;
print header,
start_html('Hello World'),
h1('Hello from www.hmmm.ip3.co.uk'),
end_html;

This works: www.hmmm.ip3.co.uk/cgi-bin/freeola-test.cgi

See if you can get that working on your site :¬)

EDIT:
Just tried your script again changing it by 'escaping the n's = [backslash]n'

#! /usr/bin/perl
print "Content-type:text/htmlnn";
print "My First Scriptnn";
print "n";
print "

Hello world!

n";
print "";

www.hmmm.ip3.co.uk/cgi-bin/freeola-test2.cgi
That works! :¬)

LAST EDIT:
Just noticed that the [backslash]n gets removed from the posts so perhaps your original post was meant to have the 'backslashes' in!
So this makes it look like a typo or you are putting the CGI script in the wrong place.
When you FTP to your web space you should be saving your scripts in the 'cgi-shl' directory.
Search Freeola Chat
Wed 04/02/09 at 00:28
Regular
Posts: 6
I'm having problem getting any CGI scripts to work on a Freeola hosted website.

I recently uploaded a basic, Hello World, script (as test.cgi) - so as to avoid any other technical issues -


#! /usr/bin/perl
print �"Content-type:text/htmlnn";
print �"<html><head><title>My First Script</title></head>nn";
print �"<body>n";
print �"<p>Hello world!</p>n";
print �"</body></html>";


[LATER EDIT - Note that backslashes were removed from n and nn at end of each line ...]

to the cgi-shl directory, chmoded the permissions to 777 but when I access www.mydomain.co.uk/cgi-bin/test.cgi I get a "404 Page Not Found" error.

A directory listing gives me ...

rwxrwxr-x 2 123456 1234 512 Feb 4 00:00 .
drwxrwxr-x 4 123456 1234 512 Oct 21 2001 ..
rwxr-xr-x 1 123456 1234 3480 Oct 21 2001 count.cgi
-rwxr-xr-x 1 123456 1234 26407 Jan 9 2002 formmail.cgi
-rwxrwxrwx 1 123456 1234 193 Feb 4 00:00 test.cgi

I've changed the Userid and Groupid numbers for privacy reasons.

I did try tech support a couple of years ago about this and they said that they couldn't really help with the scripts!!! I decided not to bother further at that time.

Anyone with any thoughts why this might be happening? It's not just that it's a Free Hosted site is it?

Thanks.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

I've been with Freeola for 14 years...
I've been with Freeola for 14 years now, and in that time you have proven time and time again to be a top-ranking internet service provider and unbeatable hosting service. Thank you.
Anthony
My website looks tremendous!
Fantastic site, easy to follow, simple guides... impressed with whole package. My website looks tremendous. You don't need to be a rocket scientist to set this up, Freeola helps you step-by-step.
Susan

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.