11 August 2009, 07:27

I'm very happy happy to be testing Hiawatha, (today is the first time I had a closer look at it)

I've just made it run with squirrelmail and phpsysinfo.And I'd like to make it run with bindgraph.cgi (and mailgraph.cgi later), but Hiawatha complains about the first line of bindgraph.cgi :

Tue 11 Aug 2009 03:46:28 +0200||/var/www/hiawath /bindgraph.cgi|"-T" is on the #! line, it must also be used on the command line at /var/www/hiawatha/bindgraph.cgi line 1.

That first line looks like this :
#!/usr/bin/perl -Tw

If I remove the "-Tw" the page loads, but then there's no graphs visible anymore (And it produced graphs earlier with Cherokee webserver)

How to debug and solve this ?

Thanks a lot for developing this software!
(I'm especially interested in the security-features like preventing sql-injections, chroot and probably some other features)

Hiawatha version: 6.16
Operating System: Debian Lenny

11 August 2009, 08:02
In the meantime, mailgraph.cgi works nicely (producing graphs) with Hiawatha, but bindgraph.cgi (or gives the before mentioned (500) error with the "-Tw" inside the bindgraph.cgi script.
Without the "T", but with "-w" it loads the text but there are no graphs, and no errors in Hiawatha's error log.

I've just tested with lighttpd on another port, and lighttpd + bindgraph.cgi does show graphs (with the "-Tw" included) with
11 August 2009, 09:12
In the meantime I read this : which is interesting.
I realized that I forgot to include some error from the error log :

Tue 11 Aug 2009 07:06:39 +0200||/var/www/hiawatha/|"-T" is on the #! line, it must also be used on the command line at /var/www/hiawatha/ line 1.
Tue 11 Aug 2009 07:06:39 +0200||/var/www/hiawatha/|no output

Forgot to mention the "no output" error before.
But that makes me wonder why the bindgraph.cgi works fine in cherokee and lighttpd ?
Looks like it's not a system call problem inside Debian Lenny then.
Hugo Leisink
11 August 2009, 12:42
How did you configure the CGI execution for bindgraph? Via CGIextension or via CGIhandler?
11 August 2009, 20:42
I have used this :
CGIhandler = /usr/bin/perl:pl
CGIhandler = /usr/bin/perl:cgi

and, by the way, the mailgraph.cgi, which is succesfully showing graphs, is also a perl script.
And I've also succesfully tested some other very simple perl scripts (hello world alike).
Later on, when I have more time, I'd like to add code inside the to find out where the exact problem is.

( For anyone else who likes to test it, bindgraph is a debian package : )
Hugo Leisink
11 August 2009, 22:02
Oke. Please try the following. Remove the CGIhandler and add the following line to your configuration:
CGIextension = cgi, pl
12 August 2009, 00:35
Thanks. I just tried that, and it does execute the original bindgraph.cgi (with "-Tw") without errors, but no graphs show up, only text. No errors in the hiawatha error log (only access logged in acces.log).
And looking at /var/cache/bindgraph/ there's no new images created, so something goes wrong in the processing of that perl script.

But if you don't mind we can postpone this problem, because I realized that I can use lighttpd for this perl script, and I read in another thread on this forum that you (Hugo) don't like perl anyway.
The bindgraph is also just for internal usage (but was the easiest setup to test hiawatha with), so I better concentrate on replacing the lighttpd and apache setups for squirrelmail, postfixadmin, phplist, mailman with hiawatha web server.
Jay States
20 October 2009, 09:35
Does Hiawatha support ConnectTo name:sock?
Hugo Leisink
21 October 2009, 00:25
I don't think I understand what you mean.
6 March 2010, 17:37
he probably wonders if the php is spoken to in a named socket way or through tcp/ip
Hugo Leisink
6 March 2010, 18:15
Hiawatha supports UNIX and TCP sockets for connecting to a FastCGI daemon.
This topic has been closed.