PDF export failed

Please report bugs here!

Moderator: Thorsten

Post Reply
leprince
Posts: 6
Joined: Fri Dec 09, 2005 5:36 pm

PDF export failed

Post by leprince »

I just installed the 1.5.4 version of phpMyFAQ. Everything run normally, except when I want to export a question in PDF format. Here is the result :
Warning: main(fpdf.php): failed to open stream: No such file or directory in /home/sites/site22/web/faq/inc/pdf.php on line 28

Fatal error: main(): Failed opening required 'fpdf.php' (include_path='') in /home/sites/site22/web/faq/inc/pdf.php on line 28

What can I do?
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

If you look at inc/pdf.php, line 28, as written in your error:

Code: Select all

require_once('fpdf.php');
that is to say, you are missing the file inc/fpdf.php: please check your file system if you've made mistakes in uncompressing the PMF 1.5.4 tar.gz/zip file :wink:.
leprince
Posts: 6
Joined: Fri Dec 09, 2005 5:36 pm

Post by leprince »

I checked the directory inc/ and I have a fpdf.php file!!
First, I checked the code of pdf.php in the line 28, and I saw that there is a call of this file.
But, in the case that the inc/fpdf.php file exist, I don't know after what to do!!??
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

I do not know how you manage the files on your server (FTP? SSH?): generally this is striclty a permissions issue. Please post:
1. the OS of the server
2. the way you manage files on the server
leprince
Posts: 6
Joined: Fri Dec 09, 2005 5:36 pm

OS + ftp

Post by leprince »

I use ftp to put fles on the server.
And this is some information about the OS server :
- Linux
- Apache/1.3.20 Sun Cobalt (Unix)
- PHP 4.3.8
- MySQL 3.23.37
Rights :
- /faq/inc/ in 777
- /faq/inc/fpdf.php (39 kb) in 644
- /faq/inc/pdf.php (21 kb) in 644
- /faq/pdf/ in 777
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Who is the owner of these files?

Post by matteo »

These rights are correct if the owner of the files&folders is the user under which Apache or the website is running.
Another check is to verify:

Code: Select all

grep error_reporting /etc/php.ini
in order to evaluate if other errors could be masked by your current PHP errors setting.
leprince
Posts: 6
Joined: Fri Dec 09, 2005 5:36 pm

PHP configuration

Post by leprince »

http://www.sfpm.asso.fr/test_php.php

Here is the PHP configuration
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

E_ALL & ~E_NOTICE

Post by matteo »

It reports:

Code: Select all

error_reporting	2039
The value 2039 stands for

Code: Select all

E_ALL & ~E_NOTICE
. For trying to debug your issue it would be more useful to set it as:

Code: Select all

E_ALL
, or set the value to 2047.
Make sure you restart Apache before trying the pdf export.
Thorsten
Posts: 15769
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

your include path is wrong. Just add a . into your php.ini file for the include path and it should work.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
leprince
Posts: 6
Joined: Fri Dec 09, 2005 5:36 pm

Post by leprince »

OK,
But it is not my server! How can I change the error_reporting and include_path parameters only for my account?
Thorsten
Posts: 15769
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you can add an ini_set() function in inc/init.php because this file is included first in phpMyFAQ. Mor information: http://www.php.net/manual/en/function.ini-set.php

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
leprince
Posts: 6
Joined: Fri Dec 09, 2005 5:36 pm

Post by leprince »

Hi,
I just did it and ...........
..........
It is perfect! Thank you very much!
Have a nice day.
Cyrille
Post Reply