Database connection so frustrating

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

LeeC
Posts: 12
Joined: Thu Oct 30, 2014 5:11 pm

Re: Database connection so frustrating

Post by LeeC » Mon Nov 03, 2014 2:07 pm

Thanks for the quick replies.

Here is my file permission

Code: Select all

root@Livecode:/usr/lib/cgi-bin# ls -l
total 12600
drwxr-xr-x 2 root root     4096 Oct  9 04:19 drivers
drwxr-xr-x 2 root root     4096 Oct  9 04:19 externals
-rwxr-xr-x 1 root root 12892072 Sep 19 11:33 livecode-community-server
yes tried every combo of mysql MYSQL MySQL

My Server is Server version: 5.5.40-0ubuntu0.14.04.1 - (Ubuntu)

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Database connection so frustrating

Post by bangkok » Mon Nov 03, 2014 2:43 pm

LeeC wrote: Here is my file permission

Code: Select all

root@Livecode:/usr/lib/cgi-bin# ls -l
total 12600
drwxr-xr-x 2 root root     4096 Oct  9 04:19 drivers
drwxr-xr-x 2 root root     4096 Oct  9 04:19 externals
-rwxr-xr-x 1 root root 12892072 Sep 19 11:33 livecode-community-server
That's insane.

The only way I manage to get the error you receive :

Code: Select all

row 14, col 6: Function: error in function handler (revOpenDatabase)
row 14, col 6: put: error in expression
Is to put 644 for instance, instead of 755, on the directory "externals".

But your permissions are correct...

Other idea : I use a version 5.5 of livecode server (before community). I'm going to try to use the 7.01 community.

UPDATE
-I confirm that i receive the same error with LC Community server 7.01
-no error with commercial server 5.5
-no error with LC community server 6.01

Try to use the 6.01

http://downloads.livecode.com/livecode/

LeeC
Posts: 12
Joined: Thu Oct 30, 2014 5:11 pm

Re: Database connection so frustrating

Post by LeeC » Mon Nov 03, 2014 3:34 pm

So, I have removed whatever version I had installed and replaced it with 6.01 and the error has changed to

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Checked the file permission, dont know if a reboot of the server is required but I am going to try that.

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: Database connection so frustrating

Post by dave.kilroy » Mon Nov 03, 2014 3:57 pm

LiveCode itself is x86 bit and recently RunRev pushed out a x64 bit version for Linux. I don't know whether LiveCode Server is x64 bit yet - but up until it is I believe it depends on a few x86 bit libraries - and in some cases the server-provider had to specifically permit access or add the libraries themselves.

I'm guessing you know all this and have allowed for it or else your test.lc script wouldn't work - am just mentioning it in case it could be a contributing factor (e.g. are those libraries in good health, up to date and non-corrupted)

Dave
"...this is not the code you are looking for..."

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Database connection so frustrating

Post by bangkok » Mon Nov 03, 2014 4:22 pm

LeeC wrote:So, I have removed whatever version I had installed and replaced it with 6.01 and the error has changed to

Internal Server Error
It's a very good improvement. :D

Have you deleted the externals and drivers directories (of the version 7) and replaced them by the 6.01 versions. And again, check the 755 permissions on both files and directories.

LeeC
Posts: 12
Joined: Thu Oct 30, 2014 5:11 pm

Re: Database connection so frustrating

Post by LeeC » Mon Nov 03, 2014 4:29 pm

Yes, I removed whatever version I had and replaced it with the 6.0.1 as you suggested.

LeeC
Posts: 12
Joined: Thu Oct 30, 2014 5:11 pm

Re: Database connection so frustrating

Post by LeeC » Mon Nov 03, 2014 4:41 pm

Is there a very simple script I can run just to test connectivity to the database or is the one I am using as simple as I can get?

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Database connection so frustrating

Post by bangkok » Mon Nov 03, 2014 4:57 pm

LeeC wrote:Yes, I removed whatever version I had and replaced it with the 6.0.1 as you suggested.
You're almost there.

Your original script is working fine on my VPS, Ubuntu 12, with LiveCode Server Community 6.01 or LiveCode Server Commercial 5.5

Fine = i don't receive the error message "row 14, col 6: Function: error in function handler (revOpenDatabase)"
Fine = I receive a MySQL error message, because database, user and password are empty.
Last edited by bangkok on Mon Nov 03, 2014 5:07 pm, edited 1 time in total.

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Database connection so frustrating

Post by bangkok » Mon Nov 03, 2014 5:01 pm

LeeC wrote:Is there a very simple script I can run just to test connectivity to the database or is the one I am using as simple as I can get?
Yes

Code: Select all

<?lc
   set the errorMode to "inline"
   put  revOpenDatabase("mysql", "127.0.0.1", "mydb", "myuser", "mypassword") into tResult
   put tResult 
   if tResult is a number then revCloseDatabase tResult
?>

LeeC
Posts: 12
Joined: Thu Oct 30, 2014 5:11 pm

Re: Database connection so frustrating

Post by LeeC » Mon Nov 03, 2014 5:11 pm

Perfect, the script above works a treat which means with a bit of fiddling around with my script I should be able to get it to work.
Thanks for all your help guys.

Tukcedo
Posts: 65
Joined: Fri Jun 27, 2014 9:43 pm

Re: Database connection so frustrating

Post by Tukcedo » Mon Nov 03, 2014 7:26 pm

Could this be the same (confirmed) bug I experienced in Ubuntu 14.04? Still not solved in 7.0.1 rc1 as far as I can tell

http://quality.runrev.com/show_bug.cgi?id=13213
Michel J.L. van der Kleij
Coding to help stray animals in the Philippines
Albert Foundation - http://albert.tukcedo.nl
Aklan Animal Rescue & Rehabilitation Center - http://aarrc.tukcedo.nl

Post Reply