Class 'Zend_Registry' not found

Hi there,

I updated to 0.4 and now I find quite a lot of these errors in error_log:

PHP Fatal error:  Class 'Zend_Registry' not found in XXXXX/piwik/core/Common.php on line 112

I am aware of the older threads and bugreports, but the solutions didn’t work for me.

I did:

  • double check, that all files are at place
  • check writing permissions on tmp and config
  • delete cache and cookies

I do not see any fault in the UI, only in the logfile.
Any ideas?
Thanks

Fixed in svn.

Well… kind of. Now I don’t get the former error no more but now

PHP Fatal error:  Class 'Piwik' not found in XXXX/piwik/core/Common.php on line 114

The “fix” I made should be unnecessary. I’ll revert it.

The problem is in your include path. It’s either not getting set, or being set wrong.

Can you create a phpinfo.php file in your piwik folder, and send me the output from:

<?php phpinfo();

[quote=vipsoft @ Jun 10 2009, 09:16 PM]The problem is in your include path. It’s either not getting set, or being set wrong.

Can you create a phpinfo.php file in your piwik folder, and send me the output[/quote]

What are you specifically intrested in? I could extract the data from phpinfo, but actually I don’t like to send all phpinfo-data of a live system :wink:

When doing

var_dump(get_include_path());

in Common.php just before the class definition I receive:

"XXXX/piwik/core:XXXX/piwik/libs:XXXX/piwik/plugins:.:/usr/local/php5/lib/php"

How could I fetch the result of the includepath in Piwik_Common::getCacheWebsiteAttributes?

Please inscruct me what data you need.

Anyhow I find it quite strange, that I did not have the problem before 0.4. All includepaths are set within piwik-installation, so I (virtually) could not (and did not) change anything in your code.

Am I the only one with this problem?

I think I’ve tracked it down…I’ll have to make some changes to my config to reproduce the problem before I know if I’ve fixed it.

Sorry, please create a ticket in Trac. Add a debug_print_backtrace() to Common.php (before the line that fails) and attach the output. Thanks.

I created a ticket here: http://dev.piwik.org/trac/ticket/801

That’s good news! I saw you fixed it so I assume that you don’t need debug_print_backtrace() any more, right?
An autoloader is a quite convenient tool… :slight_smile:

cheers

I’ll never know why you received “Class ‘Piwik’ not found” when there’s a require_once for Piwik.php plainly visible before the line where that error occurs. boggle

In any case, the autoloader should take of it.

Well, actually this was exactly what I was extremely confused about, but as I do not know the details of the code I thought there sould be an explanation somehow somewhere… I am only a little programmer, how could I understand everything… :wink:

I’ll test it.