Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Google XML Sitemap SEO


Jack_mcs

Recommended Posts

Hi,

 

In the previous posting, he mentioned that we have to "give the Cron command to the host".

I'm sorry but I dont fully understand. How would I go about doing this?

 

Also, just to clarify, I have to change the file permissions (to 7 5 5) only for the following files right?

 

sitemapcategories.xml

sitemapindex.xml

sitemapmanufacturers.xml

sitemappages.xml

sitemapproducts.xml

sitemapspecials.xml

 

And then its better to submit ALL of these files to Google Webmaster right?

 

Thanks a lot.

Link to comment
Share on other sites

Hi,

 

In the previous posting, he mentioned that we have to "give the Cron command to the host".

I'm sorry but I dont fully understand. How would I go about doing this?

- Run the script manually as mentioned in the install file.

- Copy the line with the cron job.

- Contact your host and paste that line into your message.

Also, just to clarify, I have to change the file permissions (to 7 5 5) only for the following files right?

 

sitemapcategories.xml

sitemapindex.xml

sitemapmanufacturers.xml

sitemappages.xml

sitemapproducts.xml

sitemapspecials.xml

Yes.

 

And then its better to submit ALL of these files to Google Webmaster right?

The three basic ones and the pages site map should be submitted. The manufacturers if you use manufacturers on your shop. The specials it doesn't usually matter since the same products are in the products site map.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hey. Sorry, I just have 2 more questions.

 

1. I have added "sitemappages.xml" to my Google Webmaster account, but there is an error that the sitemap does not contain any urls.

Do you know the reason for this?

 

2. I also added "sitemapproducts.xml" but there is this error: "An invalid date was found. Please fix the date or formatting before resubmitting."

I noticed that the value for all of the errors is "1969-12-31".

Do you know how I can possibly fix this as well?

 

Thanks so much.

Link to comment
Share on other sites

Hey. Sorry, I just have 2 more questions.

 

1. I have added "sitemappages.xml" to my Google Webmaster account, but there is an error that the sitemap does not contain any urls.

Do you know the reason for this?

 

2. I also added "sitemapproducts.xml" but there is this error: "An invalid date was found. Please fix the date or formatting before resubmitting."

I noticed that the value for all of the errors is "1969-12-31".

Do you know how I can possibly fix this as well?

 

Thanks so much.

 

You have to submit the URL of where the site map is e.g: http://www.yourdomain.com/sitemapindex.xml

Link to comment
Share on other sites

I have already done that. The problems I am getting come after that.

Have you looked at previous posts on this subject?

Have you looked at the actual sitemap file?

Have you ran the diagnostic?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Have you looked at previous posts on this subject?

Have you looked at the actual sitemap file?

Have you ran the diagnostic?

 

Jack

 

Hey.

 

Yes I will read the previous posts to see if anyone has this problem.

 

Also, please disregard question #1 in my previous post. I fixed it.

 

As for question #2, I understand now that its not a problem with this contribution.

 

For some reason, it says for most of my products that ""This product was added to our catalog on Wednesday 31 December, 1969".

 

If I can fix this to show the real date, then Im sure that everything should be fine.

 

I've looked into "sitemapproducts.xml" and it shows "<lastmod>1969-12-31</lastmod>" for most products.

 

Do you know of a way that I can fix this error?

 

Thanks.

Link to comment
Share on other sites

The date is taken from the date in the products table. You would need to alter that, either by editing the product in the products edit page or by directly manipulating the database.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hey.

 

Yes I will read the previous posts to see if anyone has this problem.

 

Also, please disregard question #1 in my previous post. I fixed it.

 

As for question #2, I understand now that its not a problem with this contribution.

 

For some reason, it says for most of my products that ""This product was added to our catalog on Wednesday 31 December, 1969".

 

If I can fix this to show the real date, then Im sure that everything should be fine.

 

I've looked into "sitemapproducts.xml" and it shows "<lastmod>1969-12-31</lastmod>" for most products.

 

Do you know of a way that I can fix this error?

 

Thanks.

 

 

Mines doing exactly the same, I have no idea where it gets this date from?

Link to comment
Share on other sites

Hello,

 

I installed the contribution per instructions. Here is the error that was displayed when I ran the index file:

 

Fatal error: Allowed memory size of 419430400 bytes exhausted (tried to allocate 503316480 bytes) in /home4/discxpre/public_html/includes/classes/seo.class.php(1703) : eval()'d code on line 349526

 

Here is the area of code around line 1703 in seo.class.php:

 

function get_cache($name = 'GLOBAL', $local_memory = false){
			$select_list = 'cache_id, cache_language_id, cache_name, cache_data, cache_global, cache_gzip, cache_method, cache_date, cache_expires';
			$global = ( $name == 'GLOBAL' ? true : false ); // was GLOBAL passed or is using the default?
			switch($name){
					case 'GLOBAL': 
							$this->cache_query = $this->DB->Query("SELECT ".$select_list." FROM cache WHERE cache_language_id='".(int)$this->languages_id."' AND cache_global='1'");
							break;
					default: 
							$this->cache_query = $this->DB->Query("SELECT ".$select_list." FROM cache WHERE cache_id='".md5($name)."' AND cache_language_id='".(int)$this->languages_id."'");
							break;
			} # end switch ($name)
			$num_rows = $this->DB->NumRows($this->cache_query);
			if ( $num_rows ){ 
					$container = array();
					while($cache = $this->DB->FetchArray($this->cache_query)){
							$cache_name = $cache['cache_name']; 
							if ( $cache['cache_expires'] > date("Y-m-d H:i:s") ) { 
									$cache_data = ( $cache['cache_gzip'] == 1 ? gzinflate(base64_decode($cache['cache_data'])) : stripslashes($cache['cache_data']) );
									switch($cache['cache_method']){
											case 'EVAL': // must be PHP code
													eval("$cache_data");
													break;														
											case 'ARRAY': 
													$cache_data = unserialize($cache_data);														
											case 'RETURN': 
											default:
													break;
									} # end switch ($cache['cache_method'])										
									if ($global) $container['GLOBAL'][$cache_name] = $cache_data; 
									else $container[$cache_name] = $cache_data; // not global								
							} else { // cache is expired
									if ($global) $container['GLOBAL'][$cache_name] = false; 
									else $container[$cache_name] = false; 
							}# end if ( $cache['cache_expires'] > date("Y-m-d H:i:s") )						
							if ( $this->keep_in_memory || $local_memory ) {
									if ($global) $this->data['GLOBAL'][$cache_name] = $container['GLOBAL'][$cache_name]; 
									else $this->data[$cache_name] = $container[$cache_name]; 
							}														
					} # end while ($cache = $this->DB->FetchArray($this->cache_query))						
					unset($cache_data);
					$this->DB->Free($this->cache_query);						
					switch (true) {
							case ($num_rows == 1): 
									if ($global){
											if ($container['GLOBAL'][$cache_name] == false || !isset($container['GLOBAL'][$cache_name])) return false;
											else return $container['GLOBAL'][$cache_name]; 
									} else { // not global
											if ($container[$cache_name] == false || !isset($container[$cache_name])) return false;
											else return $container[$cache_name];
									} # end if ($global)										
							case ($num_rows > 1): 
							default: 
									return $container; 
									break;
					}# end switch (true)						
			} else { 
					return false;
			}# end if ( $num_rows )				
	} # end function get_cache()

 

 

Thanks for any help in advance.

Link to comment
Share on other sites

I installed the contribution per instructions. Here is the error that was displayed when I ran the index file:

 

Fatal error: Allowed memory size of 419430400 bytes exhausted (tried to allocate 503316480 bytes) in /home4/discxpre/public_html/includes/classes/seo.class.php(1703) : eval()'d code on line 349526

That's due to your hosting account. Show the message to your host and see if they will fix it.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

That's due to your hosting account. Show the message to your host and see if they will fix it.

 

Jack

 

Jack,

 

I did increase the memory limit in php.ini file and that didn't work. So I found the php sleep line that you referenced in one of your posts. I used 'sleep (5);' in code breaks above the error line. That seemed to work. I guess. Because when I run the script in Firefox and IE, it doesn't give me an error but it gives me a blank page.

 

