the variableNames errors on Windows server 6.1.1?

Are you using LiveCode to create server scripts or CGIs?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
edgore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

the variableNames errors on Windows server 6.1.1?

Post by edgore » Mon Oct 14, 2013 5:36 pm

Can anybody duplicate this?

the script is just

Code: Select all

<?lc
put 1 into aNumber
put the variableNames
?>
It reliably results in 500 internal server error with Windows server engine 6.1.1. with the entry below in the Apache error log:

[Mon Oct 14 10:31:47 2013] [error] [client 127.0.0.1] Premature end of script headers: livecode-server.exe
[Mon Oct 14 10:31:47 2013] [error] [client 127.0.0.1] livecode-server exited due to fatal signal 11

This is on an installation that is known to be working.

Just wondering if anyone else is seeing this before I report it as a bug.

Edited - I changed the script to ensure that there is a variable - same result
Last edited by edgore on Thu Oct 17, 2013 6:13 pm, edited 1 time in total.

samuel.vannesteBUSGvXT
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 43
Joined: Wed Sep 19, 2012 6:32 pm
Location: Versailles, France

Re: the variableNames errors on Windows server 6.1.1?

Post by samuel.vannesteBUSGvXT » Thu Oct 17, 2013 8:07 am

Hello,
My guess: the variableNames is empty. Perhaps should you try

Code: Select all

<?lc
put ""
put the variableNames
?>

edgore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

Re: the variableNames errors on Windows server 6.1.1?

Post by edgore » Thu Oct 17, 2013 4:07 pm

The variable names function should not error out, even if there are no variables - it should return four blank lines (which would all show up in one line in a browser) as it does on the desktop. Getting an error 500 is bad, since it doesn't mean there was no response or output from the server, it means , generally, that there is an error in a script or the engine halted.

Did you try it on a windows server and have it crash for you too? just curious to see if you saw the same behavior.

Also, it should not be empty - when running on server there are automatically several environmental arrays that should be showing up (which are actually what I am interested in displaying and monitoring). I have also tried it in situations where I know there are variables - for example:

Code: Select all

<?lc
put 5 into aNumber
put the variableNames
?>
Same 500 error.

I've gone ahead and filed a bug report about it.

edgore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

Re: the variableNames errors on Windows server 6.1.1?

Post by edgore » Thu Oct 17, 2013 6:30 pm

This also give the same 500 error:

Code: Select all

<?lc
put 1 into aNumber
put the variableNames into aVariable
put "<html><body>This is a test -" && aVariable && "</body></html>"
?>
It works fine if you comment out line 3, so I definitely think that the variableNames is broken on windows server 6.1.1

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5861
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: the variableNames errors on Windows server 6.1.1?

Post by jacque » Thu Oct 17, 2013 6:33 pm

edgore wrote: Also, it should not be empty - when running on server there are automatically several environmental arrays that should be showing up (which are actually what I am interested in displaying and monitoring).
The environment variables are global:

put the globals
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

edgore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

Re: the variableNames errors on Windows server 6.1.1?

Post by edgore » Thu Oct 17, 2013 7:28 pm

That means they should show up on line 4 of the output from the VariableNames:

From the dictionary:
The variableNames function returns a value consisting of four lines:
1. Parameters passed to the current handler (including leading '@' for parameters passed by-reference)
2. Local variables created in the current handler
3. Local variables created in the current script but outside all handlers
4. Global variables

Even if there were somehow no variables at all the last example I posted should never fail - it should always output at least <html><body>This is a test - </body></html>. Instead it returns a 500 error if you call the variableNames() function. So, pretty sure this is a bug in the windows server engine, since everything works right on desktop.

samuel.vannesteBUSGvXT
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 43
Joined: Wed Sep 19, 2012 6:32 pm
Location: Versailles, France

Re: the variableNames errors on Windows server 6.1.1?

Post by samuel.vannesteBUSGvXT » Thu Oct 17, 2013 10:48 pm

So, pretty sure this is a bug in the windows server engine
If it is a bug, it is on Linux too. Sorry to reply so lately but I did not have time to test before. Experiencing the same issue.

But I would like to point that my livecode server on Linux always produces error 500 when nothing is sent (reason why I suggested to put "" before anything else).

Post Reply

Return to “CGIs and the Server”