Anyone has experience on deploying Xojo CGI on linux? My colleague has been working on this for 2 weeks, the furthest he can go is:
- Run directly on Xojo (Windows), connect to Linux firebird database, success.
- connect to local firebird database on Linux, success
- Deploy on Linux, run app on Windows Chrome, fail to connect to database
He is using 64-bit Ubuntu, connect to firebird 2.5 database through ODBC.
There seem not many materials about deploying Xojo web app. Can someone share your success experience? Thanks a lot!
You need to isolate the problem.
- My Linux Xojo Web app does not run.
- My Linux Xojo Web app can not talk to Firebird over ODBC.
For edge SQL cases I recommend the MBS SQL plugin. I generally use the Xojo (or vendor provided) database plugins when available but MBS SQL has some unique advantages. Firebird is on the supported list.
Try the app with out odbc connect or i hello word to see if xojo is ok on linux
@Alexis, yes the app runs on Linux, and until it tries to connect to database, it breaks
I use postgresql with no problems but chk if you can connect to the database with other app tools to see if db server is working
Yes, the server is definitely working, even I run my app in Xojo IDE (using windows ODBC), it works perfectly. So I think is the communication problem between my app and Linux ODBC
Yes, I think this is the problem
Seems like a basic question but where is the database running?
Your deployed app runs as a different, more restricted user than the other 2 scenarios you mentioned where it does work. Sounds like permissions or odbc setup.
The database is running on the Linux machine, which is firebird 2.5. My app will try to connect to the database through Linux ODBC driver. The database and ODBC seems working fine as my colleague can successfully connect to the database in Linux console, running the app in windows Xojo IDE can connect also.
The error message was something like “wrong ELF class: ELFCLASS64”
Wrong ELF class from what I understand is either a 32 bit app accessing a 64 bit library or the other way around.
Sometimes differences in the environment (when running an app manually on a command line vs when running via apache or something else) can break your unixODBC configuration. I have found it easiest to specify the connection parameters in the DSN string of the ODBC driver connection, rather than to depend on odbc.ini files being loaded correctly.
Dim myDB As New ODBCDatabase
myDB.DataSource = "Driver=/path/to/driver.so;Address=123.456.78.90;Port=1234;Database=dbname;UID=myname;PWD=somepass;Parameter=value"
Experiment to make sure you get the configuration parameters right for your driver.
Maybe that is why it could be loading one version of a driver when you are at the console and another one when in CGI
Maybe that will help?
I had similar problems with ODBC 64-Bit using firebird server 2.5 64-Bit on an 64-Bit LinuxMint System. With commandline-isql
it was easy to uses the odbc-installation. I switched to MBS SQLPLUGIN with the same database and it works. I checked with the support and it looks like there is a bug in the odbc-64 bit plugin… Just try the MBS-Plugin…