Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#2288 closed Bug (fixed)

Notice: Uninitialized string offset in Common.php on line 1308

Reported by: ryanvarley Owned by:
Priority: major Milestone: Piwik 1.3
Component: Core Keywords:
Cc: Sensitive: no

Description

Last night my piwik installation stopped working. On any login attempt i just get an error 324 in chrome, (firefox tries to download the index.php). I have been using piwik successfully for several weeks now.

The only thing thats changed is that i set that loading the dashboard would not trigger the report build. The cron job to do this had always been in place however and I did (successfully) login several times since then. Im also not certain the cron job works which is why it wasnt set like this in the first place.

On checking the eror log file there is just one entry about the time it stopped working.

[28-Mar-2011 23:47:15] PHP Notice: Uninitialized string offset: 0 in /home/greensky/public_html/piwik/core/Common.php on line 1308

I replaced all the files in the directory and now i can login but without any data loading and im unable to change any settings.

thanks

Change History (7)

comment:1 in reply to: ↑ description Changed 3 years ago by ryanvarley

[28-Mar-2011 23:47:15] PHP Notice: Uninitialized string offset: 0 in /home/greensky/public_html/piwik/core/Common.php on line 1308

Note - Not the date and time it stopped working which was ~09/04/2011 01:00 so it could be unrelated

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

ryanvarley: I'm a little confused by your timeline of events, but let's start with what:

  • what version of Piwik were you running before you replaced all the files?
  • when you replaced the files in the directory, do you mean "all" of Piwik, or just the files in the "core" directory?
  • what version of Piwik are you running now?

This will help us to isolate the cause of the notice in Common.php. The rest might be a symptom of replacing the files. At minimum:

  • manually delete the files in tmp/sessions/*, tmp/templates_c/* and tmp/assets/*, and clear your browser cache;
  • check that misc/cron/archive.sh is chmod'd with the 'x' (execute) permission set

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

  • Summary changed from error 324 when logging in due to Uninitialized string offset in Common.php on line 1308 to Notice: Uninitialized string offset in Common.php on line 1308

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

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

(In [4387]) fixes #2288 - ok, looks like the notice occurs with search engines that have no keyword parameter (empty string)

  • removing search engines with no keyword parameter defined (*.dir.yahoo.com, seek.fr, eudip.com, scroogle.org)
  • buscador.terra is now Google Enhanced, so it uses the 'query' parameter
  • updated tests

comment:5 Changed 3 years ago by ryanvarley

are you confident you've found the problem or do you need more information? how should i go about fixing it? edit the files as shown on that page?

thanks

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

If you were running 1.2.1, I'm confident the patch fixes the Notice. That shouldn't have affected your login or interrupted the tracking/archiving though.

  • manually delete the files in tmp/sessions/*, tmp/templates_c/* and tmp/assets/*, and clear your browser cache;
  • switch back to browser-based archiving to make sure everything is working normally
  • then if you want, disable browser-based archiving and see if that works as expected; make sure misc/cron/archive.sh is chmod'd with the 'x' (execute) permission set and that php-cli is in your cron user's path

comment:7 Changed 3 years ago by ryanvarley

I deleted all the files (as i couldnt be sure of any problems from replacing them). Replaced them all and applied the patch. im now back up and running as normal.

thanks.

ps i was running 1.2.1

Note: See TracTickets for help on using tickets.