Is there a way to determine if I resolved the issue successfully? I know I'm getting close.

 

Thanks

Link to comment
Share on other sites

If you are using Ultimate SEO 22d_4, install version 22d_3 instead. There is a compatibility between that last version and this contribution. It iwll be fixed with the next upload of Ultimate SEO but changing the version should get around that for now.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack,

 

I've got it to get this far:

 

Opening /home/discxpre/public_html/sitemapproducts.xmlFS_CAT /home/discxpre/public_html/Server http://www.discxpress.comSave Path /home/discxpre/public_html/WS_CAT / Write /home/discxpre/public_html/sitemapproducts.xmlOpening /home/discxpre/public_html/sitemapproducts1.xmlFS_CAT /home/discxpre/public_html/Server http://www.discxpress.comSave Path /home/discxpre/public_html/WS_CAT / Write /home/discxpre/public_html/sitemapproducts1.xmlOpening /home/discxpre/public_html/sitemapproducts2.xmlFS_CAT /home/discxpre/public_html/Server http://www.discxpress.comSave Path /home/discxpre/public_html/WS_CAT / Write /home/discxpre/public_html/sitemapproducts2.xml

Fatal error: Maximum execution time of 30 seconds exceeded in /home4/discxpre/public_html/googlesitemap/sitemap.class.php on line 470

 

That's what happens when I run googlesitemap/index.php (of course you know that).

 

What can I do about that fatal error? Tweak some code? Get host to make adjustments?

 

 

Thank you for your help.

Link to comment
Share on other sites

Nevermind Jack!

 

I solved the issue by putting my php.ini file in the 'googlesitemap' directory on the server and I get this result:

 

Opening /home/discxpre/public_html/sitemapproducts.xmlFS_CAT /home/discxpre/public_html/Server http://www.discxpress.comSave Path /home/discxpre/public_html/WS_CAT / Write /home/discxpre/public_html/sitemapproducts.xmlOpening /home/discxpre/public_html/sitemapproducts1.xmlFS_CAT /home/discxpre/public_html/Server http://www.discxpress.comSave Path /home/discxpre/public_html/WS_CAT / Write /home/discxpre/public_html/sitemapproducts1.xmlOpening /home/discxpre/public_html/sitemapproducts2.xmlFS_CAT /home/discxpre/public_html/Server http://www.discxpress.comSave Path /home/discxpre/public_html/WS_CAT / Write /home/discxpre/public_html/sitemapproducts2.xmlOpening /home/discxpre/public_html/sitemapproducts3.xmlFS_CAT /home/discxpre/public_html/Server http://www.discxpress.comSave Path /home/discxpre/public_html/WS_CAT / Write /home/discxpre/public_html/sitemapproducts3.xmlOpening /home/discxpre/public_html/sitemapproducts4.xmlFS_CAT /home/discxpre/public_html/Server http://www.discxpress.comSave Path /home/discxpre/public_html/WS_CAT / Write /home/discxpre/public_html/sitemapproducts4.xmlOpening /home/discxpre/public_html/sitemapproducts5.xmlFS_CAT /home/discxpre/public_html/Server http://www.discxpress.comSave Path /home/discxpre/public_html/WS_CAT / Write /home/discxpre/public_html/sitemapproducts5.xmlOpening /home/discxpre/public_html/sitemapproducts6.xmlFS_CAT /home/discxpre/public_html/Server http://www.discxpress.comSave Path /home/discxpre/public_html/WS_CAT / Write /home/discxpre/public_html/sitemapproducts6.xmlOpening /home/discxpre/public_html/sitemapproducts7.xmlFS_CAT /home/discxpre/public_html/Server http://www.discxpress.comSave Path /home/discxpre/public_html/WS_CAT / Write /home/discxpre/public_html/sitemapproducts7.xmlGenerated Google Product Sitemap Successfully

 

ERROR: Google Category Sitemap Generation FAILED!

 

