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.
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.
cgi-shl -> /freeola/users/6/5/sr0123456/cgi-shl
and now the scripts in the cgi-bin folder work again!
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.
> 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?
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.
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
> 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.
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 "
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
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.