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
packing arrays to send to server on-rev issues
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: packing arrays to send to server on-rev issues
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
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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: packing arrays to send to server on-rev issues
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.
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.
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: packing arrays to send to server on-rev issues
Instead of urlencode, try base64encode.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: packing arrays to send to server on-rev issues
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
instead. If it returns false, then something is wrong with pData and we'll have to look into that.
Kind regards,
Mark
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
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode