[Gambas-user] Error 500 with web app gb-web-gui
alarch at alarch.pw
Thu Jun 2 16:18:54 CEST 2022
Le Thu, 2 Jun 2022 10:00:15 +0200,
Benoit Minisini <benoit.minisini at gambas-basic.org> a écrit :
> Le 01/06/2022 à 20:13, alarch at alarch.pw a écrit :
> > Hi,
> > I have a problem with the gb-web-gui component. I wanted to test
> > this component so I made a small cgi application and I installed it
> > on a web server configured with apache, in the cgi directory. As it
> > didn't work I thought that may app had a proble, so I compiled the
> > hello word page provided by the IDE when you choose a web
> > application with a form. Still no display.
> > So I decided to make a simple command line project which just
> > includes :
> > ' Gambas module file
> > Public Sub Main()
> > Print "Content-type: text/html;charset=utf-8"
> > Print "Content-Length: 383"
> > Print ""
> > Print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"
> > \"http://www.w3.org/TR/html4/strict.dtd\">" Print "<html
> > xmlns=\"http://www.w3.org/1999/xhtml\"
> > xmlns:v=\"urn:schemas-microsoft-com:vml\">"
> > Print "<head> <meta http-equiv=\"content-type\"
> > content=\"text/html; charset=utf-8\"> <meta
> > http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"></head >"
> > Print "<body>"
> > Print "<h1>Une simple page</h1>"
> > Print "<p>avec un pauvre petit texte</p>"
> > Print "</body>"
> > End
> It's 'gb.web' that is "PHP like".
> The 'gb.web.gui' component is another beast, even if it's still a CGI
> script for the HTTP server: it handle sessions with sub-processes, so
> you must be sure that the CGI script is run under a user that can do
> all that.
> I don't know the default configuration of Apache enough, so I can't
> tell you more at the moment.
Thanks for your answer,
I don't want to do php like ! My goal is to try to get rid of php... :-)
I compiled a .gambas executable with web-gui, which did not work.
I did the same thing with the old web-form and it works.
The machine on which the application should run is running with suexec
(I'm not sure if the client accepts a site without suexec). suexec is a
module that makes a site not run on the apache user but under the name
of a system user (present in /etc/passwd).
Maybe this causes some limitations that I don't know about. I'll look
I know that in the suexec logs I got error messages because it wants a
cgi program with 700 rights, if you leave a more permissive right it
Are there any fundamental differences in the way web-form and web-gui
work? In particular with regard to sub-processes? Maybe web-form
doesn't do things that web-gui tries to do and is blocked by suexec.
I will also try to do a test on a machine of mine that does not use
suexec to find out.
I'll let you know if I find any information about the special
configuration of gambas with apache2.
More information about the User