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.

Archive /

Our old forums are still available as a read-only archive.

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

Can not install Blog module


Reply


3 Posts   26097 Views

Avatar
JonathanParker

Community Member, 37 Posts

14 March 2008 at 10:20am

Hi All,
I've previously posted this under the heading 'Probelm with installing blog ontop of tutorial', but this may have been missleading.
The problem I have is that I just can't install the blog module, I get Fatal errors:

System:
Windows XP Pro
Apache 2.2.6
MySql 5.0.45

WAMP 2.0 (Old WAMP5 upgraded) install.

I have tried the following on SS 2.2.1 / SS 2.2.2 rc1 & latest daily build of 14th March 2008 all with the same results.

I do a clean SS install; previous dir's are deleted and the MySql db ss_mysite has been dropped.
I install SS into my 'www' folder of my wamp install.
I go to browser & enter http://localhost/ss/ and I get the install page. I enter db password I re-evaluate and apart from a couple of orange texts stating that they can't detect if assests and one other are writable everything else is green. I select install (default black candy install), I get the welcome screen and use th eoption to delete the install files. I enter cms with the default un & pw and all looks well. The cms functions OK and I can follow the tutorials without any problems.

I unzip the Blog dowmload into a folder called 'Blog' I copy this folder into my ss install dir (in the same dir as assests, tutorial , themes, mysite and sapphire etc.
I go back to the browser http:localhost/ss/db/build?flush=1 (in an attempt to install the blog module) and I get the following:

FATAL ERROR: Bad class to singleton() - BlogEntry
At line 85 in C:\wamp\www\ss\sapphire\core\Core.php

user_error(Bad class to singleton() - BlogEntry,256)
line 85 of Core.php

singleton(BlogEntry)
line 175 of DatabaseAdmin.php

DatabaseAdmin->doBuild()
line 90 of DatabaseAdmin.php

DatabaseAdmin->build(Array)
line 253 of Controller.php

Controller->run(Array)
line 104 of Director.php

Director::direct(/db/build)
line 158 of main.php
Context
Debug (Debug::showError() in line 180 of Debug.php)

* className =

BlogEntry

* _SINGLETONS =
o Newsletter =
Database record: Newsletter
+ ID :

0

o Newsletter_SentRecipient =
Database record: Newsletter_SentRecipient
+ ID :

0

o Newsletter_Recipient =
Database record: Newsletter_Recipient
+ ID :

0

o NewsletterType =
Database record: NewsletterType
+ ID :

0

o PageComment =
Database record: PageComment
+ ID :

0

o Email_BounceRecord =
Database record: Email_BounceRecord
+ ID :

0

o Email_BlackList =
Database record: Email_BlackList
+ ID :

0

o PageView =
Database record: PageView
+ ID :

0

o SiteTree =
Database record: SiteTree
+ ID :

0

o Translatable = Translatable::__set_state(array( 'translatableFields' => array ( 0 => NULL, 1 => true, 2 => NULL, 3 => NULL, 4 => NULL, 5 => NULL, 6 => NULL, 7 => NULL, 8 => NULL, ), 'original_values' => NULL, 'owner' => NULL, 'extension_instances' => array ( ), 'class' => 'Translatable', ))
o QueuedEmail =
Database record: QueuedEmail
+ ID :

0

o File =
Database record: File
+ ID :

0

o EditableCheckboxOption =
Database record: EditableCheckboxOption
+ ID :

0

o EditableDropdownOption =
Database record: EditableDropdownOption
+ ID :

0

o EditableFormField =
Database record: EditableFormField
+ ID :

0

o EditableRadioOption =
Database record: EditableRadioOption
+ ID :

0

o SubmittedForm =
Database record: SubmittedForm
+ ID :

0

o SubmittedFormField =
Database record: SubmittedFormField
+ ID :

0

o Group =
Database record: Group
+ ID :

0

o Member =
Database record: Member
+ ID :

0

o Member_UnsubscribeRecord =
Database record: Member_UnsubscribeRecord
+ ID :

0

o Permission =
Database record: Permission
+ ID :

0

o Widget =
Database record: Widget
+ ID :

0

o WidgetArea =
Database record: WidgetArea
+ ID :

0

o Page =
Database record: Page
+ ID :

0

o GhostPage =
Database record: GhostPage
+ ID :

0

As I have said, the error is consistant across all the ss versions that I have tried. I am somewhat confused as I can see that nobody else seems to have had this problem.

Any suggestions would be appreciated regardless of how wild they may be and if more info is required then please leave a reply or send me an e-mail.

This is now causing me sleepness nights!!

Rgards.

Jonathan.

Avatar
JonathanParker

Community Member, 37 Posts

15 March 2008 at 2:06am

This problem is now resolved.

Thanks to Matt & others who help resolve this issue last night on the irc freenode #silverstripe chat channel. The problem was identified as the use of short tags '<?' as apposed to standard tags '<?php' within two of the code files in the blog module. The files concerned were BlogEntry.php & BlogHolder.php in both cases replacing the php start tag from '<?' to '<?php' solved the fatal erros that I was getting when trying to install the Blog module.

It does suggest in the silverstripe install procedure that short tags should be enabled, this would have prevented this error from hapening; however the problem would have happend again when the site was moved to a live server as most do not have short tags enabled.

I hope the above is of help for any others in the future who experience the same or simillar problems to those I have experienced.

Thanks to all that helped.

Regards.

Jonathan

Avatar
Jan

Community Member, 9 Posts

6 April 2008 at 4:40am

The short_open_tag=on option in php.ini worked for me! Thanks.