Sessions on XAMPP no go, Live ok.[Headache]

Are you using LiveCode to create server scripts or CGIs?

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

sphere
Posts: 957
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Sessions on XAMPP no go, Live ok.

Post by sphere » Wed Nov 06, 2019 7:04 pm

Indeed it's cheaper than having a laptop or old desktop to do that and indeed they are fun. I will think about getting one for home.
I have an Odroid C2, but it belongs to my daughter playing movies with Kodi.

On my daily job, (doing the programming besides it with a small startup) i created an Rpi server with Linux which is used as server to display Project information on Android tablets at several workbenches in a lab.
And i have one with Raspbian which i use to build something using a stepper motor (Started a year ago almost, but stopped a while because of no time) and LC. But the motor responds to mouse movements, so maybe i need an separate add-on interface to the motor-board or start using some Python examples which i tried but could not get it to work yet.

For a server the new Rpi 4 with 4GB would be good i think then. Or an Odroid because they have versions which outrun the Rasp.
2018 Worldwide Mobile Market share: Android 84.4% !!!, iOs 15.1%, others 0.1%

sphere
Posts: 957
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Sessions on XAMPP no go, Live ok.

Post by sphere » Sun Nov 10, 2019 2:51 pm

OK i tried UwAmp(nice and maybe easier than xampp), but then it only worked on the first page and not the following page, then start session gave error.Althoug it was written to the sessions folder with sufficient rights.(and enabled action module)

Tried again with Xampp, putted the LC server in d:\server\xampp\cgi-bin and added this to httpd.conf (not in httpd-xampp.confin extras folder):
i changed something but i don't know exactly what anymore....something with addhandler/action

Code: Select all

#####################################livecode###################
<Directory "d:/server/xampp/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    AddHandler livecode-script .lc
    Action livecode-script /cgi-bin/livecode-community-server.exe
</Directory>
##########################livecode#################
<Directory  "d:/server/xampp/cgi-bin">
   Options ExecCGI
AllowOverride All
Require all granted
 </Directory>
 ScriptAlias /cgi-bin/livecode-community-server.exe "d:/server/xampp/cgi-bin/livecode-community-server.exe"
 ########################################################
Sessions work now on all pages :)

Thank you all.
2018 Worldwide Mobile Market share: Android 84.4% !!!, iOs 15.1%, others 0.1%

sphere
Posts: 957
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Sessions on XAMPP no go, Live ok.[Headache]

Post by sphere » Sun Nov 17, 2019 4:14 pm

There is really something wrong with the sessions (on XAMPP/LAMPP) which gives me a major frustrating headache.
All was working fine, i did not change a thing. Just 2 days not programming. Started it up and the browser gives the error again where the line start session is :evil: :evil: :evil: :evil: :evil: This costs a lot of time just trying to get/keep the sh*t running pffff, i'm about to give up on LC server. :cry: :cry: :cry:

So to check, i've setup LAMPP, all is working ok on Ubuntu Mate. I chown the cgi-bin and htdocs. Livecode server runs ok. test.lc is ok, put the time is working and showing the correct time.

run a script where sessions is used and error again.......
a piece of the script:

Code: Select all

<?lc
--set the sessionSavePath to the defaultfolder
--set the sessionSavePath to "d:/server/xampp/htdocs/myproject/temp/"  --windows 
set the sessionSavePath to "/opt/lampp/htdocs/myprojec/temp/" --linux
--set the sessionSavePath to "sestmp/" --live
set the sessionLifetime to 3600
set the sessionCookieName to "MYPROJECT"
set the sessionID to "SessionIdentifier"
start session
This what i see in the browser:
file "/opt/lampp/htdocs/myproject/index.lc"
row 9, col 1:


Most probably it's not even LC's fault, because the scripts run perfectly on live server, and as it was working it is worth pulling your hair out when it suddenly doesn't work, out of the blue.
or...........it was latest Win10 update which was in between, but then again, it does not work on Linux Ubuntu Mate either. Where was this order page of a raspberry to setup a little server...
2018 Worldwide Mobile Market share: Android 84.4% !!!, iOs 15.1%, others 0.1%

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6965
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Sessions on XAMPP no go, Live ok.[Headache]

Post by FourthWorld » Sun Nov 17, 2019 4:41 pm

Have you successfully set up any other CGI program to work well in your XAMPP system?

And what changed been the time your XAMPP CGI setup worked and when it stopped?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

sphere
Posts: 957
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Sessions on XAMPP no go, Live ok.[Headache]

Post by sphere » Sun Nov 17, 2019 8:28 pm

FourthWorld wrote:
Sun Nov 17, 2019 4:41 pm
Have you successfully set up any other CGI program to work well in your XAMPP system?
well i tried to use previous scripts which also did work and a sessions.lc in it's own folder, i see that lcsessions.idx get's written but not the other file.
FourthWorld wrote:
Sun Nov 17, 2019 4:41 pm
And what changed been the time your XAMPP CGI setup worked and when it stopped?
except a small win10 update, nothing.
So i set it up on Ubuntu Mate too and it's acting the same.

PHP sessions works flawless, i'm roughly guessing they are not interchangeable with lc's. (would be great though :mrgreen: )
Another thing i could try is too set up apache, php7x.x and mysql separate to see if that makes a difference
2018 Worldwide Mobile Market share: Android 84.4% !!!, iOs 15.1%, others 0.1%

sphere
Posts: 957
Joined: Sat Sep 27, 2014 10:32 am
Location: Earth, Except when i Jump

Re: Sessions on XAMPP no go, Live ok.[Headache]

Post by sphere » Sun Nov 17, 2019 10:08 pm

Got it running now using Easyphp, sessions work again.

Same entry in conf file except for the correct folders.

Makes me poco loco...hopefully it keeps working, thanks!
2018 Worldwide Mobile Market share: Android 84.4% !!!, iOs 15.1%, others 0.1%

Post Reply

Return to “CGIs and the Server”