error writing htaccess

Having trouble installing serendipity?
Post Reply
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

error writing htaccess

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

Re: error writing htaccess

Post 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
# 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/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

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

Post 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
# 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/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

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