Tracy problem running on IIS7 with PHP 5.6

4 years ago

conkas
Member | 2
+
-1
-

I have a couple of lines in the Bootstrap file for my new Cliqon CMS:

if($cfg['site.debug'] == true) {
    require_once("vendor/tracy/src/tracy.php"); // Debugger (or phar)
    use Tracy\Debugger;
    Debugger::enable();
}

which I hope is what you would expect to see.

I get an error: Parse error: syntax error, unexpected 'use' (T_USE) in ....gateway.php (my bootstrap file) on line nn

Has anyone any ideas ?? I have spent a couple of hours fiddling around with things but with no joy.

4 years ago

looky
Member | 100
+
0
-

Well, get rid of the use Tracy\Debugger; line and use \Tracy\Debugger::enable();

http://php.net/…mporting.php#…

Last edited by looky (2015-02-23 15:47)

4 years ago

conkas
Member | 2
+
0
-

Ooohh!! That did the trick!

Namespaces and I do not mix … and I accept without question that they ought to.