PDF is not created

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Post Reply
firstchoiceaquatics
Posts: 14
Joined: Sun Mar 26, 2006 10:55 pm

PDF is not created

Post by firstchoiceaquatics »

Hi.

I am running version 1.57

When I a read an article and try to Show This As Pdf I get this message
FPDF error: Unable to create output file: pdf/1.pdf

I have the pdf directory with permissions 755 (I have tried with 777 but it still didn't work).

I've read the forums to try to find some help but nobody else seems to have had exactly this problem.

The faq is running at first-choice-aquatics.co.uk/faq/
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

the error messages occurs if the file couldn't be written into the folder pdf/. Do you have recursive rights on that folder?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
firstchoiceaquatics
Posts: 14
Joined: Sun Mar 26, 2006 10:55 pm

Post by firstchoiceaquatics »

Hi.

I have tried permissions set to 755 and 777 and it doesn't let me write to that directory.

I don't know what recursive permissions are so I don't know if I have them.

Can you tell me how to check for recursive permissions please?

Thank you
firstchoiceaquatics
Posts: 14
Joined: Sun Mar 26, 2006 10:55 pm

Post by firstchoiceaquatics »

It just occurs to me: does the owner of the pdf directory have to be apache or something like that? I don't fully understand the concepts of ownership so I'm not sure.

But if the permission is 777 that should mean it's world writable, shouldn't it?

Hmm - don't understand. Hope you can help as this is a very brilliant product.
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

firstchoiceaquatics wrote:It just occurs to me: does the owner of the pdf directory have to be apache or something like that? I don't fully understand the concepts of ownership so I'm not sure.
But if the permission is 777 that should mean it's world writable, shouldn't it?
Hi,
the user would be "apache" if this is the user with which your apache server (or your virtual host) is running under.
I'd suggest these steps below to clean up your server setup for the pdf folder:
  • 1. # cd /path/to/PMF;
    2. # rm -rf pdf/;
    3. # mkdir pdf;
    4. # chown apache.apache pdf/;
    5. # chmod 0777 pdf/.
Hope this help you :wink:
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
firstchoiceaquatics
Posts: 14
Joined: Sun Mar 26, 2006 10:55 pm

Post by firstchoiceaquatics »

Hi

I've tried that - exactly as you show and it doesn't change the problem.

Also, when I try to export my Faq in the admin control panel I get the following

/home/httpd/vhosts/mydomain.com/httpdocs/myfaq/pdf/faq.pdf

The correct domain is used, of course.

I have checked on my server and the user and group are both set to apache now and permissions are 777

The pdf.php script is set to my ftp login user and the group is psacln - does that make a difference?
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Mmmhhh...

Post by matteo »

Hi,
I think it is not an issue if +r is given to the other users: whilst I'm thinking to a valid reason for your issue I'd suggest you, if possible, to perfom these two commands below:
  • Code: Select all

    1. # chmod -R 0755 /path/to/PMF/
    2. # chown -R apache.apache /path/to/PMF/
This will clean up your installation permissions and then you can (re)create the pdf/ folder. Is it possible to have a post with the ouput of this command (within code tags):

Code: Select all

# cd /path/to/PMF/ && ls -lh
after running the cleanup commands?
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
firstchoiceaquatics
Posts: 14
Joined: Sun Mar 26, 2006 10:55 pm

Post by firstchoiceaquatics »

Hello

I tried your advice and I can now get pdfs! Excellent, thank you very much.

That has also solved a problem I noticed with XML file output.

Thank you very much for your help. This is a very fine script.
Post Reply