Error after upgrade to 2


i just made the upgrade. everything’s been fine and piwik is up and working, but all my personnal scripts are not working any more. i have this kind of message:

i’ve double checked path and files, and everything is fine…any help would be appreciated

using PHP Version 5.4.6-1ubuntu1.3

thank you

if you are using the PHP classes of Piwik then there are few small changes to make your code compatible with the new piwik 2. (eg. we are now using namespaces features), let us know if you have some question

thank you for your reply. can you be more specific ? i tryed a few things i found in the doc without success. for example what should become this code:

[quote="define(‘PIWIK_INCLUDE_PATH’, realpath(’…/piwik’));
define(‘PIWIK_USER_PATH’, realpath(’…/piwik’));
define(‘PIWIK_ENABLE_DISPATCH’, false);

require_once PIWIK_INCLUDE_PATH . “/index.php”;
require_once PIWIK_INCLUDE_PATH . “/core/API/Request.php”;


$request = new Piwik_API_Request(’"…]


for example with this code, i have an error on the line Piwik_FrontController::getInstance()->init();

thank you for your help

Please see updated code at Querying the Reporting API: Integrate - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3

thank you, i was misplacing the “use” part. put it on top and now it’s fine

thank you for your help