Page 1 of 1

PDF generation and safe mode

Posted: Sun Mar 20, 2005 4:25 pm
by Slarioux
Heya,

at my blog, there is this nifty little PDF thingie. But my host has safe mode on and the generator does not seem to work. I searched for this but I didnt ran into relevant pages. So here goes :).

When i try to open/download a PDF page (like "this month"), Firefox gives an Adobe error (the document is damaged) and IE gives the errors:
Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 32115 is not allowed to access /home/nder/public_html/blog/archives owned by uid 99 in /home/nder/public_html/blog/plugins/serendipity_event_blogpdf/serendipity_event_blogpdf.php on line 329

Warning: fopen(/home/nder/public_html/blog/archives/month200503.pdf): failed to open stream: No such file or directory in /home/nder/public_html/blog/plugins/serendipity_event_blogpdf/serendipity_event_blogpdf.php on line 329

Warning: fwrite(): supplied argument is not a valid stream resource in /home/nder/public_html/blog/plugins/serendipity_event_blogpdf/serendipity_event_blogpdf.php on line 330

Warning: fclose(): supplied argument is not a valid stream resource in /home/nder/public_html/blog/plugins/serendipity_event_blogpdf/serendipity_event_blogpdf.php on line 331
Safe mode. Damn. But i would rather not play around in the code, since I always break things when I do that. :P

Is there a quick search-and-replace solution for this? Or is it "too bad"?

My blog is at blog.nder.be. Any missing crucial info will be posted as soon as I know what's missing exactly :)

Re: PDF generation and safe mode

Posted: Mon Mar 21, 2005 10:34 am
by garvinhicking
It should work if you just chown() your 'archives/' folder to the owner of the PHP script.

Regards,
Garvin

Posted: Thu Mar 24, 2005 12:31 am
by muetze
It should work if you just chown() your 'archives/' folder to the owner of the PHP script.
I have the same problem. How to manage your tip?

What means "chown"? In which file do i have to change anything?

Mirko

Posted: Thu Mar 24, 2005 12:56 pm
by garvinhicking
chown() means to change the owner of a directory. You can apply that either via SSH, FTP, SCP or via some control panels.

You can't write a php script however, because PHP cannot access files not owned by it. And that's the whole problem you have. :)

Regards,
Garvin

Posted: Sun Mar 27, 2005 3:08 pm
by Slarioux
Yep, i'll have to check with my webhosting company for a fix on this. Safe mode is like, nice, but this is irritating. Not a bug tho, i realize.