Author Topic: $10 Linux PC  (Read 405 times)

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
$10 Linux PC
« on: March 02, 2025, 12:55:34 AM »
I compiled ScriptBasic for the RPi Zero W1 which is a 32 bit version of Raspian (Debian). I've mounted my RPi Zero on a frame that allows the USB connector to provide power. I use the WIFI on the board to connect to my router. I use Windows PowerShell to communicate with it via SSH. I have the Apache web server running on the RPi Zero as well. The attached scrrenshot is phpmyadmin (MySQL browser) running on Apache. Applications I create with ScriptBasic (console / web) on the RPi Zero will run on Windows (32/64) and Linux 64 bit untouched.

You can find the original RPi Zero W1 for $10 on the internet.

UPDATE
The ScriptBasic 3.0 sb-dev-msvc repo doesn't build scriba or libscriba in 32 bit so it works. It seems to have string referencing problems. All the extension modules seem to work. I had to go back to the 2.1 repo (added 3.0 fixes) to get a 32 bit Raspian OS build to work. My guess is this was a result of AIR's changes getting 64 bit Windows to work. At this point all my test scripts seem to work. Linux on a USB stick  8)

Code: Text
  1. pi@raspberrypi:~/sb-dev-msvc $ ./setup
  2. This is unix cwd=/home/pi/sb-dev-msvc/
  3. creating configure.jim
  4. creating subdirectories for compilation output files
  5. compiling Makefile using the Jamal preprocessor
  6. running syntaxer.pl to generate the syntax defintion C language tables from syntax.def
  7. running generrh.pl to generate the error messages from errors.def
  8. running lmt_make.pl for all lmt*.def files
  9. scanning all subdirectories to find all C source files
  10. there are 3639 files in the source tree
  11. there are 118 C source files in the source tree
  12. configuring module t
  13. This is unix cwd=/home/pi/sb-dev-msvc/
  14. executing headerer for the C files
  15. extracting header from interface.c
  16. creating the module object directory
  17. Processing jamal files creating makefile
  18. Module was compiled fine
  19. configuring module odbc
  20. ar: creating /home/pi/sb-dev-msvc/bin/mod/lib/odbc.a
  21. This is unix cwd=/home/pi/sb-dev-msvc/
  22. executing headerer for the C files
  23. extracting header from interface.c
  24. creating the module object directory
  25. Processing jamal files creating makefile
  26. Module was compiled fine
  27. configuring module hash
  28. This is unix cwd=/home/pi/sb-dev-msvc/
  29. executing headerer for the C files
  30. extracting header from interface.c
  31. creating the module object directory
  32. Processing jamal files creating makefile
  33. Module was compiled fine
  34. configuring module cio
  35. This is unix cwd=/home/pi/sb-dev-msvc/
  36. The module cio is not for unix.
  37. executing headerer for the C files
  38. extracting header from interface.c
  39. creating the module object directory
  40. Processing jamal files creating makefile
  41. configuring module gmp2
  42. This is unix cwd=/home/pi/sb-dev-msvc/
  43. executing headerer for the C files
  44. extracting header from interface.c
  45. creating the module object directory
  46. Processing jamal files creating makefile
  47. Module was compiled fine
  48. configuring module curl
  49. This is unix cwd=/home/pi/sb-dev-msvc/
  50. executing headerer for the C files
  51. extracting header from interface.c
  52. creating the module object directory
  53. Processing jamal files creating makefile
  54. Module was compiled fine
  55. configuring module cgi
  56. This is unix cwd=/home/pi/sb-dev-msvc/
  57. executing headerer for the C files
  58. extracting header from cgi.c
  59. extracting header from interface.c
  60. creating the module object directory
  61. Processing jamal files creating makefile
  62. Module was compiled fine
  63. configuring module mysql
  64. This is unix cwd=/home/pi/sb-dev-msvc/
  65. executing headerer for the C files
  66. extracting header from interface.c
  67. creating the module object directory
  68. Processing jamal files creating makefile
  69. Module was compiled fine
  70. configuring module sdbg
  71. This is unix cwd=/home/pi/sb-dev-msvc/
  72. executing headerer for the C files
  73. extracting header from sdbg_con.c
  74. extracting header from interface.c
  75. creating the module object directory
  76. Processing jamal files creating makefile
  77. Module was compiled fine
  78. configuring module sqlite
  79. This is unix cwd=/home/pi/sb-dev-msvc/
  80. executing headerer for the C files
  81. extracting header from interface.c
  82. creating the module object directory
  83. Processing jamal files creating makefile
  84. Module was compiled fine
  85. configuring module nt
  86. This is unix cwd=/home/pi/sb-dev-msvc/
  87. The module nt is not for unix.
  88. executing headerer for the C files
  89. extracting header from interface.c
  90. creating the module object directory
  91. Processing jamal files creating makefile
  92. configuring module mt
  93. This is unix cwd=/home/pi/sb-dev-msvc/
  94. executing headerer for the C files
  95. extracting header from interface.c
  96. creating the module object directory
  97. Processing jamal files creating makefile
  98. Module was compiled fine
  99. configuring module sbt
  100. This is unix cwd=/home/pi/sb-dev-msvc/
  101. executing headerer for the C files
  102. extracting header from interface.c
  103. creating the module object directory
  104. Processing jamal files creating makefile
  105. Module was compiled fine
  106. configuring module curses
  107. This is unix cwd=/home/pi/sb-dev-msvc/
  108. executing headerer for the C files
  109. extracting header from interface.c
  110. creating the module object directory
  111. Processing jamal files creating makefile
  112. Module was compiled fine
  113. configuring module dbg
  114. This is unix cwd=/home/pi/sb-dev-msvc/
  115. executing headerer for the C files
  116. extracting header from interface.c
  117. extracting header from dbg_con.c
  118. creating the module object directory
  119. Processing jamal files creating makefile
  120. Module was compiled fine
  121. configuring module mxml
  122. This is unix cwd=/home/pi/sb-dev-msvc/
  123. executing headerer for the C files
  124. extracting header from mxml-file.c
  125. extracting header from mxml-string.c
  126. extracting header from mxml-index.c
  127. extracting header from mxml-private.c
  128. extracting header from mxml-get.c
  129. extracting header from mxml-entity.c
  130. extracting header from mxml-search.c
  131. extracting header from mxml-node.c
  132. extracting header from interface.c
  133. extracting header from mxml-set.c
  134. extracting header from mxml-attr.c
  135. creating the module object directory
  136. Processing jamal files creating makefile
  137. Module was compiled fine
  138. configuring module slre
  139. This is unix cwd=/home/pi/sb-dev-msvc/
  140. executing headerer for the C files
  141. extracting header from slre.c
  142. extracting header from interface.c
  143. creating the module object directory
  144. Processing jamal files creating makefile
  145. Module was compiled fine
  146. configuring module ip
  147. This is unix cwd=/home/pi/sb-dev-msvc/
  148. executing headerer for the C files
  149. extracting header from interface.c
  150. extracting header from iptools.c
  151. creating the module object directory
  152. Processing jamal files creating makefile
  153. Module was compiled fine
  154. configuring module ux
  155. This is unix cwd=/home/pi/sb-dev-msvc/
  156. executing headerer for the C files
  157. extracting header from interface.c
  158. creating the module object directory
  159. Processing jamal files creating makefile
  160. Module was compiled fine
  161. configuring module ftpd
  162. This is unix cwd=/home/pi/sb-dev-msvc/
  163. The module ftpd is not for unix.
  164. executing headerer for the C files
  165. extracting header from interface.c
  166. creating the module object directory
  167. Processing jamal files creating makefile
  168. configuring module dyc
  169. This is unix cwd=/home/pi/sb-dev-msvc/
  170. The module dyc is not for unix.
  171. executing headerer for the C files
  172. extracting header from interface.c
  173. creating the module object directory
  174. Processing jamal files creating makefile
  175. configuring module zlib
  176. This is unix cwd=/home/pi/sb-dev-msvc/
  177. executing headerer for the C files
  178. extracting header from interface.c
  179. creating the module object directory
  180. Processing jamal files creating makefile
  181. Module was compiled fine
  182. configuring module json
  183. This is unix cwd=/home/pi/sb-dev-msvc/
  184. executing headerer for the C files
  185. extracting header from parson.c
  186. extracting header from interface.c
  187. creating the module object directory
  188. Processing jamal files creating makefile
  189. Module was compiled fine
  190. configuring module trial
  191. This is unix cwd=/home/pi/sb-dev-msvc/
  192. executing headerer for the C files
  193. extracting header from interface.c
  194. creating the module object directory
  195. Processing jamal files creating makefile
  196. Module was compiled fine
  197. configuring module webext
  198. This is unix cwd=/home/pi/sb-dev-msvc/
  199. executing headerer for the C files
  200. extracting header from hmac_sha256.c
  201. extracting header from sha256.c
  202. extracting header from interface.c
  203. creating the module object directory
  204. Processing jamal files creating makefile
  205. Module was compiled fine
  206. making compile command file(s)
  207. starting compilation
  208. ScriptBasic v3.0
  209. Variation >>STANDARD<< build 1
  210. Magic value 859011896
  211. Node size is 24
  212. Extension interface version is 11
  213. Compilation: Feb 28 2025 18:18:44
  214. scriba executable OK
  215. sbhttpd executable OK
  216. libscriba library OK
  217. MODULE t:        dll OK   lib OK   bas OK
  218. MODULE odbc:     dll OK   lib OK   bas OK
  219. MODULE hash:     dll OK   lib OK   bas OK
  220. MODULE gmp2:     dll OK   lib OK   bas OK
  221. MODULE curl:     dll OK   lib OK   bas OK
  222. MODULE cgi:      dll OK   lib OK   bas OK
  223. MODULE mysql:    dll OK   lib OK   bas OK
  224. MODULE sdbg:     dll OK   lib OK   bas OK
  225. MODULE sqlite:   dll OK   lib OK   bas OK
  226. MODULE mt:       dll OK   lib OK   bas OK
  227. MODULE sbt:      dll OK   lib OK   bas OK
  228. MODULE curses:   dll OK   lib OK   bas OK
  229. MODULE dbg:      dll OK   lib OK   bas OK
  230. MODULE mxml:     dll OK   lib OK   bas OK
  231. MODULE slre:     dll OK   lib OK   bas OK
  232. MODULE ip:       dll OK   lib OK   bas OK
  233. MODULE ux:       dll OK   lib OK   bas OK
  234. MODULE zlib:     dll OK   lib OK   bas OK
  235. MODULE json:     dll OK   lib OK   bas OK
  236. MODULE trial:    dll OK   lib OK   bas OK
  237. MODULE webext:   dll OK   lib OK   bas OK
  238. pi@raspberrypi:~/sb-dev-msvc $
  239.  
« Last Edit: March 10, 2025, 11:26:43 PM by John Spikowski »

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
Re: $10 Linux PC
« Reply #1 on: March 06, 2025, 03:56:51 AM »
You can get the RPi Zero adapter I used on Amazon.

GeekPi USB Dongle

I ordered a RPi Zero 2 which is a 64 bit processor and runs Ubuntu server. I ordered another GeekPi USB dongle for it.

Hopefully sb-dev-msvc (ScriptBasic 3.0) will work without issue on this 64 bit processor.

RPi Zero 2 Review

Attach is a screenshot of using ConnectBot to communicate with my RPi Zero.

« Last Edit: March 07, 2025, 03:42:27 AM by John Spikowski »

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
Re: $10 Linux PC
« Reply #2 on: March 08, 2025, 11:17:56 PM »
I received my RPi Zero 2 today.

Code: Text
  1. Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 6.8.0-1020-raspi aarch64)
  2.  
  3.  * Documentation:  https://help.ubuntu.com
  4.  * Management:     https://landscape.canonical.com
  5.  * Support:        https://ubuntu.com/pro
  6.  
  7.  System information as of Sat Mar  8 23:12:16 UTC 2025
  8.  
  9.   System load:            0.19
  10.   Usage of /:             0.5% of 468.81GB
  11.   Memory usage:           45%
  12.   Swap usage:             0%
  13.   Temperature:            47.8 C
  14.   Processes:              136
  15.   Users logged in:        1
  16.   IPv4 address for wlan0: 10.0.0.237
  17.   IPv6 address for wlan0: 2601:602:401:d780::5305
  18.   IPv6 address for wlan0: 2601:602:401:d780:2ecf:67ff:fe26:c34c
  19.  
  20.  
  21. Expanded Security Maintenance for Applications is not enabled.
  22.  
  23. 0 updates can be applied immediately.
  24.  
  25. Enable ESM Apps to receive additional future security updates.
  26. See https://ubuntu.com/esm or run: sudo pro status
  27.  
  28.  
  29. Last login: Sat Mar  8 23:10:41 2025 from 10.0.0.66
  30. jrs@RPi-Zero2:~$
  31.  
« Last Edit: March 09, 2025, 12:06:13 AM by John Spikowski »

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
Re: $10 Linux PC
« Reply #3 on: March 09, 2025, 02:06:18 AM »
The sb-dev-msvc repo source works on the RPI Zero 2. It seems 32 bit OSs have an issue with ScriptBasic 3.0.

Code: [Select]
ScriptBasic v3.0
Variation >>STANDARD<< build 1
Magic value 859003705
Node size is 24
Extension interface version is 11
Compilation: Mar  9 2025 01:28:54
scriba executable OK
sbhttpd executable OK
libscriba library OK
MODULE webext:   dll OK   lib OK   bas OK
MODULE slre:     dll OK   lib OK   bas OK
MODULE mt:       dll OK   lib OK   bas OK
MODULE sbt:      dll OK   lib OK   bas OK
MODULE mysql:    dll OK   lib OK   bas OK
MODULE json:     dll OK   lib OK   bas OK
MODULE curl:     dll OK   lib OK   bas OK
MODULE ip:       dll OK   lib OK   bas OK
MODULE t:        dll OK   lib OK   bas OK
MODULE cgi:      dll OK   lib OK   bas OK
MODULE ux:       dll OK   lib OK   bas OK
MODULE mxml:     dll OK   lib OK   bas OK
MODULE hash:     dll OK   lib OK   bas OK
MODULE zlib:     dll OK   lib OK   bas OK
MODULE sqlite:   dll OK   lib OK   bas OK
MODULE trial:    dll OK   lib OK   bas OK
MODULE odbc:     dll OK   lib OK   bas OK
MODULE dbg:      dll OK   lib OK   bas OK
MODULE sdbg:     dll OK   lib OK   bas OK
MODULE gmp2:     dll OK   lib OK   bas OK
MODULE curses:   dll OK   lib OK   bas OK


jrs@RPi-Zero2:~/sb/examples$ scriba sbt_demo.sb
123
1.23
One, Two, Three
Function Return
321
32.1
Three,Two,One
jrs@RPi-Zero2:~/sb/examples$

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
Re: $10 Linux PC
« Reply #4 on: March 09, 2025, 06:16:54 PM »
I tried to install MySQL and it trashed my Ubuntu OS. I had to start over. I'm going to install MariaDB instead and see if I have better luck.

The MariaDB install worked. I still need to work out the issue with PHP 8.3 and phpmyadmin. (MySQL web browser) This is a MySQL ScriptBasic example.

Code: Script BASIC
  1. ' MySQL Demo Program
  2.  
  3. INCLUDE mysql.bas
  4.  
  5. dbh = mysql::RealConnect("localhost","root","PASSWORD","classicmodels")
  6. mysql::query(dbh,"SELECT * FROM products WHERE productLine = 'Classic Cars'")
  7.  
  8. WHILE mysql::FetchHash(dbh,column)
  9.   PRINT column{"productCode"}," - ",column{"productName"}," - ",FORMAT("%~$###.00~",column{"MSRP"}),"\n"
  10. WEND
  11.  
  12. PRINTNL
  13. PRINT "The database handle is: ",dbh,"\n"
  14. PRINT "Affected rows by SELECT: ",mysql::AffectedRows(dbh),"\n"
  15. PRINT "Character set name is: ",mysql::CharacterSetName(dbh),"\n"
  16. PRINT "Last error is: ",mysql::ErrorMessage(dbh),"\n"
  17. PRINT "Client info is: ",mysql::GetClientInfo(),"\n"
  18. PRINT "Host info is: ",mysql::GetHostInfo(dbh),"\n"
  19. PRINT "Proto info is: ",mysql::GetProtoInfo(dbh),"\n"
  20. PRINT "Server info is: ",mysql::GetServerInfo(dbh),"\n"
  21. PRINT "PING result: ",mysql::Ping(dbh),"\n"
  22. PRINT "Thread ID: ",mysql::ThreadId(dbh),"\n"
  23. PRINT "Status is: ",mysql::Stat(dbh),"\n"
  24.  
  25. mysql::Close(dbh)
  26.  

