Unable to see images in my pdf file (using show this as pdf)

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
Thorsten
Posts: 15731
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

which version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Re: Unable to see images in my pdf file (using show this as

Post by matteo »

Hi,
hejeva wrote:Example:
http://www.digiscrapinfo.com/phpmyfaq/i ... artlang=en

Image is located at: http://www.digiscrapinfo.com/phpmyfaq/i ... eerror.jpg
Code in the faq entry:
<img src="/phpmyfaq/images/longfilenameerror.jpg" />

How do I fix this?
I've just grabbed that image from your site and I've created a fake faq on my dev server: the image has been regularly inserted into the PDF. Please, check into your Apache error log files for any pointer about your server settings: I guess that the cause for your issue could be something like a mod_security rule.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Re: Unable to see images in my pdf file (using show this as

Post by matteo »

Hi,
hejeva wrote:Unfortunately I am running on a host with limited accessibility to the Apache server. The errors that I can turn on and have available to me do not show any errors to that image being denied, pdf creation errors or any phpmyfaq activity.

Is there a rule that I can add to the _.htaccess file to allow this function to happen?
it is very difficult to find out the reason of your issue without any log.
Let's try my first bet: please locate, backup and open the [PATH_TO_PMFINSTALL]/inc/pdf.php file and move these lines below from:

Code: Select all

        ...
        if (!$info = @GetImageSize($image)) {
            return;
        }
        ...
to

Code: Select all

        ...
        ini_set('user_agent', 'phpMyFAQ PDF Builder');
        if (!$info = @GetImageSize($image)) {
            return;
        }
        ...
and report here if you can see the image in the PDF export.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Thorsten
Posts: 15731
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi Heidi,

please try to remove the @ from Matteo's code example and try it again.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15731
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

it seems there's an error on your server configuration so that the images aren't accessible. Just look at the first error message.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15731
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

ah, okay, thanks for the hint!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply