Gossamer Forum
Home : General : Perl Programming :

May sound like a dumb problem

Quote Reply
May sound like a dumb problem
Hello,
I have just regestered with a new host using UNIX and can not seem to get my perl scripts to execute, so I have now turned to professional in their trades.

the problem is that my scripts are being displayed as text files and not executing. A quick look will give you an idea, www.causeandfx.org.uk/cgi-bin/hello.cgi

using the command 'which perl' in telnet, gives /usr/bin/perl

I have set default setting for transfer to Ascii and have ensured it is transfering in ascii.

Directory listing
-rwxr-xr-x 1 domain62 vweb 211 May 14 00:13 hello.cgi

I have set permission to 755 and verified this with the above directory listing.

I have debugged the program through perl with the command 'perl -d hello.cgi' and no errors where report and worked fine.

is there anything that I am missing or is it a more serious issue.
thanks
jon
Quote Reply
Re: [TokyoJon] May sound like a dumb problem In reply to
Hey Jon,

It looks like Apache isn't set up correctly to parse perl scripts. Change the extension to .pl and see what you get. I'd contact your host and have them double check your setup.

~Charlie
Quote Reply
Re: [Chaz] May sound like a dumb problem In reply to
Thanks for the reply, I have tried both .pl and .cgi as the extension and still the same, it is just not executing the script.Frown
Quote Reply
Re: [TokyoJon] May sound like a dumb problem In reply to
For a test, make a .htaccess file, and put the following in it;

Code:
AddHandler cgi-script .pl .cgi

Then upload it to the folder where you are trying to run hello.cgi. Any joy then?

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] May sound like a dumb problem In reply to
Cheers for the help,
I have created .htaccess files and placed them in all directories just for good measure, but still no joy. I tryed adjusting the file to redirect a webpage and that even failed.

this is an extract from my host (www.streamlinenet.co.uk)
The version of Linux currently running on the virtual Linux Servers is Redhat Linux 7.2 with version 1.3 of Apache

Does this help to narrow the issue.
Quote Reply
Re: [TokyoJon] May sound like a dumb problem In reply to
It still looks like Apache isn't set up correctly to parse Perl scripts. The .htaccess trick that Andy suggested may need to be applied to the httpd.conf instead. Apache may be configured to not allow .htaccess overrides. Have you contacted your host yet?

~Charlie