Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

staticpublisher cron


Go to End


5 Posts   2100 Views

Avatar
ttyl

Community Member, 114 Posts

21 September 2010 at 9:36am

Edited: 22/09/2010 1:48am

hi,

trying to set up staticpublisher using sake as suggested here: http://doc.silverstripe.org/staticpublisher

however, I'm having trouble getting sake to run and I've followed the directions here: http://doc.silverstripe.org/sake

this is my output - any suggestions appreciated!


Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in _BLAH_/htdocs/sapphire/thirdparty/Zend/Log.php on line 135

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in _BLAH_/htdocs/sapphire/dev/LogErrorFileFormatter.php on line 38

Warning: error_log(_PATH_TO_ERROR_LOG): failed to open stream: No such file or directory in _BLAH_/htdocs/sapphire/dev/LogFileWriter.php on line 58

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in _BLAH_/htdocs/sapphire/thirdparty/Zend/Log.php on line 135

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in _BLAH_/htdocs/sapphire/dev/LogErrorFileFormatter.php on line 38

Warning: error_log(_PATH_TO_ERROR_LOG): failed to open stream: No such file or directory in _BLAH_/htdocs/sapphire/dev/LogFileWriter.php on line 58

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in _BLAH_/htdocs/sapphire/thirdparty/Zend/Log.php on line 135

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in _BLAH_/htdocs/sapphire/dev/LogErrorFileFormatter.php on line 38

Warning: error_log(_PATH_TO_ERROR_LOG): failed to open stream: No such file or directory in _BLAH_/htdocs/sapphire/dev/LogFileWriter.php on line 58

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in _BLAH_/htdocs/sapphire/thirdparty/Zend/Log.php on line 135

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in _BLAH_/htdocs/sapphire/dev/LogErrorFileFormatter.php on line 38

Warning: error_log(_PATH_TO_ERROR_LOG): failed to open stream: No such file or directory in _BLAH_/htdocs/sapphire/dev/LogFileWriter.php on line 58

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in _BLAH_/htdocs/sapphire/thirdparty/Zend/Log.php on line 135

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in _BLAH_/htdocs/sapphire/dev/LogErrorFileFormatter.php on line 38

Warning: error_log(_PATH_TO_ERROR_LOG): failed to open stream: No such file or directory in _BLAH_/htdocs/sapphire/dev/LogFileWriter.php on line 58
ERROR [User Error]: Couldn't run query:
SET CHARACTER SET 'utf8'

IN GET
Line 536 in _BLAH_/htdocs/sapphire/core/model/MySQLDatabase.php

Source
======
527: }
528:
529: function databaseError($msg, $errorLevel = E_USER_ERROR) {
530: // try to extract and format query
531: if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
532: $formatter = new SQLFormatter();
533: $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
534: }
535:
* 536: user_error($msg, $errorLevel);
537: }
538:
539: /**
540: * Return a boolean type-formatted string
541: *
542: * @param array $values Contains a tokenised list of info about this data type

Trace
=====
<ul>user_error(Couldn't run query:
SET CHARACTER SET 'utf8'

,256)
line 536 of MySQLDatabase.php

MySQLDatabase->databaseError(Couldn't run query: SET CHARACTER SET 'utf8' | ,256)
line 134 of MySQLDatabase.php

MySQLDatabase->query(SET CHARACTER SET 'utf8')
line 60 of MySQLDatabase.php

MySQLDatabase->__construct(Array)
line 95 of DB.php

DB::connect(Array)
line 65 of cli-script.php

</ul>

Avatar
Willr

Forum Moderator, 5523 Posts

21 September 2010 at 1:48pm

Edited: 22/09/2010 9:05am

For the date warning you perhaps need to ensure the date.timezone value is set in your php.ini file. Search google for how to do this specifically for your setup but should be something like http://www.rasyid.net/2007/08/29/datetimezone-in-phpini-for-php5/.

The other error looks like it is trying to write the errors to a file which doesn't exist (.../ss_errors.log.php) try creating the ss_errors.log.php file manually in your file system and ensuring that file has read / write access from the webserver. Not sure if you setup that log file but ideally you should keep the log files outside of the webroot for live sites to prevent people from directly accessing it.

Avatar
ttyl

Community Member, 114 Posts

22 September 2010 at 2:37am

Edited: 22/09/2010 4:58am

got it working, yay for silverstripe!

Avatar
ttyl

Community Member, 114 Posts

22 September 2010 at 9:18am

I had everything running which was very cool, but for some strange reason I started to get an error when running rebuildcache from sake. when I run from the browser it is fine. in fact, when running from the command line it actually builds all of the pages, but then dies on the sitemap.xml. as always any help/advice very much appreciated!

here is the error:


ERROR [User Error]: Uncaught Exception: Object->__call(): the method 'sitemap' does not exist on 'DevelopmentAdmin'
IN GET /dev/sitemap.xml
Line 724 in /.../sapphire/core/Object.php

Source
======
715:
716: default :
717: throw new Exception (
718: "Object->__call(): extra method $method is invalid on $this->class:" . var_export($config,
true)
719: );
720: }
721: } else {
722: // Please do not change the exception code number below.
723:
* 724: throw new Exception("Object->__call(): the method '$method' does not exist on '$this->class'",
2175);
725: }
726: }
727:
728: //
-----------------------------------------------------------------------------------------------------------------
729:
730: /**

Trace
=====
<ul>Object->__call(sitemap,Array)

DevelopmentAdmin->sitemap(SS_HTTPRequest)
line 137 of RequestHandler.php

RequestHandler->handleRequest(SS_HTTPRequest)
line 147 of Controller.php

Controller->handleRequest(SS_HTTPRequest)
line 281 of Director.php

Director::handleRequest(SS_HTTPRequest,Session)
line 223 of Director.php

Director::test(http://localhost/dev/sitemap.xml)
line 186 of FilesystemPublisher.php

FilesystemPublisher->publishPages(Array,,,,,,)
line 963 of Object.php

Object->extend(publishPages,Array)
line 108 of RebuildStaticCacheTask.php

RebuildStaticCacheTask->rebuildCache(Array,1)
line 33 of RebuildStaticCacheTask.php

RebuildStaticCacheTask->index(SS_HTTPRequest)
line 193 of Controller.php

Controller->handleAction(SS_HTTPRequest)
line 137 of RequestHandler.php

RequestHandler->handleRequest(SS_HTTPRequest)
line 147 of Controller.php

Controller->handleRequest(SS_HTTPRequest)
line 281 of Director.php

Director::handleRequest(SS_HTTPRequest,Session)
line 124 of Director.php

Director::direct(dev/buildcache)
line 77 of cli-script.php

</ul>

Avatar
ttyl

Community Member, 114 Posts

23 September 2010 at 3:43am

for any future readers of this thread, my problem was this line from the example code


// add any custom URLs which are not SiteTree instances
$urls[] = "sitemap.xml";

removed that and I was golden.