Forum

Cant run perl files without extension

Julian Coccia
16 December 2008, 22:57
Hi there!

I have installed Hiawatha lately and it has worked great with PHP via fcgi. Great work !!!

Now I'm trying to install a perl application but I have an issue. The perl script names don't have an extension, and Hiawatha expects a file extension in the CGIhandler configuration variable, i.e CGIhandler = /usr/bin/perl:pl

I have tried with /usr/bin/perl:pl and /usr/bin/perl:pl, and even /usr/bin/perl:pl,,perl but I can't get it to work.

Is there a special way to express that I want files without any extension?

Cheers,
Julian
Hugo Leisink
17 December 2008, 00:25
What you can try is this:
CGIhandler = /usr/bin/perl:pl
NoExtension = pl


See the manual page for more information about the NoExtension setting.
Angie
10 January 2009, 08:57
Hi!

I am a newbie. Started using Hiawatha last quarter last year.
I also have php code inside files without extension. How do I specify no extension in Hiawatha?
I already tried:

CGIhandler = /usr/local/sbin/php-fcgi:php
NoExtension = php

I placed NoExtension = php inside FastCGIserver {}. Also tried placing Extension = "", *


Thanks in advance,

Angie


Hugo Leisink
10 January 2009, 10:57
The configuration lines
CGIhandler = /usr/local/sbin/php-cgi:php
NoExtension = php

should do the trick. Have you restarted the webserver after changing the configuration? What version of Hiawatha are you using?
Angie
10 January 2009, 19:22

Hello again,

Thanks for replying. I am currently using Hiawatha 6.0.
After setting :

CGIhandler = /usr/local/sbin/php-fcgi:php
NoExtension = php

I restarted the Hiawatha webserver but still my php codes were not executed.
My "NoExtension = php" is inside FastCGIserver {}. Is that where it should be?

Thanks,

Angie


Hugo Leisink
11 January 2009, 01:14
Please, update to the latest version of Hiawatha, which is 6.11 at the moment.
Angie
17 January 2009, 03:50
Hello again Sir,

I am currently using FreeBSD. The only latest hiawatha version available in the FreeBSD port
is Hiawatha 6.10. Is my problem on extension already fixed with that version or I really have to
install 6.11 version?

Thanks again,

Angie

Hugo Leisink
17 January 2009, 09:25
You can at least try I will update the FreeBSD port soon.
Angie
17 January 2009, 10:26

Just finished installing and configuring hiawatha 6.10 on my machine but sadly,

CGIhandler = /usr/local/sbin/php-fcgi:php
NoExtension = php

still doesn't work
Hugo Leisink
17 January 2009, 19:07
Ah, I see where the problem is. You are using php-fcgi which comes with Hiawatha as a CGI handler. That's not PHP! It's a tool to run PHP as a FastCGI daemon. You should install PHP and use the php-cgi binary of the PHP package.
Menno Ter Haseborg
17 November 2009, 15:31
I try to run shell script without a extension . Version I use is v6.16 under puppy .
NoExtension = gives a error it seem to be NoExtensionAs = .
I defined NoExtensionAs = dbNN , dbNN is a small script :
<quote>
#!/bin/sh
QUERY_STRING="dbNN"
./genhtml.exp
</quote>
It display it as text and dossn't execute . Can You help me to understand what the NoExtensionAs does .

Hugo Leisink
17 November 2009, 15:48
What you want is Hiawatha to treat files without an extension as a CGI which can be run directly, thus without a parser. Use CGIextension to define the extenion for CGIs which can be run directly and tell Hiawatha to treat files without an extension as if they had the .cgi extension.

NoExtensionAs takes an extension as a parameter. It makes Hiawatha treat extensionless files as if they had that extension.

Try the following configuration:
CGIextension = cgi
NoExtensionAs = cgi
Menno Ter Haseborg
18 November 2009, 19:54
I have done what you sayed see snip:

CGIhandler = /usr/local/bin/php-cgi:php
CGIhandler = /usr/bin/perl:pl
CGIextension = bin,exp,ex,dbNN,escheidsNN,escholenNN
NoExtensionAs = dbNN,escheidsNN,escholenNN
ExecuteCGI = yes

I tryed : http:// ..... /dbNN , the source of the script is shown .

I changed it into dbNN.exp and give http:// .... /dbNN.exp and it works it executes the script .

What did I wrong ?

(Ik ben niet de slimste , maar dit snap ik niet .)
Hugo Leisink
18 November 2009, 23:05
NoExtensionAs takes only ONE extension as a parameter. How must Hiawatha otherwise know which extension to use? Pick one of the three extensions. Since they all are parameters of CGIextension, it will work.
This topic has been closed.