Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#2292 closed Bug (fixed)

undefined function safe_unserialize() in piwik\core\Cookie.php

Reported by: rayliu Owned by:
Priority: normal Milestone: Piwik 1.3
Component: Core Keywords:
Cc: Sensitive: no

Description

With regards to Ticket #1943 (closed Bug: invalid)

It says the issue is closed but I am able to re-produce the error with regards to:
Fatal error: Call to undefined function safe_unserialize() in D:\WEBSITES\piwik\core\Cookie.php on line 239

When I run in PHP, code to run new Piwik_API_Request("..etc..");
the code runs fine.

The error ONLY occurs when I am concurrently logged into the super-admin dashboard.. (e.g, try log into super-admin dashboard, and run a php new Piwik_API_Request() .. and it probably hit that error when I was trying to json_decode the requested results.

Again if i log out of the admin dashboard, the error goes away when I run the php file again.

Apologies if this is not a real bug, but just to help out in pointing errors I find. Thanks!

Currently testing:
Piwik Version: 1.2.5 - rc6
Php version: 5.2.13

Change History (6)

comment:1 Changed 3 years ago by vipsoft (robocoder)

Yes, you have to include upgrade.php. In the absence of any formal documentation, the source is the documented method.

If you got an error, then you probably weren't following the example in misc/api_internal_call.php (which includes Piwik's index.php, and in turn, testMinimumVersion, and upgradephp).

comment:2 Changed 3 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

(In [4444]) update comments in example; refactor file_get_contents, so compat functions are in one place; fixes #2292

comment:3 Changed 3 years ago by vipsoft (robocoder)

  • Keywords safe_unserialize removed
  • Milestone changed from 1.x - Piwik 1.x to 1.3 - Piwik 1.3

comment:5 Changed 3 years ago by vipsoft (robocoder)

(In [4446]) refs #2292 - fix typo in comment

comment:6 Changed 3 years ago by vipsoft (robocoder)

(In [4511]) fixes #2338, refs r4420, refs #2292 - tested with php 4.4.9

Note: See TracTickets for help on using tickets.