@anonymous-piwik-user opened this Issue on December 19th 2013

When you try to download a pdf-report raises the following 3 mistakes text below them, also see the attached screenshot.

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

Warning: fopen(/var/www/administrator/data/www/www.gkm.ru/piwik/tmp/tcpdf/__tcpdf_imgmask_alpha_f0bba2a54e1559957ccf786952cc22bc): failed to open stream: No such file or directory in /var/www/administrator/data/www/www.gkm.ru/piwik/libs/tcpdf/include/tcpdf_images.php on line 238

Backtrace -->

0 Piwik\Error::errorHandler(...) called at [:]

1 fopen(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/libs/tcpdf/include/tcpdf_images.php:238]

2 TCPDF_IMAGES::_parsepng(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/libs/tcpdf/tcpdf.php:6967]

3 TCPDF->Image(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/libs/tcpdf/tcpdf.php:6944]

4 TCPDF->Image(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/core/ReportRenderer/Pdf.php:385]

5 Piwik\ReportRenderer\Pdf->paintReportTable(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/core/ReportRenderer/Pdf.php:318]

6 Piwik\ReportRenderer\Pdf->renderReport(...) called at [:]

7 array_walk(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/plugins/ScheduledReports/API.php:444]

8 Piwik\Plugins\ScheduledReports\API->generateReport(...) called at [:]

9 call_user_func_array(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/core/API/Proxy.php:212]

10 Piwik\API\Proxy->call(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/core/API/Request.php:220]

11 Piwik\API\Request->process(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/plugins/API/Controller.php:34]

12 Piwik\Plugins\API\Controller->index(...) called at [:]

13 call_user_func_array(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/core/FrontController.php:117]

14 Piwik\FrontController->dispatch(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/index.php:71]

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

Warning: imagecreatefrompng(/var/www/administrator/data/www/www.gkm.ru/piwik/tmp/tcpdf/__tcpdf_imgmask_alpha_f0bba2a54e1559957ccf786952cc22bc): failed to open stream: No such file or directory in /var/www/administrator/data/www/www.gkm.ru/piwik/libs/tcpdf/tcpdf.php on line 6976

Backtrace -->

0 Piwik\Error::errorHandler(...) called at [:]

1 imagecreatefrompng(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/libs/tcpdf/tcpdf.php:6976]

2 TCPDF->Image(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/libs/tcpdf/tcpdf.php:6944]

3 TCPDF->Image(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/core/ReportRenderer/Pdf.php:385]

4 Piwik\ReportRenderer\Pdf->paintReportTable(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/core/ReportRenderer/Pdf.php:318]

5 Piwik\ReportRenderer\Pdf->renderReport(...) called at [:]

6 array_walk(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/plugins/ScheduledReports/API.php:444]

7 Piwik\Plugins\ScheduledReports\API->generateReport(...) called at [:]

8 call_user_func_array(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/core/API/Proxy.php:212]

9 Piwik\API\Proxy->call(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/core/API/Request.php:220]

10 Piwik\API\Request->process(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/plugins/API/Controller.php:34]

11 Piwik\Plugins\API\Controller->index(...) called at [:]

12 call_user_func_array(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/core/FrontController.php:117]

13 Piwik\FrontController->dispatch(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/index.php:71]

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

Warning: Cannot modify header information - headers already sent by (output started at /var/www/administrator/data/www/www.gkm.ru/piwik/core/Log.php:455) in /var/www/administrator/data/www/www.gkm.ru/piwik/libs/tcpdf/tcpdf.php on line 7581

Backtrace -->

0 Piwik\Error::errorHandler(...) called at [:]

1 header(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/libs/tcpdf/tcpdf.php:7581]

2 TCPDF->Output(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/core/ReportRenderer/Pdf.php:146]

3 Piwik\ReportRenderer\Pdf->sendToBrowserInline(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/plugins/ScheduledReports/API.php:467]

4 Piwik\Plugins\ScheduledReports\API->generateReport(...) called at [:]

5 call_user_func_array(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/core/API/Proxy.php:212]

6 Piwik\API\Proxy->call(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/core/API/Request.php:220]

7 Piwik\API\Request->process(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/plugins/API/Controller.php:34]

8 Piwik\Plugins\API\Controller->index(...) called at [:]

9 call_user_func_array(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/core/FrontController.php:117]

10 Piwik\FrontController->dispatch(...) called at [/var/www/administrator/data/www/www.gkm.ru/piwik/index.php:71]
Keywords: pdf-report, pdf

@anonymous-piwik-user commented on December 19th 2013

Attachment:
1.jpg

@mattab commented on December 26th 2013 Owner

Thanks for the report, also reported in forum: http://forum.piwik.org/read.php?2,108609

@mattab commented on January 3rd 2014 Owner

I cannot reproduce the issue... If you also experience this problem, please post a comment. What PHP version do you use? Have you tried chmod 777 the directory piwik/tmp/tcpdf/ ?

@anonymous-piwik-user commented on January 7th 2014

Same problem here (piwik v2.0.2). The Problem does not occur when selecting a date range within the current week/month. When choosing an older (archived?) date range, PDF generation fails and the following stack trace pops up:

Warning: fopen(/srv/www/piwik/tmp/tcpdf/__tcpdf_imgmask_alpha_cd8191daf65de53fd5124c3b8b079715): failed to open stream: No such file or directory
in /srv/www/piwik/libs/tcpdf/include/tcpdf_images.php on line 238
Backtrace
<a href='/0'>#0</a>  Piwik\Error::errorHandler(...) called at [:]
<a href='/1'>#1</a>  fopen(...) called at [/srv/www/piwik/libs/tcpdf/include/tcpdf_images.php:238]
<a href='/2'>#2</a>  TCPDF_IMAGES::_parsepng(...) called at [/srv/www/piwik/libs/tcpdf/tcpdf.php:6967]
<a href='/3'>#3</a>  TCPDF->Image(...) called at [/srv/www/piwik/libs/tcpdf/tcpdf.php:6944]
<a href='/4'>#4</a>  TCPDF->Image(...) called at [/srv/www/piwik/core/ReportRenderer/Pdf.php:385]
<a href='/5'>#5</a>  Piwik\ReportRenderer\Pdf->paintReportTable(...) called at [/srv/www/piwik/core/ReportRenderer/Pdf.php:318]
<a href='/6'>#6</a>  Piwik\ReportRenderer\Pdf->renderReport(...) called at [:]
<a href='/7'>#7</a>  array_walk(...) called at [/srv/www/piwik/plugins/ScheduledReports/API.php:444]
<a href='/8'>#8</a>  Piwik\Plugins\ScheduledReports\API->generateReport(...) called at [:]
<a href='/9'>#9</a>  call_user_func_array(...) called at [/srv/www/piwik/core/API/Proxy.php:212]
<a href='/10'>#10</a>  Piwik\API\Proxy->call(...) called at [/srv/www/piwik/core/API/Request.php:220]
<a href='/11'>#11</a>  Piwik\API\Request->process(...) called at [/srv/www/piwik/plugins/API/Controller.php:34]
<a href='/12'>#12</a>  Piwik\Plugins\API\Controller->index(...) called at [:]
<a href='/13'>#13</a>  call_user_func_array(...) called at [/srv/www/piwik/core/FrontController.php:117]
<a href='/14'>#14</a>  Piwik\FrontController->dispatch(...) called at [/srv/www/piwik/index.php:71]

...
imagecreatefrompng(/srv/www/piwik/tmp/tcpdf/__tcpdf_imgmask_alpha_cd8191daf65de53fd5124c3b8b079715):failed to open stream: No such file or directory in /srv/www/piwik/libs/tcpdf/tcpdf.php on line 6976
Backtrace
<a href='/0'>#0</a>  Piwik\Error::errorHandler(...) called at [:]
<a href='/1'>#1</a>  imagecreatefrompng(...) called at [/srv/www/piwik/libs/tcpdf/tcpdf.php:6976]
<a href='/2'>#2</a>  TCPDF->Image(...) called at [/srv/www/piwik/libs/tcpdf/tcpdf.php:6944]
<a href='/3'>#3</a>  TCPDF->Image(...) called at [/srv/www/piwik/core/ReportRenderer/Pdf.php:385]
<a href='/4'>#4</a>  Piwik\ReportRenderer\Pdf->paintReportTable(...) called at [/srv/www/piwik/core/ReportRenderer/Pdf.php:318]
<a href='/5'>#5</a>  Piwik\ReportRenderer\Pdf->renderReport(...) called at [:]
<a href='/6'>#6</a>  array_walk(...) called at [/srv/www/piwik/plugins/ScheduledReports/API.php:444]
<a href='/7'>#7</a>  Piwik\Plugins\ScheduledReports\API->generateReport(...) called at [:]
<a href='/8'>#8</a>  call_user_func_array(...) called at [/srv/www/piwik/core/API/Proxy.php:212]
<a href='/9'>#9</a>  Piwik\API\Proxy->call(...) called at [/srv/www/piwik/core/API/Request.php:220]
<a href='/10'>#10</a>  Piwik\API\Request->process(...) called at [/srv/www/piwik/plugins/API/Controller.php:34]
<a href='/11'>#11</a>  Piwik\Plugins\API\Controller->index(...) called at [:]
<a href='/12'>#12</a>  call_user_func_array(...) called at [/srv/www/piwik/core/FrontController.php:117]
<a href='/13'>#13</a>  Piwik\FrontController->dispatch(...) called at [/srv/www/piwik/index.php:71]

/tmp/tcpdf permissions are rwx for the user running Piwik. PHP 5.3.8 on GNU/Linux.

@anonymous-piwik-user commented on January 7th 2014

Just noticed that when setting 'log_only_when_debug_parameter = 1' in config, the problem goes away.

@mattab commented on January 9th 2014 Owner

In 566c63a52e31b2b2d3e1a83f8f63e74e8d661b21: Refs #4404 Error when downloading pdf-report
Can you please apply these two changes and confirm whether this fixes the issue for you?

@mattab commented on January 9th 2014 Owner

In 6a74c7aeaeb015f9c6cc58b66e05ac58bfac62cb: Refs #4404 Referencing manual tcpdf fix in the readme, so we remember to backport

@anonymous-piwik-user commented on January 9th 2014

Replying to mattab:

In 566c63a52e31b2b2d3e1a83f8f63e74e8d661b21: >```
Can you please apply these two changes and confirm whether this fixes the issue for you?

Changes applied, problem gone.
@anonymous-piwik-user commented on January 9th 2014

Thank you! Problem has been fixed!

@mattab commented on February 1st 2014 Owner

Milestone 2.1 - Piwik 2.1 deleted

@kcpal commented on September 19th 2014

I had the same problem and fixed it with this help. Thanks.

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