Code: [Select]
jrs@RPi-Zero2:~/sb/examples$ scriba mysql_demo.sb
S10_1949 - 1952 Alpine Renault 1300 - $214.30
S10_4757 - 1972 Alfa Romeo GTA - $136.00
S10_4962 - 1962 LanciaA Delta 16V - $147.74
S12_1099 - 1968 Ford Mustang - $194.57
S12_1108 - 2001 Ferrari Enzo - $207.80
S12_3148 - 1969 Corvair Monza - $151.08
S12_3380 - 1968 Dodge Charger - $117.44
S12_3891 - 1969 Ford Falcon - $173.02
S12_3990 - 1970 Plymouth Hemi Cuda - $ 79.80
S12_4675 - 1969 Dodge Charger - $115.16
S18_1129 - 1993 Mazda RX-7 - $141.54
S18_1589 - 1965 Aston Martin DB5 - $124.44
S18_1889 - 1948 Porsche 356-A Roadster - $ 77.00
S18_1984 - 1995 Honda Civic - $142.25
S18_2238 - 1998 Chrysler Plymouth Prowler - $163.73
S18_2870 - 1999 Indy 500 Monte Carlo SS - $132.00
S18_3232 - 1992 Ferrari 360 Spider red - $169.34
S18_3233 - 1985 Toyota Supra - $107.57
S18_3278 - 1969 Dodge Super Bee - $ 80.41
S18_3482 - 1976 Ford Gran Torino - $146.99
S18_3685 - 1948 Porsche Type 356 Roadster - $141.28
S18_4027 - 1970 Triumph Spitfire - $143.62
S18_4721 - 1957 Corvette Convertible - $148.80
S18_4933 - 1957 Ford Thunderbird - $ 71.27
S24_1046 - 1970 Chevy Chevelle SS 454 - $ 73.49
S24_1444 - 1970 Dodge Coronet - $ 57.80
S24_1628 - 1966 Shelby Cobra 427 S/C - $ 50.31
S24_2766 - 1949 Jaguar XK 120 - $ 90.87
S24_2840 - 1958 Chevy Corvette Limited Edition - $ 35.36
S24_2887 - 1952 Citroen-15CV - $117.44
S24_2972 - 1982 Lamborghini Diablo - $ 37.76
S24_3191 - 1969 Chevrolet Camaro Z28 - $ 85.61
S24_3371 - 1971 Alpine Renault 1600s - $ 61.23
S24_3432 - 2002 Chevy Corvette - $107.08
S24_3856 - 1956 Porsche 356A Coupe - $140.43
S24_4048 - 1992 Porsche Cayenne Turbo Silver - $118.28
S24_4620 - 1961 Chevrolet Impala - $ 80.84
S700_2824 - 1982 Camaro Z28 - $101.15

