|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53537 Phar not working on PHP-FPM
Submitted: 2010-12-13 14:04 UTC Modified: 2011-11-16 09:50 UTC
Avg. Score:4.0 ± 1.0
Reproduced:0 of 2 (0.0%)
From: alexander dot over at koeln dot de Assigned: fat (profile)
Status: Closed Package: PHAR related
PHP Version: 5.3.4 OS: Debian
Private report: No CVE-ID: None
 [2010-12-13 14:04 UTC] alexander dot over at koeln dot de
When try to run a .phar on PHP running as FPM, i got an endless redirect loop.

Test script:
$p = new Phar('test.phar');
$p->setStub($p->createDefaultStub('stub.php', 'index.php'));
$p->addFromString('index.php', '<?php phpinfo();');

header('Location: test.phar');

Expected result:
output from phpinfo();

Actual result:
redirection loop (301)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-15 23:35 UTC]
Jérôme, can you check it?
 [2011-11-15 23:35 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: fat
 [2011-11-16 00:23 UTC]
-Status: Assigned +Status: Feedback
 [2011-11-16 00:23 UTC]
Please try using this snapshot:
For Windows:

I made a test on the 5.3 branch and it works great.

The only thing it that .phar extensions were not authorized as default acception 
extension by FPM.

I fixed it. See

Can you please test on a snapshot ?
 [2011-11-16 09:44 UTC] alexander dot over at koeln dot de
I've done some tests now.
i can't reproduce the bug in every 5.3 version when using nginx as webserver.

It seems that only lighttpd fastcgi implementation is the problem here.
 [2011-11-16 09:44 UTC] alexander dot over at koeln dot de
-Status: Feedback +Status: Assigned
 [2011-11-16 09:50 UTC]
-Status: Assigned +Status: Closed
 [2011-11-16 09:50 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Feb 26 00:01:27 2024 UTC