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.
Related
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.
After reading several webs and google cloud documentation, I start thinking that is not possible to deploy a PHP git repo https://github.com/GoogleCloudPlatform/getting-started-php.git directly from Cloud shell.
In every tutorial, and in the documentation they always say you need the gcloud SDK to run it locally, but how about directly from Cloud shell?
The idea is to make work a PHP hello world example like the one in https://github.com/GoogleCloudPlatform/getting-started-php/tree/master/1-hello-world but I'm having problems with the runtime. Official tutorial
In env: flex, only the following runtimes are allowed:
('python-compat', 'java', 'java7', 'go', 'custom')
After reading I might be missing something related to docker file or composer.json, I did tests with this last one but without success so if there's a way it might be with docker file.
But while I continue investigating I wanted to know if it's possible and if I'm missing something.
Thank you!
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.
I'm trying to deploy my PHP app hosted on github to heroku. Unfortunately heroku doesn't recognise it as PHP and uses default Nodejs setup. I made sure i have composer file in the root directory as specified by heroku documentation page. I also copied Procfile from their example app. Wonder if anybody have an idea why heroku doesn't recognise my app as PHP?
UPDATE
If i push the project from my machine directly to heroku, everything works as intended.
Creating a ticket with heroku support revealed that once my app was recognised as nodejs wouldn't change automatically to PHP (I had a package.json file in my project which made it to look like nodejs app to heroku, and removing it wouldn't help). Simply creating new heroku app, without package.json file solved the problem.
You need to set the correct buildpack before pushing to heroku:
heroku buildpacks:set https://github.com/heroku/heroku-buildpack-php
does the trick.
I am trying to install Heroku for a facebook app. When i try to run $ heroku login as it says here: http://devcenter.heroku.com/articles/facebook#heroku_account_and_tools_setup I get the following error:
/bin/env: ruby: No such file or directory
I don't even want to use ruby, I need php. I don't have php/ruby installed. Can you help me?
Here is what you could do
Download heroku toolbet
Download TortoiseGit
Setup SSH keys, you can use putty agent
Git Clone the new heroku app you made using tortoisegit
Make changes on your folder
Commit your changes
Push the changes
Test the app via adding it on a facebook page
Its not as easy as it looks but it has to be done this way unless you have an https server.
There are documentations there that could help you out.
Good luck :)