The database handle is: 1
Affected rows by SELECT: 38
Character set name is: utf8mb4
Last error is:
Client info is: 3.3.10
Host info is: Localhost via UNIX socket
Proto info is: 10
Server info is: 10.11.8-MariaDB-0ubuntu0.24.04.1
PING result: -1
Thread ID: 0
Status is: Uptime: 5262  Threads: 1  Questions: 116  Slow queries: 0  Opens: 48  Open tables: 29  Queries per second avg: 0.022
jrs@RPi-Zero2:~/sb/examples$

Here is the value of the MAXINT ScriptBasic command. On Linux 64 bit integers are 8 bytes where in Windows 64 bit integers are 4 bytes.

jrs@RPi-Zero2:~/sb/examples$ scriba maxint.sb
MAXINT = 9223372036854775807
jrs@RPi-Zero2:~/sb/examples$
« Last Edit: March 09, 2025, 11:18:13 PM by John Spikowski »

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
Re: $10 Linux PC
« Reply #5 on: March 10, 2025, 02:51:03 AM »
It looks like sbhttpd (ScriptBasic web server) is having string reference issues like on RPi Zero W1. I'm going to have to build it under 2.1.  :(

I recompiled sbhttpd under the 2.1 repo and it works fine now.

Code: Script BASIC
  1. ' CGI Echo
  2.  
  3. GLOBAL CONST nl = "\n"
  4. CONST NumberOfCookies = 3
  5.  
  6. INCLUDE cgi.bas
  7.  
  8. ' sessionid = mt::NewSessionId()
  9. OPTION cgi$Method cgi::Get OR cgi::Post
  10.  
  11. cgi::Header 200,"text/html"
  12.  
  13. FOR i = 1 TO NumberOfCookies
  14.   ' cookie(i) is i, no domain is defined, path is /, expires after 10 seconds, not secure
  15.  cgi::SetCookie "cookie" & i, i, undef, "/", gmtime() + 10, false
  16. NEXT
  17.  
  18. cgi::FinishHeader
  19.  
  20. '-------------------------------------------------------
  21. PRINT """
  22. <HTML>
  23. <HEAD>
  24. <title>CGI Echo</title>
  25. </HEAD>
  26. <BODY><font face="VERDANA" size="2">
  27. <H1>View CGI Parameters</H1>
  28. This page shows the CGI parameters the way it was uploaded.
  29. <!-- here is the result of the previous HTTP request -->
  30. <FONT SIZE="3">
  31. <PRE>
  32. CGI system variables
  33. --------------------
  34.  
  35. """
  36. ' PRINT "Session ID      = ", sessionid, nl
  37. PRINT "ServerSoftware  = ", cgi::ServerSoftware(), nl
  38. PRINT "ServerName      = ", cgi::ServerName(), nl
  39. PRINT "GatewayInterface= ", cgi::GatewayInterface(),nl
  40. PRINT "ServerProtocol  = ", cgi::ServerProtocol(), nl
  41. PRINT "ServerPort      = ", cgi::ServerPort(), nl
  42. PRINT "RequestMethod   = ", cgi::RequestMethod(), nl
  43. PRINT "PathInfo        = ", cgi::PathInfo(), nl
  44. PRINT "PathTranslated  = ", cgi::PathTranslated(), nl
  45. PRINT "ScriptName      = ", cgi::ScriptName(), nl
  46. PRINT "QueryString     = ", cgi::QueryString(), nl
  47. PRINT "RemoteHost      = ", cgi::RemoteHost(), nl
  48. PRINT "RemoteAddress   = ", cgi::RemoteAddress(), nl
  49. PRINT "AuthType        = ", cgi::AuthType(), nl
  50. PRINT "RemoteUser      = ", cgi::RemoteUser(), nl
  51. PRINT "RemoteIdent     = ", cgi::RemoteIdent(), nl
  52. PRINT "ContentType     = ", cgi::ContentType(), nl
  53. PRINT "ContentLength   = ", cgi::ContentLength(), nl
  54. PRINT "UserAgent       = ", cgi::UserAgent(), nl
  55. PRINT "Cookie          = ", cgi::RawCookie(), nl
  56.  
  57. PRINT "Referer         = ", cgi::Referer(), nl
  58. PRINT "Password        = ", Environ("HTTP_PASSWORD"), nl
  59. PRINT "Full auth string= ", Environ("HTTP_AUTHORIZATION"), nl
  60. PRINT "\nCookies:\n"
  61. FOR i = 1 TO NumberOfCookies
  62.   PRINT "cookie" & i, " ", cgi::Cookie("cookie" & i), "\n"
  63. NEXT
  64.  
  65. IF cgi::RequestMethod() = "GET" THEN
  66.   PRINT "GET text field using GetParam(\"TEXT-GET\") is ", cgi::GetParam("TEXT-GET"), nl
  67. END IF
  68.  
  69. IF cgi::RequestMethod() = "POST" THEN
  70.   PRINT "POST text field using PostParam(\"TEXT-POST\") is ", cgi::PostParam("TEXT-POST"), nl
  71. END IF
  72.  
  73. PRINT """
  74. </PRE>
  75. <TABLE>
  76.  <TR>
  77.    <TD BORDER=0 BGCOLOR="EEEEEE">
  78.      <PRE>
  79.      A simple form to POST parameters:<BR>
  80.      <FORM METHOD="POST" ACTION="/home/echo">
  81.        <INPUT TYPE="TEXT" VALUE="Default POST Field Text" NAME="TEXT-POST">
  82.        <INPUT TYPE="SUBMIT" NAME="SUBMIT-BUTTON" VALUE=" POST ">
  83.      </FORM>
  84.      </PRE>
  85.    </TD>
  86.    <TD BORDER=1 width="20">&nbsp;</TD>
  87.    <TD BORDER=0 BGCOLOR="EEEEEE">
  88.    <PRE>
  89.    A simple form to GET parameters:<BR>
  90.    <FORM METHOD="GET" ACTION="/home/echo">
  91.      <INPUT TYPE="TEXT" VALUE="Default GET Field Text" NAME="TEXT-GET">
  92.      <INPUT TYPE="SUBMIT" NAME="SUBMIT-BUTTON" VALUE=" GET ">
  93.    </FORM>
  94.  
  95.    </TD>
  96.  </TR>
  97. </TABLE>
  98. </BODY>
  99. </HTML>
  100. """
  101.  
« Last Edit: March 10, 2025, 04:13:36 AM by John Spikowski »

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
Re: $10 Linux PC
« Reply #6 on: March 10, 2025, 06:47:12 AM »
If you need to take your Linux server on the road with you. Your phone can act as a WIFI Hotspot for your RPi Zero to connect to. Using the ConnectBot app gives you a SSH console. The keyboard is resizable and floats.
« Last Edit: Today at 04:59:01 AM by John Spikowski »

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
Re: $10 Linux PC
« Reply #7 on: March 10, 2025, 06:41:10 PM »
I have had my RPi Zero 2 plugged into my battery pack for 12 hours and it still shows full charge. They were serious when they said low power. My guess it's going to last for a week, maybe longer. The heat sink seems to be doing its job keeping the CPU running cool.

Temperature:            42.4 C
« Last Edit: March 10, 2025, 07:54:38 PM by John Spikowski »

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
Re: $10 Linux PC
« Reply #8 on: March 10, 2025, 09:07:48 PM »
I was able to get by the issue with PHP 8.3 and phpmyadmin on Ubuntu 24.04. The trick to fixing this is after you install phpmyadmin with sudo apt install phpmyadmin, execute sudo apt install -y phpmyadmin libapache2-mod-php.

phpmyadmin works really well on your phone. (mobile centric)

