Clueless on how to put my PHP project in the Internet - php

Good day!
I've searched for many sites on how I could deploy my PHP projet in the internet but I don't know how to do it because I am confused with some of the technical terms.
You see, I am using xampp for my local web server. Now I want to put it in the internet. I found some free web hosting sites so i've decided to upload all my htdocs files inside it.. But how can I put the xampp (apache server) and my mysql database on it? I'm confused. Please help. A step-by-step procedure of what should i do could be really helpful. Thank you in advance.

Get a hosting account (try www.bluehost.com for instance).They will set you up with a Linux server and MySQL. You don't have to install Apache or MySQL, you will use whatever they've got. All you need to do is upload your PHP files to the right folder, setup your database on their server and you should be good to go.

If you buy a domain-name and space, connect them using the NS settings
If you are using a free, then the settings are already okay.
Export the database from your XAMP.
Login to the remote server. There you'll find PHPMyAdmin. Import the database.
Upload the file.
Make sure file listing is off. That is if a user goes to any directory he can not see the file list!
Done :)

Simplifying a bit, there are two ways you can get your site online.
First, you could purchase or rent a server that is yours and yours alone. This is commonly called "dedicated hosting" and costs somewhere around $100 / month. If you choose this option, you have your own server housed in a datacenter somewhere, and you must install Apache, MySQL, and any other server software you care to use.
I doubt, given what you've described, you have chosen this option.
Second, you could rent "shared hosting" from any one of the dozens of hosting providers out there. If you do this, with a typical cost of $2 to $10 per month, the hosting provider is administering the server. You have no direct access at all. Your only access is through the tools they provide.
Given that, how specifically you can upload files is up to them (is it FTP? SSH? a horrifying web-based upload tool of some kind?) Similarly, how you access your MySQL databases (assuming they offer MySQL databases) is entirely up to them as well.
Many providers now use a tool called cPanel for this administration, so you may try browsing to www.example.com/cPanel (using your domain) on the off chance that works. If not, though, follow the instructions your host provides. Only they can correctly describe how their setup works.

The hosting will be already having apache and mysql installed you only have to put your files thats it

I suggest you contact your webhosting site. The web hosting needs to host php, and mysql. Then you can upload your files to their web server, and copy your mysql database to their mysql server.

You do not need to transfer xampp to your host: apache and mysql are running on nearly every server
Upload all your files in your htdocs directory via ftp to your server
To transfer your database, use phpMyAdmin. It is installed with xampp and alos installed on nearly every server. In phpMyAdmin, use the export/import functionality
In your php file where you connect to the db change the login settings to the settings the hoster gave you
That should work...

Hosting Company already have setup for apache,php, mysql. All you need to uploads all your
files from xampp htdocs to a right folder like public_html using a ftp software like
filezilla. They also provide a control panel like using which you can manage your mysql
database and all others settings like directory permission.

Related

how to install codeigniter on 1and1 (Ionos)?

I develop for the first time a site in PHP, I do not master this language correctly and I would like to know how to install Codeigniter on 1and1 hosting (Ionos). Thank you for your help
You will need to upload entire file/script using FTP to your hosting server and upload your database as well (usually using PHPMyAdmin from cPanel).
If you already have your configuration file done (MySQL username, password, and database name) but problem still occurs, I highly suggest you to reach their technical support.

How to publish a website built by HTML and PHP?

I built a website (localhost) using PHP and HTML through XAMPP. Now, I want to publish it online (webhost), available to everyone. What should I do? Thanks in advance!
First you need a host to upload your files. For this purchase hosting space from godaddy, bluehost or someother provider. You need to purchase a domain too. After domain and hosting space, if you have purchase linux hosting, then 90% chance is that you will get a cpanel. So log into your cpanel then navigate to 'public_html'. Inside this, using some ftp client like filezilla, or cpanel's build in upload feature, upload all your files. If your website needs a database, then you need to create a database, add database user and password using database wizard tools in cpanel.
When you will purchase a hosting, these things will be very clear once you login and expore a little.
Moving a website to another host consists of the following steps:
Moving the website's files.
Moving the website's database(s) (if any).
Configuring your application to work at the new host.
Pointing your domain's DNS to the new host.
A more detailed breakdown of these steps can be found below:
Transferring the files to the new host
The most convenient way to transfer your website's files to your new web hosting account is via FTP. You should connect to your hosting account and download the files locally to your computer. Then you have to upload them to your new hosting account's main folder (usually public_html, www or httpdocs).
More information on how to use FTP can be found in our FTP tutorial.
Transferring the website's databases
You have to export the database content from your old hosting account (usually into an SQL file), create a new database at your new hosting company and import the information in it. For detailed information on how to import/export databases via phpMyAdmin you can refer to this tutorial.
Application setup on the new host
This really depends from the website application that you are using. For step-by-step instructions on how to reconfigure some of the most popular applications
Check this out https://www.heroku.com/. The website will update as you push your code to the git. It's free, easy to use and good for small project.

