New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error: Class 'Piwik_Common' not found in ... core/Piwik.php on line 0 #1412
Comments
Please use the forum for installation support. PM me ("vipsoft") your phpinfo and a backtrace from your web server's error_log. |
This is not a support issue, this is a bug: a displayed fatal error. No matter what my php info could give, this is a bug. Note: If you need a specific information, I'll be glad to provide you with that. But for now, you should check why the file Piwik call a class that doesn't exist. |
I didn't say it wasn't a bug, but there's insufficient info in your bug report to debug. I can't duplicate the error you're experiencing, and we can't PM via Trac. If your phpinfo and backtrace, then we can begin diagnosing the root cause. |
I just installed Xdebug, here is the stack trace: ( ! ) Fatal error: Class 'Piwik_Common' not found in /var/www/***/public_html/piwik/core/Piwik.php on line 0 Time Memory Function Location1 0.0000 664608 {main}( ) ../index.php:0 ( ! ) Fatal error: Class 'Piwik_Common' not found in /var/www/***/public_html/piwik/core/Piwik.php on line 0 Time Memory Function Location1 0.0000 664608 {main}( ) ../index.php:0 If you need specific information from the phpinfo, I'll be glad to provide you with that, but not the whole file. |
Thanks. The root cause is that your config and tmp folders are not writeable by the web server user. Chmod/chown to resolve. The error message appears to be a shutdown bug in your version or build of php. We can mitigate that by reordering some code in the __destruct. |
(In [2283]) fixes #1412 |
Isn't it possible to test the access permission with fileperms() (instead of making PHP Crash) ? But anyway, the error is Piwik_Common not found. If you look in your function you have static call at line 55 and 101. Is it possible to get there without having the Piwik_Common class loaded ? (I can even figure out where the class is located...) |
Is the patch not working for you? fileperms() wouldn't make a difference. The test for access permissions isn't causing the crash. I'm running php 5.3.2-1ubuntu4.2 with the Suhosin patch. The reason you don't see a require_once for core/Common.php is because Piwik uses an autoloader. However, judging from the stacktrace, it isn't even reaching lines 55 or 101 of Piwik.php. The reference to Piwik_Common is in FrontController's __destruct. If an uncaught exception occurs in a __destruct, a fatal error occurs. A number of users have reported problems with eAccelerator. You might try disabling that if you have it. |
(jump to the end, solution founded) Yes, I've the Suhosin Patch 0.9.9.1 installed. Ok, this time I've been able to manually trace everything (by placing old-school echo everywhere), here is the result: The line in problem is:
From the checkDirectoriesWritable() method of the Piwik.php class. While executing the line, the autoloader is called.
Note: The line # is incorrect, because I've added new debug line. Then I see the a,b,e point are executed. They're from the FrontController __destruct() method:
But why no 'g' ? So I've checked in the Piwik::getModule() method, adding new debug values, and modifying a little bit the method to be able to continue my uggly but useful debug:
So the A is executed, but then an error appear because the Piwik_Common class have previously failed to launch. So why does Piwik_Common is not found ? I've dumped the $path variable instead of $class in the autoloader, and I get this: And, of course, none of theses file exist... So basically, it was a SSH upload problem, or a broken archive when I downloaded it (but I don't think so) It would be nice if the file inclusion error were someking of accessible, as the exception is not displayed anywhere, and cause a fatal error. |
Hi,
I just unzipped piwik on my site, then I access http://mysite.com/piwik/, and I have this error:
Fatal error: Class 'Piwik_Common' not found in /<censored>/public_html/piwik/core/Piwik.php on line 0
Things starts out pretty bad I guess.
The text was updated successfully, but these errors were encountered: