Printing problems on new installation.

Started by pekkari, 30.01.17 - klo:00:32

Previous topic - Next topic

pekkari

Hi,

First of all, thank you so much for this great piece of software, that I think it might helps loads of new businesses
in Finland to easily address invoicing.

I did an installation using the github source code, using nginx(1.10.2), php-fpm(on php-5.6.29) and Mariadb(10.0.28). I followed the steps
to create the deployment of the application, and everything looks good except a couple of things I'd like to feedback you.

First is, I found there is an snippet of code that prevents an invoice to be printed in case it's not having today's date. Not sure what is the
intention, but it would be great to print invoices that you archived, and invoices that you create for future dates.

From js/mlinvoice.js function printInvoice:

        if (typeof form.data('checkInvoiceDate') !== 'undefined') {
           var d = new Date();
           var dt = $('#invoice_date').val().split('.');
           if (parseInt(dt[0], 10) != d.getDate() || parseInt(dt[1], 10) != d.getMonth()+1 || parseInt(dt[2], 10) != d.getYear() + 1900) {
               if (!confirm(translate('InvoiceDateNonCurrent'))) {
                   return false;
               }
           }
       }


After commenting this snippet, I got the following error when trying to print an invoice. Do you know about this issue?

2017/01/29 17:05:22 [error] 13864#0: *880 FastCGI sent in stderr: "PHP message: PHP Deprecated:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0" while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "POST /json.php?func=put_invoice HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost", referrer: "http://localhost/index.php?func=archived_invoices&list=invoice&form=invoice&id=2"
2017/01/29 17:05:22 [error] 13864#0: *880 FastCGI sent in stderr: "PHP message: PHP Warning:  Cannot modify header information - headers already sent in Unknown on line 0" while reading upstream, client: 127.0.0.1, server: localhost, request: "POST /json.php?func=put_invoice HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost", referrer: "http://localhost/index.php?func=archived_invoices&list=invoice&form=invoice&id=2"
2017/01/29 17:05:22 [error] 13864#0: *880 FastCGI sent in stderr: "PHP message: PHP Warning:  session_start(): Cannot send session cache limiter - headers already sent in /opt/MLInvoice/localize.php on line 21
PHP message: PHP Warning:  Cannot modify header information - headers already sent in /opt/MLInvoice/json.php on line 379" while reading upstream, client: 127.0.0.1, server: localhost, request: "POST /json.php?func=put_invoice HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost", referrer: "http://localhost/index.php?func=archived_invoices&list=invoice&form=invoice&id=2"

Other point I wanted to highlight is that, every time I enter something in the database, I see an error in the top right corner with and status ok,
code 200 from http specs. I guess that might be problem of my setup, but if you have a guess how could it be solved it well be pretty much welcome.

Thanks for your great work!

pekkari

Aia! It turns out that you didn't use that variable in the code, so just activating the variable from php.ini
specified in the error message fixes both, the php error, and the pop-up with the ok status answer.

Ere Maijala

Thanks for the follow-up and great that you got it working!

--Ere