Moving XAMPP project to real server - mysql

I'm a college student and an amateur in web development. I've been working on a query system to query some foxpro database tables for this company I am interning in. I was asked to implement my project in their local server (running on Windows Server 2003) and I am not sure where to begin since this will be my first time working with a real server and I have almost zero knowledge about it.
The project was done with PHP, Javascript, mySQL and JQuery and is developed in XAMPP. It will be accessed by everyone on the office intranet. I need to set up mySQL database for the login as well.
1) Would it be better to do this on IIS or Apache?
2) I am aware that XAMPP is Apache, but if I implement my project on IIS, will there be any difference or will I need to change my codes?
Any advice is greatly appreciated!

The answer to this question is governed by
the tech your project uses.
your need to coexist with the other services on that company W2003 server.
If your project happens to be the first web app to be served from that server, just set up XAMPP, move your files and database to the server, and be done with it.
But it's unlikely. You need to talk to whomever set up the last web app on that server. It's possible to set up a server so some web pages are served by IIS and others by Apache, but then those pages need different port numbers. That will make things more confusing and less convenient for your users.
php/MySQL/odbc works fine on IIS if that's what you need to use. You may have to monkey around with protections and so forth to get it tweaked out. But it will perform just fine.
The take-home lesson for you as you develop this small scale web app is to build things like that to fit the intended production deployment environment. XAMPP is a popular and successful development setup PRECISELY BECAUSE there are approximately Avogadro's Number of $4-per-month Linux-Apache-MySQL-php hosting services in the world that are entirely compatible with it. But that's not your deployment target this time.

Related

i would like to know few things about how to host and upload full website include(server ,react, mysql)

Finally i completed my first full project using server, client, data
i would like to know few things about how to host and upload full website include(server ,react, mysql)
i so wondering how that is work, for now i understand that to upload a simple website you need a domain and to hosting, just do npm run build and upload it..., this is something that i know but, when that is not just a simple website like
when i have such as
server side with Node.js + express that have requests (on localhost) *probably need to change the localhost to something else but what
Database running with MySql
React app that have many request to (localhost)
how can i hosting all of them and running my website for everyone, i mean that my sql will still running, CRUD Data will update normal, and the server will still get request and send or update them to mysql data.
and if I'll want to make some change on mysql, server, client
i want to change it like i change it now
Actually i'm not a FullStack developer if i don’t know it... 🥶 so i really interesting to understand all of that issues
i hope you guys havק An understandable answer for me, thanks 🙏 and just take your time :)
Well, where to start hehe. There are a lot of different ways to host a web app. Heroku for example makes this process really simple.
Personally, I use Digital Ocean to host my apps. This is generally how that goes:
I have a project with a folder structure that seperates the server logic and the client logic.
Since you're using Node, you build your client with npm run build. Next make sure the dist/build folder is inside your server folder. That is the folder you are going to 'host'. On Digital Ocean, you make a new droplet (which basically is just a tiny part of a server).
You install Node, Git, Pm2 and (for example) Nginx. You clone your project from Github to the server and install all the dependencies.
You have to do a few configurations with nginx (specifying a domain name for example) to make everything work. This article goes into more detail about that.
Also, a database is frequently hosted seperately. You should read more about that.
If you have everything setup, you can just code on your project as usual. Push new updates to github, and pull in the changes on the server.
Here is another post on Stackoverflow talking about hosting MySql with react.

Web Development, Domain and Site Hosting

I'm not 100% sure if I'm on the correct section but i'll transfer the post once I know where it's supposed to be but I am looking for advice regarding web development, setting up a domain and hosting it.
I'm currently working on a personal project using Cloud9. Which is an online development environment where I can develop and host. The reason why I chose this is because it has MySQL usability as I retrieve and store data on the project I am working on.
I am now at the point where I want to get a domain and host a site to transfer my project over to a live website with my own domain which also has SQL/MySQL usability.
Any advice or where would be the best place to look up on methods of pursuing this?
Edit: I develop using PHP and JavaScript with MySQL
To start I would suggest heroku, they have a free option and some nice guides, depending on which server side language you use . This way you can get used to hosting some apps and doing deployments, seeing logs etc.
The database doesn't have to be on the same hosting necessarily, you can use mongolab for example.
For domain names it's a different thing, you will have to use the likes of godaddy
Why not setup your own VPS (Virtual Private Server)? There are many providers..
Design the software application with portability and avoid vendor lock-in to cloud services. For file transfer, there are FTP/FXP, zip/gzip, & version control standards like Git, CVS, SVN, etc. Use phpMyAdmin for the database export & import process to change web hosts. Otherwise, build a staging subdomain or a local development environment with copies of the original web app & use those to transfer files+DB to a new host for production.

