Tracy problem running on IIS7 with PHP 5.6

Notice: This thread is very old.
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.

looky
Member | 99
+
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)

conkas
Member | 2
+
0
-

Ooohh!! That did the trick!

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