You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
answeredFor when a question was asked and we referred to forum or answered it.TaskIndicates an issue is neither a feature nor a bug and it's purely a "technical" change.
when the Document Root of Piwik lies on a Network Share under Windows, the PDF Reports throw errors when using functions like imagettftext(), imagettfbbox(), etc:
Warning: imagettfbbox(): Could not find/open font in \\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\libs\pChart2.1.3\class\pImage.class.php on line 211
Backtrace -->
#0 Piwik_ErrorHandler(...) called at [:]
#1 imagettfbbox(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\libs\pChart2.1.3\class\pImage.class.php:211]
#2 pImage->getTextBox(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\libs\pChart2.1.3\class\pDraw.class.php:988]
#3 pDraw->drawText(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\plugins\ImageGraph\StaticGraph.php:282]
#4 Piwik_ImageGraph_StaticGraph->getTextWidthHeight(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\plugins\ImageGraph\StaticGraph.php:300]
#5 Piwik_ImageGraph_StaticGraph->getMaximumTextWidthHeight(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\plugins\ImageGraph\StaticGraph\GridGraph.php:376]
#6 Piwik_ImageGraph_StaticGraph_GridGraph->getGridLeftMargin(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\plugins\ImageGraph\StaticGraph\GridGraph.php:87]
#7 Piwik_ImageGraph_StaticGraph_GridGraph->initGridChart(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\plugins\ImageGraph\StaticGraph\Evolution.php:29]
#8 Piwik_ImageGraph_StaticGraph_Evolution->renderGraph(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\plugins\ImageGraph\API.php:513]
#9 Piwik_ImageGraph_API->get(...) called at [:]
#10 call_user_func_array(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\core\API\Proxy.php:190]
#11 Piwik_API_Proxy->call(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\core\API\Request.php:128]
#12 Piwik_API_Request->process(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\core\ReportRenderer.php:242]
#13 Piwik_ReportRenderer::getStaticGraph(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\core\ReportRenderer\Html.php:144]
#14 Piwik_ReportRenderer_Html->renderReport(...) called at [:]
#15 array_walk(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\plugins\PDFReports\API.php:440]
#16 Piwik_PDFReports_API->generateReport(...) called at [:]
#17 call_user_func_array(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\core\API\Proxy.php:190]
#18 Piwik_API_Proxy->call(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\core\API\Request.php:128]
#19 Piwik_API_Request->process(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\plugins\API\Controller.php:27]
#20 Piwik_API_Controller->index(...) called at [:]
#21 call_user_func_array(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\core\FrontController.php:138]
#22 Piwik_FrontController->dispatch(...) called at [\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik\index.php:61]
Problem is, that imagettftext() doesn't seem to handle UNC paths for the font file, which resolves to \\10.24.4.5\WWW-EXTRA$\piwik\current\piwik/plugins/ImageGraph/fonts/tahoma.ttf
(Also see http://www.php.net/manual/en/function.imagettfbbox.php#91050 )
I don't know if a solution is necessary, I made a workaround to set a new PIWIK_INCLUDE_PATH in bootstrap.php:
Thanks for the report. If only the imagettf* functions are affected, and if all of them use the path from getFontPath then it would be great to patch this function with the str_replace you proposed! please subit pull request or patch :)
Thanks for contributing to this issue. As it has been a few months since the last activity and we believe this is likely not an issue anymore, we will now close this. If that's not the case, please do feel free to either reopen this issue or open a new one. We will gladly take a look again!
answeredFor when a question was asked and we referred to forum or answered it.TaskIndicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Hi,
when the Document Root of Piwik lies on a Network Share under Windows, the PDF Reports throw errors when using functions like imagettftext(), imagettfbbox(), etc:
Problem is, that imagettftext() doesn't seem to handle UNC paths for the font file, which resolves to
\\10.24.4.5\WWW-EXTRA$\piwik\current\piwik/plugins/ImageGraph/fonts/tahoma.ttf
(Also see http://www.php.net/manual/en/function.imagettfbbox.php#91050 )
I don't know if a solution is necessary, I made a workaround to set a new PIWIK_INCLUDE_PATH in bootstrap.php:
Otherwise a solution would be to change the API::getFontPath() to rewrite Paths beginning with
\\
to//
?The text was updated successfully, but these errors were encountered: