Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Google XML Sitemap Feed - by Chemo


Guest

Recommended Posts

Ive installed Google XML Sitemap contribution.

Uploaded all files and folders as instructed.

Have changed permission on the three dummy files to 777 as listed and placed them in the proper folder. (my main folder is called hotsauce, not catalog)

 

I get the following error listed below?.

Can anyone tell me what I need to do to fix this?

Thanks in Advance

 

 

Warning: fopen(/home/bjbywrsk/public_html/hotsauce/googlesitemapsitemapproducts.xml): failed to open stream: Permission denied in /home/bjbywrsk/public_html/hotsauce/googlesitemap/sitemap.class.php on line 581

ERROR: Google Product Sitemap Generation FAILED!

 

Warning: fopen(/home/bjbywrsk/public_html/hotsauce/googlesitemapsitemapcategories.xml): failed to open stream: Permission denied in /home/bjbywrsk/public_html/hotsauce/googlesitemap/sitemap.class.php on line 581

ERROR: Google Category Sitemap Generation FAILED!

 

Warning: fopen(/home/bjbywrsk/public_html/hotsauce/googlesitemapsitemapindex.xml): failed to open stream: Permission denied in /home/bjbywrsk/public_html/hotsauce/googlesitemap/sitemap.class.php on line 581

ERROR: Google Sitemap Index Generation FAILED!

 

Array

(

[QUERY] => Array

(

[PRODUCTS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 12

)

 

[CATEOGRY] => Array

(

[sTATUS] => success

[NUM_ROWS] => 6

)

 

)

 

[sAVE_FILE_XML] => Array

(

[0] => Array

(

[file] => /home/bjbywrsk/public_html/hotsauce/googlesitemapsitemapproducts.xml

[status] => failure

[file_exists] => false

)

 

[1] => Array

(

[file] => /home/bjbywrsk/public_html/hotsauce/googlesitemapsitemapcategories.xml

[status] => failure

[file_exists] => false

)

 

[2] => Array

(

[file] => /home/bjbywrsk/public_html/hotsauce/googlesitemapsitemapindex.xml

[status] => failure

[file_exists] => false

)

 

)

 

)

Miz

---------------------

Contributions

New Fields with Easy Populate

Remove Category Images

Link to comment
Share on other sites

Ive installed Google XML Sitemap contribution.

Uploaded all files and folders as instructed.

Have changed permission on the three dummy files to 777 as listed and placed them in the proper folder. (my main folder is called hotsauce, not catalog)

 

I get the following error listed below?.

Can anyone tell me what I need to do to fix this?

Thanks in Advance

Warning: fopen(/home/bjbywrsk/public_html/hotsauce/googlesitemapsitemapproducts.xml): failed to open stream: Permission denied in /home/bjbywrsk/public_html/hotsauce/googlesitemap/sitemap.class.php on line 581

ERROR: Google Product Sitemap Generation FAILED!

 

Warning: fopen(/home/bjbywrsk/public_html/hotsauce/googlesitemapsitemapcategories.xml): failed to open stream: Permission denied in /home/bjbywrsk/public_html/hotsauce/googlesitemap/sitemap.class.php on line 581

ERROR: Google Category Sitemap Generation FAILED!

 

Warning: fopen(/home/bjbywrsk/public_html/hotsauce/googlesitemapsitemapindex.xml): failed to open stream: Permission denied in /home/bjbywrsk/public_html/hotsauce/googlesitemap/sitemap.class.php on line 581

ERROR: Google Sitemap Index Generation FAILED!

 

Array

(

[QUERY] => Array

(

[PRODUCTS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 12

)

 

[CATEOGRY] => Array

(

[sTATUS] => success

[NUM_ROWS] => 6

)

 

)

 

[sAVE_FILE_XML] => Array

(

[0] => Array

(

[file] => /home/bjbywrsk/public_html/hotsauce/googlesitemapsitemapproducts.xml

[status] => failure

[file_exists] => false

)

 

[1] => Array

(

[file] => /home/bjbywrsk/public_html/hotsauce/googlesitemapsitemapcategories.xml

[status] => failure

[file_exists] => false

)

 

[2] => Array

(

[file] => /home/bjbywrsk/public_html/hotsauce/googlesitemapsitemapindex.xml

[status] => failure

[file_exists] => false

)

 

)

 

)

 

 

 

 

well i figured part of it out.

line 581 is if ($fp = fopen($filename, 'w+')){

 

its missing something somewhere... Its going to the wrong directory and not putting in a slash aftre the one its in.

[file] => /home/bjbywrsk/public_html/hotsauce/googlesitemapsitemapindex.xml

Miz

---------------------

Contributions

New Fields with Easy Populate

Remove Category Images

Link to comment
Share on other sites

well i figured part of it out.

line 581 is if ($fp = fopen($filename, 'w+')){

 

its missing something somewhere... Its going to the wrong directory and not putting in a slash aftre the one its in.

[file] => /home/bjbywrsk/public_html/hotsauce/googlesitemapsitemapindex.xml

 

 

fixed it but it still dosent make sense.

in sitemap.class.php

 

I commented out line 258

// $this->savepath = DIR_FS_CATALOG;

 

it wrote to the XML files without a problem?!@?!?!?! odd !!!!

Miz

---------------------

Contributions

New Fields with Easy Populate

Remove Category Images

Link to comment
Share on other sites

I also got the following errror,

 

Warning: main(includes/configure.php): failed to open stream: No such file or directory

 

And many more files that could not been found with crontab.

The problem is when you use php in CLI mode that it does not change the working directory like it does when you call the same index.php from a webbrowser.

So before the line in index.php in the googlesitemap directory

 

require_once('includes/configure.php');

 

add

 

chdir('/root/to/your/shop/catalog/');

 

(replace '/root/to/your/shop/ to your absolute path on the webserver, (you can find it in configure.php at define('DIR_FS_CATALOG .....))

 

For me Cron works perfect now. Even Google likes my sitemap now.

 

cu

Link to comment
Share on other sites

Hi just installed this great contribute.

 

However I am getting this error.

 

Generated Google Product Sitemap Successfully

 

Generated Google Category Sitemap Successfully

 

 

Fatal error: Call to undefined function: glob() in /home/usr/local/share/doc/vhost/pennpaper.co.uk/httpdocs/googlesitemap/sitemap.class.php on line 743

 

I am new to php, My site is running on PHP version 4.2.1

 

Any help?

 

Merry Christams and Happy New Year to all..... !!!

Link to comment
Share on other sites

hi,

 

i get the same error:

 

Fatal error: Call to undefined function: tep_get_parent_categories() in /home/includes/seo_cache.php on line 175

 

Anyone find the fix for this?

 

Thanks

 

Marcus

 

 

 

Hello all,

 

Having another very weird problem. I got the 2 mods (SEO URL's 2.0b and GoogleSiteMap) to work well on a CRE 6.15 site.

 

However, when I installed the same on a default MS2 version (slightly modded - no page cache), the SEO URL's work ok until I run the GoogleSiteMap. I use the cName method (can't use mod_rewrite). When I run GoogleSiteMap, I get this error:

and then the configuration data for SEO URL's gets updated to 2.1 (which does not support cName) and SEO URL's are broken. I have to delete the SEO_ fields from the configuration tables and run install-cache.php / install-seo.php again to setup the database.

 

Why is GoogleSiteMap updating my SEO URL's configuration data? Is there any fix for this? I didn't have this problem when I installed both contribs on a CRE 6.15 site.

 

Any help is always appreciated.

Link to comment
Share on other sites

  • 2 weeks later...

Could you please tell me why i get the following error:

Warning:  fopen(/*****/*****/*******/*****/catalog/sitemapindex.xml): failed to open stream: Permission denied in /******/*****/****_***/*****/catalog/googlesitemap/sitemap.class.php on line 581
ERROR: Google Sitemap Index Generation FAILED!

Thank you

Edited by stevemitch2
Link to comment
Share on other sites

Hi, solved the problem above, but now google is telling its not the supported format!!!

 

"Unsupported file format Your Sitemap does not appear to be in a supported format. "

 

Chemo, can you please advise of the problems and what needs doing to rectify.

Thanks

Link to comment
Share on other sites

also, the pages show this, although it says its set up successfully and cron job was successful (first one last night);

 

The XML page cannot be displayed 
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. 


--------------------------------------------------------------------------------

XML document must have a top level element. Error processing resource 'http://www.subdomain.domain.co.uk/****/si...

 

thanks

Link to comment
Share on other sites

I'm getting this error after changing host companies. I don't know what is wrong it was working before with my old host any Ideas. This is the error when I go to www.mywebsite.com/catalog/googlesitemap/index.php

 

500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Link to comment
Share on other sites

I have installed the google site maps and get the following error:-

 

The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

 

I have Seo urls also installed

 

Can anybody help?

Link to comment
Share on other sites

Hi everyone.

 

I have just installed this contrib and the files are being generated. However, when I try and tell google where the files are I just get the error:

 

We could not find the Sitemap at the location you provided. Please make sure the Sitemap URL is correct and resubmit your Sitemap.

 

I can access the files from a web browser so they are definately there. Therefore it is either a permissions problem or a XML validation problem. The files have CHMOD 777 so I don't think the permissions are a problem.

 

Can someone check my file to assure me I am not going mad?

 

sitemapindex.xml

<?xml version="1.0" encoding="UTF-8"?>

<sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">

<sitemap>

<loc>http://www.mysite.co.uk/sitemapcategories.xml</loc>

<lastmod>2006-01-21</lastmod>

</sitemap>

<sitemap>

<loc>http://www.mysite.co.uk/sitemapproducts.xml</loc>

 

<lastmod>2006-01-21</lastmod>

</sitemap>

</sitemapindex>

 

sitemapcategories.xml

<?xml version="1.0" encoding="UTF-8"?>

<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">

<url>

<loc>http://www.mysite.co.uk/index.php?cPath=35</loc>

<lastmod>2006-01-08</lastmod>

<changefreq>weekly</changefreq>

<priority>0.5</priority>

</url>

 

<url>

<loc>http://www.mysite.co.uk/index.php?cPath=36</loc>

<lastmod>2006-01-08</lastmod>

<changefreq>weekly</changefreq>

<priority>0.5</priority>

</url>

<url>

 

<loc>http://www.mysite.co.uk/index.php?cPath=37</loc>

<lastmod>2006-01-14</lastmod>

<changefreq>weekly</changefreq>

<priority>0.5</priority>

</url>

</urlset>

 

sitemapproducts.xml

<?xml version="1.0" encoding="UTF-8"?>

<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">

<url>

<loc>http://www.mysite.co.uk/product_info.php?products_id=135</loc>

<lastmod>2006-01-20</lastmod>

<changefreq>weekly</changefreq>

<priority>1.0</priority>

</url>

 

<url>

<loc>http://www.mysite.co.uk/product_info.php?products_id=132</loc>

<lastmod>2006-01-20</lastmod>

<changefreq>weekly</changefreq>

<priority>0.9</priority>

</url>

<url>

 

<loc>http://www.mysite.co.uk/product_info.php?products_id=134</loc>

<lastmod>2006-01-20</lastmod>

<changefreq>weekly</changefreq>

<priority>0.6</priority>

</url>

<url>

<loc>http://www.mysite.co.uk/product_info.php?products_id=136</loc>

 

<lastmod>2006-01-20</lastmod>

<changefreq>weekly</changefreq>

<priority>0.4</priority>

</url>

<url>

<loc>http://www.mysite.co.uk/product_info.php?products_id=133</loc>

<lastmod>2006-01-20</lastmod>

 

<changefreq>weekly</changefreq>

<priority>0.3</priority>

</url>

</urlset>

 

A second question. How do I make all my products have the same priority? Thanks.

Link to comment
Share on other sites

Hi just installed this great contribute.

 

However I am getting this error.

 

Generated Google Product Sitemap Successfully

 

Generated Google Category Sitemap Successfully

Fatal error: Call to undefined function: glob() in /home/usr/local/share/doc/vhost/pennpaper.co.uk/httpdocs/googlesitemap/sitemap.class.php on line 743

 

I am new to php, My site is running on PHP version 4.2.1

 

Any help?

 

Merry Christams and Happy New Year to all..... !!!

 

The glob() function only works on servers running PHP 4.3 or higher. If you need a workaround, I found this one in the PHP manual.

 

I HAVE NOT TESTED IT. IT IS NOT MY CODE. SOMEONE WHO KNOWS WHAT THEY ARE DOING SHOULD TRY THIS FIRST.

 

Call it by:

 

<? $results=glob('/home/user/*.txt;*.doc') ?>

 

Add this function and call it instead of glob.

 

<?php

if(!(function_exists('glob')))

{function glob($pattern)

{#get pathname (everything up until the last / or \)

$path=$output=null;

if(PHP_OS=='WIN32')

$slash='\\';

else

$slash='/';

$lastpos=strrpos($pattern,$slash);

if(!($lastpos===false))

{$path=substr($pattern,0,-$lastpos-1); #negative length means take from the right

$pattern=substr($pattern,$lastpos);

}

else

{#no dir info, use current dir

$path=getcwd();

}

$handle=@ opendir($path);

if($handle===false)

return false;

while($dir=readdir($handle))

{if(pattern_match($pattern,$dir))

$output[]=$dir;

}

closedir($handle);

if(is_array($output))

return $output;

return false;

}

 

function pattern_match($pattern,$string)

{#basically prepare a regular expression

$out=null;

$chunks=explode(';',$pattern);

foreach($chunks as $pattern)

{$escape=array('$','^','.','{','}',

'(',')','[',']','|');

while(strpos($pattern,'**')!==false)

$pattern=str_replace('**','*',$pattern);

foreach($escape as $probe)

$pattern=str_replace($probe,"\\$probe",$pattern);

$pattern=str_replace('?*','*',

str_replace('*?','*',

str_replace('*',".*",

str_replace('?','.{1,1}',$pattern))));

$out[]=$pattern;

}

if(count($out)==1)

return(eregi("^$out[0]$",$string));

else

foreach($out as $tester)

if(eregi("^$tester$",$string))

return true;

return false;

}

}

?>

Link to comment
Share on other sites

Hi

 

Anybody know what this can be:

Fatal error: Cannot instantiate non-existent class: url_rewrite in /home/hqautoli/public_html/includes/functions/html_output.php on line 69

 

 

Hi,

 

I've just installed the Google XML contrib and I'm getting exactly the same error message, i've searched all through the forums to no avail for an answer - anyone have any ideas?

 

TIA

Link to comment
Share on other sites

Hi,

 

I've just installed the Google XML contrib and I'm getting exactly the same error message, i've searched all through the forums to no avail for an answer - anyone have any ideas?

 

TIA

 

Hey there!

 

I'm also getting this error and can't understand why! Could anybody help me with this, i've definitely done the installation correctly but it still won't work.

 

I've been stuck on this for days now, will any of you lovely people help me!!

 

HappyDaize x

Link to comment
Share on other sites

Hi,

 

i install this contrib and what could i say...it rocks :)

 

But now i want to integrate the enable/disable categories contrib to work well in this contrib.

 

I change the function GenerateCategorySitemap from

		$sql = "SELECT categories_id as cID, date_added, last_modified as last_mod 
			FROM " . TABLE_CATEGORIES . " 
			ORDER BY parent_id ASC, sort_order ASC, categories_id ASC";

to

		$sql = "SELECT categories_id as cID, date_added, last_modified as last_mod 
			FROM " . TABLE_CATEGORIES . " where categories_status = '1'
			ORDER BY parent_id ASC, sort_order ASC, categories_id ASC";

and it worked well.

 

But now i want to make changes to the function GenerateProductSitemap, not to display products from disabled categories.

I change from

		$sql = "SELECT products_id as pID, products_date_added as date_added, products_last_modified as last_mod, products_ordered 
			FROM " . TABLE_PRODUCTS . " 
			WHERE products_status='1' 
			ORDER BY products_ordered DESC";

to

		$sql = "SELECT p.products_id as pID, p.products_date_added as date_added, p.products_last_modified as last_mod, p.products_ordered 
			FROM " . TABLE_PRODUCTS . " p,  " . TABLE_CATEGORIES . " cd where p.products_status='1' 
			and cd.categories_status = '1'
			ORDER BY p.products_ordered DESC";

but it doesnt work in anyway.

 

Anyone an idea?

 

 

lg pordoeb

Link to comment
Share on other sites

I've managed to get this to work, except that I get /googlesitemap/ in the middle of my category urls. It is basically entering the folders name into the url. I managed to fix this for everything else (my DIR_FS_CATALOG was actually the folder name using SCRIPT_FILE, for some reason it works ok for the usual running of the shop but not here?).

 

Can anyone tell me where else the code for directing to the root directory is for the creation of the urls? I have looked at and messed about with hrefLink, but this does not contain anything for the root, so I'm assuming it must be somewhere else?

 

cheers

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...