Error with "trusted piwik hostname" website change


#1

Hi everyone-

I made a change to the “trusted piwik hostname” site setting at the bottom of the general settings page and now my site won’t load. I was thinking there is a place to fix it in mysql database but could not find it. Any idea how I can fix this? :slight_smile:

See attached photo.


#2

Anyone have an idea about how to fix this?


#3

Here is full backtrace

There is an error. Please report the message (Piwik 2.0.3) and full backtrace in the Piwik forums (please do a Search first as it might have been reported already!).

Warning: preg_match() [function.preg-match]: Unknown modifier ‘/’ in /home/sgolub/public_html/piwik/core/Url.php on line 248

Backtrace -->

#0 Piwik\Error::errorHandler(…) called at [:]
#1 preg_match(…) called at [/home/sgolub/public_html/piwik/core/Url.php:248]
#2 Piwik\Url::isValidHost(…) called at [/home/sgolub/public_html/piwik/core/Url.php:294]
#3 Piwik\Url::getHost(…) called at [/home/sgolub/public_html/piwik/core/Url.php:340]
#4 Piwik\Url::getCurrentHost(…) called at [/home/sgolub/public_html/piwik/core/Url.php:69]
#5 Piwik\Url::getCurrentUrl(…) called at [/home/sgolub/public_html/piwik/core/View.php:214]
#6 Piwik\View->render(…) called at [/home/sgolub/public_html/piwik/plugins/Login/Controller.php:105]
#7 Piwik\Plugins\Login\Controller->login(…) called at [/home/sgolub/public_html/piwik/plugins/Login/Controller.php:65]
#8 Piwik\Plugins\Login\Controller->index(…) called at [:]
#9 call_user_func_array(…) called at [/home/sgolub/public_html/piwik/core/FrontController.php:117]
#10 Piwik\FrontController->dispatch(…) called at [/home/sgolub/public_html/piwik/core/Plugin/Controller.php:742]
#11 Piwik\Plugin\Controller->redirectToIndex(…) called at [/home/sgolub/public_html/piwik/plugins/CoreHome/Controller.php:57]
#12 Piwik\Plugins\CoreHome\Controller->redirectToCoreHomeIndex(…) called at [:]
#13 call_user_func_array(…) called at [/home/sgolub/public_html/piwik/core/FrontController.php:117]
#14 Piwik\FrontController->dispatch(…) called at [/home/sgolub/public_html/piwik/index.php:62]


(Matthieu Aubry) #4

Don’t add the slash / in your trusted_host, simply add the hostname without any slash


#5

[quote=matt]
Don’t add the slash / in your trusted_host, simply add the hostname without any slash[/quote]

Where do I change this setting at? I can not login to piwik.

I made the change to config.php.ini but i still get an error and then this:

Error: You must call Zend_Session::regenerateId() before any output has been sent to the browser; output started in /home/sgolub/public_html/piwik/core/Log.php/455


(Matthieu Aubry) #6

what error?


#7

[quote=matt]
what error?[/quote]

This:

There is an error. Please report the message (Piwik 2.0.3) and full backtrace in the Piwik forums (please do a Search first as it might have been reported already!).

Warning: preg_match() [function.preg-match]: Unknown modifier ‘/’ in /home/sgolub/public_html/piwik/core/Url.php on line 248

Backtrace -->

#0 Piwik\Error::errorHandler(…) called at [:]
#1 preg_match(…) called at [/home/sgolub/public_html/piwik/core/Url.php:248]
#2 Piwik\Url::isValidHost(…) called at [/home/sgolub/public_html/piwik/core/Url.php:294]
#3 Piwik\Url::getHost(…) called at [/home/sgolub/public_html/piwik/core/Url.php:340]
#4 Piwik\Url::getCurrentHost(…) called at [/home/sgolub/public_html/piwik/core/Url.php:69]
#5 Piwik\Url::getCurrentUrl(…) called at [/home/sgolub/public_html/piwik/core/View.php:214]
#6 Piwik\View->render(…) called at [/home/sgolub/public_html/piwik/plugins/Login/Controller.php:105]
#7 Piwik\Plugins\Login\Controller->login(…) called at [/home/sgolub/public_html/piwik/plugins/Login/Controller.php:65]
#8 Piwik\Plugins\Login\Controller->index(…) called at [:]
#9 call_user_func_array(…) called at [/home/sgolub/public_html/piwik/core/FrontController.php:117]
#10 Piwik\FrontController->dispatch(…) called at [/home/sgolub/public_html/piwik/core/Plugin/Controller.php:742]
#11 Piwik\Plugin\Controller->redirectToIndex(…) called at [/home/sgolub/public_html/piwik/plugins/CoreHome/Controller.php:57]
#12 Piwik\Plugins\CoreHome\Controller->redirectToCoreHomeIndex(…) called at [:]
#13 call_user_func_array(…) called at [/home/sgolub/public_html/piwik/core/FrontController.php:117]
#14 Piwik\FrontController->dispatch(…) called at [/home/sgolub/public_html/piwik/index.php:62]


