@andre-dierker opened this Issue on October 6th 2014

After adding a second trusting URL, Piwik seems a bit broken :)

www metapixl com-piwik-index php module corehome action _009

Warning: preg_match(): Unknown modifier 'p' in /var/www/piwik/core/Url.php on line 255 

Backtrace -->

<a href='/0'>#0</a> Piwik\Error::errorHandler(...) called at [:]
<a href='/1'>#1</a> preg_match(...) called at [/var/www/piwik/core/Url.php:255]
<a href='/2'>#2</a> Piwik\Url::isValidHost(...) called at [/var/www/piwik/core/Url.php:311]
<a href='/3'>#3</a> Piwik\Url::getHost(...) called at [/var/www/piwik/core/Url.php:357]
<a href='/4'>#4</a> Piwik\Url::getCurrentHost(...) called at [/var/www/piwik/core/Url.php:105]
<a href='/5'>#5</a> Piwik\Url::getCurrentUrlWithoutFileName(...) called at [/var/www/piwik/core/SettingsPiwik.php:170]
<a href='/6'>#6</a> Piwik\SettingsPiwik::getPiwikUrl(...) called at [/var/www/piwik/core/FrontController.php:394]
<a href='/7'>#7</a> Piwik\FrontController->init(...) called at [/var/www/piwik/core/dispatch.php:33]
<a href='/8'>#8</a> require_once(...) called at [/var/www/piwik/index.php:46]

Warning: preg_match(): Unknown modifier 'p' in /var/www/piwik/core/Url.php on line 255 

Backtrace -->

<a href='/0'>#0</a> Piwik\Error::errorHandler(...) called at [:]
<a href='/1'>#1</a> preg_match(...) called at [/var/www/piwik/core/Url.php:255]
<a href='/2'>#2</a> Piwik\Url::isValidHost(...) called at [/var/www/piwik/core/Url.php:311]
<a href='/3'>#3</a> Piwik\Url::getHost(...) called at [/var/www/piwik/core/Url.php:357]
<a href='/4'>#4</a> Piwik\Url::getCurrentHost(...) called at [/var/www/piwik/core/Url.php:105]
<a href='/5'>#5</a> Piwik\Url::getCurrentUrlWithoutFileName(...) called at [/var/www/piwik/core/SettingsPiwik.php:170]
<a href='/6'>#6</a> Piwik\SettingsPiwik::getPiwikUrl(...) called at [/var/www/piwik/core/View.php:144]
<a href='/7'>#7</a> Piwik\View->__construct(...) called at [/var/www/piwik/plugins/CoreHome/Controller.php:133]
<a href='/8'>#8</a> Piwik\Plugins\CoreHome\Controller->getDefaultIndexView(...) called at [/var/www/piwik/plugins/CoreHome/Controller.php:168]
<a href='/9'>#9</a> Piwik\Plugins\CoreHome\Controller->index(...) called at [:]
<a href='/10'>#10</a> call_user_func_array(...) called at [/var/www/piwik/core/FrontController.php:577]
<a href='/11'>#11</a> Piwik\FrontController->doDispatch(...) called at [/var/www/piwik/core/FrontController.php:86]
<a href='/12'>#12</a> Piwik\FrontController->dispatch(...) called at [/var/www/piwik/core/dispatch.php:34]
<a href='/13'>#13</a> require_once(...) called at [/var/www/piwik/index.php:46]

Warning: preg_match(): Unknown modifier 'p' in /var/www/piwik/core/Url.php on line 255 

Backtrace -->

<a href='/0'>#0</a> Piwik\Error::errorHandler(...) called at [:]
<a href='/1'>#1</a> preg_match(...) called at [/var/www/piwik/core/Url.php:255]
<a href='/2'>#2</a> Piwik\Url::isValidHost(...) called at [/var/www/piwik/core/Url.php:311]
<a href='/3'>#3</a> Piwik\Url::getHost(...) called at [/var/www/piwik/core/Url.php:357]
<a href='/4'>#4</a> Piwik\Url::getCurrentHost(...) called at [/var/www/piwik/core/Url.php:105]
<a href='/5'>#5</a> Piwik\Url::getCurrentUrlWithoutFileName(...) called at [/var/www/piwik/core/SettingsPiwik.php:170]
<a href='/6'>#6</a> Piwik\SettingsPiwik::getPiwikUrl(...) called at [/var/www/piwik/plugins/CoreAdminHome/CustomLogo.php:130]
<a href='/7'>#7</a> Piwik\Plugins\CoreAdminHome\CustomLogo->getPathToLogo(...) called at [/var/www/piwik/plugins/CoreAdminHome/CustomLogo.php:43]
<a href='/8'>#8</a> Piwik\Plugins\CoreAdminHome\CustomLogo->getSVGLogoUrl(...) called at [/var/www/piwik/plugins/API/API.php:303]
<a href='/9'>#9</a> Piwik\Plugins\API\API->getSVGLogoUrl(...) called at [/var/www/piwik/core/Plugin/Controller.php:683]
<a href='/10'>#10</a> Piwik\Plugin\Controller->setBasicVariablesView(...) called at [/var/www/piwik/core/Plugin/Controller.php:626]
<a href='/11'>#11</a> Piwik\Plugin\Controller->setGeneralVariablesView(...) called at [/var/www/piwik/plugins/CoreHome/Controller.php:134]
<a href='/12'>#12</a> Piwik\Plugins\CoreHome\Controller->getDefaultIndexView(...) called at [/var/www/piwik/plugins/CoreHome/Controller.php:168]
<a href='/13'>#13</a> Piwik\Plugins\CoreHome\Controller->index(...) called at [:]
<a href='/14'>#14</a> call_user_func_array(...) called at [/var/www/piwik/core/FrontController.php:577]
<a href='/15'>#15</a> Piwik\FrontController->doDispatch(...) called at [/var/www/piwik/core/FrontController.php:86]
<a href='/16'>#16</a> Piwik\FrontController->dispatch(...) called at [/var/www/piwik/core/dispatch.php:34]
<a href='/17'>#17</a> require_once(...) called at [/var/www/piwik/index.php:46]

Warning: preg_match(): Unknown modifier 'p' in /var/www/piwik/core/Url.php on line 255 

Backtrace -->

<a href='/0'>#0</a> Piwik\Error::errorHandler(...) called at [:]
<a href='/1'>#1</a> preg_match(...) called at [/var/www/piwik/core/Url.php:255]
<a href='/2'>#2</a> Piwik\Url::isValidHost(...) called at [/var/www/piwik/core/Url.php:311]
<a href='/3'>#3</a> Piwik\Url::getHost(...) called at [/var/www/piwik/core/Url.php:357]
<a href='/4'>#4</a> Piwik\Url::getCurrentHost(...) called at [/var/www/piwik/core/Url.php:73]
<a href='/5'>#5</a> Piwik\Url::getCurrentUrl(...) called at [/var/www/piwik/core/View.php:225]
<a href='/6'>#6</a> Piwik\View->render(...) called at [/var/www/piwik/plugins/CoreHome/Controller.php:169]
<a href='/7'>#7</a> Piwik\Plugins\CoreHome\Controller->index(...) called at [:]
<a href='/8'>#8</a> call_user_func_array(...) called at [/var/www/piwik/core/FrontController.php:577]
<a href='/9'>#9</a> Piwik\FrontController->doDispatch(...) called at [/var/www/piwik/core/FrontController.php:86]
<a href='/10'>#10</a> Piwik\FrontController->dispatch(...) called at [/var/www/piwik/core/dispatch.php:34]
<a href='/11'>#11</a> require_once(...) called at [/var/www/piwik/index.php:46]
@mattab commented on October 6th 2014 Owner

Thanks for the report, could you paste here the text you put in the trusted_hosts config ?

@andre-dierker commented on October 7th 2014

Hi,
I've added the second host via the web interface.
Text was: "www.metapixl.com/piwik"

config.ini.php
[...]
[General]
trusted_hosts[] = "piwik.metapixl.com"
trusted_hosts[] = "www.metapixl.com/piwik"
salt = "saltsaltsalt"

[Plugins]
[...]

@andre-dierker commented on October 7th 2014

OK, solved this.
trusted_host accepts only the FQDN and not an absolute Path.
Anyway, it should still be checked or has it been tested and this was the strange error message?

@mattab commented on December 1st 2014 Owner

we fixed this in some other issue, it works without error now!

This Issue was closed on December 1st 2014
Powered by GitHub Issue Mirror