REST API advice for beginner

I'm pretty new in this part of programming so any help would be appreciated.
I've made an app and now I want to allow the user to buy via Braintree. I have implemented it with help of some tutorials using PHP SDK, tested on phone using XAMPP and ngrok. It works perfectly (generates token, makes a payment using testing cards) but now I want to move it online. Just simply move that folder from XAMPP instalation folder somewhere online so I (and all other useres) don't need to use ngrok.
Actually, want to replace
final String API_GET_TOKEN = "https:/smthng-random.ngrok.io/braintree/main.php";
final String API_PAY = "http://smthng-random.ngrok.io//braintree/pay.php";
with
final String API_GET_TOKEN = "https:/WHATEVER/main.php";
final String API_GET_PAY = "https:/WHATEVER/pay.php";
so that can give me the same what I've got with xampp and ngrok.
Thanks in advance
btw: PHP is not my better side of programming so it would be great just to move those 2 files (main.php & pay.php) just like they are :) And I've just found that firebase might be option but just exploring for now :)
I think your request is unclear - it's not REST API advice at all, it's about deploying an application to a live environment.
You have successfully installed your web development environment locally (XAMP, nginx) and now it's time to go live.
You basically need a Linux server capable of running, well, apache mysql, php (get where that XAMP comes from?)
This is only an overview, search how to do each of the topics I'll describe:
1. Find a host. (You should go to the shared, vps hostings if you're inexperienced, otherwise, there are way better hosts like linode, digital ocean and AWS, but those can be a little more challenging for beginners.
2. Buy a domain
3. Point the domain's DNS to your host's IP address or NS
4. Now, upload those files you mentioned to the servers public folder. Servers public folders might differ, specially from shared / vps hostings to full-blown Linux instances. If you go the "cloud" way (digital ocean, etc) usually you'll drop the files at /var/www/html
You'll have to set up virtual hosts if you decide to go for the full blown Linux instances
The files should be accessible now. Make sure versions are consistent between your machine and your servers.

What kind of remote server service was I using?

I’m part of a very small company that uses a database hosted on a server (104.131.##.###). However, the server no longer responds and the person who set up and owns the server space has already left the company. This past employee seems disgruntled so they won’t help. It’s complicated, but we decided to open a new server. The only issue is, I don’t know what we were using.
What I do know is I would access and change the database at http://104.131.##.###/phpmyadmin/ (image of login below)
I also had php files stored on the server using Filezilla (in a “var” folder, if that helps) which were accessed via path: http://104.131.96.###/path/to/file.php
I’ve set up a version of the same server using xampp on my own computer, but I can’t keep my computer running constantly.
So my question is, what service were we using / should we use? Where would I start to set up a new server like this? (I still have the php files and can recreate the db)
I've looked into AWS and digitalOcean, but I'm in a bit over my head and can't tell if they're offering what we need.
Any help would be appreciated. Thank you
The server was using phpmyadmin and mysql and Digital Ocean.
So you need at least a LAMP stack. With the info given we can't help you more.

Do I need to install PHP, MySQL, and something like XAMP, if I already have an IDE, a webhost, and FTP client?

It seems like there are two ways to go, and the determining factor is whether you want to host on your own computer, or through a webhost.
If I have an IDE, a webhost server I subscribe to, and an FTP client to transfer my files to the server, then I don't need to install PHP, MySQL, and XAMP, right?
I know XAMP allows me make my computer website server.
When I install PHP, am I installing the intepreter for my computer/server to parse the .php files? (and same for MySQL?)
If I pay for web hosting, then their servers already have PHP and MySQL parsers, and all I need to do is upload my text files, right?
Thanks in advance
U just cant simply put the files in server without developing them.and if you want to develop any website or any webapp then u need to make your system a local server where you can execute your server side languages like php.XAMP is a short form for mysql,apache and php for windows.and 'website server' is not the proper word.use LOCALHOST instead because only u will have access to your server unless you are connected via LAN or WAN.so i can summarize the above in few points keeping in mind that you want to develop your website.
step 1:install XAMP
step 2:develop and test your scripts.
Step 3:if everything works fine than host your site in the webserver for everybody to see it.

Categories