@aric But it says this must be run from the command line. How do i plug this into Google for instance? and it looks like from looking at the code that once this is done you have to redo it manually each time to include the next notices, is that correct?
@TweXXX cgi mode is not well supported, please ask dream host to contact us, we provide support for them, but they must be the ones to make the necessary changes.
aric@aric-laptop:~/mainline/scripts$ ./sitemap.php --help Script for creating sitemaps files per http://sitemaps.org/
-f Use as output file -d Use for new sitemaps -u Use as root for URLs General options:
-q --quiet Quiet (little output) -v --verbose Verbose (lots of output) -c --conf= Use as config file -s --server= Use as server name -p --path= Use as path name -h --help Show this message and quit.
@aric i am not sure if this is right, is this how the line should read in crob job?
cd /home/user/sitename.com/ /usr/local/php5/bin/php /home/user/sitename.com/scripts/sitemap.php -f sitemapindex.xml -d sitemaps -u
It doesn't seem to be working, I am not getting an email to say it is working but also can't find a sitemap file, which I assume is called sitemapindex.xml.
Also why did you leave out the arguments after -u? that part is important. and do you have a driectory in /home/user/sitename.com called sitemaps and is it writeable?
output from the script would answer these questions I believe. you could try running it locally, if you have a local install of statusnet.
@aric this is sorted. Dreamhost helped me with this, this line needs to be on its own line and then all others will work.
cd /home/out07/twexxx.com/
So this is the full code: cd /home/out07/twexxx.com/ /usr/local/php5/bin/php /home/out07/twexxx.com/scripts/sitemap.php -f sitemapindex.xml -d sitemaps -u http://twexxx.com/sitemaps/
When I run this: /var/www/sitename.com/www/root/scripts/sitemap.php I get: -bash: /var/www/sitename.com/www/root/scripts/sitemap.php: Permission denied
-f Use as output file -d Use for new sitemaps -u Use as root for URLs
--you need to define these.
Also it you get the latest version of statusnet from gitorious there is a sitemap plugin, enable it and go to sitename.com/admin/sitemap and you can add you bing google and yahoo keys and then run "php /statusnet/plugins/sitemap/scripts/updatecounts.php"
Ok, it works like this: php /var/www/domain.com/www/root/scripts/sitemap.php -f sitemapindex.xml -d /var/www/domain.com/www/root/sitemaps -u http://domain.com/sitemaps/
Regarding the pluggin - I am using 0.9.3, added the plugin in config (addPlugin('Sitemap');) and there is no such menu 'sitemap' in admin.... neither the url /admin/sitemap works...
@aric i have just checked and i have over 10000 posts to the site but the sitemap has only got 1517 urls in the sitemap. Is there something that i need to do. I have rerun the chron job. I have also deleted the created the xml files and recreated them and still all the notices have not been made. I am running 0.9.4
Comments
/usr/local/bin/php /home/user/sitename.com/scripts/sitemap.php
I have asked for the job to be emailed to me when it is done and this is what comes back.
Parse error: syntax error, unexpected '{' in /home/user/sitename.com/lib/common.php on line 131
Line 131 is this : StatusNet::init(@$server, @$path, @$conffile);
Please advise.
Parse error: syntax error, unexpected '{' in /home/user/sitename.com/lib/common.php on line 131
That's php4 on dreamhost servers.
Try:
/usr/local/php5/bin/php /home/user/sitename.com/scripts/sitemap.php
/usr/local/php5/bin/php /home/user/sitename.com/scripts/sitemap.php
And now it says this:
Error: output directory does not exist.
What directory must i make?
aric@aric-laptop:~/mainline/scripts$ ./sitemap.php --help
Script for creating sitemaps files per http://sitemaps.org/
-f Use as output file
-d Use for new sitemaps
-u Use as root for URLs
General options:
-q --quiet Quiet (little output)
-v --verbose Verbose (lots of output)
-c --conf= Use as config file
-s --server= Use as server name
-p --path= Use as path name
-h --help Show this message and quit.
here is an example
cd /var/www/sitename/ && /usr/bin/php -d memory_limit=706M scripts/sitemap.php -f sitemapindex.xml -d sitemaps -u http://sitename/sitemaps/
cd /home/user/sitename.com/ /usr/local/php5/bin/php /home/user/sitename.com/scripts/sitemap.php -f sitemapindex.xml -d sitemaps -u
It doesn't seem to be working, I am not getting an email to say it is working but also can't find a sitemap file, which I assume is called sitemapindex.xml.
Please help.
its really hard to tell whats going on if you cat see the response the script is giving.
/usr/local/php5/bin/php /home/user/sitename.com/scripts/sitemap.php -f sitemapindex.xml -d sitemaps -u
Also why did you leave out the arguments after -u? that part is important.
and do you have a driectory in /home/user/sitename.com called sitemaps and is it writeable?
output from the script would answer these questions I believe. you could try running it locally, if you have a local install of statusnet.
cd /home/out07/twexxx.com/ /usr/local/php5/bin/php /home/out07/twexxx.com/scripts/sitemap.php -f sitemapindex.xml -d sitemaps -u http://twexxx.com/sitemaps/
cd /home/out07/twexxx.com/
So this is the full code:
cd /home/out07/twexxx.com/
/usr/local/php5/bin/php /home/out07/twexxx.com/scripts/sitemap.php -f sitemapindex.xml -d sitemaps -u http://twexxx.com/sitemaps/
Thanks for your help on this!
I get:
-bash: /var/www/sitename.com/www/root/scripts/sitemap.php: Permission denied
Why is that ?
Script for creating sitemaps files per http://sitemaps.org/
-f Use as output file
-d Use for new sitemaps
-u Use as root for URLs
--you need to define these.
Also it you get the latest version of statusnet from gitorious there is a sitemap plugin, enable it and go to sitename.com/admin/sitemap and you can add you bing google and yahoo keys and then run "php /statusnet/plugins/sitemap/scripts/updatecounts.php"
Permission denied
when I run
/var/www/domain.com/www/root/scripts/sitemap.php -f sitemapindex.xml -d sitemaps -u http://domain.com/sitemaps/
php /var/www/domain.com/www/root/scripts/sitemap.php -f sitemapindex.xml -d /var/www/domain.com/www/root/sitemaps -u http://domain.com/sitemaps/
Regarding the pluggin - I am using 0.9.3, added the plugin in config (addPlugin('Sitemap');) and there is no such menu 'sitemap' in admin.... neither the url /admin/sitemap works...
and then enable the plugin.
I found it
$config['admin']['panels'][] = 'sitemap';
in order to see the panel... :)