Is there a way I can assign the associative array elements to a variable in the .rsp file?
E.g. m_cTmpStr = _files[i].tmp_name
The above returns me an “Unrecognized phrase/keyword near column 32” error

I am trying to move the uploaded file to another location, since I am having problem using the _files[1].tmp_name as a memory var, I used the following temp workaround in .rsp :

move_uploaded_file(_files[1].tmp_name, ‘My_Temp_Name.jpg’)
copy file ‘C:\lianja\cloudserver\tenants\public\wwwroot\My_T emp_Name.jpg’ to “C:\lianja\cloudserver\tenants\public\wwwroot\myTa rgetFolder\My_Perm_Name.jpg’

Being able to access the _files[1].tmp_name will be ideal, as the program will need the filename and extension to move to the correct location. Anybody has any luck assigning the _files[1] into temp memory variables?


To access tmp_name store _FILES[1] to a new array:

myfilearray = _FILES[1]
m_cTmpStr = myfilearray.tmp_name


tried running a dos command in the rsp to scale an image, with the following codes:

m.cArg = “c:\mydoscommand\myimagescaling.exe C:\lianja\cloudserver\tenants\public\wwwroot\_myim ages\_upload_000022f4_3.jpg /scale=(800,600)”

run (m.cArg)

I can execute the above 2 lines in the console to successfully scale the image.
But when i run the browser, the uploaded image does not get scale.

A: is not supported in web and mobile.


I believe this is a security precaution: running system commands from a server connected to the web is a major security risk.

I would suggest seeing if you can run execPython in an RSP page (I’m thinking not, but it’s worth a try). There are Python libraries readily available for scaling images.

node.js libraries are available for image scaling also: node.js is distributed with Lianja, and Lianja.evalJavascript() is available in web/mobile, so this definitely should work.


When using VFP for server side scripting of functions and/or RSP pages, can you instantiate and use VFP class libraries to perform work?

Most of our current code base in held in straight prg class libraries and I’m assuming we can utilise these classes within Lianja.


Yes you can use both procedure libraries and class libraries in server side rsp pages.

Generating JSON using a single sql statement is trivial.


Categories RSP

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s