PHP in Google App Engine

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.2.x. If you need support for phpBB 3.2.x please visit the 3.2.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
fruel
Registered User
Posts: 2
Joined: Sat Jul 19, 2014 12:47 am

Re: PHP in Google App Engine

Post by fruel »

I tried to install phpb 3.0.12 on Google App Engine using Fredsa's tutorial.

The setup worked fine (I copied an existing forum and did not install a new one) and the performance is really good but there are some big problems left:
  • preg_replace with the /e modifier (fixed in 3.1.0)
  • File uploads: Due to the design of Google App Engine the filesystem is not writable. To store files you need to use Google Cloud Storage which can be accessed from PHP with a stream wrapper (e.g. gs://storage-bucket/123.txt)
  • E-Mail - Google App Engine has its own Mail-API instead of PHP's mail() function. (using SMTP mail might work)
The biggest problem is file uploads - the other things I might be able to solve.
Is there any way to tell phpbb to upload files to gs://storage-bucket/ instead of files/ and images/avatars/upload?

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1836
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: PHP in Google App Engine

Post by DavidIQ »

Those paths are stored in the config table I believe. I don't think we'd fix any of this in the 3.0 line though. How does 3.1 fare?
Image

fruel
Registered User
Posts: 2
Joined: Sat Jul 19, 2014 12:47 am

Re: PHP in Google App Engine

Post by fruel »

Yes, GAE support in 3.1 would be very cool.

I tried changing the path for the uploaded files from "files/" to "gs://my-storage-bucket/" in the administrative area but it claims that this location is not writable.
(The path was correct - I tried creating a file in a sepereate php script using fopen/fwrite and it worked)

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1836
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: PHP in Google App Engine

Post by DavidIQ »

Maybe try changing it directly in the config table and see what happens. You'd have to purge the forum cache.
Image

Post Reply