BigPoppa
BigPoppa

Reputation: 1215

Working with Images on Google AppEngine for PHP

I would like to use the php appengine to create an image service which would require access to imagemagick or graphicsmagick or an images api if google has one. From my searching I don't see current support for any of these. Am I missing something?

Thanks!

Jim

Upvotes: 2

Views: 2152

Answers (3)

Tyguy7
Tyguy7

Reputation: 593

It looks as if ImageMagick is unable to read any files in. When attempting to read a file for manipulation, it always errors out because the filesystem is read-only. This happens with files located in upload tmp folders as well as files accessed from cloud storage. It seems that they introduced Imagick too soon.

PHP Fatal error: Uncaught exception 'ImagickException' with message 'UnableToWriteBlob `magick--1Xkv1q4AveVZ9': Read-only file system @ error/blob.c/ImageToFile/1726'

Upvotes: 2

Alvin K.
Alvin K.

Reputation: 4379

Update: Feb 2015

Edit: Users will have to enable this explicitly by specifying extension=imagick.so in their php.ini file.

(Enclosed below is email from Google)

In response to developer feedback, we have introduced a significant upgrade of PHP in the latest release of App Engine with more features and improved performance.

The changes include:

  • Support for the PHP 5.5 runtime, alongside the current PHP 5.4 runtime.
  • The cURL extension is now available, meaning curl_*() functions can now be used from within your application (read more about how to enable cURL support in our documentation).
  • The tempnam() and sys_get_temp_dir() functions are not available.
  • Support for direct file uploads.
  • Support for concurrent requests, which allows the PHP interpreter to run an efficient multi-threaded mode when serving HTTP requests. This must be enabled in your app.yaml file.
  • Support for the ImageMagick extension (which allows powerful image manipulation) and MongoDB extension (which allows you to connect to an existing MongoDB installation).

To take advantage of these new features, find your ‘app.yaml’ file and change the line that reads

 runtime: php

to

 runtime: php55 

Upvotes: 2

Peter McKenzie
Peter McKenzie

Reputation: 741

PHP on App Engine doesn't yet have ImageMagick or GraphicsMagick available. It does have GD available though, which offers similar capabilities.

I should also add a link to the list of PHP extensions available on App Engine. You'll see gd listed, but no Magick.

Upvotes: 3

Related Questions