Error on cron sending email statistics - manual email sending also fails


(Dominik) #1

Hi,

My piwik installation is configured to send multiple pdf statistics via email monthly. Last night there was an error. It was the first run of the monthly report after updating to piwik 1.6. I tried to send the statistics via email manually but this also failed (only showing the loading graphics for a couple of minutes, I cancelled the process then). Downloading the pdf file directly works as aspected, also sending a html statistic via email.

The cron gave me this error last night:


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

Warning: imagepng(): Unable to open '/var/www/piwik/tmp/tcpdf/mska_c594aa216289afab0dfceec45e4243bb' for writing: Datei oder Verzeichnis nicht gefunden in /var/www/piwik/libs/tcpdf/tcpdf.php on line 7903 

Backtrace -->#0 Piwik_ErrorHandler(...) called at [:]#1 imagepng(...) called at [/var/www/piwik/libs/tcpdf/tcpdf.php:7903]#2 TCPDF->ImagePngAlpha(...) called at [/var/www/piwik/libs/tcpdf/tcpdf.php:7416]#3 TCPDF->Image(...) called at [/var/www/piwik/core/ReportRenderer/Pdf.php:271]#4 Piwik_ReportRenderer_Pdf->paintReportTable(...) called at [/var/www/piwik/core/ReportRenderer/Pdf.php:205]#5 Piwik_ReportRenderer_Pdf->renderReport(...) called at [:]#6 array_walk(...) called at [/var/www/piwik/plugins/PDFReports/API.php:351]#7 Piwik_PDFReports_API->generateReport(...) called at [/var/www/piwik/plugins/PDFReports/API.php:411]#8 Piwik_PDFReports_API->sendEmailReport(...) called at [/var/www/piwik/plugins/PDFReports/PDFReports.php:128]#9 Piwik_PDFReports->generateAndSendScheduledReports(...) called at [/var/www/piwik/plugins/PDFReports/PDFReports.php:116]#10 Piwik_PDFReports->monthlyS! chedule(...) called at [:]#11 call_user_func(...) called at [/var/www/piwik/core/TaskScheduler.php:76]#12 Piwik_TaskScheduler::runTasks(...) called at [/var/www/piwik/plugins/CoreAdminHome/API.php:38]#13 Piwik_CoreAdminHome_API->runScheduledTasks(...) called at [:]#14 call_user_func_array(...) called at [/var/www/piwik/core/API/Proxy.php:179]#15 Piwik_API_Proxy->call(...) called at [/var/www/piwik/core/API/Request.php:121]#16 Piwik_API_Request->process(...) called at [/var/www/piwik/plugins/API/Controller.php:27]#17 Piwik_API_Controller->index(...) called at [:]#18 call_user_func_array(...) called at [/var/www/piwik/core/FrontController.php:132]#19 Piwik_FrontController->dispatch(...) called at [/var/www/piwik/index.php:53]





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

Warning: imagepng(): Unable to open '/var/www/piwik/tmp/tcpdf/mskp_c594aa216289afab0dfceec45e4243bb' for writing: Datei oder Verzeichnis nicht gefunden in /var/www/piwik/libs/tcpdf/tcpdf.php on line 7908 

Backtrace -->#0 Piwik_ErrorHandler(...) called at [:]#1 imagepng(...) called at [/var/www/piwik/libs/tcpdf/tcpdf.php:7908]#2 TCPDF->ImagePngAlpha(...) called at [/var/www/piwik/libs/tcpdf/tcpdf.php:7416]#3 TCPDF->Image(...) called at [/var/www/piwik/core/ReportRenderer/Pdf.php:271]#4 Piwik_ReportRenderer_Pdf->paintReportTable(...) called at [/var/www/piwik/core/ReportRenderer/Pdf.php:205]#5 Piwik_ReportRenderer_Pdf->renderReport(...) called at [:]#6 array_walk(...) called at [/var/www/piwik/plugins/PDFReports/API.php:351]#7 Piwik_PDFReports_API->generateReport(...) called at [/var/www/piwik/plugins/PDFReports/API.php:411]#8 Piwik_PDFReports_API->sendEmailReport(...) called at [/var/www/piwik/plugins/PDFReports/PDFReports.php:128]#9 Piwik_PDFReports->generateAndSendScheduledReports(...) called at [/var/www/piwik/plugins/PDFReports/PDFReports.php:116]#10 Piwik_PDFReports->monthlyS! chedule(...) called at [:]#11 call_user_func(...) called at [/var/www/piwik/core/TaskScheduler.php:76]#12 Piwik_TaskScheduler::runTasks(...) called at [/var/www/piwik/plugins/CoreAdminHome/API.php:38]#13 Piwik_CoreAdminHome_API->runScheduledTasks(...) called at [:]#14 call_user_func_array(...) called at [/var/www/piwik/core/API/Proxy.php:179]#15 Piwik_API_Proxy->call(...) called at [/var/www/piwik/core/API/Request.php:121]#16 Piwik_API_Request->process(...) called at [/var/www/piwik/plugins/API/Controller.php:27]#17 Piwik_API_Controller->index(...) called at [:]#18 call_user_func_array(...) called at [/var/www/piwik/core/FrontController.php:132]#19 Piwik_FrontController->dispatch(...) called at [/var/www/piwik/index.php:53]





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

Warning: fopen(/var/www/piwik/tmp/tcpdf/mska_c594aa216289afab0dfceec45e4243bb): failed to open stream: Datei oder Verzeichnis nicht gefunden in /var/www/piwik/libs/tcpdf/tcpdf.php on line 7725 

Backtrace -->#0 Piwik_ErrorHandler(...) called at [:]#1 fopen(...) called at [/var/www/piwik/libs/tcpdf/tcpdf.php:7725]#2 TCPDF->_parsepng(...) called at [/var/www/piwik/libs/tcpdf/tcpdf.php:7414]#3 TCPDF->Image(...) called at [/var/www/piwik/libs/tcpdf/tcpdf.php:7912]#4 TCPDF->ImagePngAlpha(...) called at [/var/www/piwik/libs/tcpdf/tcpdf.php:7416]#5 TCPDF->Image(...) called at [/var/www/piwik/core/ReportRenderer/Pdf.php:271]#6 Piwik_ReportRenderer_Pdf->paintReportTable(...) called at [/var/www/piwik/core/ReportRenderer/Pdf.php:205]#7 Piwik_ReportRenderer_Pdf->renderReport(...) called at [:]#8 array_walk(...) called at [/var/www/piwik/plugins/PDFReports/API.php:351]#9 Piwik_PDFReports_API->generateReport(...) called at [/var/www/piwik/plugins/PDFReports/API.php:411]#10 Piwik_PDFReports_API->sendEmailReport(...) called at [/var/www/piwik/plugins/PDFReports/PDFReports.php:128]#11 ! Piwik_PDFReports->generateAndSendScheduledReports(...) called at [/var/www/piwik/plugins/PDFReports/PDFReports.php:116]#12 Piwik_PDFReports->monthlySchedule(...) called at [:]#13 call_user_func(...) called at [/var/www/piwik/core/TaskScheduler.php:76]#14 Piwik_TaskScheduler::runTasks(...) called at [/var/www/piwik/plugins/CoreAdminHome/API.php:38]#15 Piwik_CoreAdminHome_API->runScheduledTasks(...) called at [:]#16 call_user_func_array(...) called at [/var/www/piwik/core/API/Proxy.php:179]#17 Piwik_API_Proxy->call(...) called at [/var/www/piwik/core/API/Request.php:121]#18 Piwik_API_Request->process(...) called at [/var/www/piwik/plugins/API/Controller.php:27]#19 Piwik_API_Controller->index(...) called at [:]#20 call_user_func_array(...) called at [/var/www/piwik/core/FrontController.php:132]#21 Piwik_FrontController->dispatch(...) called at [/var/www/piwik/index.php:53]


What is the problem here?

Regards,
Dominik


(Matthieu Aubry) #2

The problem is “unable to open file [xxxx] for writing: Datei oder Verzeichnis nicht gefunden in”


(Dominik) #3

But why occurs this problem on three reports out of about 20?


(Dominik) #4

The error occurred again - it’s a new month :wink:

I tried some things and finally found out that it has something to do with the report of search engines. It works if I disable the checkbox “search engines” (Verweise -> Suchmaschinen) in the email report settings.

Btw. a manual download of the report is fine, just the email report doesn’t work and stops the cron for all other website reports :X

Update: After manually creating the folder piwik/tmp/tcpdf the email sending also works fine. I will have a closer look next month ::o


(Matthieu Aubry) #5

It is probably because, the search engine reports shows the search engines icons on the PDF, and to load the images causes the error “/tmp/tcpdf/” is not writable/readable. can you please ensure that piwik/tmp/tcpdf/ is writable and it should work fine