Jump to content
  • 0
wmac

Can't view invoices TCPDF ERROR

Question

When clicking on view invoice it returns error TCPDF ERROR: [Image] No such file or directory in

I believe that is directory permission but I don't know each one.

Share this post


Link to post
Share on other sites

20 answers to this question

Recommended Posts

  • 0
3 hours ago, wmac said:

When clicking on view invoice it returns error TCPDF ERROR: [Image] No such file or directory in

I believe that is directory permission but I don't know each one.

Are your temp and uploads directories writeable?

Settings -->> System -->> Basic Setup

Share this post


Link to post
Share on other sites
  • 0

I did not test yet but I found out the uploads directory was not configured in the system, now it is and it is writable, I will check on the first invoice generated

Share this post


Link to post
Share on other sites
  • 0
13 minutes ago, wmac said:

I did not test yet but I found out the uploads directory was not configured in the system, now it is and it is writable, I will check on the first invoice generated

Just tested, didn't work, must be another thing, I will check on the logo I never set the invoice background

Share this post


Link to post
Share on other sites
  • 0

Do you have the PHP GD library extension? Sometimes TCPDF tries to resize the logo and it uses GD to do it.

Regarding your uploads directory:

Quote

Make sure your uploads directory exists and is defined under Settings > System > General: Uploads Directory.

Some tips:

- The uploads directory should be above your document root or public_html directory so that it's not accessible directly via the web.
- A common path to the uploads directory would be something like: **/home/user/uploads/** 
- Make sure the uploads directory is writable by your web server and cron users. 755 permissions are usually sufficient, but you may need to set it to 777
- Inside the uploads directory, you should have a directory called 1 (for the company ID), and system.
- Plugins typically create their own directories within your company ID directory, but you may need to create them manually.

These are the directories you should have under uploads:

└── uploads
    ├── 1
    │   ├── download_files
    │   ├── invoices
    │   ├── mass_mailer_files
    │   └── support_manager_files
    └── system
 

 

Share this post


Link to post
Share on other sites
  • 0
10 hours ago, Paul said:

Do you have the PHP GD library extension? Sometimes TCPDF tries to resize the logo and it uses GD to do it.

Regarding your uploads directory:

 

PHP GD is loaded

I don't have all those directories under /uploads/1    I will create and check

Thanks

 

Share this post


Link to post
Share on other sites
  • 0
3 minutes ago, Blesta Addons said:

i still believe that you have a missed logo or background image, can you posta screenshoot of your Invoice Customization under , settings -> Billing/Payment -> Invoice Customization .

 

invoice1.png

Share this post


Link to post
Share on other sites
  • 0

Is the path defined correctly under Settings > System > General: Root Web Directory? Should begin and end with a forward slash, and be the same as your document root. Also check the Temp Directory. The default is /tmp/ but some servers don't allow access to the system temp directory. I'd suggest creating a tmp directory within your users home directory, above the doc root, and setting it here.

Also, are you running 4.1? There is new file-based logging, and you can check your "Log Directory" on this page also and take a look at the files in that location.

Share this post


Link to post
Share on other sites
  • 0
6 hours ago, Paul said:

Is the path defined correctly under Settings > System > General: Root Web Directory? Should begin and end with a forward slash, and be the same as your document root. Also check the Temp Directory. The default is /tmp/ but some servers don't allow access to the system temp directory. I'd suggest creating a tmp directory within your users home directory, above the doc root, and setting it here.

Also, are you running 4.1? There is new file-based logging, and you can check your "Log Directory" on this page also and take a look at the files in that location.

The path is correct I also create a new tmp directory with 777 in the home directory and still have the same issue, I am running VestaCP so the home directory is in a different path from the others CP.

Also when the debug was on, I answered a customer support ticket and got this info from the log and it is related to the /tmp/

tempnam(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): 

 

and after that the stack trace that I don't want to post

What I can say is the path is correct on settings>system>general all of them also finish with /

 

I am not running 4.1, should I upgrade??

Share this post


Link to post
Share on other sites
  • 0
11 hours ago, wmac said:

Found a PHP open_basedir directive on the VHost configuration removed and restarted Apache and still have the same issue

 

Normally you should not remove it, you should set it to none , something like

open_basedir none

Share this post


Link to post
Share on other sites
  • -1
On 8/26/2017 at 9:09 AM, Blesta Addons said:

Normally you should not remove it, you should set it to none , something like

open_basedir none

Put it back but makes no difference.

Now I realize that  the customers at client area also can not view invoices

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×