SOLVED: Failed to open stream

Found a bug? Tell us!!
Post Reply
JonasBang
Regular
Posts: 66
Joined: Mon Apr 23, 2007 10:57 pm
Location: Copenhagen, Denmark
Contact:

SOLVED: Failed to open stream

Post by JonasBang »

Hi,

One of my old sites now give me this error on both static pages:
Warning: fopen(/hsphere/local/home/jonasbang/hydraulisktidende.dk/templates_c/staticpage_pagelist.dat): failed to open stream: Permission denied in /hsphere/local/home/jonasbang/hydraulisktidende.dk/plugins/serendipity_event_staticpage/serendipity_event_staticpage/serendipity_event_staticpage.php on line 925 Warning: fwrite(): supplied argument is not a valid stream resource in /hsphere/local/home/jonasbang/hydraulisktidende.dk/plugins/serendipity_event_staticpage/serendipity_event_staticpage/serendipity_event_staticpage.php on line 926 Warning: fclose(): supplied argument is not a valid stream resource in /hsphere/local/home/jonasbang/hydraulisktidende.dk/plugins/serendipity_event_staticpage/serendipity_event_staticpage/serendipity_event_staticpage.php on line 927
I have not been around that site for some time, so I don't know when or how this problem occurred.

Anyone with a clue ??

Br,
Jonas
Last edited by JonasBang on Tue Jan 26, 2010 7:51 pm, edited 1 time in total.
JonasBang
Regular
Posts: 66
Joined: Mon Apr 23, 2007 10:57 pm
Location: Copenhagen, Denmark
Contact:

Re: Failed to open stream

Post by JonasBang »

I'm using Serendipity version 1.4.1

/Jonas
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Failed to open stream

Post by garvinhicking »

Hi!

Check if templates_c/ is still writable. Seems that staticpage_pagelist.dat cannot be written.

HTH,
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/
JonasBang
Regular
Posts: 66
Joined: Mon Apr 23, 2007 10:57 pm
Location: Copenhagen, Denmark
Contact:

Re: Failed to open stream

Post by JonasBang »

If I look at the directory structure with my FTP program, for this path (/hsphere/local/home/jonasbang/hydraulisktidende.dk/templates_c/staticpage_pagelist.dat) I can see:

hsphere/local/home/jonasbang/ - No clue what permissions are
hydraulisktidende.dk/ - 000
templates_c/ - 767
staticpage_pagelist.dat - 664

Is that ok ??

Br,
Jonas
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Failed to open stream

Post by garvinhicking »

Hi!

That depends on the owner. Your webserver/php-user must either be the owner or inside the owner group, than 664 would be sufficient. If the user does not match, the permission "4" applies, which means "no write privileges". So either change the owner to the PHP process, or make it '666'.

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/
JonasBang
Regular
Posts: 66
Joined: Mon Apr 23, 2007 10:57 pm
Location: Copenhagen, Denmark
Contact:

Re: Failed to open stream

Post by JonasBang »

Ah, changing to 666 worked, thx Garvin.

Br,
Jonas
Post Reply