Cgi and Database
Richard Miller
wow at together.net
Thu Feb 7 10:00:07 EST 2008
Hershel,
I'm not sure if this is the answer to your question, but I have found
problems with using http-based url's from inside the cgi folder. You
might try removing the "http://localhost/cgi-bin" portion, since it
appears the database is already inside the cgi-bin directory.
Another option is to use a conventional flat file database (i.e. text
file). I've been using that with Rev cgi with no problem.
Richard
On Feb 6, 2008, at 8:37 PM, Hershel Fisch wrote:
> Hi all I'm in the works of creating a web site rev CGI which the
> interface
> is almost done, And now I'm stuck when it comes to the database
> part. Have
> no idea how to work this out tried various different way's and ????
> E.g.
>
> #!revolution
>
> on startup
> put 1 & getTip1() into theData
> # write minimal set of HTTP headers to stdout
> put "Content-Type: text/html" & cr
> put "Content-Length:" && the length of theData & cr & cr
> put theData
> end startup
>
> function getTip1
> get revGetDatabaseDriverPath()
> return it
> end getTip1
>
> function getTip2
> get revOpenDatabase("sqlite","http://localhost/cgi-bin/
> testdb.db", , , , )
> return it
> end getTip2
>
> function getTip3
> get revOpenDatabase("sqlite","testdb.db", , , , )
> return it
> end getTip3
> "ERROR 500"
>
> Any help would be appreciated.
> Hershel Fisch
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list