Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Error when downloading pdf-report #4404

Closed
anonymous-piwik-user opened this Issue · 11 comments

3 participants

Anonymous Piwik user Matthieu Aubry Kunwar Chandra Pal
Anonymous Piwik user

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

Matthieu Aubry
Owner

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

Matthieu Aubry
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

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
#0  Piwik\Error::errorHandler(...) called at [:]
#1  fopen(...) called at [/srv/www/piwik/libs/tcpdf/include/tcpdf_images.php:238]
#2  TCPDF_IMAGES::_parsepng(...) called at [/srv/www/piwik/libs/tcpdf/tcpdf.php:6967]
#3  TCPDF->Image(...) called at [/srv/www/piwik/libs/tcpdf/tcpdf.php:6944]
#4  TCPDF->Image(...) called at [/srv/www/piwik/core/ReportRenderer/Pdf.php:385]
#5  Piwik\ReportRenderer\Pdf->paintReportTable(...) called at [/srv/www/piwik/core/ReportRenderer/Pdf.php:318]
#6  Piwik\ReportRenderer\Pdf->renderReport(...) called at [:]
#7  array_walk(...) called at [/srv/www/piwik/plugins/ScheduledReports/API.php:444]
#8  Piwik\Plugins\ScheduledReports\API->generateReport(...) called at [:]
#9  call_user_func_array(...) called at [/srv/www/piwik/core/API/Proxy.php:212]
#10  Piwik\API\Proxy->call(...) called at [/srv/www/piwik/core/API/Request.php:220]
#11  Piwik\API\Request->process(...) called at [/srv/www/piwik/plugins/API/Controller.php:34]
#12  Piwik\Plugins\API\Controller->index(...) called at [:]
#13  call_user_func_array(...) called at [/srv/www/piwik/core/FrontController.php:117]
#14  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
#0  Piwik\Error::errorHandler(...) called at [:]
#1  imagecreatefrompng(...) called at [/srv/www/piwik/libs/tcpdf/tcpdf.php:6976]
#2  TCPDF->Image(...) called at [/srv/www/piwik/libs/tcpdf/tcpdf.php:6944]
#3  TCPDF->Image(...) called at [/srv/www/piwik/core/ReportRenderer/Pdf.php:385]
#4  Piwik\ReportRenderer\Pdf->paintReportTable(...) called at [/srv/www/piwik/core/ReportRenderer/Pdf.php:318]
#5  Piwik\ReportRenderer\Pdf->renderReport(...) called at [:]
#6  array_walk(...) called at [/srv/www/piwik/plugins/ScheduledReports/API.php:444]
#7  Piwik\Plugins\ScheduledReports\API->generateReport(...) called at [:]
#8  call_user_func_array(...) called at [/srv/www/piwik/core/API/Proxy.php:212]
#9  Piwik\API\Proxy->call(...) called at [/srv/www/piwik/core/API/Request.php:220]
#10  Piwik\API\Request->process(...) called at [/srv/www/piwik/plugins/API/Controller.php:34]
#11  Piwik\Plugins\API\Controller->index(...) called at [:]
#12  call_user_func_array(...) called at [/srv/www/piwik/core/FrontController.php:117]
#13  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

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

Matthieu Aubry
Owner

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

Matthieu Aubry
Owner

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

Anonymous Piwik user

Replying to mattab:

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

Changes applied, problem gone.
Anonymous Piwik user

Thank you! Problem has been fixed!

Matthieu Aubry
Owner

Milestone 2.1 - Piwik 2.1 deleted

Kunwar Chandra Pal

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

Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab Refs #4404 Error when downloading pdf-report
Can you please apply these two changes and confirm whether this fixes the issue for you?
566c63a
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Matthieu Aubry mattab Refs #4404 Referencing manual tcpdf fix in the readme, so we remember…
… to backport
6a74c7a
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.