Creating Local AMP Application on Network Share - php

I've recently begun to develope web applications with Apache web server, MySQL database server and PHP. My work is looking for a cheap efficient way to update an older split Access database which currently is configured with the backend residing on a network share and the front-end being distributed to end users.
Is it possible to install an AMP stack on a network drive and have multiple users at different locations access a php site on an Apache web server backed by a MySQL server. Could the end users simply access the site through the IP address of the network drive?
Any feedback is greatly appreciated!!

I am not sure how you can install it on a network drive because apache server needs to run as a service and binds its self with port 80 or any other as you customise.
All I can suggest is you can install wamp http://www.wampserver.com/en/ on any of your network machines and access it locally from within your network.
Simple as it sounds.

Related

Server data accessing from non local network without port forwarding

I'm using XAMPP server and I have my files in htdocs folder of XAMPP.
I had connected to my laptop using my mobile hotspot.
Can I access my files in XAMPP folder from another system which is not in same network i.e., can I access the files present in XAMPP folder from another another computer via internet
without router only by mobile hotspot?
Yes, it's possible to access the web server from an external network, depending on your current network configuration.
There are two simple solutions I think would suit you.
Configure your firewall if needed, enable port forwarding in your router settings to forward port 80 to the internal IP of the machine running your XAMPP-server.
If you're on a network in which you can't configure, I recommend checking out ngrok.com, which is a service where you can setup a public URL for your XAMPP-server. Works from any type of network, where you have internet-access, of course.
Note, alternative 2 is good for exposing a development-server, nothing I'd recommend for running a site in production.
Most network providers don't allow accessing the termials in the network.
If your provider does portforwarding and entering the public(!) IP of your hotspot should bei enough.

Desktop Application with Client Server Architecture That Syncs with Cloud Database

I have a web app running with PHP and MySQL.
I need to develop a desktop application which will sync data from the cloud DB whenever the client's computer connects to internet. If the client's computer is not connected to the internet, the desktop application will continue to work offline, using the local DB. The local DB is obviously a replica of the cloud DB.
I don't want to use Microsoft c# to create the desktop application. The desktop application needs to be cross platform and should run on Windows, Mac and Linux.
I have used XAMPP to create a local MySQL DB and have achieved the local app to sync with the cloud app. However, there are multiple problems to that approach.
-- Whenever my client's need to install the local app, they need to call me and I have to install XAMPP in their computer, setup the server, setup the local database and prepare it to sync with the cloud database with their account. They obviously aren't tech savvy so they don't know how to do it themselves.
-- If the client formats his computer, they will call me again and again and I have to set it up for them all the time, which isn't scalable in the longer haul.
-- XAMPP doesn't work when there are other processes running and using common ports. Example - Skype, Quickheal and other antivirus software running will prevent the SQL server to start. Sometimes what happens is that even after I have installed the local app, the client will install an antivirus software or some other tool and my local app will stop working on their computer.
Hence, I need to do away with XAMPP and switch to something else.
SQLite is out of question since it is serverless. I don't want to use .NET either. What I am looking for is this
I want to develop the database driven local application and package it somehow. I want to provider an installer file which will automatically install the database server, setup the database and everything else. The client will only login to the system in the local app and he doesn't have to setup any server. All the work that he does will be synced with the cloud server whenever internet connection resumes.
Please note that there is a master slave work involved. The client will have multiple terminal computers using the master system from other terminals and all these terminal computers will use the local database installed in the master computer.
I have tried to illustrate this with a diagram below
What's the best way to go about it?

Securing Xammp file on a windows oS

I want to install Xampp on my client machine for the organization to make use of the Application i build for them on a local network...
How can i secure the files in the htdocs in order to restrict third party from stealing/accessing the file of the App.
I will like to secure the files either using password or any other means and still make the Application files accessible by other systems.
Thanks in advance!
I would highly recommend against this, this is not what XAMPP was designed for.
I would set-up a virtual machine on their LAN and set-up a LAMP stack and host the application that way

Web Hosting on Amazon AWS (PHP + MySQL)

