Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Stuck on cron wget sitemap


motorcity

Recommended Posts

Posted

When I run this as a cron using this command;

wget -q http://www.~~~~mywebsite~~~~~.com/usu5_sitemaps/index.php

or this one;

wget -q http://~~~~my~~~~~/usu5_sitemaps/index.php >/dev/null 2>&1

 

I get the session id in the sitemapIndex.xml

<sitemap>
<loc>http://~~~~mysite~~~~~/sitemapCategories.xml?osCsid=22990b4b146faeb58930da64d582eb67</loc>
<lastmod>2012-12-30</lastmod>
</sitemap>

 

 

 

If I run it manually, not as a cron like this;

http://www.~~~~mywebsite~~~~~.com/usu5_sitemaps/index.php

I get a normal looking entry in the sitemapIndex without the osCid

<sitemap>
<loc>http://~~~~mysite~~~~~/sitemapCategories.xml</loc>
<lastmod>2012-12-30</lastmod>
</sitemap>

 

Any thoughts anyone?

Posted

Fix the sitemap code to strip out the session ID (if present).

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Fix the sitemap code to strip out the session ID (if present).

Thanks for the response.

The thing is when running manually it doesn't put the session id in there, so I've been thinking it's got more to do with file permissions or something along that line.

What I know is to start with I had;

/usr/bin/wget = usrid 0 root, grpid 0 root, perm755

/catalog/usu5_sitemaps (and the files in this folder) = usrid me, grpid me, perm777

/catalog/sitemapIndex.xml = usrid me, grpid me, perm777

 

so I changed the following

/catalog/usu5_sitemaps (and the files in this folder) = usrid 0 root, grpid 0 root, perm777

/catalog/sitemapIndex.xml = usrid 0 root, grpid 0 root, perm777

~~same results~~

 

So then I changed all of the above to usr & grp = 99 nobody (as I understand cpanel runs as "nobody" not "root")

but that doesn't change it either!

In all scenarios running manually the index is fine, wget adds the osCid to the file name.

Posted

You've missed the point.

 

The XML file is created by a PHP file, correct?

 

So modify the PHP file code to strip the session ID.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Thank you all,

Giving credit where due;

cannuck1964

 

Set Force Cookie Use = True (in osc admin sessions)

 

Thanks Peter.

Works every time now.

 

~Happy New Year!

~Motorcity

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...