Monthly Archives: November 2014

Update your Google API PHP Client

tl;dr – The canary process for the 1.9.17 PHP Runtime has identified an issue with the Google APIs Client Library for PHP that will cause applications to break. Update your version to at least 1.1.2 ASAP.

Hi All,

During the canary process for the new version of the PHP runtime, an issue has been uncovered related to the Google API PHP client and the cURL extension. The App Engine sockets library does not allow socket connections to, which prevents the client library from working if it uses cURL, which is it’s default configuration.

We have made a change to the client library so that it will always use PHP streams on App Engine, which prevents this error from occurring. However this means that your application code will need to be updated to the new version of the client library and the code re-deployed to the production environment.

To reduce the possibility of an outage for your application we encourage you to update this library and re-deploy your application as soon as possible.

In the meantime we continue to assess the number of affected applications to determine what the best course of action is to ensure minimal disruption for existing apps. This may well mean delaying the release of the PHP 5.5 runtime with cURL support to allow sufficient time for applications to be upgraded.

Update 28 Nov: We have decided to roll back the 1.9.17 PHP release with PHP 5.5 and cURL for the time being. You have plenty of time to update your applications to the latest API client.


App Engine PHP 1.9.17 pre-release SDK

Well it’s been a while since the PHP team have had any updates to post to this blog. For the last few months the team has been heads down working with the rest of the App Engine team working on improving the reliability, stability and performance of the platform. You can read a little more on this in this post that our very own VP Daniel Sturman made on the App Engine discussion forum.

That being said, we’re ready to get the ball rolling once more on delivering a great PHP experience on App Engine, moving the platform from experimental to GA as soon as possible. In fact, we have the following features ready to launch in the next App Engine release, 1.9.17.

  • Upgrading the interpreter to PHP 5.5.18, which includes
    • support for Zend opcache.
    • APCu extension for in process caching.
    • backend improvements for parallel request serving from the same runtime instance.
  • Adding support for the cURL extension.
  • Adding support for the mailparse extension.

Now usually we do not pre-announce features that are scheduled in an upcoming release, because plans can change at the last minute and features can be pushed back a release or two (which could still happen here). But we regard this is a special case as the change from PHP 5.4.32 to PHP 5.5.18 could break existing applications. There is a small list of PHP 5.5 backwards incompatible changes and we want to give you developers a chance to fix any issues that your apps might have because of the switch.

To assist in identifying any potential problems in your applications, we’ve created 1.9.17 pre-release SDKs that have the PHP 5.5 interpreter bundled. You can download these SDKs from the following links.

For linux users, we suggest building the interpreter from source, using the following shell commands.

  sudo apt-get install gcc libmysqlclient-dev libxml2-dev libcurl4-openssl-dev libpng-dev libjpeg-dev
  wget --trust-server-names
  tar -xvf php-5.5.18.tar.bz2
  cd php-5.5.18
  ./configure --prefix=$DEST/installdir \
    --enable-bcmath \
    --enable-calendar \
    --enable-ftp \
    --enable-mbstring \
    --enable-opcache \
    --enable-soap \
    --enable-sockets \
    --enable-zip \
    --disable-fileinfo \
    --disable-flatfile \
    --disable-posix \
    --with-curl \
    --with-gd \
    --with-openssl \
    --without-sqlite3 \
    --without-pdo-sqlite \
    --without-imap \
    --without-kerberos \
    --without-interbase \
    --without-ldap \
    --without-mssql \
    --without-oci8 \
    --without-pgsql \
    --without-pear \
    --disable-phar \
    --without-snmp \
    --enable-mysqlnd \
    --with-pdo-mysql=mysqlnd \
    --with-mysqli=mysqlnd \
  make install -j
  cd -

This will build an php-cgi binary that is used by the App Engine development server, which can be found located in the folder $DEST/app_engine/5.5/installdir/bin. Follow these instructions to run the development appserver with the php-cgi binary that you’ve built.

As always, you can report any issues in the public issue tracker and we’ll do our best to solve them promptly.