I am totally confused on how to host a Dynamic website created using PHP and MySQL in Amazon Cloud.
I went through Amazon S3 and I hosted a static website there!
Then I tried Amazon EC2 and I learned some aspects about the concept of VPC. I thought that the dynamic websites are hosting in Amazon Cloud using EC2. I followed some steps and they taught me how to launch a website using Drupal (But, I didn't want that !! )
No other tutorials on EC2 to deploy my web application was not found.
Then I found AWS Elastic Beanstalk, I uploaded a simple PHP document and I can see that deployed successfully.
But Still, I am not satisfied. Because, I don't know which is the correct way to deploy my PHP application.
So can anyone direct me on Deploying a PHP MySQL Application in AWS ?
Depends on your needs. Elastic Beanstalk might be a good option for many apps, but I chose EC2 for my app's backend (using PHP, MySQL and S3 for storage).
Quick steps to get you up and running:
Log into the AWS Mangement Console and start a new EC instance (Windows server 2012 R2 Base > t2.micro should be good enough for a start!)
At step "6. Configure Security Group", add Rules for at least HTTP, HTTPS and RDP (so you can connnect via Remote Desktop)
Connect to your new instance via Remote Desktop and install a decent browser (Enable File Downloads in IE's Security Settings and download Chrome or Firefox)
Open the Windows Firewall and add rules for the same ports you opened in the Security Group of your Instance in the AWS Management Console. (Right-click on “Inbound Rules”, then select “New Rule…”)
Download and install XAMPP (I put it in C:\xampp)
Open the XAMPP Control panel and install Apache and MySQL as services (so they will start automatically when your instance launches); make sure everything is started up.
Now put your files in C:\xampp\htdocs\ and you're ready to go!
Bonus Steps:
Set up Filezilla FTP Server (and open the required ports in both the instance's security group and the Windows Firewall) so you can upload/download files without having to go through Remote Desktop.
Get an Elastic IP and assign it to your instance, so it's IP address will never change.
Get an SSL certificate so you can use HTTPS
The answer depends on the load that you are expecting and the resources you have to handle all the administration tasks.
If you expect heavy or variable loads, there are many reasons why not to deploy a production PHP + MySQL application on a EC2.
Here are some of the benefits of deploying to Elastic Beanstalk instead of a manual configured EC2:
You get version control of each deployment.
You can scale up or down automatically if you need more/less instances to handle new load.
You get a load-balancer in front of your EC2s instances with a bunch of out-of-the-box "recommended" configurations.
Regarding MySQL, if you go for an Amazon RDS instance you can handle replication, monitorization and automatic backups with pretty low effort. A lot of the configurations you would need to tweak are now available through parameter-groups.
On the other hand, if you want to have full control of everything that is going on on your server (that means you have time to monitor, backup and do maintenance tasks, which is not my case :), or if you do not plan to have much traffic, or if you want the less expensive option, you should go with a low cost EC2 instance.
In my experience, (after 2 years of working on AWS with 10 production applications, I'm kind of a regular AWS user) pretty much every customization or change I needed on both RDS and EBS I was able to tweak it and get it working, so I'm pretty satisfied with choosing the EBS+RDS option.
Below are two links i found which are helpful to Create and Update an Application with AWS Elastic Beanstalk
https://aws.amazon.com/getting-started/tutorials/launch-an-app/
https://aws.amazon.com/getting-started/tutorials/update-an-app/

Ideas on ways to implement simple offsite clone of web app (php / codeigniter / mysql)

Have a web app installed on a local internal hardware. I am trying to figure out how best (even if possible) to replicate the data to an external server with the same app installed so they can sync the data between them. So if external they can access via web if internal they can access locally.
PHP / CodeIgniter App running on MySQL.
Had idea of having the local app remotely connect and use the external server DB as the main source but then thought what if internet isn't available how best could I handle that?
So your webservice runs on a machine in your local network. And if you're not on the local network you want to connect via Internet?
Can you detect when you're on the local network? Maybe this is as simple as trying http://mywebservice/, otherwise switch to Internet mode http://mywebservice.mydomain.com.
You could also consider dropping local availability. Does it happen a lot that you are on the local network but don't have Internet access?

Categories