export to PDF: no images

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

johanna
Posts: 23
Joined: Mon Jun 08, 2009 1:09 pm
Location: Finland

Re: export to PDF: no images

Post by johanna »

I enabled DEBUG mode but I got no errors. And after I click "Export" my browser loads the page a bit too long and then shows empty page. Url for this is: /phpmyfaq/admin/index.php?uin=&action=exportfile&downwards=1&type=pdf&dispos=attachment&submitExport=Export+your+FAQ
Thorsten
Posts: 15731
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: export to PDF: no images

Post by Thorsten »

Hi,

how many entries do you have? Do you see something in your webserver error log?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
johanna
Posts: 23
Joined: Mon Jun 08, 2009 1:09 pm
Location: Finland

Re: export to PDF: no images

Post by johanna »

I've got only 5 entries but each of them contains lot of pictures. I have tried to export FAQs to PDF only in article view (so one at a time instead of whole category) but that results blank page also.

There's nothing in my servers php_error.txt nor in apache_error.txt files. In access.txt file is this message:
127.0.0.1 - - [08/Jun/2009:16:21:22 +0300] "GET /phpmyfaq/admin/index.php?uin=&action=exportfile&catid=14&downwards=1&type=pdf&dispos=attachment&submitExport=Export+your+FAQ HTTP/1.1" 200 -

Thanks for helping me!
Thorsten
Posts: 15731
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: export to PDF: no images

Post by Thorsten »

Hi,

how many pictures? It could be a memory problem with PHP.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
johanna
Posts: 23
Joined: Mon Jun 08, 2009 1:09 pm
Location: Finland

Re: export to PDF: no images

Post by johanna »

I made a test article with one picture (size 11.21 kB). That didn't work either. Could that be too much, already? "post_max_size" and "upload_max_filesize" are both 100M. Is there some else value that I should check in case of PHP memory problem?

I have tested with Firefox, Opera and IE and all of them results only blank page.
Thorsten
Posts: 15731
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: export to PDF: no images

Post by Thorsten »

Hi,

no, that's okay... the problem is that without having a error messahe I cannot debug this... is your FAQ public available?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
johanna
Posts: 23
Joined: Mon Jun 08, 2009 1:09 pm
Location: Finland

Re: export to PDF: no images

Post by johanna »

Unfortunately it's not available for public since the site is on my localhost. I've planned to publish it, though, so if no one else is having this problem and I can't solve it, I will tell you as soon as I can publish my site!

Thanks a lot for your time!
johanna
Posts: 23
Joined: Mon Jun 08, 2009 1:09 pm
Location: Finland

Re: export to PDF: no images

Post by johanna »

Um, could this have something to do with "Links KO" in my articles? It says "Host localhost is slow or not responding.". Though, pictures are shown correctly.

Edit
Yeah, that's that. I inserted a picture from Internet and then PDF was created successfully. Well, the site is going to be on Internet - not on my localhost - so maybe the problem won't occur then.
It would be nice to know why my localhost "is slow or not responding"...
johanna
Posts: 23
Joined: Mon Jun 08, 2009 1:09 pm
Location: Finland

Re: export to PDF: no images

Post by johanna »

This is weird... My localhost exports image from Internet fine but my company's server won't do that. The execution of inserting image ends here on /inc/PMF_Export/Pdf.php :

Code: Select all

if (!$info = @getimagesize($image)) {
    return;
}
getimagesize() is located on standard.php (at least my Eclipse said so when holding the mouse over the text) but I couldn't locate that file in my phpMyFAQ installation. Can anyone tell me where that file is or why this is happening?
Thorsten
Posts: 15731
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: export to PDF: no images

Post by Thorsten »

Hi,

maybe a firewall problem between the company server and the Internet?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
johanna
Posts: 23
Joined: Mon Jun 08, 2009 1:09 pm
Location: Finland

Re: export to PDF: no images

Post by johanna »

Don't know... Images are working with relative paths, so there might be something in firewall like you said. Well, we surely can use only relative paths for images so problem solved - kind of.

And yeah, standard.php isn't included on phpMyFAQ because it's some standard file of PHP. getimagesize() is a PHP function from GD library.
Thorsten
Posts: 15731
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: export to PDF: no images

Post by Thorsten »

Hi,
johanna wrote:Don't know... Images are working with relative paths, so there might be something in firewall like you said. Well, we surely can use only relative paths for images so problem solved - kind of.
but relative paths will be transformed into absolute paths with an URL... so it has to be something else.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
johanna
Posts: 23
Joined: Mon Jun 08, 2009 1:09 pm
Location: Finland

Re: export to PDF: no images

Post by johanna »

I commented those lines out where relative paths are transformed into absolute paths. I'm not sure but there might be limited access to the subdomain where our phpMyFAQ is located, so I thought that relative paths could work better. And they did. So the reason images didn't work in first place might be our server.
Post Reply