PHP package issues

  • From: "Brian G." <drakain@xxxxxxxxx>
  • To: rumpkernel-users@xxxxxxxxxxxxx
  • Date: Sun, 12 Jul 2015 20:00:19 -0400

Hey everyone, I'm trying to get up and running with rumprun-packages/php
and I've hit a bit of a roadblock.

I'm able to launch the demo site provided in standalone mode, however, when
I try to load in a larger PHP application (uses namespace, calls to
__FILE__ and other language features) I receive parse errors.

When running the application on a traditional system I do not encounter any
issues like this, even when trying to recreate configuration conditions.

In the code there is one file that looks like this:


use Doctrine\Common\Annotations\AnnotationRegistry;
use Composer\Autoload\ClassLoader;

* @var ClassLoader $loader
$loader = require __DIR__.'/../vendor/autoload.php';

AnnotationRegistry::registerLoader(array($loader, 'loadClass'));

return $loader;

This file has no linting errors, but when I browse to it, I receive this

*Parse error*: syntax error, unexpected '::registerLoader(a' in
*/data/www/symfony_demo/vendor/autoload.php* on line *10*

Now, when I try to use PHP's built in linting feature on the kernel (php -l
file.php) instead of starting the server I can see the output "No syntax
errors detected".

I'm not sure why use of the PHP server would cause a parse error on rumprun
but not on a traditional system. The next thing I will try is using nginx
as a server, however, this still puzzles me. I'm not sure where this
breakage would even be introduced. I even mounted the ISO to my system and
inspected the file just to double check if something had mangled it some



Other related posts: