advertisement

Article:
  Installing a Wiki on Your iBook
Subject:   Wiki: php warnings
Date:   2003-06-17 00:09:09
From:   adam_alexander
Awesome article, thanks for the learning experience!


I have everything up and running, but in the footer of my Wiki there is a php warnings box with these alerts:


PHP Warnings
lib/config.php:145: Notice[8]: Object to string conversion
lib/config.php:145: Notice[1024]: Object


They do not seem to be serious errors affecting the wiki - how can i fix these up?


I am running OS X 10.2.6 and have followed all steps above. TIA for any advice.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Wiki: php warnings
    2003-06-17 13:15:03  matt_hunt [Reply | View]

    The messages you're seeing are caused by PHPwiki's locale handling. I suspect it's down to the fact that this is, strictly speaking, a development release- it's pretty good all the same.

    I assume that you're running with a locale set so you could fix up the messages by starting Apache in the C locale, e.g. if you log in as the root user using the bash shell, you can use the command:

    LC_ALL=C apachectl start

    to start Apache. This will set the default locale in Apache's environment. That should get rid of the messages, but it's a bit of a bind. You can also get rid of them by commenting out line 145 of lib/config.php in the installed PHPwiki directory. i.e. change this:

    if (!$newlocale) {
    trigger_error(fmt("Can't set locale: '%s'", $loc), E_USER_NOTICE);
    $loc = setlocale(LC_ALL, ''); // pull locale from environment.

    to this:

    if (!$newlocale) {
    // trigger_error(fmt("Can't set locale: '%s'", $loc), E_USER_NOTICE);
    $loc = setlocale(LC_ALL, ''); // pull locale from environment.
-->