[Gambas-user] CGI program in Gambas

Benoît Minisini gambas at ...1...
Mon Aug 3 21:36:11 CEST 2009


> Benoit,
>
>
> I never write asp cgi but only cgi unix script. I understand completly
> the concept of this one.
> I try the little example that I found on the Gambas web site:
>
> #!/usr/bin/env gbw2
> <%
> DIM sEnv AS String
> %>
>
> <!-- Variable declaration must come before any HTML -->
>
> <html>
>
> <h2>CGI script environmental variables</h2>
>
> <table border="1" cellspacing="0" cellpadding="2">
>
>    <tr>
>      <th align="left">Name</th>
>      <th align="left">Value</th>
>    </tr>
>
> <% FOR EACH sEnv IN Application.Env %>
>    <tr valign="top">
>      <td><%= sEnv %></td>
>      <td><%= Application.Env[sEnv] %> </td>
>    </tr>
> <% NEXT %>
>
> </table>
>
> </html>
>
>
> It works fine on console but not over Apache server.
> It can find the gbw2 link on my system with or without writing the
> full path of
> of the link. On my system it's: /usr/local/bin/gbw2  -> /usr/local/bin/
> gbs2
>
> How can I add the path to this link in the environment used when the
> cgi is executed ?
>
> Olivier Cruilles
> Mail: linuxos at ...1896...
>

"/usr/bin/env gbw2" looks for "gbw2" in the PATH environment variable. Check 
that Apache does not clear it, so that it cannot be found.

-- 
Benoît




More information about the User mailing list