Posted: December 9, 2014 at 9:33 pm
|
Hi, I’m having an issue where when I try to view the invoice, or download it as a PDF, it takes an extremely long time, and while it’s happening I can’t view any other pages on the site. Any ideas why this would be happening? |
Hi Ian, What kind of hosting are you using? Can I run a test registration on the site to troubleshoot this? |
|
|
Hi, Our company does the hosting ourselves, so we have control over the hosting environment if something needs to be done there. You can try a test registration with this event: It’s invoice-only so you can get to the end without paying anything. When viewing the receipt or attempting to download the PDF Invoice is when it struggles. Thanks |
Hi, The invoice page is an html page with information. The Download PDF button then creates the PDF on demand. Could you temporarily turn on WP debugging using this macro? https://gist.github.com/848801a1173be464fbe7 Then could you try accessing the invoice page and let us know if you see anything in the debugging log? — |
|
Downloading an invoice from your site (looks like you now have WP_Debug enabled) shows a PDF that can not be opened normally. However opening the PDF in SubLime text shows 3 errors.
We use DOMPDF to create the PDF’s which uses fopen to download files from your site. Can you check on your sever and see if fopen is disabled, this is normally within the php.ini file, you should find allow_url_fopen, is that enabled or disabled? You should also be able to find this within Event Espresso -> Maintenance -> System Information. |
|
|
Thansk Tony, we saw that message and did some Googling and saw the allow_url_fopen suggestion. This is what EE says, re allow_url_fopen: global_value 1 |
|
Just a small update. I’ve spoken to our server guy, and he’s checked and fopen is enabled on the server and that account, and he’s checked the requirements for DOMPDF and apparently we’re all good there too. |
|
Hi, Can you try using a logo image that does not have an alpha channel (transparency)? PNG should be fine so long as the background is solid (e.g. white), though a JPG or GIF might be smaller file size (always a benefit). |
|
Hi Dean, I’ve switched to a JPG and it hasn’t helped. |
Does your site have ‘hotlink protection’? We’ve seen it before where hotlink protection basically checks the User-agent of the request for the image, if it is not a browser then the connection is blocked. I’m wondering if something similar is happening here. |
|
|
No, I don’t believe so. |
Hi Ian, Does it help if the invoice doesn’t include a logo image? |
|
|
Hi Josh, Sorry for the late reply. Not using an image does fix the issue, however we do need that image. We have tried several different images in different formats & sizes, with no improvement. |
Hi Ian, I took the URL for the above image (the one that is timing out) and used it to add a logo to my Invoice on my test site – http://take.ms/ZUVXe As you can see the Invoice is generated correctly and is pulling the image from your server, what this means is that ‘something’ is blocking the request when your own server requests the image. I would recommend contacting your host and requesting they investigate this. What kind of hosting are you using? |
|
|
Hi Tony, We also host the site, and we have our server guys looking at it, but it looks like none of the obvious solutions are working (fopen config etc.). We’ll keep looking into it on the sever then. Thanks for your help though. |
Hi Ian, I ran some web searches on the issue that you are running into and found these results that may help in determining the cause: http://community.sitepoint.com/t/getimagesize-filename-url/3710 http://stackoverflow.com/questions/5272239/how-to-handle-timeouts-in-getimagesize — |
|
The support post ‘Invoice Generation Slow, Freezes Site Until Finished’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.