Changing install from php as cgi to php-fpm

Changing install from php as cgi to php-fpm

by Rance Hall -
Number of replies: 2
I converted an existing install from Apache 2.x running php5 to php-fpm.

We're running Moodle 2.6.

After converting to php-fpm we found several issues reported by our users like unable to backup courses, etc.

We've been able to deal with most of the issues but I'm stumped and can't quite finish.

We started this to gain some performance gains and that seems to have worked.

We were unable to get a course backup until I set the php-fpm start path to the file root of the web site.

Now that we can get course backups, we can't seem to do a restore.

I'm wondering what I'm missing.  I've been googling but not finding anything specifically useful.


Any hints appreciated.

Average of ratings: -
In reply to Rance Hall

Re: Changing install from php as cgi to php-fpm

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You need to disclose more background information like the server platform, OS version/flavour/distribution, how do you install and configure Apache (modules), etc.

If the issue is performance related, the correct forum is "Hardware and performance" https://moodle.org/mod/forum/view.php?id=596. When you start a new discussion, you'll see the full initial pointers.
In reply to Visvanath Ratnaweera

Re: Changing install from php as cgi to php-fpm

by Rance Hall -

Sorry for the delay in getting this posted.


The servers are Ubuntu 14.04.3 and the install is exclusively from .deb style packages.

These servers run Puppet for management of configs, autodeployment, etc.


We've changed the chdir in /etc/php5/fpm/pool.d/www.conf


We've changed some of the php directives in /etc/php5/fpm/php.ini

But sometimes when trying to do a course backup and all times when trying to do a course restore we get the following:

Content Encoding Error

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

Please contact the website owners to inform them of this problem.