Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Download PHP App Engine Standard Source Code?

Hello,

Is there any way to download the source code to a PHP application that was uploaded to App Engine Standard in 2018? I've googled around and tried multiple ways:

1. I tried to install an old version of appcfg (suggested here), but appcfg failed to login with a security error

2. A SO answer suggested SSHing into the instance and grabbing the source code, but later I found that SSH is only available for flex instances, not standard GAE instances.

3. From this SO answer (https://stackoverflow.com/a/66794473 ) it suggests to use gcloud to show the source code and copy it out, but I tried on my application and it doesn't show the code nor a link to the source

4. From the same SO answer, it suggested going to Versions > Diagnose > Tools and then downloading the source code, but I don't see that on my GAE page.

ironforge_0-1698282032139.png

5. Again from the same SO answer, it suggests looking at Stackdriver Debugger. I've tried searching for debugger, tracer, profiler, etc in the GCP dashboard and none of them are showing the source code. 

 

Can anyone suggest a way I might be able to recover the source code for my PHP application?

Thanks for your help.

0 1 68.4K
1 REPLY 1

I can explain why some of the solutions aren't working for you

it suggests to use gcloud to show the source code and copy it out, but I tried on my application and it doesn't show the code nor a link to the source

This is probably because the source code is no longer in the staging bucket. When you deploy code to GAE using gcloud app deploy, it goes to a staging bucket and it stays there for 2 weeks, unless you change the setting. See this blog article from us for a detailed explanation 

> it suggested going to Versions > Diagnose > Tools and then downloading the source code, but I don't see that on my GAE page

That feature has been deprecated by Google (see annoucement)

 

One thing that you can try (to see if it works for you)

1. Go to https://console.cloud.google.com/storage/browser?project=<your project> 

2. Look for the 'artifact' bucket and click it. It should show containers > images. Check if your source files are there

 

..... NoCommandLine ......
 https://nocommandline.com
A GUI for Google App Engine