Duplicating existing cakephp app for development

I need to make a development version of a cakePHP app with its own db so that a developer can work on it without disturbing the current users.
I thought it would be simple, I just copied the entire director /project to /project_dev and then copied the DB "project_db" to "project_db_dev". Then I went into /project_dev/config/database.php and changed the db to "project_db_dev".
When I went to see what I had done, I saw the app was still connecting to the same db, as if I'd changed nothing. I realized that the original folder name was referenced in /app/webroot/.htaccess so do I need to find/replace all instances of that folder name?
What steps should I follow to duplicate an existing cakePHP app?
You need to setup some kind of development lifecycle.
Generally speaking the developer shouldn't be doing any development on the server. The best way to handle it is locally using a stack of some kind such as Lamp (Linux, Apache, Mysql, PHP) switch out linux with other OS's. There are multiple cloud solution to these environments to such as Koding.com
Using something like Git for version control the developer can develop locally then push the code through to the server after is being thoroughly tested locally or on a dev server or some kind.
Keeping Dev work and Live work away from each other is key.
Could do with a bit more information.
If both databases are hosted on the same server and you have permission to access them both with the same user then all you have to do is change the name of the database in your database.php
If not you will also have to update the IP and any other additional settings port etc.
If you are still having troubles email me simpsond1988#gmail.com

how to configure shared web hosting on ubuntu server?

i am planning to open a shared web hosting company. before opening i am configuring and checking that all things are up and running or not.
i had tried webmin, virtualmin and ajenti as web hosting manager on ubuntu server but i am not satisfied with them. is there any alternative to them which have secure administrator and client side control panel and easier to manager client account and hosts.
i am using apache2 as web server and mysql as database serve.
Thank You
Try ZPanel, it is cross-platform and has a great looking control panel. They also provide an installer which installs Apache, PHP, MySQL, and ZPanel, all pre-configured to run a shared hosting service.
Link
Getting shared hosting right isn't an easy thing to do especially if you want to allow your clients to use scripting languages like PHP. By default, PHP runs under the same userid regardless of which of customer the files belong to. So they will be able to see the files (including config files with database passwords) of the other customers.
There are ways around this problem, but most of them are either inconvenient for the customer or they bring other problems (like having to run the Apache as root).
Besides the shared hosting market is quite full with existing companies which have huge data centers and therefore can offer much more service at lower costs.
So my suggestion would be: Look at new services that you can provide. Docker Hosting or LXC Hosting isn't that common yet and you can better compete there.
If you really want to do simple shared hosting, and are in search of an admin tool: Try ISPCONFIG3

Server for mobile feed app (like Instagram, Twitter...)?

I've made a mobile native app with a feed system like Instagram/Twitter. In development mode I was just running a PHP/MySQL Apache local server, but now I need to publish the app and work with a real server. Which kind of server do I need? I just need to send http requests (JSON), loads of them!
Do I just need a hosting server like 1and1? (http://www.1and1.com/linux-web-hosting?__lf=Static)
But this one, it only has 1GB MySQL databases... not enough
Is there any kind of app/server whatever? Which kind of server does Instagram use?
These days lots of users are moving to the cloud.
Check out Amazon EC2: http://aws.amazon.com/ec2/
You can setup a micro instance server and it is very cheap to run tests on and get off the ground. Then if you like how it's running, you can simply upgrade to a more powerful server without having to re-install everything.
It also allows you to scale if your application gets really popular by just cloning the server.
Really worth checking out.