Page 1 of 1
Launching LC stack from server, accessing file outside home
Posted: Tue Mar 18, 2014 3:26 pm
by shawnblc
Like php.
If I distribute an app with a splash screen that accesses the main application on the server, can that app that I upload to the server also access files outside of the public_html directory?
Example:
put url ("file:" & home/username/newdir/list.txt) into tList
answer tList
Re: Launching LC stack from server, accessing file outside h
Posted: Tue Mar 18, 2014 5:16 pm
by Klaus
HI Shawn,
not sure what you mean?
Do you access your "main application" (which is a livecode stack, I think?) with:
...
go url("http://www.some_server/folder/mainapp.livecode")
...
?
If yes, then no!
Since that stack is NOT on the server anymore, but on your machine.
If that is not what you mean, I need more info.
Best
Klaus
Re: Launching LC stack from server, accessing file outside h
Posted: Tue Mar 18, 2014 8:52 pm
by shawnblc
Splash screen -----> distributed to others
-----> splash screen accesses main app on the server
-------> main app on server accesses a text file on the same server that is outside of the home directory
Is that possible?
Re: Launching LC stack from server, accessing file outside h
Posted: Tue Mar 18, 2014 9:04 pm
by FourthWorld
For security reasons, Apache won't allow any client to access file outside the web root. But you can write a CGI to do that, since CGI's have all the permissions you do when you shell in.
Re: Launching LC stack from server, accessing file outside h
Posted: Tue Mar 18, 2014 10:25 pm
by shawnblc
FourthWorld wrote:For security reasons, Apache won't allow any client to access file outside the web root. But you can write a CGI to do that, since CGI's have all the permissions you do when you shell in.
Gotcha. That's exactly what I was looking for. Thank you!
Update: tested and works. Thanks Richard.