Jump to:

559 Posts in 3589 Topics by 245 members

Hosting Requirements

SilverStripe Forums » Hosting Requirements » ReflectionClass errors when using SS 2.4.7 on PHP5.4.2

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

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

Page: 1 2
Go to End
Author Topic: 3798 Views
  • bennettpr
    Avatar
    Community Member
    37 Posts

    ReflectionClass errors when using SS 2.4.7 on PHP5.4.2 Link to this post

    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

  • Futureweb
    Avatar
    Community Member
    233 Posts

    Re: ReflectionClass errors when using SS 2.4.7 on PHP5.4.2 Link to this post

    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

  • Futureweb
    Avatar
    Community Member
    233 Posts

    Re: ReflectionClass errors when using SS 2.4.7 on PHP5.4.2 Link to this post

    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...

  • bennettpr
    Avatar
    Community Member
    37 Posts

    Re: ReflectionClass errors when using SS 2.4.7 on PHP5.4.2 Link to this post

    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

  • Futureweb
    Avatar
    Community Member
    233 Posts

    Re: ReflectionClass errors when using SS 2.4.7 on PHP5.4.2 Link to this post

    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...

  • liefra
    Avatar
    Community Member
    5 Posts

    Re: ReflectionClass errors when using SS 2.4.7 on PHP5.4.2 Link to this post

    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

  • bennettpr
    Avatar
    Community Member
    37 Posts

    Re: ReflectionClass errors when using SS 2.4.7 on PHP5.4.2 Link to this post

    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

  • liefra
    Avatar
    Community Member
    5 Posts

    Re: ReflectionClass errors when using SS 2.4.7 on PHP5.4.2 Link to this post

    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

    3798 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.