[Gambas-user] Using Gambas for Apache cgi

Rolf-Werner Eilert eilert-sprachen at ...221...
Thu Sep 20 12:35:45 CEST 2012



Am 20.09.2012 10:27, schrieb Rolf Schmidt:
> Hi Rolf-Werner,
>
>>>> But Apache has some problem with it. I configured the cgi-bin as above
>>>> (actually not me, but it's the default). Apache looks for it and
>>>> seemingly it DOES find it but it complaints with a 500 Internal Error
>>>> page and in /var/log/apache2/suexec.log we can read something about
>>>> gid/uid mismatch.
>>>
>>> All files must be accessible by the user/group the apache is running
>>> with. On Debian systems it is www-data:www-data. Make a chown on your
>>> files. Never give the files executable right for everybody.
>>
>> Just tried it this way, but it doesn't help. Strange...
>>
>> You mean the .gambas files, right? Not env, gbr, gbx etc.?
>>
>> There is a test/test.cgi in the cgi-bin, it's not www-data:www-data and
>> it runs fine. The .gambas file does run when started from a terminal, so
>> the Gambas side seems to work fine. Apache seems to find the .gambas
>> file and start it. It all boils down to some misunderstanding of Apache
>> with how to handle it.
>
> Try to login as root and than do a "su - apache" or to the system
> account the apache runs under (perhaps you can find the account in "top"
> or with "ps"). Then start you program in the terminal - you now have all
> the rights an apache server has - and see what happens. Helpfull may be
> a "tail -f" on the apache error file, to see what goes wrong, when you
> do some thing. This is a method to check if you have problems with
> user/group rights, as the error message you posted suggests.
>
> Grüße
> Rolf
>

Yes :-) This is exactly what I tried yesterday and it runs flawlessly. 
Just tried it again to be sure now. It prints the HTML page into the 
terminal and stops without any error message.

Really weird...

Rolf




More information about the User mailing list