Page 1 of 1

PDF is not created

Posted: Sun Mar 26, 2006 10:59 pm
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/

Posted: Mon Mar 27, 2006 6:34 am
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

Posted: Mon Mar 27, 2006 10:35 am
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

Posted: Mon Mar 27, 2006 10:40 am
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.

Posted: Mon Mar 27, 2006 11:50 am
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:

Posted: Mon Mar 27, 2006 12:07 pm
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?

Mmmhhh...

Posted: Mon Mar 27, 2006 12:17 pm
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?

Posted: Mon Mar 27, 2006 1:14 pm
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.