Page 1 of 1

error writing htaccess

Posted: Wed Jan 14, 2009 5:49 pm
by Don Chambers
Recently installed s9y on a server I have never used before. The installation was 1.3.x initially, then upgraded to 1.4 as soon as that version was released.

Getting this error when saving configuration:

Code: Select all

Attempting to write /myabsolutepath/.htaccess file...
Warning: fclose(): supplied argument is not a valid stream resource in /myabsolutepath/include/functions_installer.inc.php on line 819
Done
The .htaccess file does get written and saved..... and it looks perfectly normal, with one exception:

Code: Select all

#RewriteCond %{REQUEST_URI} !-U
Also, the first rewrite rule (mod_rewrite) is:

Code: Select all

RewriteRule ^serendipity_admin.php serendipity_admin.php [NC,L,QSA] 

So, what's the likely cause of the fopen() error? Permissions?
And why the differences in the htaccess file?

Re: error writing htaccess

Posted: Wed Jan 14, 2009 6:21 pm
by garvinhicking
Hi!

That's okay - the RewriteCond was deactivated for s9y. The admin rule is simply to skip all other rules if the URL matches.

The fopen error should actually only be caused by probably the file pointer having been closed already. I wouldn't really know the circumstances under this could happen - but you can discard that. It would've only be critical if you had an error to write the file.

regards,
garvin

Posted: Wed Jan 14, 2009 7:09 pm
by Don Chambers
But what unusual here is that I was doing 2 sites... same 1.4 package. One gets the fopen error, one does not. The one with the error also has the extra htaccess lines, the one without does not.

Posted: Wed Jan 14, 2009 7:13 pm
by garvinhicking
Hi!

Okay, that would mean the other site has a 1.3 htaccess and the other one an updated .htaccess with the disabled line. Effectively the files are the same.

Check if the permissions are the same.

Regards,
Garvom

Posted: Wed Jan 14, 2009 7:22 pm
by Don Chambers
Both were upgraded from 1.3.x, but perhaps one had url rewriting enabled before the upgrade, and the other did not. Difficult to tell.

Right now, I am more concerned about the fopen error, especially since the file is being written.

I think the site with the error has group permissions on htaccess set to 99 whereas the other site has group permissions set to the user.