« Last Edit: March 11, 2025, 05:05:53 AM by John Spikowski »

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
Re: $10 Linux PC
« Reply #9 on: March 11, 2025, 01:19:49 AM »
This is my portable 64 bit Ubuntu 24.04.4 RPi Zero 2 workstation. The foldable bluetooth keyboard works great with my Samsung S20FE5G phone.

The desk this is sitting on was once owned by Samuel Morse {creator of the Morse Code) and was made in 1860.

« Last Edit: March 11, 2025, 01:30:22 AM by John Spikowski »

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
Re: $10 Linux PC
« Reply #10 on: March 11, 2025, 06:58:03 PM »
Without starting MariaDB and Apache2 my memory usage is 45%. With them started I'm at 67%. Linux provides disk swap space if additional memory is needed beyond physical memory. On a positive note the 'disk' is a micro SD card with transfer rates of 180 MB / second.

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
Re: $10 Linux PC
« Reply #11 on: March 11, 2025, 07:57:59 PM »
I wrote a script to create a 50MB string and print its length.

Code: [Select]
jrs@RPi-Zero2:~/sb/examples$ cat testmem.sb
a = STRING(50000000," ")
PRINT LEN(a),"\n"

jrs@RPi-Zero2:~/sb/examples$ time scriba testmem.sb
50000000

real    0m1.203s
user    0m0.723s
sys     0m0.424s
jrs@RPi-Zero2:~/sb/examples$
« Last Edit: March 11, 2025, 09:45:40 PM by John Spikowski »

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
Re: $10 Linux PC
« Reply #12 on: March 12, 2025, 03:22:07 AM »
This is the results of free -h with everything running including sbhttpd.
Code: [Select]
               total        used        free      shared  buff/cache   available
Mem:           409Mi       256Mi        29Mi       5.5Mi       139Mi       153Mi

This is just Ubuntu running. No Apache, MariaDB or sbhttpd.
Code: [Select]
               total        used        free      shared  buff/cache   available
Mem:           409Mi       163Mi        94Mi       3.0Mi       168Mi       245Mi

It seems Linux grabs memory from buffer/cache when memory is needed by an  executing program.
Code: [Select]
jrs@RPi-Zero2:~/sb/examples$ time scriba testmem.sb
75000000

real    0m1.835s
user    0m1.090s
sys     0m0.661s
jrs@RPi-Zero2:~/sb/examples$ free -h
               total        used        free      shared  buff/cache   available
Mem:           409Mi       249Mi       137Mi       5.5Mi        38Mi       160Mi
Swap:             0B          0B          0B
jrs@RPi-Zero2:~/sb/examples$
« Last Edit: Today at 06:46:29 AM by John Spikowski »

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
Re: $10 Linux PC
« Reply #13 on: March 12, 2025, 05:17:40 AM »
Here is a picture of using my Alexa base and tablet as my workstation.
« Last Edit: March 12, 2025, 05:20:26 AM by John Spikowski »

John Spikowski

  • Moderator
  • *****
  • Posts: 252
    • View Profile
Re: $10 Linux PC
« Reply #14 on: March 12, 2025, 06:55:03 PM »
I now have Apache running with sbhttpd as a proxy. This is a demo of the Bootstrap UI framework running on the RPi Zero 2. I can access the web server using http://rpi-zero2 as the host name.

Hint:  I use the SQLite extension module with the memory DB option with my web development. It allows me to query, format and sum raw data for presentation.

The sdbg preprocessor extention allows single step / breakpoints / view variables /  ... of your web script via your ssh connection.   8)

You can try the Bootstrap demo on my AWS Linux server with this URL.

https://sbqbo.org/home/qbo_main
« Last Edit: Today at 05:46:31 AM by John Spikowski »