Author Topic: Segmentation Fault.  (Read 62372 times)

steven

  • Guest
Segmentation Fault.
« on: November 12, 2016, 11:26:43 AM »
Hey john,
just to recap in the email I sent, I tried running SBHTTPD using different distro's (debian 7.5 - 8.0 32 bit and 64 bit and ubuntu 16.04 x64) and i keep getting "Segmentation Fault". Scriba seems to work (although I did not really test it, but atleast I did not get that error) and i have been trying for over 6 hours.

So now I have ubuntu 16.04 x64 which is freshly installed. I think I am doing everything right, I put the files where your post says to put them, and the config i have seems to be right so I am truly in the dark why this is happening.

As I said I am using scriptbasic 2.2, I tried the downloads from your 2.2 download thread and even the ones which you zipped to help other users who were having the same error.

I doubt scriptbasic has any dependencies, but I guess it is worth to ask if it does?

Also does SBHTTPD need any environment variables to be set? I see you do mention it in a few threads but I did not think it is a must for me.

Also just a bit more info: I am trying to connect SBHTTPD on the vps so I can run scripts on the internet (I know its smarter/safer to run it locally, but I rather have it production ready since it is easier to me that way)

Thanks so much for the time you have taken to make scriptbasic, there are only a few recent posts here, but if I get this thing to finally run right I have no problems making updated how-to's (which I think would benefit since most of the examples and how-to are from years ago) and I will post some examples for others that can use it.

I truly like scriptbasic because it seems to be lightweight, I use to use php years ago but I found it to be really bloated and finding scriptbasic seemed to be a perfect alternative.


Support

  • Administrator
  • *****
  • Posts: 19
    • View Profile
Re: Segmentation Fault.
« Reply #1 on: November 12, 2016, 11:57:32 AM »
SBHTTPD is a HTTP web server that is usually a proxy to Apache as SBHTTPD doesn't handle media, only BASIC scripts. You need to access the SBHTTPD sever via a web browser.

Please post the configuration you are using now and I will help you try to straighten out.

steven

  • Guest
Re: Segmentation Fault.
« Reply #2 on: November 12, 2016, 12:29:15 PM »
Here is a config I was using, but I did try different things with no luck, but this is what I basically used:
Code: [Select]
dll ".so"
module "/usr/local/lib/scriba/"
include "/usr/share/scriba/include/"
docu "/usr/share/scriba/source/"
preproc (
  internal (
    dbg "/usr/local/lib/scriba/dbg.so"
   )
   )
maxstep 0
maxlocalstep 0
maxlevel 24847
maxmem 0
servers (
  server (
    port 8889
    ip "10.22.2.94"
    protocol "http"
   )
   )
  threads 20
  listenbacklog 30
  home "/usr/share/scriba/source/"
  proxyip 0
  pid (
    file "/var/log/scriba/pid.txt"
    delay 10
    wait (
      period 10
      length 1
     )
   )
  vdirs (
    dir "/cgi-bin/:/usr/share/scriba/source/"
   )
  client (
    allowed "0.0.0.0/0.0.0.0"
   )
  errmsgdest 3
  nolog 0
  log (
    panic (
      file "/var/log/scriba/panic.log"
     )
    app (
      file "/var/log/scriba/app.log"
     )
    err (
      file "/var/log/scriba/err.log"
     )
    hit (
      file "/var/log/scriba/hit.log"
     )
    stat (
      file "/var/log/scriba/stat.log"
     )
   )
  msg404 """
<HTML>
<HEAD>
<TITLE>Error 404 page not found</TITLE>
</HEAD>
<BODY>
<FONT FACE=\"Verdana\" SIZE=\"2\">
<H1>Page not found</H1>
We regretfully inform you that the page you have requested can not be found on this server.
<p>
In case you are sure that this is a server configuration error, please contact
<FONT SIZE=\"3\"><TT>root@localhost</TT></FONT>
</FONT>
</BODY>
</HTML>
 """
  code404 "200 OK"
 )


Support

  • Administrator
  • *****
  • Posts: 19
    • View Profile
Re: Segmentation Fault.
« Reply #3 on: November 12, 2016, 03:41:47 PM »
My localhost Apache / sbhttpd proxy setup is working fine on my box. Here is my basic.conf and Apache 000-default.conf proxy settings.

Script BASIC Config

dll ".so"
module "/home/jrs/sb/sb22/modules/"
include "/home/jrs/sb/sb22/include/"
maxinclude 100
maxstep 0
maxlocalstep 0
maxlevel 29666
maxmem 0
servers (
  server (
    port 8889
    ip "127.0.0.1"
    protocol "http"
   )
  threads 20
  listenbacklog 3
  home "/home/jrs/sbweb/"
  proxyip 1
  pid (
    file "/home/jrs/sblog/pid.txt"
    delay 10
    wait (
      period 10
      length 1
     )
   )
  errmsgdest 3
  nolog 0
  log (
    panic (
      file "/home/jrs/sblog/panic.log"
     )
    app (
      file "/home/jrs/sblog/app.log"
     )
    err (
      file "/home/jrs/sblog/err.log"
     )
    hit (
      file "/home/jrs/sblog/hit.log"
     )
    stat (
      file "/home/jrs/sblog/stat.log"
     )
   )
  msg404 """
<HTML>
<HEAD>
<TITLE>Error 404 page not found</TITLE>
</HEAD>
<BODY>
<FONT FACE=\"Verdana\" SIZE=\"2\">
<H1>Page not found</H1>
We regretfully inform you that the page you have requested can not be found on this server.
<p>
In case you are sure that this is a server configuration error, please contact
<FONT SIZE=\"3\"><TT>root@localhost</TT></FONT>
</FONT>
</BODY>
</HTML>
 """
  code404 "200 OK"
 )


Apache

ProxyRequests Off
ProxyPass /home/ http://127.0.0.1:8889/
ProxyPassReverse /home/ http://127.0.0.1:8889/


sudo sbhttpd -start

I have found that the configuration file's default location assumed is /ect/scriba/.

Attached is my working Linux 64 bit sbhttpd.
« Last Edit: November 12, 2016, 05:01:56 PM by support »

steven

  • Guest
Re: Segmentation Fault.
« Reply #4 on: November 12, 2016, 05:20:10 PM »
Awesome!

I think it was the way I had the modules and other files set (in multiple posts it gives a structure where the files should be) but by me using the /home/ folder it now works.

This is strange why this happened, but all is good, SBHTTPD seems to be working.

Thanks so much for the help!

Support

  • Administrator
  • *****
  • Posts: 19
    • View Profile
Re: Segmentation Fault.
« Reply #5 on: November 12, 2016, 05:26:18 PM »
I'm glad you got it running.

Have fun!