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.

Hosting Requirements /

What you need to consider when choosing a hosting provider and plan.

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

ReflectionClass errors when using SS 2.4.7 on PHP5.4.2


Go to End


20 Posts   13774 Views

Avatar
bennettpr

Community Member, 37 Posts

28 May 2012 at 12:04pm

Hi all,

I recently upgraded my local machine to PHP 5.4.2 in order to run the SS3 Beta 2. The beta runs fine, but existing SS2.4.7 sites are throwing an odd error when trying to save edited pages:

Saves are returning a 500 error: "Uncaught ReflectionException: Access to non-public constructor of class Transliterator" at line 90 of /path/to/site/sapphire/core/Object.php"

There seems to be an issue with the fact that the constructor for Transliterator isn't explicitly declared as a public method, but even when I change the constructor to a public method the same error is returned (!?)

Any advice?

This seems to be the only issue stopping my existing SS2.4.7 sites from running successfully on PHP 5.4.2

Avatar
JonShutt

Community Member, 244 Posts

29 May 2012 at 9:48am

Same issue here.

I'm guessing my hosting company have just upgraded the PHP version, and now silverstripe won't install - all previously installed copies worked, so SS works, just not the installer...

My PHP version is 5.2.17

Avatar
JonShutt

Community Member, 244 Posts

29 May 2012 at 10:31am

Acutally, I've also found that it is affecting existing sites - I can no longer create new pages.

ERROR [User Error]: Uncaught ReflectionException: Access to non-public constructor of class Transliterator
IN POST /mysite/admin/AddPageOptionsForm
Line 90 in /home/future/public_html/firefighters/sapphire/core/Object.php

Same error - I can however right click and duplicate a page. However, it's not ideal...

Avatar
bennettpr

Community Member, 37 Posts

29 May 2012 at 12:46pm

Hi Futureweb,

Perhaps this isn't PHP version related then, as I have sites running on few versions of PHP 5.3.x and they are fine.
I have rolled my local dev environment back to PHP 5.3.8 and this has stopped the ReflectionException errors though.
Seems like an odd bug, hopefully someone will be able to offer some advice, as I'd rather not hack the core if avoidable.

Paul

Avatar
JonShutt

Community Member, 244 Posts

29 May 2012 at 1:08pm

Hi,

infact, I did just update the php version, and it's fixed it all for me...

still not sure why it broke in the first place, but hey ho...

Avatar
liefra

Community Member, 5 Posts

12 June 2012 at 4:14am

Hi

I'm also having difficulties running an existing SS 2.4.7 version on PHP 5.4.3 (OS: Fedora 17 64 Bit)

The first error message I get is: Notice: Array to string conversion. This is due to some PHP changes in > 5.4. I tried to disable error_messages in _config.php and php.ini, but I cannot get rid of this notice

Did anyone manage to run SS 2.4.7 on PHP > 5.4?

Would be great to hear if it could be done

Thanks a lot
Frank

Avatar
bennettpr

Community Member, 37 Posts

12 June 2012 at 8:13am

Hi all,

I'm not sure 2.4.7 on PHP 5.4 will be viable.
SilverStripe's current internal focus is on launching the RC of version 3.0 (which requires PHP5.4) and they'll have to stop updating and patching the 2.4 core at some point as they move more work to version 3.0.

My plan is to keep running 2.4 sites on PHP5.3 and then move to SS 3.0 / PHP 5.4 once the first RC is released.

Paul

Avatar
liefra

Community Member, 5 Posts

13 June 2012 at 2:12pm

Hi Paul

thanks for your reply. I do use for now an additional PHP 5.3 installation and once SS 3 is released I'll also see how much work an update will be

Cheers, Frank

Go to Top