I am using version 2.9
I have a problem trying to use my sqlite database on a linux server
I have a standalone application working very well and using a sqlite database file.
I have uploaded the sqlite database chmod 755 into the cgi-bin folder
I have uploaded the following cgi file and chmod 755 and with UNIX file format
#!revolution -ui
on startup
library "minimal.rev"
end startup
I have uploaded a very simple stack with the following stack script.
on librarystack
get revOpenDatabase("sqlite",".Dances.s3db",,,,)
end librarystack
on calling the cgi in firefox I get the dreaded 500 server error.
on checking the server logs it reports clearly "execution error on line 2 char 5".
Obviously from the above I have whittled the code down to identify the problem.
I have also tried using another linux server but with the same result.
For the record other cgi's I have tried work fine.
I wondered if this is an ISP problem as a previous request to our superb team in Edinburgh although full of ideas obviousy expected this code to work.
Can anyone duplicate this error ?
Help would be most gratefully appreciated as I can see no way forward.
linux server errors with sqlite and v 2.9
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Flume,
It looks like your CGI engine is unaware of the SQLite external. You don't write that you have set the path to the external correctly.
Best,
Mark
It looks like your CGI engine is unaware of the SQLite external. You don't write that you have set the path to the external correctly.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- VIP Livecode Opensource Backer
- Posts: 1236
- Joined: Sat Apr 08, 2006 1:10 pm
- Location: Zurich
- Contact:
I got mysql working with the following script (sugested by mark waddingham):
Note that I have put all executable files (besides the cgi itself) outside of the cgi-bin, an even outside the http folder. This is supposed to increase security.
the folder "/home/user/rev/" contains these files:
dbmysql.so --themysql external
rev --the engine
revdb.so --the general db external
Adjust accordingly for SQlite and the paths you want to use.
Code: Select all
#!/home/user/rev/rev -ui
on startup
--setup mySQL
set the externals of the templateStack to "/home/user/rev/revdb.so"
create stack "externals"
start using stack "externals"
revSetDatabaseDriverPath "/home/user/rev"
--normal cgi stuff here
-- As we have created a stack we need either quit or delete
-- stack at the end.
delete stack "externals"
end startup
the folder "/home/user/rev/" contains these files:
dbmysql.so --themysql external
rev --the engine
revdb.so --the general db external
Adjust accordingly for SQlite and the paths you want to use.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode