php5-fpm chokes on missing /var/www

Bug #731572 reported by CatchesAStar
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
php5 (Debian)
Fix Released
Unknown
php5 (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: php5-fpm

When php5-fpm is installed, it looks for a /var/www directory to generate its configuration.
However, php5-fpm is not only used for apache. Other webservers, such as Nginx do not use the /var/www folder as their root. As a result, php5-fpm stops during installation with

Setting up php5-fpm (5.3.5-1ubuntu1) ...
update-rc.d: warning: php5-fpm stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (none)
 * Starting PHP5 FPM... Mar 08 20:14:16.908184 [WARNING] [pool www] pm.start_servers is not set. It's been set to 20.
Mar 08 20:14:16.908957 [ERROR] [pool www] the chdir path '/var/www' does not exist or is not a directory
Mar 08 20:14:16.908969 [ERROR] failed to post process the configuration

and the /var/www folder has to be created in order to install php5-fpm.

Maybe we can make a dialog or something else to let users choose the directory, or simply create the /var/www folder.

Related branches

description: updated
Revision history for this message
Andreas Moog (ampelbein) wrote :

Thanks for the report, that is already known at debian. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=601243

Changed in php5 (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Changed in php5 (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package php5 - 5.3.5-1ubuntu2

---------------
php5 (5.3.5-1ubuntu2) natty; urgency=low

  * debian/php5-fpm.init: Dont start fpm if /var/www doesnt exist.
    (LP: #731572)
 -- Chuck Short <email address hidden> Fri, 11 Mar 2011 16:29:24 -0500

Changed in php5 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
David Strauss (davidstrauss) wrote :

I have 5.3.5-1ubuntu4 installed, and this bug still affects me.

Revision history for this message
David Strauss (davidstrauss) wrote :

Steps to reproduce:

1. Install Natty server Alpha 3.
2. sudo apt-get install -y php5-fpm

Revision history for this message
David Strauss (davidstrauss) wrote :

Oh, I actually get a *warning* now, but the package still refuses to finish installation because of it. So, the original issue here isn't fixed.

Changed in php5 (Debian):
status: New → Fix Committed
Revision history for this message
Ondřej Surý (ondrej) wrote :

I'm here with David...

You didn't solve the original problem, but created more problems in one go. The init.d script really should fail if there's incorrect configuration, but this fix:

a) ignores the failure of missing /var/www (by returning
b) stops php5-fpm from running even if there is a correct configuration, but /var/www is missing

And thanks for fixing that only in Ubuntu, that's always helpful.

Changed in php5 (Debian):
status: Fix Committed → Fix Released
Changed in php5 (Debian):
status: Fix Released → New
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Agreed, this isn't fixed as evidenced by the new bug report bug #754210

Ondrej, we generally fix things in Ubuntu first and then send the patch back to Debian later once we know the fix was effective for Ubuntu users.

Revision history for this message
Ondřej Surý (ondrej) wrote :

> Ondrej, we generally fix things in Ubuntu first and then send the patch
> back to Debian later once we know the fix was effective for Ubuntu users.

Maybe that's generally what you (should) do, but I don't remember a single patch provided by the Ubuntu to the Debian pkg-php team. I had to cherry-pick interesting stuff myself, and given that the Debian php team is undermanned for a long time, this isn't exactly a good base for fruitful cooperation...

I don't care for patches which apply only to Ubuntu, but where is the patch for:

LP: #739977
LP: #697181
LP: #611316
LP: #676672
LP: #638401
LP: #564920

Any many more... just picked few interesting pieces from Ubuntu changelog diff, or the difference Ubuntu and Debian debian/patches/series:

diff -pruN 5.3.5-1/debian/patches/series 5.3.5-1ubuntu6/debian/patches/series
--- 5.3.5-1/debian/patches/series 2011-04-01 20:47:19.000000000 +0100
+++ 5.3.5-1ubuntu6/debian/patches/series 2011-04-01 20:41:07.000000000 +0100
@@ -50,6 +50,8 @@ session_save_path.patch
 #581911_pdo_mysql_segfaults.patch
 php-fpm-man-section-and-cleanup.patch
 fpm-config.patch
+lp564920-fix-big-files.patch
+configure-as-needed.patch
 fix_crash_in__php_mssql_get_column_content_without_type.patch
 bug53070.patch
 fix-crash-with-entity-declarations-in-simplexml.patch
@@ -59,3 +61,5 @@ fix-memory-leak-inside-highlight_string.
 fix-segfault-in-pgsql_stmt_execute-when-postgres-is-down.patch
 fix-segfault-when-node-is-NULL-in-simplexml.patch
 fix-segfault-when-using-several-cloned-intl-objects.patch
+temporary-path-fixes-for-multiarch.patch
+backport-upstream-lp592442.patch

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Ondrej, I have to agree that we're not sending nearly enough patches back to you and your team, and you seem to be staying at least 1 step ahead of us at all times.

We'll keep working on it.. and thanks for the heads up on the patches we haven't even begun to send back.

Changed in php5 (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.