[Newbie Questions] Setting up and test a local php app before deploying in QCP

38 views
Skip to first unread message

Terry Middleton

unread,
Apr 16, 2019, 2:47:23 PM4/16/19
to Google App Engine
Hello GAE Developers,

I am wanting to develop a PHP app and deploy in the QCP.   I'm so close, yet I'm missing something because I'm not there yet.

Here's what I have done so far.

  • Downloaded the GCP SDK, PHP, App Engine, etc.  I've actually walked through deploying an php application (and it worked).

However, I have absolutely no idea what I did.  I just followed the instructions.  Although, I have somewhat of an idea.  I'm not 100% in the dark. I now understand what roll QCP plays and what it takes to push an app to QCP.  

What I really want to do is create the app in PHP, test it locally, then push it out to QCP.

My questions are:

  • What can I use to develop the PHP files locally, then test them?
  • Is it truly just creating the php files in a directory structure and declaring the app in the yaml file?
  • How do I setup my local environment?  I followed the instructions on this, yet I'm missing something because I don't see where I test it locally.


Any thoughts, directions, or insights would be so appreciated.  

Terry

Harmit Rishi (Cloud Platform Support)

unread,
Apr 17, 2019, 9:25:10 PM4/17/19
to Google App Engine

Hi Terry,

Thanks for using Google Groups!


I am not too sure what QCP is. Would you be able to clarify what you mean by that?

In regards to your questions:


1. What can I use to develop the PHP files locally, then test them?
Since PHP is a scripting language that is suited for web development and can be used to embed into HTML, you will need a local server to run your PHP code. You can check out the official installation and configuration guide that PHP offers on their official website here.


As for a code editor, there are plenty of free ones offered on the web. Typically, the one you use is based on preference.


2.Is it truly just creating the php files in a directory structure and declaring the app in the yaml file?

It depends on the size of your application, you may want to consult this documentation that highlights the configuration files required for PHP on App Engine standard.


3.How do I setup my local environment?  I followed the instructions on this, yet I'm missing something because I don't see where I test it locally.


You may use the PHP development server for App Engine standard here for local testing. This local dev server stimulates how your application would run in production on App Engine. Additionally, the local development server simulates the services provided by the libraries in the SDK for App Engine (i.e: Datastore, Memcache, Task Queues, etc). You may follow the instructions to set this up here.

Side note: I believe it would be worth it for you to check out the differences between our two App Engine environments (Flexible vs Standard) here.


I hope this helps!


Terry Middleton

unread,
Apr 18, 2019, 12:20:18 PM4/18/19
to Google App Engine
Harmit,

This very much does help.  Thank you for your details responses.  This goes a long way in helping understand the big picture of GCP and how the pieces fit together.   

Truly, Thank You!

Terry

PS.  QCP was a typo.  I meant to type GCP.  Not sure how that happens as the G and Q are really far apart on the keyboard.
Reply all
Reply to author
Forward
0 new messages