How to deploy PHP backend application by google cloud - php

I install in the google cloud app engine the Apache and PHP.
I put the files in var/www/html/.
I try to connect to PHP by POST, it's not working.
seem the PHP files no running.
Please help me! Thank!

The way you use App Engine is by just deploying your applications, there is no need to install Apache or PHP on it. In fact there is a very simple guide over at https://cloud.google.com/appengine/docs/standard/php/quickstart which shows how to deploy a simple hello world application and you can start building from there.

Related

Upload my php project files to use with google cloud AppEngine

I've spent 10+ hours yesterday reading up about / testing tutorials with google cloud and how I can use them as a host for my dynamic website.
With all of the new information in my head, I'm scrambled on what to do.
I already have my Virtual Machine Instance built with an IP that links to my domain, this works fine. However, I cannot for the life of me figure out how to put my project files on there. I figured it would have been something like "upload project files", "link with appengine", "link with cloud sql", but it seems like I was wrong?
In the tutorials, I uploaded googles sample projects (tutorials) by cloning a github link in the shell.
git clone https://github.com/GoogleCloudPlatform/getting-started-php.git
They also said a zip file could be extracted as an alternative.
Are those the only way of doing this? Should I create my own github and cone it in the shell?
Is it possible to link an AppEngine with a bucket that has my project files on there? (just throwing the question out there)
bonus question: once the files are uploaded, am I able to edit/develop through google cloud or do I need to edit changes in my files, then re-upload it to the cloud as an update?
This is my first time trying to have google (or any company) host my website, and this is completely foreign territory for me so any direction is much appreciated.
there are couple things mixed up in your question. Let me try to untangle them.
You don't need to create virtual machine if you want to run your PHP powered website on App Engine. There's a great overview in this article https://cloud.google.com/appengine/docs/standard/php/an-overview-of-app-engine
The way you run your PHP website on App Engine is by deploying your code to the version, you can do it using gcloud app deploy tool from your sources on your local machine. I recommend you to start by going through tutorial on here: https://cloud.google.com/appengine/docs/standard/php/quickstart
There's currently no way to link Google Cloud Storage bucket with App Engine version, you have to deploy your code yourself using either gloud app deploy or using App Engine Admin API that gcloud is using internally.
There's no way to edit your App Engine application code in the cloud.

How to deploy a php application from local machine to google app engine

I am new to google cloud plateform. I have a php application on my local host and want to set up this on App engine. I followed some documentation and used gcloud deploy command for example given in documents. It was working properly. But in examples it first clone a git repository and deploy a code from that on app engine. I know how to launch app engine instance. But I am not getting how I will upload code from my local host to app engine. I know app.yaml and config files are needed but my question is - how I will upload and deploy code to app engine even if I created app.yaml and config files.
I heard about google app engine launcer but didn't find any valid source for installing on ubuntu. Is there any client software that can be used to deploy my code on app engine or is it compulsory to first set up my code on git then use it as given in example in document.
Follow the quickstart in the documentation. It covers everything that you need:
Downloading the Cloud SDK (The launcher is ancient and deprecated, don't use it.)
Creating a Cloud Platform project in case you haven't yet.
Running locally, which you've already figured out.
Deploying your project to App Engine using the gcloud app deploy <path_to_app.yaml> command.
You don't need or want the launcher. You don't need to do anything with git.
After installing google cloud SDK and following all instruction on here i sucessfully set up local development server and php application.

Cakephp 3.0 or > on Azure?

Is it possible to run Cake 3.0 or higher on Azure Web Apps? I have an app running locally on a 3+ version but when I installed CakePHP on my Azure web app it's running 2.5.1.
I feel like it's just a matter of uploading all of the newer files and the db created for the 3.0 version but scared there is some kind of write access the new cake will need thus preventing it from running and burning a ton of my time.
I started learning PHP 3 weeks ago so calling me a newb is probably an insult to newbs.
This article tells answered most of my original questions regarding this issue.
Yes, it is possible to deploy CakePHP > 3.0 applications to Azure Web Apps. But we need to some preactions to make the application to run. Generally, you can try to following steps:
Create an empty Azure Web Apps, and enable Composer extension, and also you can enable Visual Studio Online for easy script modifications and command running. Refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-mysql-deploy-use-git/#enable-composer-automation-with-the-composer-extension for more.
Create a file named web.config with the content at http://book.cakephp.org/3.0/en/installation.html#iis7-windows-hosts in the root directory of your application.
Add the inlt extension in PHP runtime on Azure. Add a folder named ext in your root directory, create a file ext.ini in this folder with the content:
extension=php_intl.dll. Add an App Setting to your Web App with the key PHP_INI_SCAN_DIR and value d:\home\site\wwwroot\ext. You also can do this step leverage Visual Studio Online extension after deployment. Refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-configure/ for details.
Set up the development environment of your Azure Web Apps, deploy your CakePHP application to Azure via Git. Refer to https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-mysql-deploy-use-git/#set-up-the-development-environment for details.

How to use Composer in PHP Google App Engine

Can anyone explain how I can get Composer working in Google App Engine (PHP)? I understand what composer is and how it works but I have no idea on how to get it onto my App Engine.
You need to run composer locally, and then upload the entire application that has been build by composer to production using the appcfg command.

site under maintainence for php and IIS server

I have a website running on php symfony2 framework with IIS has the web server .I wanted to display Site Under maintainence message whenever there is prod deployment .I tried using app_offline.htm by placing in the root driectory of my website but didn't workout.
Can someone suggest me a better way of handling this or how to make this work.
Any suggestion would be appreciated
Thanks!

Categories