Skip to content
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

Use of undefined constant PIWIK_INCLUDE_PATH #14346

Closed
idevwebs opened this issue Apr 14, 2019 · 7 comments
Closed

Use of undefined constant PIWIK_INCLUDE_PATH #14346

idevwebs opened this issue Apr 14, 2019 · 7 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@idevwebs
Copy link

I had this installed and working before. Not sure what is causing this error. I tried deleting the entire matomo folder and replacing from fresh zip.

Fatal error: Uncaught Error: Class 'Piwik\SettingsServer' not found in /home/site/public_html/matomo/core/testMinimumPhpVersion.php:87 Stack trace: 
#0 /home/site/public_html/matomo/core/testMinimumPhpVersion.php(175): Piwik_ShouldPrintBackTraceWithMessage() 
#1 /home/site/public_html/matomo/core/testMinimumPhpVersion.php(194): Piwik_GetErrorMessagePage('<p><strong>Mato...', false, '<ul>\n ...') 
#2 /home/site/public_html/matomo/core/bootstrap.php(30): require_once('/home/site/p...') 
#3 /home/site/public_html/matomo/index.php(21): require_once('/home/site/p...') 
#4 {main} thrown in /home/site/public_html/matomo/core/testMinimumPhpVersion.php on line 87
@idevwebs
Copy link
Author

Additional info:
php 7.3

[16-Apr-2019 05:23:55 UTC] PHP Warning:  Use of undefined constant PIWIK_INCLUDE_PATH - assumed 'PIWIK_INCLUDE_PATH' (this will throw an Error in a future version of PHP) in /home/site/public_html/matomo/core/bootstrap.php on line 30
[16-Apr-2019 05:23:55 UTC] PHP Warning:  require_once(PIWIK_INCLUDE_PATH/core/testMinimumPhpVersion.php): failed to open stream: No such file or directory in /home/site/public_html/matomo/core/bootstrap.php on line 30
[16-Apr-2019 05:23:55 UTC] PHP Fatal error:  require_once(): Failed opening required 'PIWIK_INCLUDE_PATH/core/testMinimumPhpVersion.php' (include_path='.:/opt/cpanel/ea-php73/root/usr/share/pear') in /home/site/public_html/matomo/core/bootstrap.php on line 30

@idevwebs idevwebs changed the title New Install: Fatal error: Uncaught Error: Class 'Piwik\SettingsServer' not found Use of undefined constant PIWIK_INCLUDE_PATH Apr 16, 2019
@fdellwing
Copy link
Contributor

Can you post the first ~20 lines from piwik.php and index.php?

@tsteur
Copy link
Member

tsteur commented Apr 16, 2019

Hi there,

it sounds like some file wasn't copied properly during the update. I recommend you update the files again using the manual update see https://matomo.org/docs/update/#the-manual-three-step-update

Make sure to backup your config/config.ini.php and do not delete it as mentioned in the docs. This should fix your issue. Let us know if this doesn't work and we're happy to look at it again and reopen the issue.

@tsteur tsteur closed this as completed Apr 16, 2019
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Apr 16, 2019
@idevwebs
Copy link
Author

FYI this turned out to be a php include_path config issue.

@acch
Copy link

acch commented Jun 7, 2019

FYI this turned out to be a php include_path config issue.

Would you mind letting me know how you've solved this? Looks like I'm facing the same / similar issue... Thanks!

@fdellwing
Copy link
Contributor

I read, that set_include_path() may fail if you setup an include path in your php.ini. So, you could check if that is the case for you and if yes, comment it out and test it again?

@idevwebs
Copy link
Author

idevwebs commented Jun 7, 2019

I don't recall everything, but here's what I do recall:

  1. I use WHM and in efforts to secure things, I had configured php open_basedir to be limited to user home and in my configuration, I had to add another value to set include_path to start there as well as setting upload_tmp_dir. Those changes were done in system_pool_defaults.yaml
  2. Eventually I enabled ini_set after numerous other security things were done first.
  3. I initially modified the matomo/core/testMinimumVersion.php commenting the exit(1) at the end before doing adding support for windows phone 7 version 7.5 #1 and Using alternate database. #2 above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

4 participants