I am encountering a very strange problem after moving to PHP55.
I have a working environment both locally and deployed on PHP. After following instructions sent by Google on migrating to PHP55:
To take advantage of these new features, find your ‘app.yaml’ file and change the line that reads runtime: php to runtime: php55
The new functionality will automatically be enabled in the local development server, and in production once your application is deployed. You will be able to switch back to the old runtime at any time for the next two months by reverting the configuration in your app.yaml file. Some features such as cURL support may require additional configuration in order to be enabled.*
I hit the famous Error establishing a database connection error.
As soon as I revert the PHP55 back to PHP in my app.yaml file, the error goes away and the webpages load again.
Any feedback is greatly appreciated. I can share the wp-config.php if needed.
Here is the entries in app.yaml :
application: sxxxx-xxxxx version: 5 runtime: php55 api_version: 1 threadsafe: yes
handlers: - url: /(..(htm|html|css|js))$ static_files: \1 upload: ..(htm|html|css|js)$ application_readable: true
- url: /wp-content/(.*\.(ico|jpg|png|gif))$
static_files: wp-content/\1
upload: wp-content/.*\.(ico|jpg|png|gif)$
application_readable: true
- url: /(.*\.(ico|jpg|png|gif))$
static_files: \1
upload: .*\.(ico|jpg|png|gif)$
- url: /wp-admin/(.+)
script: wp-admin/\1
secure: never
- url: /wp-admin/
script: wp-admin/index.php
secure: never
- url: /wp-login.php
script: wp-login.php
secure: never
- url: /wp-cron.php
script: wp-cron.php
login: admin
- url: /xmlrpc.php
script: xmlrpc.php
- url: /wp-(.+).php
script: wp-\1.php
- url: /(.+)?/?
script: index.php
=============
Here is my unchanged wp-config.php which works with php in app.yaml, but with php55 in app.yaml, gives me the Error :
if(isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'],'Google App Engine') !== false) {
/** Google App Engine Settings */
define('DB_NAME', 'sadhusanga');
define('DB_USER', 'root');
define('DB_PASSWORD', '');
define('DB_HOST', ':/cloudsql/sadhu-sanga:gaura');
}
else
{
/** Local Settings */
define('DB_NAME', 'sadhusanga');
define('DB_USER', 'root');
define('DB_PASSWORD', 'xxxxxxxx');
define('DB_HOST', 'localhost');
}