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.

General Questions /

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

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

silverstripe and MAMP 3


Go to End
Reply


9 Posts   564 Views

Avatar
Guy Van Bael

Community Member, 35 Posts

11 June 2014 at 1:52am

Hi,

I tried to update my MAMP version from MAMP2 to MAMP3. Unfortunately... al my SS3 sites won't run with php version 5.4.4 or 5.5.
I even tried adding php 5.4.1 to mamp 3, but then apache won't start.

In the end i reverted the situation to my mamp2 version and all's working again.

Is anybody using Mamp3? Or does anybod know what's causing this?

Avatar
camfindlay

Forum Moderator, 171 Posts

17 June 2014 at 4:25pm

Can you define "won't run" a bit more?

I know in some of the "...AMP" type of stacks that are coming out now are using Apache 2.4 which has been causing some issues with the URL rewriting.

The issue is mentioned at https://groups.google.com/forum/#!topic/silverstripe-dev/-xH6yZfC5Tc

Avatar
Guy Van Bael

Community Member, 35 Posts

18 June 2014 at 11:31pm

Hi Cam,

The probleem is indeed Apache 2.4. Mamp3 uses it and silverstripe apparantly has issues with Apache 2.4.
It's definitly not the php version, because sites on our hosting company use 5.4.4. The only "weird" thing in that case is that we have to disable APC in php5.4.4 for silverstripe to run properly.

I hope this issue with apache 2.4 will be adressed soon, before too many hostingcompanies upgrade their Apache version.

Avatar
camfindlay

Forum Moderator, 171 Posts

19 June 2014 at 4:09pm

It seems actually the quick fix is just to delete the index.php file and ensure mod_rewrite is installed.

Avatar
arthurdent

Community Member, 170 Posts

12 August 2014 at 8:40pm

Edited: 12/08/2014 8:48pm

OK, if the fix is to delete the index.php file at the root level of your SilverStripe site, no, don't think that's it (thought it sounded too good to be true!!). I have just tried it. The trace reads as follows (it actually loops a fair few times...)

[User Error] Couldn't run query: SELECT DISTINCT "SiteTree_Live"."ClassName", "SiteTree_Live"."Created", "SiteTree_Live"."LastEdited", "SiteTree_Live"."URLSegment", "SiteTree_Live"."Title", "SiteTree_Live"."MenuTitle", "SiteTree_Live"."Content", "SiteTree_Live"."MetaDescription", "SiteTree_Live"."ExtraMeta", "SiteTree_Live"."ShowInMenus", "SiteTree_Live"."ShowInSearch", "SiteTree_Live"."Sort", "SiteTree_Live"."HasBrokenFile", "SiteTree_Live"."HasBrokenLink", "SiteTree_Live"."ReportClass", "SiteTree_Live"."CanViewType", "SiteTree_Live"."CanEditType", "SiteTree_Live"."ShowMap", "SiteTree_Live"."StaticMap", "SiteTree_Live"."Version", "SiteTree_Live"."ParentID", "SiteTree_Live"."ID", CASE WHEN "SiteTree_Live"."ClassName" IS NOT NULL THEN "SiteTree_Live"."ClassName" ELSE 'SiteTree' END AS "RecordClassName" FROM "SiteTree_Live" WHERE ("SiteTree_Live"."URLSegment" = 'home' AND "SiteTree_Live"."ParentID" = 0) ORDER BY "SiteTree_Live"."Sort" ASC LIMIT 1 Unknown column 'SiteTree_Live.ShowMap' in 'field list'
GET /MySite-v3.1.5/

Line 598 in /Users/Sites/MySite-v3.1.5/framework/model/MySQLDatabase.php
Source

589    }
590
591    public function databaseError($msg, $errorLevel = E_USER_ERROR) {
592       // try to extract and format query
593       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
594          $formatter = new SQLFormatter();
595          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
596       }
597
598       user_error($msg, $errorLevel);
599    }
600
601    /**
602     * Return a boolean type-formatted string
603     *
604     * @param array $values Contains a tokenised list of info about this data type

Trace

Couldn't run query: SELECT DISTINCT "SiteTree_Live"."ClassName", "SiteTree_Live"."Created", "SiteTree_Live"."LastEdited", "SiteTree_Live"."URLSegment", "SiteTree_Live"."Title", "SiteTree_Live"."MenuTitle", "SiteTree_Live"."Content", "SiteTree_Live"."MetaDescription", "SiteTree_Live"."ExtraMeta", "SiteTree_Live"."ShowInMenus", "SiteTree_Live"."ShowInSearch", "SiteTree_Live"."Sort", "SiteTree_Live"."HasBrokenFile", "SiteTree_Live"."HasBrokenLink", "SiteTree_Live"."ReportClass", "SiteTree_Live"."CanViewType", "SiteTree_Live"."CanEditType", "SiteTree_Live"."ShowMap", "SiteTree_Live"."StaticMap", "SiteTree_Live"."Version", "SiteTree_Live"."ParentID", "SiteTree_Live"."ID", CASE WHEN "SiteTree_Live"."ClassName" IS NOT NULL THEN "SiteTree_Live"."ClassName" ELSE 'SiteTree' END AS "RecordClassName" FROM "SiteTree_Live" WHERE ("SiteTree_Live"."URLSegment" = 'home' AND "SiteTree_Live"."ParentID" = 0) ORDER BY "SiteTree_Live"."Sort" ASC LIMIT 1 Unknown column 'SiteTree_Live.ShowMap' in 'field list'
MySQLDatabase.php:598
MySQLDatabase->databaseError(Couldn't run query: SELECT DISTINCT "SiteTree_Live"."ClassName", "SiteTree_Live"."Created", "SiteTree_Live"."LastEdited", "SiteTree_Live"."URLSegment", "SiteTree_Live"."Title", "SiteTree_Live"."MenuTitle", "SiteTree_Live"."Content", "SiteTree_Live"."MetaDescription", "SiteTree_Live"."ExtraMeta", "SiteTree_Live"."ShowInMenus", "SiteTree_Live"."ShowInSearch", "SiteTree_Live"."Sort", "SiteTree_Live"."HasBrokenFile", "SiteTree_Live"."HasBrokenLink", "SiteTree_Live"."ReportClass", "SiteTree_Live"."CanViewType", "SiteTree_Live"."CanEditType", "SiteTree_Live"."ShowMap", "SiteTree_Live"."StaticMap", "SiteTree_Live"."Version", "SiteTree_Live"."ParentID", "SiteTree_Live"."ID", CASE WHEN "SiteTree_Live"."ClassName" IS NOT NULL THEN "SiteTree_Live"."ClassName" ELSE 'SiteTree' END AS "RecordClassName" FROM "SiteTree_Live" WHERE ("SiteTree_Live"."URLSegment" = 'home' AND "SiteTree_Live"."ParentID" = 0) ORDER BY "SiteTree_Live"."Sort" ASC LIMIT 1 | Unknown column 'SiteTree_Live.ShowMap' in 'field list',256)
MySQLDatabase.php:150
MySQLDatabase->query(SELECT DISTINCT "SiteTree_Live"."ClassName", "SiteTree_Live"."Created", "SiteTree_Live"."LastEdited", "SiteTree_Live"."URLSegment", "SiteTree_Live"."Title", "SiteTree_Live"."MenuTitle", "SiteTree_Live"."Content", "SiteTree_Live"."MetaDescription", "SiteTree_Live"."ExtraMeta", "SiteTree_Live"."ShowInMenus", "SiteTree_Live"."ShowInSearch", "SiteTree_Live"."Sort", "SiteTree_Live"."HasBrokenFile", "SiteTree_Live"."HasBrokenLink", "SiteTree_Live"."ReportClass", "SiteTree_Live"."CanViewType", "SiteTree_Live"."CanEditType", "SiteTree_Live"."ShowMap", "SiteTree_Live"."StaticMap", "SiteTree_Live"."Version", "SiteTree_Live"."ParentID", "SiteTree_Live"."ID", CASE WHEN "SiteTree_Live"."ClassName" IS NOT NULL THEN "SiteTree_Live"."ClassName" ELSE 'SiteTree' END AS "RecordClassName" FROM "SiteTree_Live" WHERE ("SiteTree_Live"."URLSegment" = 'home' AND "SiteTree_Live"."ParentID" = 0) ORDER BY "SiteTree_Live"."Sort" ASC LIMIT 1,256)
DB.php:208
DB::query(SELECT DISTINCT "SiteTree_Live"."ClassName", "SiteTree_Live"."Created", "SiteTree_Live"."LastEdited", "SiteTree_Live"."URLSegment", "SiteTree_Live"."Title", "SiteTree_Live"."MenuTitle", "SiteTree_Live"."Content", "SiteTree_Live"."MetaDescription", "SiteTree_Live"."ExtraMeta", "SiteTree_Live"."ShowInMenus", "SiteTree_Live"."ShowInSearch", "SiteTree_Live"."Sort", "SiteTree_Live"."HasBrokenFile", "SiteTree_Live"."HasBrokenLink", "SiteTree_Live"."ReportClass", "SiteTree_Live"."CanViewType", "SiteTree_Live"."CanEditType", "SiteTree_Live"."ShowMap", "SiteTree_Live"."StaticMap", "SiteTree_Live"."Version", "SiteTree_Live"."ParentID", "SiteTree_Live"."ID", CASE WHEN "SiteTree_Live"."ClassName" IS NOT NULL THEN "SiteTree_Live"."ClassName" ELSE 'SiteTree' END AS "RecordClassName" FROM "SiteTree_Live" WHERE ("SiteTree_Live"."URLSegment" = 'home' AND "SiteTree_Live"."ParentID" = 0) ORDER BY "SiteTree_Live"."Sort" ASC LIMIT 1,256)
SQLQuery.php:945
SQLQuery->execute()
DataList.php:751
DataList->first()
DataObject.php:2908
DataObject::get_one(SiteTree,"SiteTree"."URLSegment" = 'home' AND "SiteTree"."ParentID" = 0)
ModelAsController.php:111
ModelAsController->getNestedController()
ModelAsController.php:75
ModelAsController->handleRequest(SS_HTTPRequest,DataModel)
RootURLController.php:130
RootURLController->handleRequest(SS_HTTPRequest,DataModel)
Director.php:366
Director::handleRequest(SS_HTTPRequest,Session,DataModel)
Director.php:152
Director::direct(/,DataModel)
main.php:189

Real pity as upgrading to MAMP 3 fixed the ModRewrite problem I've been having for eons...

Avatar
martimiz

Forum Moderator, 1106 Posts

14 August 2014 at 4:56am

Unknown column 'SiteTree_Live.ShowMap' in 'field list'

This looks like you either didn't do a /dev/build/?flush=1 after adding the 'ShowMap' field, or you removed the field but still try to use it from some part of your code?

Avatar
arthurdent

Community Member, 170 Posts

14 August 2014 at 9:04am

Thanks for your comments martimiz. Unfortunately it's not that simple -- I have done /dev/build/ and ?flush=all (not ?flush=1 but would that make a difference?) many, many times and I always get screeds of errors -- it seems to do some kind of loop. Must admit at the end I didn't really know what to do next -- I was removing added functions (GoogleMaps, forms etc) to try to get back to a base SilverStripe install. Then I tried to run a clean install of SS ('Simple' theme and new DB) and it was throwing the same errors. From Cam's comments I've put it down to the face that SilverStripe simply doesn't like Apache 2.4 which comes bundled with MAMP 3...

Avatar
martimiz

Forum Moderator, 1106 Posts

14 August 2014 at 10:24pm

Edited: 14/08/2014 10:25pm

Hmm, I'm sorry, can't get my MAMP 3 to use Apache 2.4 (on OSX Mountain Lion), so I can't reproduce specific 2.4 issues.

The first thing to do would indeed be to install a completely fresh version of SilverStripe (new code, default mysite, no extra modules, new db, new whatever). Then see if your install still complains about a missing field, which it shouldn't. Then post the first error you get, and take it from there...

Afaik the error you posted above is definitely not a 2.4 issue...

Go to Top