PDF generation and safe mode

Found a bug? Tell us!!
Post Reply
Slarioux
Posts: 2
Joined: Mon Oct 04, 2004 4:56 pm

PDF generation and safe mode

Post 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 :)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: PDF generation and safe mode

Post by garvinhicking »

It should work if you just chown() your 'archives/' folder to the owner of the PHP script.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
muetze
Regular
Posts: 10
Joined: Mon Aug 16, 2004 10:12 pm
Location: Hamburg

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Slarioux
Posts: 2
Joined: Mon Oct 04, 2004 4:56 pm

Post 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.
Post Reply