Page 1 of 1

packing arrays to send to server on-rev issues

Posted: Wed Jun 26, 2013 6:59 pm
by fenick
When I ran this on my local server:

function unPackArray pData, returnMe
local tError
try
put arrayDecode( URLdecode(pData) ) into pData
if pData = empty then
get doError ("error.10.no data received on server side.", returnMe)
else
return pData
end if
catch tError
get doError ("error.20.could not unpack on server side.", returnMe)
end try
end unPackArray

it unpacks the array and works nicely.

When I run this script when it is on on-rev. pData end up being empty and it returns my error message.

Since it is the same script, but performsn different, I thought someone on this board might have an idea of where else to dig.

-Nick

Re: packing arrays to send to server on-rev issues

Posted: Fri Jun 28, 2013 9:41 am
by Mark
Hi Nick,

What is the version of revServer? Perhaps it doesn't contain a routine for arrayEncode/arrayDecode. It would help if you returned tError instead of your own custom error. What does tError contain? Recently, I also read about someone who was unable to use arrays larger than 8MB.

Kind regards,

Mark

Re: packing arrays to send to server on-rev issues

Posted: Fri Jun 28, 2013 4:50 pm
by fenick
This happens on on-rev hosting. I do not know how to look up which version of the server they are using. Any ideas?

The try does not fail, do it never falls into the catch to set a tError

I Want to see what happens after put URLdecode(pData) into pData.... but I can't since it is reverted to non safe characters and gets messed up on the response from the server.

Re: packing arrays to send to server on-rev issues

Posted: Fri Jun 28, 2013 5:04 pm
by FourthWorld
Instead of urlencode, try base64encode.

Re: packing arrays to send to server on-rev issues

Posted: Thu Jul 04, 2013 11:49 am
by Mark
Hi Fenick,

I think that the version function should return the version of the LC server engine.

I see two possibilities. Either no data is sent to the On-Rev server and pData is actually empty, or the version of LC server on your On-Rev server doesn't recognise that an array is not an empty variable. Try

Code: Select all

pData is an array
instead. If it returns false, then something is wrong with pData and we'll have to look into that.

Kind regards,

Mark