Hi there,
I have an issue using a HTTPSocket in a web app.
The app works fine locally in debug (OSX) but gives a “500 internal server error” when deployed as CGI.
The app was working fine until I added HTTPsocket in a new window.
The error is reproduced creating a small test app with a single window.
The log error on the web server gives:
[Tue Oct 28 15:45:02 2014] [error] [client 99.99.99.99] Can't use an undefined value as a symbol reference at test.cgi line 118.
[Tue Oct 28 15:45:02 2014] [error] [client 99.99.99.99] Premature end of script headers: test.cgi
Line 118 in test.cgi is
print $sock $body;
The only processing in the shown event of the main window is:
Dim Sock As new HTTPSocket
Dim content As String = Sock.get("http://api.jotform.com/form/....................", 30)
result = loadContent(content)
TextArea1.Text = result
If I just remove the httpsocket related lines like this it works:
' Dim Sock As new HTTPSocket
Dim content As String = "{"responseCode":200,"resultSet":{"offset................"}}" ' this string is copied/pasted from the results I get when debugging
result = loadContent(content)
TextArea1.Text = result
Context:
Dev: Xojo 2014r2.1 on OSX 10.9.5
Web: linux server at 1701hostings (I have other web apps running on the same server, so it’s not a server or permissions issue) .
I hope someone can help.
Thanks !