Shared Hosting (Solved)
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Shared Hosting (Solved)
Hi,
I decided that i want to build a personal project for my interest and have decided to use livecode to deploy it as a mobile application. However, i have some question which i hope i can find some answers here.
1. Would LiveCode be compatible/connected to a database that is in a shared hosting server? From my knowledge, it is generally harder to do it on a database that is in a shared hosting server.
2. If not, should i get a database on a vps server or a dedicated server? Which would be compatible with livecode and able to execute its commands faster which results in a lesser lag time.
Thank you!
I decided that i want to build a personal project for my interest and have decided to use livecode to deploy it as a mobile application. However, i have some question which i hope i can find some answers here.
1. Would LiveCode be compatible/connected to a database that is in a shared hosting server? From my knowledge, it is generally harder to do it on a database that is in a shared hosting server.
2. If not, should i get a database on a vps server or a dedicated server? Which would be compatible with livecode and able to execute its commands faster which results in a lesser lag time.
Thank you!
Last edited by EddieLee on Sun May 10, 2020 12:59 pm, edited 1 time in total.
Eddie 

Re: Shared Hosting
1. Yes LiveCode is "compatible" with shared hosting. If you are talking about LiveCode Server setup, then you have a bit more direct control (depending on the hosting service) to install the engine, but it is not really any "easier" - you still have to know what you are doing (and potentially have more chances to break the server). Otherwise you would have no practical difference in connection. Either way, you should not be having an app that connects directly to the database from the internet. Always send posts to a server script (whether php or LiveCode) that sanitises and verifies the data and actions to then update the database.
2. If this is for a personal project I can't see you needing to worry about laggy response from a shared host.
2. If this is for a personal project I can't see you needing to worry about laggy response from a shared host.
Re: Shared Hosting
Hi Sparkout
1. However, I’m unable to connect to the database when using a shared hosting and have been unable to solve the issue. Do you have a sample which I could try? I’m unable to establish a connection with my
P.S This is the reference I’m using to establish a connection.
http://lessons.livecode.com/m/4071/l/70 ... l-database
2. Maybe in the future I would be deploying it in the play store for other users.
Thanks so much!
1. However, I’m unable to connect to the database when using a shared hosting and have been unable to solve the issue. Do you have a sample which I could try? I’m unable to establish a connection with my
P.S This is the reference I’m using to establish a connection.
http://lessons.livecode.com/m/4071/l/70 ... l-database
2. Maybe in the future I would be deploying it in the play store for other users.
Thanks so much!
Last edited by EddieLee on Sun May 03, 2020 9:53 am, edited 1 time in total.
Eddie 

Re: Shared Hosting
As Sparkout already pointed out, for security reasons you should avoid to connect to the DB directly from your App, if the DB is hosted online.
Here´s a link to an HTTPS-Based LiveCode-MariaDB/MySQL API which allows your mobile or standalone app to communicate with a MySQL or Maria DB.
https://www.hostm.com/tutorials/livecod ... iadb-mysql
Here´s a link to an HTTPS-Based LiveCode-MariaDB/MySQL API which allows your mobile or standalone app to communicate with a MySQL or Maria DB.
https://www.hostm.com/tutorials/livecod ... iadb-mysql
Re: Shared Hosting
Hi Matthiasr,matthiasr wrote: ↑Sun May 03, 2020 9:49 amAs Sparkout already pointed out, for security reasons you should avoid to connect to the DB directly from your App, if the DB is hosted online.
Here´s a link to an HTTPS-Based LiveCode-MariaDB/MySQL API which allows your mobile or standalone app to communicate with a MySQL or Maria DB.
https://www.hostm.com/tutorials/livecod ... iadb-mysql
Thanks for the help, I will try and see if it works tmr. Any idea why the lesson on livecode is not working for me? And is the way of doing connected directly to the DB?
http://lessons.livecode.com/m/4071/l/70 ... l-database
Thank you!
Eddie 

Re: Shared Hosting
Seems i missed your previous post.EddieLee wrote: ↑Sun May 03, 2020 9:45 amHi Sparkout
1. However, I’m unable to connect to the database when using a shared hosting and have been unable to solve the issue. Do you have a sample which I could try? I’m unable to establish a connection with my
P.S This is the reference I’m using to establish a connection.
http://lessons.livecode.com/m/4071/l/70 ... l-database
Many shared hosting systems do not allow by default the remote connection to the DB
Some systems allow to setup the remote access either for an ip or a domain, but as written before you should avoid this for security reasons.
The best way is using server side scripts which do the communication between your app and the DB.
Re: Shared Hosting
So by using server side scripts, what is the benefit of it as compared to a remote access? And also is there any lessons or reference I can use to follow through to ensure that my connection to the DB is successful? I want to try the difference between using remote access and using server side scripts and hope that I may use remote access to develop the app first and if it deploys to play store, I may change to using server side scripts.matthiasr wrote: ↑Sun May 03, 2020 10:05 am
Seems i missed your previous post.
Many shared hosting systems do not allow by default the remote connection to the DB
Some systems allow to setup the remote access either for an ip or a domain, but as written before you should avoid this for security reasons.
The best way is using server side scripts which do the communication between your app and the DB.
Eddie 

Re: Shared Hosting
Please don't.
The benefit of server side scripts is that you can receive any valid update requests and verify/sanitise them, and have the server process them securely.
If you allow a direct connection from your app, you are also allowing a direct connection from anyone, anywhere not using your app. It's so much harder to secure against vulnerabilities, and open to brute force attacks. It won't be long before you get automated hack attempts, and sooner or later...
Not that that means that server side scripting is without vulnerability. But it is much more inherently secure.
The benefit of server side scripts is that you can receive any valid update requests and verify/sanitise them, and have the server process them securely.
If you allow a direct connection from your app, you are also allowing a direct connection from anyone, anywhere not using your app. It's so much harder to secure against vulnerabilities, and open to brute force attacks. It won't be long before you get automated hack attempts, and sooner or later...
Not that that means that server side scripting is without vulnerability. But it is much more inherently secure.
Re: Shared Hosting
Thanks, I Guess I will go ahead and use server side scripts to establish a connection to the database. Any idea where can I find references/tutorials for me to follow as I guess the link I provided from livecode is for remote access?SparkOut wrote: ↑Sun May 03, 2020 12:27 pmPlease don't.
The benefit of server side scripts is that you can receive any valid update requests and verify/sanitise them, and have the server process them securely.
If you allow a direct connection from your app, you are also allowing a direct connection from anyone, anywhere not using your app. It's so much harder to secure against vulnerabilities, and open to brute force attacks. It won't be long before you get automated hack attempts, and sooner or later...
Not that that means that server side scripting is without vulnerability. But it is much more inherently secure.
Eddie 

Re: Shared Hosting
Mathias already posted a good tutorial for using server side scripting for database access above, repeated here: https://www.hostm.com/tutorials/livecod ... iadb-mysql
It's based on LiveCode Server as the script engine. Your setup specifics for the script engine configuration and database management depends on your hosting service, but this is fairly generic and should be a good starting point.
This thread viewtopic.php?f=12&t=27521 could also give some insights for other flavours of middleman scripting in php.
It's based on LiveCode Server as the script engine. Your setup specifics for the script engine configuration and database management depends on your hosting service, but this is fairly generic and should be a good starting point.
This thread viewtopic.php?f=12&t=27521 could also give some insights for other flavours of middleman scripting in php.
Last edited by SparkOut on Sun May 03, 2020 2:46 pm, edited 1 time in total.
Re: Shared Hosting
Hi, I realise the website above provides web hosting which is not needed for me as I’m doing a mobile application, any advice on what should I do next? I Guess what I’m looking for is server hosting and is any of them compatible with livecode?SparkOut wrote: ↑Sun May 03, 2020 2:21 pmMathias already posted a good tutorial for using server side scripting for database access above, repeated here: https://www.hostm.com/tutorials/livecod ... iadb-mysql
It's based on LiveCode Server as the script engine. Your setup specifics for the script engine configuration and database management depends on your hosting service, but this is fairly generic and should be a good starting point.
Eddie 

Re: Shared Hosting
The tutorial and the downloadable file are provided by HostM, who is indeed offering Webhosting. But you can use the tutorial and their scripts for free on every server you want. You don‘t have to subscribe to any of HostM‘s services. So in your case, you could install the free Livecode Server on your shared host, download the sample scripts from HostM and you should be ready to go following the instructions from HostM
Re: Shared Hosting
Hi,matthiasr wrote: ↑Sun May 03, 2020 3:55 pmThe tutorial and the downloadable file are provided by HostM, who is indeed offering Webhosting. But you can use the tutorial and their scripts for free on every server you want. You don‘t have to subscribe to any of HostM‘s services. So in your case, you could install the free Livecode Server on your shared host, download the sample scripts from HostM and you should be ready to go following the instructions from HostM
What if my shared hosting does not comes with the livecode server? So actually I’m confused at what I need in order to develop a mobile application. Firstly I need a server and a database hosting service? Any recommendations?
Eddie 

Re: Shared Hosting
OK, let's go back to hhe beginning. What type of application are you planning?
Do you intend to have a standalone app for use on mobile device, with data stored locally on that device? Or a server-based database to which multiple mobile devices make connections (through server-side scripting layer, as mentioned)?
What sort of app do you have in mind and what sort of data will you be storing and processing?
You may (or may not) need server hosting. If you do, then even if your hosting package does not include LiveCode Server by default, it is reasonably straightforward to set up on most hosts. Recommendations are a bit tricky as service offerings will depend on your location and other factors. Find out what package you want to sign up with a host of your choice according to budget etc, and we should be able to help get you set up. In the extremely unlikely case of being unable to use LiveCode Server there will undoubtedly be a php setup that you could use Sphere's library for, as per the old forum thread in the additional link above.
Do you intend to have a standalone app for use on mobile device, with data stored locally on that device? Or a server-based database to which multiple mobile devices make connections (through server-side scripting layer, as mentioned)?
What sort of app do you have in mind and what sort of data will you be storing and processing?
You may (or may not) need server hosting. If you do, then even if your hosting package does not include LiveCode Server by default, it is reasonably straightforward to set up on most hosts. Recommendations are a bit tricky as service offerings will depend on your location and other factors. Find out what package you want to sign up with a host of your choice according to budget etc, and we should be able to help get you set up. In the extremely unlikely case of being unable to use LiveCode Server there will undoubtedly be a php setup that you could use Sphere's library for, as per the old forum thread in the additional link above.
Re: Shared Hosting
Hi SparkOut, thank you so much for your helpSparkOut wrote: ↑Sun May 03, 2020 4:31 pmOK, let's go back to hhe beginning. What type of application are you planning?
Do you intend to have a standalone app for use on mobile device, with data stored locally on that device? Or a server-based database to which multiple mobile devices make connections (through server-side scripting layer, as mentioned)?
What sort of app do you have in mind and what sort of data will you be storing and processing?
You may (or may not) need server hosting. If you do, then even if your hosting package does not include LiveCode Server by default, it is reasonably straightforward to set up on most hosts. Find out what package you want to sign up with a host of your choice according to budget etc, and we should be able to help get you set up.
I’m planning to do a mobile application for Android first and iOS later when I’m about to be done on the Android.
I would like to use a server based database whereby multiple users are able to make connections to the database at the same time. I probably have to subscribe to a shared hosting or a vps?
The app is a menu app whereby users are able to view the different types of food available from a specific store. It mainly contains pictures and descriptions of the food. It should also store the selection of the food that is chosen and and in the future, allow the user to make payment on the application itself.
I practically have no experience in setting up the livecode server on a hosting service as I have not done it before. Doesn’t livecode server only included in livecode Indy?
I hope that you can recommend a server hosting service(preferably with livecode server) if you’re familiar so that I can get started on. Budget is quite flexible as it is a personal project for now which might be integrated into a business in the future which is why I do not mind spending more.
Thanks so much again
Last edited by EddieLee on Sun May 03, 2020 5:23 pm, edited 3 times in total.
Eddie 
