Req #68022 [NEW]: FPM should allow multiple includes per file
| From: | manuel-php at mausz dot at | Date: | Mon, 15 Sep 2014 22:26:58 +0000 |
| Subject: | Req #68022 [NEW]: FPM should allow multiple includes per file | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-187542@lists.php.net to get a copy of this message | ||
From: manuel-php at mausz dot at
Operating system:
PHP version: Irrelevant
Package: FPM related
Bug Type: Feature/Change Request
Bug description:FPM should allow multiple includes per file
Description:
------------
FPM should allow multiple include directives per file. Looking at the
code I see no real reason this is prohibited. The attached patch should
fix this limitation and makes the code more sane (imho).
Additional I've fixed the wrong line numbers printed in case of nested
includes. They are always the same.
I can also create a pull request on GitHub if that's preferred.
Test script:
---------------
This is a simple test for the wrong line numbers *only*:
# cat fpm.d/test.conf
[test]
include = etc/fpm.d/vhost.tmpl
# cat etc/fpm.d/vhost.tmpl
prefix = /var/www/$pool
user = $pool
pm = ondemand
unknown_directive=foo
Expected result:
----------------
[15-Sep-2014 21:36:49] ERROR: [etc/fpm.d/vhost.tmpl:4] unknown entry
'unknown_directive'
[15-Sep-2014 21:36:49] ERROR: Unable to include etc/fpm.d/vhost.tmpl
from etc/fpm.d/test.conf at line 2
[15-Sep-2014 21:36:49] ERROR: Unable to include etc/fpm.d/test.conf from
etc/php-fpm.conf at line 15
[15-Sep-2014 21:36:49] ERROR: failed to load configuration file
'etc/php-fpm.conf'
[15-Sep-2014 21:36:49] ERROR: FPM initialization failed
Actual result:
--------------
[15-Sep-2014 21:36:21] ERROR: [etc/fpm.d/vhost.tmpl:4] unknown entry
'unknown_directive'
[15-Sep-2014 21:36:21] ERROR: Unable to include etc/fpm.d/vhost.tmpl
from etc/fpm.d/test.conf at line 4
[15-Sep-2014 21:36:21] ERROR: Unable to include etc/fpm.d/test.conf from
etc/php-fpm.conf at line 4
[15-Sep-2014 21:36:21] ERROR: failed to load configuration file
'etc/php-fpm.conf'
[15-Sep-2014 21:36:21] ERROR: FPM initialization failed
--
Edit bug report at https://bugs.php.net/bug.php?id=68022&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68022&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68022&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68022&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68022&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68022&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68022&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68022&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68022&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68022&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68022&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68022&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68022&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68022&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68022&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68022&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68022&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68022&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68022&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68022&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68022&r=mysqlcfg