Page 1 of 1

SOLVED: Failed to open stream

Posted: Tue Jan 26, 2010 11:09 am
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

Re: Failed to open stream

Posted: Tue Jan 26, 2010 11:11 am
by JonasBang
I'm using Serendipity version 1.4.1

/Jonas

Re: Failed to open stream

Posted: Tue Jan 26, 2010 12:39 pm
by garvinhicking
Hi!

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

HTH,
Garvin

Re: Failed to open stream

Posted: Tue Jan 26, 2010 2:25 pm
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

Re: Failed to open stream

Posted: Tue Jan 26, 2010 4:36 pm
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

Re: Failed to open stream

Posted: Tue Jan 26, 2010 7:51 pm
by JonasBang
Ah, changing to 666 worked, thx Garvin.

Br,
Jonas