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.
Related
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.
I currently work for a company that is developing a web and mobile application. I've been programming for a while now, but am less familiar with web development. I previously had been writing specialized python scripts for the company; they wanted me to transition into developing their web app. The web dev is currently being outsourced, so there aren't employees at the company that are familiar with how the website was developed. The third party is aware of my task, but is not very helpful and would prefer I only make changes locally.
What I need to do :
I need to put the Drupal site onto a local server, so I can make changes without breaking what was previously built or being on the outsourced web server.
Site specs:
Drupal 7.52
mySQL
PHP 5.6.30-1
Apache/2.2.22
My specs:
Windows 10
I have the website files (code and database). I keep encountering the same error, and have tried a number of different solutions and web stacks. When I go to upload our database into phpMyAdmin, I get an error about the database being too large (unzipped, around 118,000 KB, zipped, around 12,000 KB). I have tried a number of workarounds, and keep falling short. I've changed max_allowed_packets, $cfg['UploadDir'], and many more recommendations given here on Stack Overflow.
I've uninstalled everything from my system, so I can just start over from scratch. If anyone can give a set of instructions for how I would take the website files, upload the large database, and then have a copy of the website on a local server, that would be miraculously helpful.
Thank you!
You could use a virtual machine like this project https://www.drupal.org/project/vdd, which has what you need for local development and you will not need to mess up with our local OS
I've spent the entire morning scouring the internet trying to find a solution to this and I haven't found one yet so now I'm here. I have a LAMP server on digital ocean and I want to use it strictly as a database server. I have a Jekyll site on Github that I've got up and running, but I want to know if there is a way to send users over to my LAMP server for authentication, but use my Jekyll site for the rest of the website. Would it be possible to redirect the page to the server and then have the root directory of the virtual host in the url location? I want to implement this all on the same domain, but I want to do it this way to make it fast and efficient.
Would I have to use different two nameservers from different domains and would this cause any problems?
I know you can do a Jekyll-Angular-Firebase stack, but I want something that I can maintain on my own and don't have to pay $50 a month for.
Would it be possible to talk to the database in the form itself so that everything else is static and doesn't have to be processed by the lamp server?
Any help would be greatly appreciated. Thanks you.
Just deploy/upload your static site (the '_site' folder in Jekyll) to your LAMP stack and add some php files for authentication.
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.
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.