Author Topic: Script BASIC Distribution Clean-up  (Read 3758 times)

Offline AlyssonR

  • Advocate
  • Posts: 125
Script BASIC Distribution Clean-up
« on: August 20, 2016, 01:57:31 PM »
I was trying SB 2.0.0

I *will* try SB 2.2 - especially as it seems to have a much simpler install. Maybe in the morning.

What I would really like is a ready-built stack to install on my choice of systems

... oh dear, I hope I haven't just volunteered myself.  :o

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Script BASIC Distribution Clean-up
« Reply #1 on: August 20, 2016, 02:47:33 PM »
Quote
I was trying SB 2.0.0

That version is over 12 years old.

Quote
What I would really like is a ready-built stack to install on my choice of systems.

So would I.

Quote
... oh dear, I hope I haven't just volunteered myself.

Yep!  ;D

Actually my goal is to get Script BASIC included in a popular Linux distribution.


« Last Edit: August 20, 2016, 02:49:33 PM by John »

Offline AlyssonR

  • Advocate
  • Posts: 125
Re: Script BASIC Distribution Clean-up
« Reply #2 on: August 21, 2016, 07:05:35 AM »
12-year-old software doesn't faze me ... I still run a PDP 11-23 for some tasks, and that was built in 1979.

I'm just going to throw XAMPP on my development server and try to get SB2.2 running there.


At the moment, I'm still running Windows 7 and XP throughout, but that's mainly for a combination of convenience and compatibility with the rest of my systems and existing software - plus Remote Desktop is a tool I'm used to.

Once I've got my DB up and running, I'll probably throw together a Linux server to test and then host it -mind you, the last Linux server I built was running SuSE 6.something, so it'll be an adventure ... I wonder if a RasPi would be fast enough (which is where SB would *really* score).

Offline AlyssonR

  • Advocate
  • Posts: 125
Re: Script BASIC Distribution Clean-up
« Reply #3 on: August 21, 2016, 02:38:44 PM »
Well, XAMPP is up and running ...

it even attempts to execute CGI scripts - successfully in the case of Perl scripts, but with SB (sb64.exe, which runs okay via SymLink), I get:

Quote
Server error!

The server encountered an internal error and was unable to complete your request.

Error message:
couldn't create child process: 720002: cgitest.sb

If you think this is a server error, please contact the webmaster.
Error 500
127.0.0.1
Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.23

Which is an enormous step up from where I was 2 days ago when the stack wouldn't even accept that there was such a thing as CGI.


Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Script BASIC Distribution Clean-up
« Reply #4 on: August 21, 2016, 03:28:17 PM »
These tutorials might be helpful.

ScriptBasic CGI Programming Tutorial

CGI Programming II

I think your problem is with the Apache configuration and not authorizing SB as a CGI engine.

Offline AlyssonR

  • Advocate
  • Posts: 125
Re: Script BASIC Distribution Clean-up
« Reply #5 on: August 21, 2016, 03:34:12 PM »
The problem was in the included cgi.bas.  ???

By emitting a valid header manually, the test program executes and terminates cleanly - in both command-line and CGI modes.

*big shrug* It may be a quirk of a Windows 64 system running 32-bit Apache running a 64-bit scripting engine - I suspect that things were getting out of sync.

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Script BASIC Distribution Clean-up
« Reply #6 on: August 21, 2016, 07:07:52 PM »
You might be able to pull something like that off on Linux but Windows and 64 bit is uncharted territory.

I have a Windows 7 64 bit partition I use for Script BASIC 64 bit development. All external libraries and servers are 64 bit as well.

Under Linux (primary development environment) I have a VirtualBox running Windows 7 32 bit OS which I prefer over SysWOW64 as my XP migration path.
« Last Edit: August 21, 2016, 08:04:39 PM by John »

Offline AlyssonR

  • Advocate
  • Posts: 125
Re: Script BASIC Distribution Clean-up
« Reply #7 on: August 22, 2016, 03:46:27 AM »
For the most part, Win 7 (64 bit) is fairly well-behaved, but once in a while it decides that it will behave like an unruly child.

I had a little play with cgi.bas, and  almost anything I tried to do with it failed and crashed sb64.exe *shrugs*

Next I'll check the details of the configuration.

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Script BASIC Distribution Clean-up
« Reply #8 on: August 22, 2016, 04:19:56 AM »
It's been awhile since I fired up my Windows 7 64 bit partition to play with Script BASIC Windows 64.

I'll see if I can get 64 bit Apache and Script BASIC running in CGI mode. I don't use SB for CGI much anymore as it doesn't provide the session support the SBHTTPD multi-threaded proxy server offers using the MT extension module.
« Last Edit: August 22, 2016, 04:22:18 AM by John »

Offline AlyssonR

  • Advocate
  • Posts: 125
Re: Script BASIC Distribution Clean-up
« Reply #9 on: August 22, 2016, 09:37:57 AM »
XAMPP is just 32bit on Windows, sadly.

There are a few things that, from my POV, using CGI are convenient for - not the least of which is testing out data merge on form layouts (I want to be able to produce consistent results on templated output forms). The DB application will simply be run locally in the first instance.

Once I have abit of practice with SB, I will probably end up using the SBHTTP daemon for most of what I need to do.

At first glance, SB is able to do what I have been using Saxon to do in about a tenth of the time, and with a lot less mucking about with XSLT files, using a simple HTML template that can be tested on the fly, which means a whole lot.

Offline AlyssonR

  • Advocate
  • Posts: 125
Re: Script BASIC Distribution Clean-up
« Reply #10 on: August 22, 2016, 12:14:55 PM »
I have never, ever understood the mindset that denies the possibilities of cross-pollinating projects.

Of course, lack of interest has killed as many projects as over-possessiveness.

... and now, for some reason, I'm wondering if I can get SB running on a RasPi in order to get another of my projects back underway - I really detest trying to do stuff in Python.

Offline John

  • Forum Support / SB Dev
  • Posts: 2191
    • ScriptBasic Open Source Project
Re: Script BASIC Distribution Clean-up
« Reply #11 on: August 22, 2016, 12:18:10 PM »
I have compiled Script BASIC on Android Linux native with gcc and under Ubuntu Linux ARM.

Let me know if you need any help with that.

Offline AlyssonR

  • Advocate
  • Posts: 125
Re: Script BASIC Distribution Clean-up
« Reply #12 on: August 22, 2016, 12:31:19 PM »
That is encouraging ... but a project for another day (well, month or year). For now, the Pi-powered video eyepiece for my microscope is ... acceptable, if a little clunky.

What can I say - it was cheaper than spendinh 450 on an equivalent commercial product!