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.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

Installation help please, multiple issues.


Reply


8 Posts   1837 Views

Avatar
OS1

Community Member, 5 Posts

18 November 2010 at 3:09am

I've been trying to install SilverStripe to investigate it and compare it to the three usual suspects. This was instigated by reading that you're the first open source project to be M$ certified. But I've given up, it's all become to painful and time consuming! Well, ok, not quite or I wouldn't be posting here.

Step 1) Download - yes, did that!
Step 2) Install - yeah, right

So I'm here <http://doc.silverstripe.org/installation-on-webserver>
"Visit your Sites Domain or IP Address in your webbrowser" - NO!! visit your_site/install.php

So I work through the not too obvious errors about file permissions, except that in half the cases the files weren't there to have their permissions set. Wouldn't be more helpful to actually say a file is not there. Anyway, a few touch and chmods seem to sort it out but you're never 100% sure.

Then is says everything is set to install, so I select Install.

Next I get some banal message about Database Error and in classic style nothing more except some equally crap message that the web server was unable to perform the request. I doubt it! The web server had done just fine I suspect!

I trawl the forums but no suggestions work. The best one was advice to add a debug entry to mysite/_config.php - brilliant! You can't install the site with this file present and you can't get debug output without it!!

Next, hmmmm! I think. I'll re-install but now I won't use the BlackCandy theme, the Tutorials are the way to go right, no; wrong again. This time I'm told the installation has worked! Yipee! And to follow the links to the CMS. So I do. Bugger! 404! I look at the file system, there's no admin directory nor file. I look in the database, no references to admin any where ** sigh **

Next, I register an account so I can <s>rant</s> report issues.

Next I re-run the install using Black Candy so I can accurately report on the error message reported above. I'm quite used to it now, I have a console window open so I can just use the cursor keys and <Return>.

Blimey, the install now works! There's nothing like consistency, it this is nothing like... you get the point. Well is says it's worked but it hasn't really. I'm just thinking about deleting this post when bam!
[User Error] Couldn't run query: SELECT COUNT(*) FROM "PageComment" WHERE "PageComment"."ParentID" = '1' Table 'SilverStripe.PageComment' doesn't exist
GET /

Line 526 in /opt/lampp/htdocs/SilverStripe/sapphire/core/model/MySQLDatabase.php
Source

517    }
518    
519    function databaseError($msg, $errorLevel = E_USER_ERROR) {
520       // try to extract and format query
521       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
522          $formatter = new SQLFormatter();
523          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
524       }
525       
526       user_error($msg, $errorLevel);
527    }
528    
529    /**
530     * Return a boolean type-formatted string
531     *
532     * @param array $values Contains a tokenised list of info about this data type

Trace

Couldn't run query: SELECT COUNT(*) FROM "PageComment" WHERE "PageComment"."ParentID" = '1' Table 'SilverStripe.PageComment' doesn't exist
Line 526 of MySQLDatabase.php
MySQLDatabase->databaseError(Couldn't run query: SELECT COUNT(*) FROM "PageComment" WHERE "PageComment"."ParentID" = '1' | Table 'SilverStripe.PageComment' doesn't exist,256)
Line 124 of MySQLDatabase.php
MySQLDatabase->query(SELECT COUNT(*) FROM "PageComment" WHERE "PageComment"."ParentID" = '1',256)
Line 129 of DB.php
DB::query(SELECT COUNT(*) FROM "PageComment" WHERE "PageComment"."ParentID" = '1')
Line 392 of ContentController.php
ContentController->PageComments()
Line 369 of ViewableData.php
ViewableData->obj(PageComments,,,1)
Line 446 of ViewableData.php
ViewableData->XML_val(PageComments,,1)
Line 207 of .cache.themes.blackcandy.templates.Layout.Page.ss
include(/opt/lampp/htdocs/SilverStripe/silverstripe-cache/.cache.themes.blackcandy.templates.Layout.Page.ss)
Line 420 of SSViewer.php
SSViewer->process(Page_Controller,Zend_Cache_Frontend_Output)
Line 411 of SSViewer.php
SSViewer->process(Page_Controller)
Line 202 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 199 of ContentController.php
ContentController->handleRequest(SS_HTTPRequest)
Line 67 of ModelAsController.php
ModelAsController->handleRequest(SS_HTTPRequest)
Line 111 of RootURLController.php
RootURLController->handleRequest(SS_HTTPRequest)
Line 281 of Director.php
Director::handleRequest(SS_HTTPRequest,Session)
Line 124 of Director.php
Director::direct(/)
Line 127 of main.php

A quick exam of the database reveals that indeed it is now trying to interrogate a database table that doesn't exists. Ah, I know, it's confused, it's already got a bunch of tables - I'll delete the database and start again. Once again the install works, why?!?! it failed time after time before, but lets not worry too much about that right now. And yes, the same error again, no database table called PageComment.

I have no hair left and my tears have turned to manic laughter. I'm sorry guys, it's great that M$ have certified you, I certainly need certifying after trying to use SliverStripe, but I fear I'll have to stick to the usual three CMSs that not only install but work the way they describe.

I'm using 2.4.3, I suspect I would have had more success using the 2.4.2 Windows installer (I'm using Linux before anyone says "yes"!).

Avatar
Greg1

Community Member, 28 Posts

18 November 2010 at 1:18pm

Edited: 18/11/2010 1:20pm

I'm not really able to help with most of that as every install on multiple servers has gone without a hitch (albeit all linux cpanel webhosting) but I would suggest that you post up more information about your server as that my indicate more about where the problems lie.

"Visit your Sites Domain or IP Address in your webbrowser" - NO!! visit your_site/install.php

This will depend on how your sever is set up. It will usually work because it will hit index.php which then sends you to install.php.

However I think the default install of apache (and most others) will leave a index.html file in the web directory which will be encountered before the index.php.

The rest is a little difficult for me to figure out but hopefully someone else with more experience is able to help.

The two big downsides of SilverStripe are the lack of documentation and the small size of the community so it can feel very frustrating when you run into snags.

Avatar
Willr

Forum Moderator, 5513 Posts

18 November 2010 at 3:15pm

here's no admin directory nor file. I look in the database, no references to admin any where ** sigh **

Most URL's in SilverStripe are virtually rewritten. Like you will find no /dev/build, these are all handled by mod_rewrite.

[User Error] Couldn't run query: SELECT COUNT(*) FROM "PageComment" WHERE "PageComment"."ParentID" = '1' Table 'SilverStripe.PageComment' doesn't exist

By the sounds of it the database did not finish building correctly. Try rebuilding the database by visiting yoursite.com/dev/build.

So I work through the not too obvious errors about file permissions, except that in half the cases the files weren't there to have their permissions set

The files do not need to be there. If they don't exist it checks to see if the permission of the parent folder (i.e mysite) has the permissions to create a file. If it does then all is well if the file doesn't exist. If no file and the permissions on the parent directory don't allow creating files then it raises it as a flag.

Thanks for the feedback, if you have any other suggestions for how we can improve the installer please raise it as a ticket on open.silverstripe.org!

Avatar
OS1

Community Member, 5 Posts

18 November 2010 at 10:37pm

Thanks for the replies guys.

Willr: "By the sounds of it the database did not finish building correctly. Try rebuilding the database by visiting yoursite.com/dev/build. "

The URL appears to work but I cannot access it as it appears to not know my credentials. Which of the details I entered during the install become the admin credentials?

Avatar
OS1

Community Member, 5 Posts

19 November 2010 at 2:16am

ok, so I added "echo $fileName;" into index.php to start some debugging and then it started working and re-directed me to install.php!!

I removed _config.php and re-ran the installation. This time I was able to "run" http://ss-dev/dev/build?isDev=1 . Here is the output:
Environment Builder
http://ss-dev/
dev→ build
Building database SilverStripe using MySQL 5.1.41

Creating database tables
SiteConfig
SiteTree
Email_BounceRecord
QueuedEmail
File
Group
LoginAttempt
Member
MemberPassword
Permission
PermissionRole
PermissionRoleCode
Widget
WidgetArea
Page
ErrorPage
RedirectorPage
VirtualPage
Image
Folder
Image_Cached

Creating database records
SiteConfig
SiteTree
Email_BounceRecord
QueuedEmail
File
Group
LoginAttempt
Member
MemberPassword
Permission
PermissionRole
PermissionRoleCode
Widget
WidgetArea
Page
ErrorPage
RedirectorPage
VirtualPage
Image
Folder
Image_Cached

Database build completed!

Still no "PageComment".

Avatar
OS1

Community Member, 5 Posts

19 November 2010 at 5:28am

So now I've hand created a table called PageComment and taken a guess at it having a field called "id" and taking a stab at the field types for "IsSpam", "NeedsModeration" and "ParentID".

And yes, I now see the "Home" page.

Sadly however clicking on "the CMS" results in a 404 error, it still can't find "/admin", should it be "/foo/admin" or "/foo/bar/admin"

Avatar
OS1

Community Member, 5 Posts

19 November 2010 at 6:14am

WOOHOO!!!! It's working, It's working, It's working :-)

During the install I had received a message saying that the directory "cms" didn't exist. So I created one assuming the installer would do the rest. The installer was now happy. However, the cms directory should have been unzipped with all the other files; but the installer didn't baulk. Something had gone wrong with my original unzipping so I had just created an empty "cms" directory which was obviously terribly wrong!! So I've re-unzipped the SilverStripe tar.gz file and voila, I now have a populated "cms" directory and a working site AND a working admin area :-)

Ideally the installer should point out that "cms" is part of the zip file and is not going to be created / populated and it should baulk if all it finds is an empty directory or at the very least look for some key files.

Avatar
Sean

Forum Moderator, 922 Posts

19 November 2010 at 11:14am

Thanks OS1,

I think that's a good idea. The installer could check there is at *least* an _config.php in the cms and sapphire directories.

I'd like to think that would have saved you some hair. :-)

Thanks,
Sean