[Gambas-user] Running website from server

Ian ian.roper at ...1974...
Fri Jun 26 11:55:31 CEST 2015


Randel,
Don't forget to give your shell scripts an extension ie: myscript.gbw

Then let Apache ( or ngix ) know that it's a CGI script.

something like this: from the apache 000-default.conf on my web server

ScriptAlias /cgi-bin "/usr/lib/cgi-bin/"

     <Directory "/usr/lib/cgi-bin/">
            AllowOverride None
                 AddHandler cgi-script .gbw  .gambas
                 Options -Indexes +ExecCGI +FollowSymLinks
         Require all granted
     </Directory>


I've been able to get the single example to work but no other scripts 
formatted for gbw3 appear to do so.
I've been trying now for about 2 weeks with no success, so if you get it 
working can you please let me know how you did it.
Error logs from Apache give this as an error for any script ( other than 
the example)
"malformed header from script 'test3.gbw': Bad header: # Gambas Project 
File 3.0,"


I've also tried .gambas control line applications but same deal.
The Apache error log contains nothing and the access log seems to say 
that it functioned correctly.
But... the output is a blank page with no source code when you "view source"

One of the test scripts I've tried without any success.
========================
#!/usr/bin/gbw3

<%
private sRes As String
Exec ["cat", "/proc/meminfo"] To sRes
%>
<html><body>
<!-- Variable declaration must come before any HTML -->
<ul>
  <li><%= sRes %></li>
</ul>
</body></html>
===========================

Also ensure that the symbolic link for gbw3 is set in :
/usr/bin

ian at ...3489... /usr/bin $ ls -l gb*
-rwxr-xr-x 1 root root  31568 Jun 20 12:10 gba3
-rwxr-xr-x 1 root root 167184 Jun 20 12:10 gbc3
lrwxrwxrwx 1 root root     11 Jun 20 12:10 gbh3 -> gbh3.gambas
-rwxr-xr-x 1 root root  14873 Jun  7 21:26 gbh3.gambas
-rwxr-xr-x 1 root root  31392 Jun 20 12:10 gbi3
lrwxrwxrwx 1 root root      4 Jun 20 12:10 gbr3 -> gbx3
lrwxrwxrwx 1 root root     11 Jun  7 21:26 gbs3 -> gbs3.gambas
-rwxr-xr-x 1 root root  23230 Jun  7 21:26 gbs3.gambas
*lrwxrwxrwx 1 root root     11 Jun  7 21:26 gbw3 -> gbs3.gambas*
-rwxr-xr-x 1 root root 380664 Jun 20 12:10 gbx3


Also I've written a quick apache log viewer gambas app which will also 
give you the modules loaded using 'apachectl'.
Allow you to view the apache2.conf & the various other config files
If you want a copy drop me a line - it's a quick & dirty app to help me 
try an diagnose the issues I'm having
getting Gambas scripts to run.

If you have any success please let me know.
My Web server is Ubuntu 14.04
Gambas is 3.7.90


Cheers,
Ian Roper.

-----------------------------------------------------------

On 26/06/15 09:02, Randall Morgan wrote:
> ; This is the expected behavior I believe. You need to us gbw3 and not
> grbr3 to serve your your site. See the wiki:
> http://gambaswiki.org/wiki/doc/serverpage
>
> On Thu, Jun 25, 2015 at 11:35 AM, Moviga Technologies <moviga at ...3488...>
> wrote:
>
>>
>> Hi!
>>
>> I have made a website with Gambas, and uploaded it to my Ubuntu 15.04
>> VirtualBox server.
>>
>> As I run:
>>
>> $ gbr3 website.gambas --httpd
>>
>> it just spits out html markup in the console window...
>>
>>
>> ------------------------------------------------------------------------------
>> Monitor 25 network devices or servers for free with OpManager!
>> OpManager is web-based network management software that monitors
>> network devices and physical & virtual servers, alerts via email & sms
>> for fault. Monitor 25 devices for free with no restriction. Download now
>> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>
>




More information about the User mailing list