Scheduled Availability Report generates corrupt PDF files

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Scheduled Availability Report generates corrupt PDF file

Post by ssax »

Please edit your /etc/php.ini and change these:

Code: Select all

extension=/usr/lib64/php/modules/pdo.so
extension=/usr/lib64/php/modules/pdo_mysql.so
To this:

Code: Select all

;extension=/usr/lib64/php/modules/pdo.so
;extension=/usr/lib64/php/modules/pdo_mysql.so
Then restart apache and test it again:

Code: Select all

service httpd restart
You have the modules defined in multiple places, in your /etc/php.ini AND from your /etc/php.d entries

Send the output of this command (different than the orignal):

Code: Select all

grep -i "pdo\|pdo_mysql" /etc/php.d/*
Then if it doesn't work, revert your changes and send any errors you receive and the output of this command:

Code: Select all

tail -n100 /var/log/messages /var/log/httpd/error_log /var/log/httpd/ssl_error_log
DennisPR
Posts: 149
Joined: Mon May 07, 2012 10:34 am

Re: Scheduled Availability Report generates corrupt PDF file

Post by DennisPR »

I have upgraded to 5.6.0 w while back and 7 out 8 reports worked fine this month.

I have commented out both lines in the /etc/php.ini

Here is the output of the command you requested

Code: Select all

grep -i "pdo\|pdo_mysql" /etc/php.d/*
/etc/php.d/pdo_dblib.ini:; Enable pdo_dblib extension module
/etc/php.d/pdo_dblib.ini:extension=pdo_dblib.so
/etc/php.d/pdo.ini:; Enable pdo extension module
/etc/php.d/pdo.ini:extension=pdo.so
/etc/php.d/pdo_mysql.ini:; Enable pdo_mysql extension module
/etc/php.d/pdo_mysql.ini:extension=pdo_mysql.so
/etc/php.d/pdo_pgsql.ini:; Enable pdo_pgsql extension module
/etc/php.d/pdo_pgsql.ini:extension=pdo_pgsql.so
/etc/php.d/pdo_sqlite.ini:; Enable pdo_sqlite extension module
/etc/php.d/pdo_sqlite.ini:extension=pdo_sqlite.so
I have scheduled the reports to run daily to see if it works now.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Scheduled Availability Report generates corrupt PDF file

Post by ssax »

Ok, with those /etc/php.ini lines removed let us know how it works, was the 8th one corrupt or what happened?
DennisPR
Posts: 149
Joined: Mon May 07, 2012 10:34 am

Re: Scheduled Availability Report generates corrupt PDF file

Post by DennisPR »

I have generated over 20 reports since and 10 failed again.
It's not always the same reports that fail.

Still corrupt PDF's as attachments.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Scheduled Availability Report generates corrupt PDF file

Post by npolovenko »

@DennisPR, Have you noticed any difference in the Apache error log when the PDF report is generated OK and when it shows session timeout?

Open the /etc/php.ini file and change:

Code: Select all

session.gc_maxlifetime = 1440
to

Code: Select all

session.gc_maxlifetime = 2000
Please PM me a screenshot of Admin -> System Settings "Program URL" and "External URL".

And upload the apache error log(the most recent one, and two previous ones) from /var/log/httpd.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked