[Starkit] Re: starpack as cgi

David Welton davidnwelton at gmail.com
Wed Jun 8 12:49:36 CEST 2005


Hi... resending this after subscribing to the list.  Would be nice to
set the list up so as to be able to mod non-subscribers through, but I
suppose that's also time consuming.

On 6/7/05, David Welton <davidnwelton at gmail.com> wrote:

> Hi, going off a wiki page, I thought I'd take this to email:
> 
>     * How does one make a CGI ? I checked out
> http://www.equi4.com/259, but I still get:
> 
>     application-specific initialization failed: couldn't open
> "setup.tcl": no such file or directory
> 
> What's really weird is that if I copy the starpack to /usr/bin, so
> that it's in the path, things seem to work.
> 
> 
> > Permissions: sounds like tclkit cannot re-open itself for reading, needed to get at > the embedded runtime files -jcw
> 
> The thing that I don't quite buy about that is that this works as 'protect.cgi':
> 
> #!/home/vhosts/blahblah/main_cgi/protect
> 
> Whereas if I move protect to protect.cgi, it doesn't work.
> Permissions are as follows:
> 
> -rwxr-xr-x  1 root   root   1692008 Jun  7 19:33 protect
> -rwxr-xr-x  1 blah sscusr      48 Jun  7 19:05 protect.cgi
> 
> I did some straceing of it too, and can provide that on request... the
> salient bit seems to be this, though:
> 
> 26164 execve("/usr/lib/cgi-bin/prova.cgi", ["prova.cgi"], [/* 25 vars */]) = 0
> ....
> 26164 access("/usr/local/sbin/prova.cgi", X_OK) = -1 ENOENT (No such file or dir
> ectory)
> 26164 access("/usr/local/bin/prova.cgi", X_OK) = -1 ENOENT (No such file or dire
> ctory)
> 26164 access("/usr/sbin/prova.cgi", X_OK) = -1 ENOENT (No such file or directory
> )
> 26164 access("/usr/bin/prova.cgi", X_OK) = -1 ENOENT (No such file or directory)
> 26164 access("/sbin/prova.cgi", X_OK)   = -1 ENOENT (No such file or directory)
> 26164 access("/bin/prova.cgi", X_OK)    = -1 ENOENT (No such file or directory)
> 26164 access("/usr/bin/X11/prova.cgi", X_OK) = -1 ENOENT (No such file or direct
> ory)
> 26164 access("/usr/local/sbin/prova.cgi", X_OK) = -1 ENOENT (No such file or dir
> ectory)
> 26164 access("/usr/local/bin/prova.cgi", X_OK) = -1 ENOENT (No such file or dire
> ctory)
> 26164 access("/usr/sbin/prova.cgi", X_OK) = -1 ENOENT (No such file or directory
> )
> 26164 access("/usr/bin/prova.cgi", X_OK) = -1 ENOENT (No such file or directory)
> 26164 access("/sbin/prova.cgi", X_OK)   = -1 ENOENT (No such file or directory)
> 26164 access("/bin/prova.cgi", X_OK)    = -1 ENOENT (No such file or directory)
> 26164 access("/usr/bin/X11/prova.cgi", X_OK) = -1 ENOENT (No such file or direct
> ory)
> 
> ....
> 
> 
> 26164 getcwd("/usr/lib/cgi-bin", 4096)  = 17
> 26164 lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> 26164 lstat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=40960, ...}) = 0
> 26164 lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> 26164 lstat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=40960, ...}) = 0
> 26164 lstat64("/usr/lib/cgi-bin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> 26164 open("/usr/lib/cgi-bin/setup.tcl", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No s
> uch file or directory)
> 26164 _llseek(2, 0, [0], SEEK_CUR)      = 0
> 26164 ioctl(2, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbffff798) = -1 ENOTTY (Inappropr
> iate ioctl for device)
> 26164 getsockname(2, 0xbffff860, [16])  = -1 ENOTSOCK (Socket operation on non-s
> ocket)
> 26164 write(2, "application-specific initialization failed: ", 44) = 44
> 26164 write(2, "couldn\'t open \"setup.tcl\": no such file or directory", 52) =
> 52
> 
> So... I have a workaround, but I'm not satisfied, I'd like to figure
> out what's going wrong.  But I don't know enough about starpacks to
> know exactly where to dig.

Thanks for your time and any light you might shed on things,
-- 
David N. Welton
 - http://www.dedasys.com/davidw/

Apache, Linux, Tcl Consulting
 - http://www.dedasys.com/


More information about the Starkit mailing list