Server Errors

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

Locked
SirWobbyTheFirst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 239
Joined: Tue Jun 30, 2009 11:15 pm

Server Errors

Post by SirWobbyTheFirst » Tue Jun 25, 2013 12:09 am

Hey guys, I decided this would be the best place to inform you as I have found a few problems with the server, ones that are making it increasingly frustrating to work with, some are down to bugs in the code and could easily be fixed by someone knowledgeable with C and C++ and others are just downright out of align with the desktop engine.

1) Start Session doesn't work on the Windows build, trying to execute the command just generates an error as if the command doesn't exist. Works fine on Mac and Linux builds.
2) The database drivers don't work on the Mac build, trying to execute any DB command generates an invalid database type error. Works fine on Windows and Linux builds.
3) The engine seems to hate an If Else statement, for example in my login pages backend I have the following code:

Code: Select all

If SmIsUserLoggedOn() = True Then
   // Redirect to home page.
Else If tDisableLogon = True Then
   // Notify the user, logon is disabled.
Else If The Keys Of $_GET <> Empty Then
   If "au" Is Among The Lines Of The Keys Of $_GET Then
      If "i" Is Not Among The Lines Of The Keys Of $_GET Or $_GET["i"] Is Not A Number Then
         // Notify the user, user ID is invalid.
      End If
   End If
End If
The engine throws out an "if-then: error in statement" message for line 7 which corresponds to the "// Notify the user, logon is disabled" line which simply places a message in a variable to be outputted later on. If I delete the MySQL record for the user ID 1 and thus make an account unactivated, the script executes successfully and creates the record but if I specify the same ID again, it is supposed to spit out a message I made stating the account has been activated but instead, throws a hissy fit and dumps that error instead.

This is an example of one of those cases where the Server engine is vastly different to the desktop engine and it is really annoying, because I would like to make use of LiveCode as my website backend but I can't because of these issues. I'm already having to run a Ubuntu VM in the background to get the Start Session command and MySQL DB drivers to work in the first place. If anyone could shed some light on this and possibly fix these problems, I would turn for you.

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Server Errors

Post by monte » Tue Jun 25, 2013 12:31 am

Not sure about #1 ot #3 but #2 should be resolved. Have you tried dp2?
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

SirWobbyTheFirst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 239
Joined: Tue Jun 30, 2009 11:15 pm

Re: Server Errors

Post by SirWobbyTheFirst » Tue Jun 25, 2013 7:54 am

I've only tried DP1 which didn't work, but I will give DP2 a go later on today. And report my findings.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1206
Joined: Thu Apr 11, 2013 11:27 am

Re: Server Errors

Post by LCMark » Tue Jun 25, 2013 1:01 pm

@mitchpitkin92:
I've taken a quick look at the issues...

(1) I tried a very simple script using LiveCode server on Windows (using start session) and it seems to work fine (it creates the session index and session file in the default session save path which is the temp dir). What error are you seeing?

(2) This was an issue with the build scripts for Mac server's revDB - it wasn't building with the correct flags meaning it looks in the wrong place for externals/drivers. I've just applied a fix for 6.1 that should resolve this issue.

(3) I can't reproduce this problem with a simple if/elseif structured as you have. The error suggests one of the real lines of code you have in the 'Notify the user, logon is disabled' clause is causing an error but not pushing an error message on the error stack. (i.e. The problem is something in the code in the elseif clauses rather than the construct itself). Can you elaborate on the actual code that is being executed there?

Locked

Return to “Engine Contributors”