Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Support

Pages: 1 ... 8 9 [10] 11 12
136
Debugger / ScriptBasic 2.1 Debug Option
« on: July 08, 2007, 02:09:28 AM »
If you have installed ScriptBasic 2.1 from the setup.exe distribution you may have noticed that Peter added a debug internal preprocessor and a standalone remote debugger. (more on the remote debugger in another post)

To debug a ScriptBasic program, use the '-i dbg' option to start your program.

scriba -i dbg mypgm.sb

Note: The ScriptBasic Windows install defines the .sb file attribute as being a ScriptBasic program. This will allow to run the program by using it's name only without the 'scriba' prefix.

John

137
General Discussions / ScriptBasic 2.1 Application Server Testing
« on: June 06, 2007, 02:38:45 AM »
I'm testing the ScriptBasic 2.1 application server under CentOS. (Red Hat recompile) I have already tested it under Windows without any issues.

As soon as I get a the application I'm working on in ScriptBasic completed and MT and MySQL are fully tested, I'll post the source and binaries.

I've started a page on the wiki for the MT module and will clean it up in the next few days. I also plan on documenting how to bring up the application server on multiple virtual hosts.

Stay Tuned !

John

138
ScriptBasic Examples w/source / PostgreSQL Example
« on: May 21, 2006, 02:55:09 PM »
http://www.scriptbasic.org/cgi-bin/pgsqltest.bas

I would like to thank Peter Szabo (pgsql extension module author) for updating his work to the current version of the RedHat LAMP stack.

Code: [Select]

#!/usr/bin/scriba -c

INCLUDE cgi.bas
INCLUDE pgsql.bas

OPTION cgi$Method cgi::Post or cgi::Get

cgi::Header 200,"text/html"

cgi::FinishHeader

PRINT """
<html>
<head>
<title>PostgreSQL</title>
</head>
<body>
<font face="Verdana, Arial, Helvetica, sans-serif">
<table border="1" cellpadding="3">
"""

c = PGSQL::PGopen("dbname='database' user='user' password='password'")
IF ISSTRING(c) THEN
  PRINT "Connect Error: (", RTRIM(c), ")\n"
  END
END IF

r = PGSQL::PGexec(c, "SELECT * FROM contact")
IF ISSTRING(r) THEN
  PRINT "Query Error: (", RTRIM(r), ")\n"
  END
END IF

PRINT "<b>PGSQL Handle: </b>" & c & "<br>"
PRINT "<b>Command Status: </b>" & PGSQL::PGcmdStatus(r) & "<br>"
PRINT "<b>Command Tuples: </b>" & PGSQL::PGcmdTuples(r) & "<br>"
PRINT "<br>"

' Column Names
PRINT "<tr>"
nf=PGSQL::PGncols(r)
FOR i=0 TO nf-1
  PRINT "<td>" & PGSQL::PGcol(r,i) & "</td>"
NEXT
PRINT "</tr>"

' Data
nrows=PGSQL::PGnrows(r)
FOR row=0 TO nrows-1
  PRINT "<tr>"
  FOR col=0 TO nf-1
    IF PGSQL::PGgetisnull(r,row,col) THEN
      PRINT "<td>NULL</td>"
    ELSE
      PRINT "<td>" & PGSQL::PGgetvalue(r,row,col) & "</td>"
    END IF
  NEXT
  PRINT "</tr>"
NEXT

PRINT """
</table>
</body>
</html>
"""

PGSQL::PGclose(r)
PGSQL::PGclose(c)

END

139
ScriptBasic Examples w/source / WEBGET - Browser based Curl Example
« on: May 17, 2006, 04:14:30 PM »
This example Curl program will retrieve the source HTML of the URL you submit. IE doesn't work with default security settings and the 'MIME Sniffing" feature needs to be disabled so the file attribute is used for MIME determination like the other browsers. MSDN Reference

http://www.scriptbasic.org/curl.html

Code: [Select]

*** getweb.bas ***

#!/usr/bin/scriba -c

INCLUDE cgi.bas
INCLUDE curl.bas

OPTION cgi$Method cgi::Post or cgi::Get

this_url = cgi::PostParam("geturl")

CURL = curl::init()
curl::option CURL,"URL",this_url
curl::option CURL,"FILE","/var/www/vhosts/scriptbasic.org/httpdocs/pagedump.txt"
curl::perform CURL
curl::finish CURL

cgi::Header 302,""
PRINT "Location: /pagedump.txt\n"
cgi::FinishHeader

END


*** curl.html ***

<html>
<head>
<title>ScriptBasic WebGet</title>
</head>
<body>
<h1>Curl Example</h1>

Enter URL to retrieve:

<form method="post" action="/cgi-bin/getweb.bas">
  <input type="text" name="geturl" size=40>
  <input type="submit" value="Get Page">
</form>
</body>
</html>

140
GTK-Server / Module GTK Overview
« on: May 15, 2006, 12:13:56 AM »
GTK-Server Web Site  (Peter van Eerten - author)

141
DBG / Module DBG Overview
« on: May 15, 2006, 12:00:43 AM »

142
T / Module (T)ools Overview
« on: May 14, 2006, 11:50:50 PM »

143
MT / Module MT Overview
« on: May 14, 2006, 11:45:59 PM »

144
GD / Module GD Overview
« on: May 14, 2006, 11:42:16 PM »

145
HASH / Module HASH Overview
« on: May 14, 2006, 11:38:14 PM »

146
RE / Module RE Overview
« on: May 14, 2006, 11:34:10 PM »

147
ZLIB / Module ZLIB Overview
« on: May 14, 2006, 11:31:48 PM »

148
NT / Module NT Overview
« on: May 14, 2006, 11:28:11 PM »

149
CIO / Module CIO Overview
« on: May 14, 2006, 11:24:38 PM »

150
Curl / Module CURL Overview
« on: May 14, 2006, 11:19:19 PM »

Pages: 1 ... 8 9 [10] 11 12