sitemap plugin - correct settings when blog in root?

Creating and modifying plugins.
Post Reply
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

sitemap plugin - correct settings when blog in root?

Post by Don Chambers »

Just installed the sitemap generator. The blog is installed in the root of the domain.

The file is not being generated. Works fine in my localhost sandbox. I tried copying that file to my server, which worked fine, and the file had permissions 644. Saving an entry does not rewrite that file.

Current url rewrite is set to "Use Apache mod_rewrite". Same behavior if set to "Disable rewriting". Cannot set site to "Use Apache errorhandling" as that disables all stylesheets.

Server stuff is *NOT* my area of expertise..... do I need a rule in the .htaccess file for this sitemap? Current .htaccess looks like this, and was generated with s9y was first installed:

Code: Select all

# BEGIN s9y
ErrorDocument 404 /index.php
DirectoryIndex /index.php

RewriteEngine On
RewriteBase /
RewriteRule ^((archives/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+\.html)/?) index.php?/$1 [NC,L,QSA]
RewriteRule ^(authors/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-\%]+\.rss) index.php?/$1 [NC,L,QSA]
RewriteRule ^(feeds/authors/([0-9]+)-[0-9a-z\.\_!;,\+\-\%]+\.rss) index.php?/$1 [NC,L,QSA]
RewriteRule ^(categories/([0-9;]+)-[0-9a-z\.\_!;,\+\-\%]+) index.php?/$1 [NC,L,QSA]
RewriteRule ^archives([/A-Za-z0-9]+)\.html index.php?url=/archives/$1.html [NC,L,QSA]
RewriteRule ^([0-9]+)[_\-][0-9a-z_\-]*\.html index.php?url=$1-article.html [L,NC,QSA]
RewriteRule ^feeds/(.*) index.php?url=/feeds/$1 [L,QSA]
RewriteRule ^unsubscribe/(.*)/([0-9]+) index.php?url=/unsubscribe/$1/$2 [L,QSA]
RewriteRule ^approve/(.*)/(.*)/([0-9]+) index.php?url=approve/$1/$2/$3 [L,QSA]
RewriteRule ^delete/(.*)/(.*)/([0-9]+) index.php?url=delete/$1/$2/$3 [L,QSA]
RewriteRule ^(admin|entries)(/.+)? index.php?url=admin/ [L,QSA]
RewriteRule ^archive/? index.php?url=/archive [L,QSA]
RewriteRule ^(index|atom[0-9]*|rss|b2rss|b2rdf).(rss|rdf|rss2|xml) rss.php?file=$1&ext=$2
RewriteRule ^(plugin|plugin)/(.*) index.php?url=$1/$2 [L,QSA]
RewriteRule ^search/(.*) index.php?url=/search/$1 [L,QSA]
RewriteRule ^comments/(.*) index.php?url=/comments/$1 [L,QSA]
RewriteRule ^(serendipity\.css|serendipity_admin\.css) index.php?url=/$1 [L,QSA]
RewriteRule ^index\.(html?|php.+) index.php?url=index.html [L,QSA]
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
RewriteRule (.*\.html?) index.php?url=/$1 [L,QSA]

<Files *.tpl.php>
    deny from all
</Files>

<Files *.tpl>
    deny from all
</Files>

<Files *.sql>
    deny from all
</Files>

<Files *.inc.php>
    deny from all
</Files>

<Files *.db>
    deny from all
</Files>

# END s9y
=Don=
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Additional info - no error messages posted by the plugin.. says it is creating the file and notifying the services. Also tried without notifying the services, no difference.

Also tried creating an empty file with permissions 0777.... file is not being updated.

I cannot access the apache logs as this is a shared server.
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Hm, sounds like a write problem to me. Is your "." directory 0777 so that the file can really be written?

Regards,
Garvun
# 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 »

garvinhicking wrote:Hi!

Hm, sounds like a write problem to me. Is your "." directory 0777 so that the file can really be written?

Regards,
Garvun
Wouldn't that be awfully dangerous?
=Don=
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Garvin - sent you a pm with some ftp info.

The "." folder does not directly have permissions set.... ie, no numeric value is assigned directly to the root folder.... which is consistent with several other sites I have ftp access to.

Now what?
=Don=
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

With respect to file permissions, s9y had no problem writing to serendipity_config_local.inc.php, located in the same root folder.

But this sitemap file is simply not being generated. I have installed it on a second s9y site that is also installed in the root, and it does not work there either.
=Don=
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

I FOUND IT!!!!!!!!!!!!

I read a few unanswered threads on the forum here where this solution could very well have been their problem too!

Looks like my shared server environment defaults to: allow_url_fopen = off. However, they allow a php.ini file to exist in the root, so I created one with only a single line in it of allow_url_fopen = on. I also have URL rewriting set to "Use Apache mod_rewrite. That's it!! :D


Observation: I noticed the plugin does NOT seem to update the sitemap when an entry id deleted... only when one is created, or edited. Shouldn't it also update the sitemap on entry delete?
=Don=
Post Reply