database access...

Are you using LiveCode to create server scripts or CGIs?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Location: Philippines
Contact:

database access...

Post by shadowslash » Mon Apr 26, 2010 7:49 pm

I haven't tested this yet but would still like confirmation before I do... I have already set up a fully working revCGI from the rev3.5-gm-2 engine on my hosting. my hosting offers up to 3 SQL databases for me to use.. my question is, will revCGI or *.cgi scripts on my server be able to access the database that my host provided? take note that my host doesn't support remote access to the MySQL database...

any insights or experiences on these aspects?
Parañaque, Philippines
Image
Image

RRobert
Posts: 151
Joined: Sat Feb 28, 2009 8:20 pm

Re: database access...

Post by RRobert » Mon Apr 26, 2010 10:03 pm

will revCGI or *.cgi scripts on my server be able to access the database that my host provided? take note that my host doesn't support remote access to the MySQL database...
Why not? Doesn't your CGI script run on the same server?

Robert

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Location: Philippines
Contact:

Re: database access...

Post by shadowslash » Mon Apr 26, 2010 11:43 pm

yes but when I try to run a test page for INSERTing VALUES into the database, it gives me a "500 Internal Server Error"... i don't know what the reason is for that case either..
Parañaque, Philippines
Image
Image

RRobert
Posts: 151
Joined: Sat Feb 28, 2009 8:20 pm

Re: database access...

Post by RRobert » Tue Apr 27, 2010 12:44 am

Try to run the script from the shell and see what revolution says or examine the error log of the webserver.

Robert

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Location: Philippines
Contact:

Re: database access...

Post by shadowslash » Tue Apr 27, 2010 2:25 pm

RRobert wrote:Try to run the script from the shell and see what revolution says or examine the error log of the webserver.

Robert
I'm not sure I follow what you stated. What do you mean by try to run the script from the shell? Oh and additional information, my hosting provider seems to be using a Linux box...
Parañaque, Philippines
Image
Image

RRobert
Posts: 151
Joined: Sat Feb 28, 2009 8:20 pm

Re: database access...

Post by RRobert » Tue Apr 27, 2010 7:39 pm

shadowslash wrote:I'm not sure I follow what you stated. What do you mean by try to run the script from the shell? Oh and additional information, my hosting provider seems to be using a Linux box...
Do you have shell access via SSH2? Or access to the apache log directory?

PS: Do you use Windows, Mac or Linux locally?

Robert

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Location: Philippines
Contact:

Re: database access...

Post by shadowslash » Mon May 03, 2010 1:06 pm

RRobert wrote:
shadowslash wrote:I'm not sure I follow what you stated. What do you mean by try to run the script from the shell? Oh and additional information, my hosting provider seems to be using a Linux box...
Do you have shell access via SSH2? Or access to the apache log directory?

PS: Do you use Windows, Mac or Linux locally?

Robert
I use Windows and quite frankly, I haven't the slightest idea about SSH2... x)
Parañaque, Philippines
Image
Image

RRobert
Posts: 151
Joined: Sat Feb 28, 2009 8:20 pm

Re: database access...

Post by RRobert » Mon May 03, 2010 3:14 pm

Does your hoster write something about SSH on his website?

PS: puTTY is a free SSH client.

Robert

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: database access...

Post by Mark » Tue May 04, 2010 3:51 pm

You can find a version of PuTTy here: http://qurl.tk/a8

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

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

Re: database access...

Post by bangkok » Thu May 06, 2010 7:33 am

shadowslash wrote:yes but when I try to run a test page for INSERTing VALUES into the database, it gives me a "500 Internal Server Error"... i don't know what the reason is for that case either..
I had the same problem.

It migth be related to the way you have installed the rev cgi.

- put in comment/delete all your DB commands and functions within your cgi. My point : my own cgi was working perfect.... until I started to add DB related script. I had too a 500 internal server error
This little test should help you to trace the origin of the problem. If it's related to DB functions, then it's linked to your rev cgi installation : DB drivers, even the runtime version etc. and the tricky issue of path (for the db driver for instance)
For instance, during my own tests : i had problems with a runtime 4.5 and 4. So I took a version 3.5 and then it was working fine.

Klaus
Posts: 13866
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: database access...

Post by Klaus » Thu May 06, 2010 1:12 pm

FYI: Version 3.5 of Rev was the last version you could use as a CGI engine!
RunRev removed this feature from later versions!

Best

Klaus

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

Re: database access...

Post by bangkok » Thu May 06, 2010 5:12 pm

Klaus wrote:FYI: Version 3.5 of Rev was the last version you could use as a CGI engine!
RunRev removed this feature from later versions!
Ah ah ah ah !

:D

Now I understand...

Oh my god, I lost a couple of hours on this...

Anyway.

Post Reply

Return to “CGIs and the Server”