Start Session Not Working

Are you using LiveCode to create server scripts or CGIs?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
mickpitkin92
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 230
Joined: Tue Jun 30, 2009 11:15 pm

Start Session Not Working

Post by mickpitkin92 » Thu Jun 13, 2013 11:33 pm

Hey guys, I'm using the new 6.0 version of the server and whenever I use the Start Session command, LiveCode errors out, it dumps an empty error for line 8 which is the line in which I have Start Session on. Has anyone else been, having this problem?

Code: Select all

file "D:\XAMPP\htdocs\system\api\databaseapi.lc"
file "D:\XAMPP\htdocs\index.lc"
file "D:\XAMPP\htdocs\system\api\globalproperties.lc"
  row 8, col 1: 
file "D:\XAMPP\htdocs\system\api\sessionapi.lc"
EDIT: I did a bit of debugging and the Start Session command is triggering the following in a try/catch statement: 728,0,0,2 <-- Which using the cErrorsList points to Script File Index: and additionally passes 0,8,1 which I assume are the line number and column number.

From my understanding, we should be able to use start session immediately without any problems, is there a bug in the source code or something?

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1682
Joined: Sat Feb 28, 2009 11:49 pm

Re: Start Session Not Working

Post by sturgis » Sat Jun 15, 2013 8:29 pm

Not sure if this will help, but there is a working example of a (very) simple session setup in the following thread.

http://forums.runrev.com/viewtopic.php? ... ion#p50034

I just set up 6.0.2 server on my mac box, used the exact same script from that thread (second post I think) and it is working. First hit doesn't show much, 2nd hit shows incrementing session counters.

Might post the contents of your sessionapi.lc if you need more help getting it to work.

mickpitkin92
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 230
Joined: Tue Jun 30, 2009 11:15 pm

Re: Start Session Not Working

Post by mickpitkin92 » Mon Jun 17, 2013 8:33 pm

I decided to try out LC Server on OS X and Start Session works fine. There must be an error in the Windows build somewhere, where this error is, I can't tell you, C++ still gives me nightmares to this day. My guess is that someone like Monte, Mark Wieder or Mark himself would be able to track this down and squash it. I've now got to figure out how I can redirect my OS X XAMPP's MySQL to use my existing database and keep them synced up.

mickpitkin92
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 230
Joined: Tue Jun 30, 2009 11:15 pm

Re: Start Session Not Working

Post by mickpitkin92 » Tue Jun 18, 2013 12:47 am

So now, that headache is out the way, the server has decided to give me yet another headache, in the form of being unable to connect to the MySQL database running under XAMPP. Regardless of what I try it always returns revdberr,invalid database type as the error message. At this rate I'm starting to think, I was better off just letting PHP teabag me. ¬_¬ Funnily enough, this error never appeared in the Windows build and instead, it connected first time everytime.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1682
Joined: Sat Feb 28, 2009 11:49 pm

Re: Start Session Not Working

Post by sturgis » Tue Jun 18, 2013 12:52 am

The 2 folders that come with the livecode-server package are next to the executable right? And correctly permissioned?

mickpitkin92
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 230
Joined: Tue Jun 30, 2009 11:15 pm

Re: Start Session Not Working

Post by mickpitkin92 » Tue Jun 18, 2013 12:55 am

They are present in the cgi-bin folder along side the server exe and they are set to read and write everyone. That is the default, I didn't make any modifications.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1682
Joined: Sat Feb 28, 2009 11:49 pm

Re: Start Session Not Working

Post by sturgis » Tue Jun 18, 2013 1:14 am

Yes indeedy, the externals/drivers in community 6 0 2 for mac do seem broken. Replacing them with a previous version (from my commercial) fixes the issue. Hopefully 6.0.3 will be out soon.

mickpitkin92
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 230
Joined: Tue Jun 30, 2009 11:15 pm

Re: Start Session Not Working

Post by mickpitkin92 » Tue Jun 18, 2013 1:16 am

6.0.1 do you reckon?

EDIT: Tried with 6.0.1 and the new 6.1 DP, neither are working. Will try using the drivers from LiveCode itself, if that doesn't work, I don't know what will.
EDIT2: Nope, still nothing.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1682
Joined: Sat Feb 28, 2009 11:49 pm

Re: Start Session Not Working

Post by sturgis » Tue Jun 18, 2013 1:31 am

just tried with 6 0 1, no luck. going ack to 5.0.2 works like a charm but again thats the older commercial side so I can't pass them on to you. 6.0.3 hopefully.

Also tried messing with the ones from the IDE no luck there. They're bundles anyway so would probably have to dig in to the bundle and pull out the lib itself, rename things correctly, then cross lots of fingers. Hopefully a build will be soon forthcoming to fix this.

Post Reply

Return to “CGIs and the Server”