Opening /home/discxpre/public_html/sitemapindex.xmlFS_CAT /home/discxpre/public_html/Server http://www.discxpress.comSave Path /home/discxpre/public_html/WS_CAT / Write /home/discxpre/public_html/sitemapindex.xmlGenerated Google Sitemap Index Successfully

 

Array

(

[QUERY] => Array

(

[PRODUCTS] => Array

(

[sTATUS] => success

[NUM_ROWS] => 382479

)

 

[CATEOGRY] => Array

(

[sTATUS] => false

[NUM_ROWS] => 0

)

 

)

 

[sAVE_FILE_XML] => Array

(

[0] => Array

(

[file] => /home/discxpre/public_html/sitemapproducts.xml

[status] => success

[file_exists] => true

)

 

[1] => Array

(

[file] => /home/discxpre/public_html/sitemapproducts1.xml

[status] => success

[file_exists] => true

)

 

[2] => Array

(

[file] => /home/discxpre/public_html/sitemapproducts2.xml

[status] => success

[file_exists] => true

)

 

[3] => Array

(

[file] => /home/discxpre/public_html/sitemapproducts3.xml

[status] => success

[file_exists] => true

)

 

[4] => Array

(

[file] => /home/discxpre/public_html/sitemapproducts4.xml

[status] => success

[file_exists] => true

)

 

[5] => Array

(

[file] => /home/discxpre/public_html/sitemapproducts5.xml

[status] => success

[file_exists] => true

)

 

[6] => Array

(

[file] => /home/discxpre/public_html/sitemapproducts6.xml

[status] => success

[file_exists] => true

)

 

[7] => Array

(

[file] => /home/discxpre/public_html/sitemapproducts7.xml

[status] => success

[file_exists] => true

)

 

[8] => Array

(

[file] => /home/discxpre/public_html/sitemapindex.xml

[status] => success

[file_exists] => true

)

 

)

 

)

 

I guess the php.ini file is needed in every directory that runs a script of that kind. If you can elaborate on this it may help others.

 

Thank you.

Link to comment
Share on other sites

I guess the php.ini file is needed in every directory that runs a script of that kind. If you can elaborate on this it may help others.

It depends on the server setup. The code has to be able to access files in a different directory. Some host won't allow this with some kind of edit, as you have found.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi, Just had some time to look properly thought the sitemaps being generated and they are submitting the wrong url's to google e.g: http://www.alloywheelscenter.co.uk/FILENAM...?products_id=28 instead of http://www.alloywheelscenter.co.uk/product...;products_id=28 so it then comes up with a 404 not found error? what could be causing this to happen?

Link to comment
Share on other sites

Capital letters like that means there is a mistake in your code - a missing definition. You will need to figure out where the link is supposed to be going to and check the code to make sure there is an entry for that page in the includes/filenames.php file.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I don't use that contribution and am not aware of what it is looking for. You will need to ask in its support thread for help.

Also, there was a post in the last week or so about getting this to work with SEO-G. That may help if you can find it.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I don't use that contribution and am not aware of what it is looking for. You will need to ask in its support thread for help.

Also, there was a post in the last week or so about getting this to work with SEO-G. That may help if you can find it.

 

Jack

Hi Jack

 

I will try and look for it

 

Thanks

Link to comment
Share on other sites

Hi Jack,

 

Installed the contrib "Google XML Sitemap SEO". Tried to run it but the browers returns this message when I hit enter after http://mydomain.com/catalog/googlesitemap/index.php

 

Unable to connect to database server!

 

Checked with my hosting provider. All they said was that my db is running fine. I knew this much.

 

Any clue as to the direction I need to go?

 

Thanks a lot for your time.

 

PS: I did try to change the settings in the Admin Config page but it did not make any difference.

Nick G. Romain

Link to comment
Share on other sites

Hi Jack,

 

Installed the contrib "Google XML Sitemap SEO". Tried to run it but the browers returns this message when I hit enter after http://mydomain.com/catalog/googlesitemap/index.php

 

Unable to connect to database server!

Assuming the rest of your shop works correctly, I can only guess that you've made a mistake in the installation. Although, that involves so little I can't think what that might be. All I can suggest is that you go back through the installation steps and see if you missed something.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

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...