17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2081 Views |
-
2.1 RC1 install errors

17 September 2007 at 9:51pm
Hi, I'm having some troubles installing 2.1 (on Windows) - on the "Installing SilverStripe..." page I get the error:
Building database schema...
Fatal error: DATABASE ERROR: Couldn't run query: insert into `SiteTree_versions` SET `ShowInMenus` = '0', `ShowInSearch` = '0', `Status` = '', `Viewers` = 'Anyone', `Editors` = 'LoggedInUsers', `Title` = '', `Content` = '', `URLSegment` = '', `LastEdited` = '', `Created` = '2007-09-17 20:13:12', `ClassName` = 'SiteTree', `MenuTitle` = '', `MetaTitle` = '', `MetaDescription` = '', `MetaKeywords` = '', `HomepageForDomain` = '', `ProvideComments` = '0', `Sort` = '0', `LegacyURL` = '', `HasBrokenFile` = '0', `HasBrokenLink` = '0', `ReportClass` = '', `ViewersGroup` = '0', `EditorsGroup` = '0', `ParentID` = '0', `Version` = 1, `RecordID` = 1, `AuthorID` = 0 | Incorrect datetime value: '' for column 'LastEdited' at row 1 in C:\webserver\sites\www.blog.local\sapphire\core\model\Database.php on line 368
If I refresh it enough it goes to rewritetest.php, and just sits at a blank page. I think this one is a windows problem breaking the rewrite test - if I change line rewritetest.php line 41 from
if($baseURL == "/") {
to
if($baseURL == DIRECTORY_SEPARATOR) {
it works fine.
Once it gets to /home/successfullyinstalled, it just says "The requested page couldn't be found." The problem seems to be that it's looking for the home page in SiteTree_Live, but there's nothing in SiteTree_Live, it's just in SiteTree. This might be related to the database error earlier, I don't know. Trying to go to /admin/publishall just gets another blank page.
Any wisdom? Do I have something really wrong here?
-
Re: 2.1 RC1 install errors

17 September 2007 at 11:10pm
It's a known bug - patch: http://open.silverstripe.com/changeset/42173
Also described at http://www.silverstripe.com/general-discussion/flat/5050 (end of page and second page)Your change to the rewrite test is interesting - it's failing on Windows, but if you just force it to continue, it's normally fine. I'll give it another look...
-
Re: 2.1 RC1 install errors

18 September 2007 at 12:25am
Thanks, not sure how I missed that...my fix was to change DataObject::write() on line 432(ish) from
DB::query("INSERT INTO `{$baseTable}` SET Created = NOW()");
to
DB::query("INSERT INTO `{$baseTable}` SET Created = NOW(), LastEdited = NOW()");
-
Re: 2.1 RC1 install errors

18 September 2007 at 12:47am
Yep, changing DataObject is another solution, but I'm not sure that's how it should be.
Matt thought it should be set to NOW(), but Andy's fix just replaced the empty strings with null (actually my quick'n'dirty approach). I guess it won't matter later on so both ways should be fine.DIRECTORY_SEPARATOR didn't help on my system (Vista 64bit, Apache 2.2.6, PHP 5.2.4) - I still get the error that mod_rewrite is not working correctly but when forcing it to continue it's all fine...
-
Re: 2.1 RC1 install errors

18 September 2007 at 12:57am
That's interesting, it worked for me...although the second time around I made the same change to a few places in install.php as well. Maybe you could try that (I think there are three places with the same line as above), although I didn't check to see if they made a difference. I remember having the same issue in the older versions of SS as well, and had to change a few slashes in the installer to make it work properly.
Anyway, I'm just happy it's going now - I've been hanging out to play with the blog module.
-
Re: 2.1 RC1 install errors

18 September 2007 at 1:15am Last edited: 18 September 2007 1:18am
I don't think that's fixing it, because dirname($_SERVER['SCRIPT_NAME']) just gets the folder from where you are calling it. And on my Windows box Apache uses / in the path and not \ (which DIRECTORY_SEPARATOR returns). So for example if I'm just echoing dirname($_SERVER['SCRIPT_NAME']) from wwwroot/test/index.php I get "/test".
And as I'm generally installing SS in a subdirectory$baseURL = dirname($_SERVER['SCRIPT_NAME']);
if($baseURL == "/") {
$baseURL = "";
}
won't apply anyway. -
Re: 2.1 RC1 install errors

18 September 2007 at 7:38pm
Matt thought it should be set to NOW() - That's just what it did in the past, after thinking about it for a bit it makes more sense to leave it null - that way you know when a page has been newly-created and not changed yet, if you want to know that state for a page.
| 2081 Views | ||
|
Page:
1
|
Go to Top |