(Matthieu Aubry) #8

What’s the content of your config.ini.php, the lines starting with trusted_host ? can you paste them here?


#9

[quote=matt]
What’s the content of your config.ini.php, the lines starting with trusted_host ? can you paste them here?[/quote]

Her eyou go:

trusted_hosts[] = “http://www.websitename.com/

[Plugins]
Plugins[] = "CorePluginsAdmin"
Plugins[] = "CoreAdminHome"
Plugins[] = "CoreHome"
Plugins[] = "CoreVisualizations"
Plugins[] = "Proxy"
Plugins[] = "API"
Plugins[] = "ExamplePlugin"
Plugins[] = "Widgetize"
Plugins[] = "Transitions"
Plugins[] = "LanguagesManager"
Plugins[] = "Actions"
Plugins[] = "Dashboard"
Plugins[] = "MultiSites"
Plugins[] = "Referrers"
Plugins[] = "UserSettings"
Plugins[] = "Goals"
Plugins[] = "SEO"
Plugins[] = "Events"
Plugins[] = "UserCountry"
Plugins[] = "VisitsSummary"
Plugins[] = "VisitFrequency"
Plugins[] = "VisitTime"
Plugins[] = "VisitorInterest"
Plugins[] = "ExampleAPI"
Plugins[] = "ExampleRssWidget"
Plugins[] = "Provider"
Plugins[] = "Feedback"
Plugins[] = "Login"
Plugins[] = "UsersManager"
Plugins[] = "SitesManager"
Plugins[] = "Installation"
Plugins[] = "CoreUpdater"
Plugins[] = "CoreConsole"
Plugins[] = "ScheduledReports"
Plugins[] = "UserCountryMap"
Plugins[] = "Live"
Plugins[] = "CustomVariables"
Plugins[] = "PrivacyManager"
Plugins[] = "ImageGraph"
Plugins[] = "DoNotTrack"
Plugins[] = "Annotations"
Plugins[] = "MobileMessaging"
Plugins[] = "Overlay"
Plugins[] = "SegmentEditor"
Plugins[] = "Morpheus"
Plugins[] = “Zeitgeist”

[PluginsInstalled]
PluginsInstalled[] = "Login"
PluginsInstalled[] = "CoreAdminHome"
PluginsInstalled[] = "UsersManager"
PluginsInstalled[] = "SitesManager"
PluginsInstalled[] = "Installation"
PluginsInstalled[] = "CorePluginsAdmin"
PluginsInstalled[] = "CoreHome"
PluginsInstalled[] = "Proxy"
PluginsInstalled[] = "API"
PluginsInstalled[] = "Widgetize"
PluginsInstalled[] = "LanguagesManager"
PluginsInstalled[] = "Actions"
PluginsInstalled[] = "Dashboard"
PluginsInstalled[] = "MultiSites"
PluginsInstalled[] = "UserSettings"
PluginsInstalled[] = "Goals"
PluginsInstalled[] = "SEO"
PluginsInstalled[] = "UserCountry"
PluginsInstalled[] = "VisitsSummary"
PluginsInstalled[] = "VisitFrequency"
PluginsInstalled[] = "VisitTime"
PluginsInstalled[] = "VisitorInterest"
PluginsInstalled[] = "ExampleAPI"
PluginsInstalled[] = "ExamplePlugin"
PluginsInstalled[] = "ExampleRssWidget"
PluginsInstalled[] = "Provider"
PluginsInstalled[] = "Feedback"
PluginsInstalled[] = "CoreUpdater"
PluginsInstalled[] = "UserCountryMap"
PluginsInstalled[] = "Live"
PluginsInstalled[] = "CustomVariables"
PluginsInstalled[] = "PrivacyManager"
PluginsInstalled[] = "ImageGraph"
PluginsInstalled[] = "DoNotTrack"
PluginsInstalled[] = "Transitions"
PluginsInstalled[] = "Annotations"
PluginsInstalled[] = "MobileMessaging"
PluginsInstalled[] = "Overlay"
PluginsInstalled[] = "SegmentEditor"
PluginsInstalled[] = "CoreVisualizations"
PluginsInstalled[] = "Referrers"
PluginsInstalled[] = "Events"
PluginsInstalled[] = "CoreConsole"
PluginsInstalled[] = "ScheduledReports"
PluginsInstalled[] = "Zeitgeist"
PluginsInstalled[] = “Morpheus”

[Plugins_Tracker]
Plugins_Tracker[] = "Provider"
Plugins_Tracker[] = "Goals"
Plugins_Tracker[] = "UserCountry"
Plugins_Tracker[] = "UsersManager"
Plugins_Tracker[] = "SitesManager"
Plugins_Tracker[] = “PrivacyManager”


(Matthieu Aubry) #10

Thanks for the report! I fixed it in Warning: preg_match(): Unknown modifier '/' in Url.php on line 245 · Issue #4626 · matomo-org/matomo · GitHub


#11

Matt that absolutely worked. Thank you for your help. You may close this.