Page 1 of 1

*.php vs *.lc?

Posted: Wed Aug 26, 2015 2:58 pm
by sms5138
Hi everyone,

I'm working through a middleware solution for a project that i'm working on, and have seen multiple examples. Some use .php while some use .lc. I'm wondering if this is just based on personal preference/comfort level with the given language, or is one more secure than another?

Thank you in advance!

-Sean

Re: *.php vs *.lc?

Posted: Wed Aug 26, 2015 4:39 pm
by ghettocottage
Some more experienced developers might chime in here, but my thought is that you are correct: it is just based on personal preference/comfort level with the given language.

PHP or Livecode will be as secure as you make it.

Personally, I prefer to use Livecode as the middleware since I can use the same functions and language in the front-end and back-end. Although I am more familiar with PHP, I enjoy Livecode language more, and often find myself in a web-project where I am trying to tell php to do something and forget that I cannot simply say "put it into myVariable"

Re: *.php vs *.lc?

Posted: Wed Aug 26, 2015 8:15 pm
by sms5138
Thanks for getting back to me!

I have to agree with you. I've already started tinkering with a .lc solution, and using some pretty helpful resources here in the forum.

Re: *.php vs *.lc?

Posted: Wed Aug 26, 2015 9:51 pm
by Dixie
I have to agree with 'ghettocottage'.. I use .lc files for the simple reason you use liveCode in the script of the files... it makes it all seamless... :-)

Re: *.php vs *.lc?

Posted: Thu Aug 27, 2015 3:49 pm
by sms5138
I've started using .lc, and am liking it so far. As you guys said it is pretty seamless, and straight forward. One question i have (that may be pretty simple) how to you take the data that's sent back from the .lc script, and put it into a datagrid?

I'm able to get it to complete the query like i want, and pull the information that i need, but do not know how to move that variable into a datagrid.

Any help you may have would be greatly appreciated.

Thanks!

Sean

Re: *.php vs *.lc?

Posted: Thu Aug 27, 2015 4:48 pm
by ghettocottage
Something like this (if your variable is named tQuery):

Code: Select all

      set the dgText of group "DataGrid" to tQuery

Next step is learning to encrypt your data to and from the server.
I started playing with that, but only got as far as encrypting to the server (no back)..but what I have has been working well. If I can find time today I will put it on Github

Re: *.php vs *.lc?

Posted: Mon Aug 31, 2015 2:42 pm
by sms5138
Hey!

Sorry it took so long to get back to you! life got a bit busy, but wanted to thank for your help. looks like that did the trick!

regards,

Sean

Re: *.php vs *.lc?

Posted: Fri Sep 18, 2015 9:03 am
by sphere
It also depends were your webserver is running. Many hosts do not run LC or even know LC or just do not allow you to run it.
So then you have to use PHP.

Re: *.php vs *.lc?

Posted: Fri Sep 18, 2015 9:50 am
by FourthWorld
LiveCode is as easy to install as any other CGI program. While it's convenient when you can find a host like mHost.com or on-rev.com with LC Server preinstalled, it can usually be installed in nearly any other host minutes.

Re: *.php vs *.lc?

Posted: Fri Sep 18, 2015 8:37 pm
by sphere
I followed this: http://lessons.runrev.com/m/4070/l/3665 ... a-htaccess

but i get a forbidden 403 error

So i'll have to request my host if it is allowed.

Re: *.php vs *.lc?

Posted: Fri Sep 18, 2015 8:42 pm
by FourthWorld
sphere wrote:I followed this: http://lessons.runrev.com/m/4070/l/3665 ... a-htaccess

but i get a forbidden 403 error

So i'll have to request my host if it is allowed.
If your host doesn't provide SSH access to your server it's not a good fit for development. If they do, you should be able to set the required permissions yourself without need to wait for them.

Re: *.php vs *.lc?

Posted: Fri Sep 18, 2015 8:52 pm
by sphere
I just checked, they only provide SSH on a dedicated server :cry: