Announcement

Symphony's issue tracker has been moved to Github.

Issues are displayed here for reference only and cannot be created or edited.

Browse

Closed#609: Saving Preferences causes Fatal Error

When saving preferences, the page was white screening. So I turned on display_errors in .htaccess.

php_flag display_errors on

For whatever reason, this is only happening on our production server:

Fatal error: Method Configuration::__toString() must not throw an exception in /home/symphony/public_html/symphony/lib/core/class.administration.php on line 0

The server environment has the following specs:

  • Apache/2.2.14 (Ubuntu)
  • PHP Version 5.3.2-1ubuntu4.7
  • MySQL server version: 5.0.83-community-log
  • MySQL client version: 5.1.41

Checking out version Symphony 2.2 doesn't make a difference.

Do you have any extensions enabled?

Yes, I have several extensions enabled. I suppose I posted this issue prematurely (didn't test extensively). Just wondering whether anyone has seen an issue like this before.

I'll do some tests to see whether the same thing happens on a clean install or whether it's an extension that's causing the issue. We have another production server running an older version of PHP (5.2.6) that does not have this issue. So, I'm wondering what's the difference.

So, on the same server, I started with a clean install of Symphony, copied all extensions and enabled them. I clicked Save Changes on the Preferences page and the preferences were saved successfully.

So, there's no issue with Symphony here. Sorry for another false report.

There must be something wrong with my other install. I'll let you know if I find anything worth reporting.

I narrowed it down to some code in my config.php file. Removing this code fixed the error:

    ###### OPENID-AUTH ######
    'openid-auth' => array(
        'store-path' => '/home/symphony/openid',
        'sreg-required-fields' => array('fullname', 'dob'),
        'sreg-optional-fields' => array('language'),
        'login-redirect' => '/dashboard/',
        'logout-redirect' => '/login/',
    ),
    ########

So, I narrowed it down further. The array() appears to be causing the error. If I replace the arrays with NULL the error goes away.

    ###### OPENID-AUTH ######
    'openid-auth' => array(
        'store-path' => '/home/symphony/openid',
        'sreg-required-fields' => NULL,
        'sreg-optional-fields' => NULL,
        'login-redirect' => '/dashboard/',
        'logout-redirect' => '/login/',
    ),
    ########

Now I can confirm that this was the only difference between all the installs. The others did not have an array() set as a value in the config.php file. (I was trying to follow the documentation for the OpenID Authentication extension). If I change this, the other installs do not behave well either.

The Configuration class doesn't support array values.

Most extensions use a commas separated list to get around this limitation and just explode/implode on read/write.

This issue is closed.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details