php-apc causes wrong php-file to be executed

Bug #1079095 reported by Ketil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php-apc (Ubuntu)
New
Undecided
Unassigned

Bug Description

We have been able to reproduce a bug on two different computers with this configuration:

1. We have two php sites running on the same apache2 webserver as different virtual hosts on the same IP (they are both CakePHP), let's call them P1 and P2

2. P1 calls P2 with HttpSocket()'s ->post() method, so in effect they will often be executing code at the same time

3. Both P1 and P2 have a file called AppController.php, which is the controller superclass within each site.

4. When php-apc is enabled and P1 calls P2, P2 actually tries to execute P1's AppController.php, which fails because it runs functionality that doesn't make sense in P2's code. So the return value received by P1 is always an error, every time.

5. Manually send a POST to P2 with curl or wget shows that P2 works as it should when not called from P1.

6. Disabling php-apc solves the problem.

This was pretty difficult to debug, since everything seemed to work fine when testing each component individually, but failed when running everything together. We finally discovered it when a hunch led us to uninstall php-apc, and when this fixed the issue we installed php-apc on a dev computer, which immediately introduced the same error in dev as well.

The workaround for now is to disable php-apc. This could potentially be used to leak information from shared hosting sites, etc.

This may be related to the old issue noted here:

https://bugs.php.net/bug.php?id=57708

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: php-apc (not installed)
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic 3.2.24
Uname: Linux 3.2.0-29-generic x86_64
ApportVersion: 2.0.1-0ubuntu15
Architecture: amd64
Date: Thu Nov 15 10:42:56 2012
InstallationMedia: Ubuntu-Server 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120817.3)
MarkForUpload: True
ProcEnviron:
 LANGUAGE=en_US:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: php-apc
UpgradeStatus: No upgrade log present (probably fresh install)

information type: Private Security → Public
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.