500 - Internal Server Error

Hi team,

when downloading an invoice by pressing “Download PDF”, it doesn’t happen, instead the page with

500 - Internal Server Error
Please refresh this page or try again later.

shows up.

It’s a new issue, first noticed few weeks ago, before that everything was fine.

The same page shows up when used an option “Send Email”.

Would you be able to help on this?

Kind regards

Can you turn on debugging mode in your ip_config.php so that the errors will show up?

A 5xx Error is always server-related.

  1. please make sure you do fullfill the requirements which you can find here: REQ
  2. please do as @UnderDog stated and show us the log.
  3. Please also append the Server log (PHP, Apache etc)
  4. also write us which version of:
    4.1 InvoicePlane
    4.2 PHP
    4.3 your OS

You are using

Thank you very much for your replies.

We’ve tried and made a new installation of the program in different location, the pdf-function doesn’t work there neither unfortunately.

Below is our conversation with the web hosting company. Would you be able to advise what could be a hint to solve the issue?

Jakub: We use an invoice program on dildizayn.com and the functionality whereby we can generate an invoice into a PDF doesn’t work any more and used to work in the past (for sure it worked until 21 Dec 2020). The issue seems to be on the server as when downloading an the page with this information shows up: 500 - Internal Server Error Please refresh this page or try again later. Would you be able to help on this?
Petar B.: May I know from which page is the program downloading the invoices from?
Jakub: E.g. https://dildizayn.com/invoice/invoices/view/122
Petar B.: This page is asking me for login credentials.
Petar B.: I am seeing quite a few errors in your error log referring to this folder:
Petar B.: 2021-02-16 14:10:42 UTC [apache][core:info] [pid 51496] [client 185.89.39.13:50030] AH00128: File does not exist: /home/u617-olsu6xbsje8e/www/dildizayn.com/public_html/favicon.ico, referer: https://dildizayn.com/invoice/invoices/generate_pdf/123 2021-02-16 13:51:12 UTC [apache][core:info] [pid 35880] [client 176.88.137.170:41186] AH00128: File does not exist: /home/u617-olsu6xbsje8e/www/dildizayn.com/public_html/favicon.ico, referer: https://dildizayn.com/invoice/invoices/generate_pdf/122
Petar B.: After checking, the invoices folder under public_html does not exist.
Petar B.: Is this program set to a specific file path?
Jakub: I’m not sure, would you be able to advise how this can be verified?
Petar B.: Has a developer set this program up for you?
Petar B.: If yes, it would be best if they check if the program is set to a specific file path and make sure that it is pointing correctly to home/customer/www/dildizayn.com/public_html/invoice
Petar B.: However the the folder and files that you are trying to open: https://dildizayn.com/invoice/invoices/view/122 are not present at the moment on the file manager.
Jakub: We set the program ourselves and it worked until few weeks back without problems
Petar B.: I understand. That is why my question was if it is set to a specific file path. Do please try to re-setup the program.
Jakub: Would re-setuping mean losing the current data or will they stay?
Petar B.: I am seeing 2 backup folders for your invoices in the invoice folder under public_Html.
Petar B.: Sadly, I am unable to confirm if the data will stay or it will be lost.
Petar B.: The setup of this program is on the development side and is out of the scope of our support. I have checked on the server in the meantime and it is in full operational status and not what is causing the 500 error. The 500 error is caused by the missing invoices folder.
Jakub: Is it possible to find out where the folder for the invoices should be?
Petar B.: I do think that the folder that you are trying to reach is:
Petar B.: dildizayn.com public_html invoice application modules invoices views
Petar B.: public_html → invoice → application → modules → invoices → views
Petar B.: This is how the application looks to be setup.
Jakub: I set up a new version of the program under “billing”
Jakub: here I set the path to IP_URL=http://dildizayn.com/billing
Jakub: according to the instructions for the program I should be able to access 'setup" by typing www.dildizayn.com/billing/setup in a browser window, but it doesn’t work
Jakub: I also set the .htaccess file to the same path
Jakub: https://dildizayn.com/billing/setup does not work
Petar B.: The billing has to be inside public_html and not outside of it
Petar B.: Because thats where all folders and files related to your website and that are able to be reached by dildizayn.com/ are.
Jakub: ok, I just changed that
Jakub: and when I try again, the message “Your system folder path does not appear to be set correctly. Please open the following file and correct this: index.php” appears
Petar B.: Which file are you trying to reach inside the billing folder ?
Jakub: index.php
Jakub: https://dildizayn.com/billing/index.php/setup
Petar B.: This would be the correct link url:https://www.dildizayn.com/billing/index.php
Petar B.: However, it looks like the system path inside the index.php file is not correct. This is quite on the development side of things and sadly it is out of the scope of our support. As much as I would love to help you with this, I will not be able to. We are only able to help with errors related to the server or additional services such as emails. I would suggest getting a developer to look at this.
Jakub: We will ask the software developers. I guess it will be it for now, thank you very much for your help.

Before you try to mess with anything on your server try to set it up locally.
Then in your ipconfig.php check for the correct path, if that’s set up wrong you’ll get these errors.

The server having a public_html is fine. InvoicePlane needs to be uploaded there, so you’re on the right track.

with .htaccess needing to be setup correctly and InvoicePlane in either the billing or invoice directory you should be able to fix it.

Try it out locally first!
What is the PHP version on your server?

When you set it to HTTP please also try to access it from HTTP and not HTTPS.
The IP_URL have to match to 100%!

Also: if you install InvoicePlane you also have to mofidy the htaccess.

Please read here: Installation - InvoicePlane Wiki
The htaccess brings its own little documentation, see: https://github.com/InvoicePlane/InvoicePlane/blob/master/htaccess

Thanks again for your replies.
We seem to have tried everything we could, attached are ipconfig.php and a pic of how it set up in the directory…
Kindest regards

ipconfig.php (1,5 KB)

We can help you, if you want we can do it by remote assistance.

Thanks a lot, we would be pleased if we could do it this way.
When would be convenient for you and how can we do it?
Kindest regards

@jakub by private I will write and publish to solve your case, if any user has the same problem he will know how to solve it.