Jump to content
  • 0

[SOLVED] Unable to view Invoices on PHP7.1


MDHMatt

Question

9 answers to this question

Recommended Posts

  • 0

You might try increasing the memory limit from 32M to say 128M. The message in the logs mentions the temp directory. It's just a notice, so I'm not sure if it's indicative of a problem but you may want to check your temp directory as defined under Settings > System > General: Temp Directory. By default it's the system temp directory (/tmp/) and some servers do not allow access, or there are permissions issues. You could create a new temp directory within your users home directory and update the setting to see if it helps.

Link to comment
Share on other sites

  • 0
26 minutes ago, MDHMatt said:

as the title says im unable to view invoices on php7.1 i just get a 500 error page and can't see any issues in the log files Invoices are generating but i just can't view them

have you tried enabling your debug mode inside blesta's config to see why?

Quote

 

Turn error reporting to -1

 

in /config/blesta.php:

 

Configure::errorReporting(-1);

Configure::set("System.debug", true);

that would log the errors in your webserver log otherwise blesta will try to "mask" the errors instead and you will not see them in the error log of your webserver.

Link to comment
Share on other sites

  • 0
5 hours ago, MDHMatt said:

done that but not getting any errors. i tried changing it back to php5 then re enabling php7.1. the invoice is now shown but only like shown in the attachment  2-03-2018 (2).pdf

okay? so what are you trying to do? as unless you have the html invoices addon by someone here in the forums I Believe blesta-addons made it, you won't see the invoice as html output only in pdf form which you can see. you could submit that as a feature request to add that in the core though.

Link to comment
Share on other sites

  • 0

This is an issue generating/viewing PDF invoices, not a 3rd party HTML version right? Does your PHP 7 have the GD extension? If there is a logo or background image, sometimes TCPDF uses GD to resize or manipulate the image in some way.

Also, what version of Blesta is this? Did you check the logs? Since 4.1, Blesta does some logging with Monolog. Settings > System > General to check the path to your logs directory, and whether it's writable. Then, check the logs to see if anything is written when you try to generate an invoice.

Link to comment
Share on other sites

  • 0
2 hours ago, Paul said:

This is an issue generating/viewing PDF invoices, not a 3rd party HTML version right? Does your PHP 7 have the GD extension? If there is a logo or background image, sometimes TCPDF uses GD to resize or manipulate the image in some way.

Also, what version of Blesta is this? Did you check the logs? Since 4.1, Blesta does some logging with Monolog. Settings > System > General to check the path to your logs directory, and whether it's writable. Then, check the logs to see if anything is written when you try to generate an invoice.

Its a standard blesta 4.2.2 install. you can see the phpinfo here; https://mdhosting.co.uk/phpinfo.php. i can give you ssh access if this helps?

I did check the logs and it is writable but the only thing its saying is this;

[2018-04-11 05:15:09] general.NOTICE: E_NOTICE: tempnam(): file created in the system's temporary directory {"code":8,"message":"tempnam(): file created in the system's temporary directory","file":"/home/mdhostin/public_html/billing/vendors/tcpdf/tcpdf.php","line":5410} 
[2018-04-11 09:06:42] general.NOTICE: E_NOTICE: tempnam(): file created in the system's temporary directory {"code":8,"message":"tempnam(): file created in the system's temporary directory","file":"/home/mdhostin/public_html/billing/vendors/tcpdf/tcpdf.php","line":5410} 
[2018-04-11 11:20:09] general.NOTICE: E_NOTICE: tempnam(): file created in the system's temporary directory {"code":8,"message":"tempnam(): file created in the system's temporary directory","file":"/home/mdhostin/public_html/billing/vendors/tcpdf/tcpdf.php","line":5410} 
[2018-04-11 15:54:44] general.NOTICE: E_NOTICE: tempnam(): file created in the system's temporary directory {"code":8,"message":"tempnam(): file created in the system's temporary directory","file":"/home/mdhostin/public_html/billing/vendors/tcpdf/tcpdf.php","line":5410} 
[2018-04-11 17:25:08] general.NOTICE: E_NOTICE: tempnam(): file created in the system's temporary directory {"code":8,"message":"tempnam(): file created in the system's temporary directory","file":"/home/mdhostin/public_html/billing/vendors/tcpdf/tcpdf.php","line":5410} 

 

1 hour ago, Blesta Addons said:

are you using the default template engine or our HTML Invoice components?

normally what i see from the file attached it only printed the terms !!!!

can you check apache or nginx log file to see is the real error .

 

All logs showing no erros... thanks for the help guys i hope we can fix it :D

Link to comment
Share on other sites

  • 0
2 hours ago, Paul said:

You might try increasing the memory limit from 32M to say 128M. The message in the logs mentions the temp directory. It's just a notice, so I'm not sure if it's indicative of a problem but you may want to check your temp directory as defined under Settings > System > General: Temp Directory. By default it's the system temp directory (/tmp/) and some servers do not allow access, or there are permissions issues. You could create a new temp directory within your users home directory and update the setting to see if it helps.

Seems like changing the mem size has cleared it. Its also had the added benefit of fixing the high cpu usage. My php must not have been configured correctly and doing this has solved it. thanks guys 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...