Koozali.org: home of the SME Server

Horde 3 "Use of undefined constant"

Offline Smitro

  • *
  • 349
  • +0/-0
Horde 3 "Use of undefined constant"
« on: April 29, 2006, 12:20:28 AM »
Hi,
 (sorry for the long post)
I did an update on my server (SME 6.5) and durring the process it updated webmail. The problem is, it was already updated to horde 3. So it was kinda a downgrade.

Since then, I have run the latest horde upgrade script and I now get the following errors. When trying to access webmail.
Code: [Select]

Notice: Use of undefined constant  - assumed '' in /usr/share/pear/Log/syslog.php on line 150

Notice: Use of undefined constant - assumed '' in /usr/share/pear/Log/syslog.php on line 150

Notice: Use of undefined constant c - assumed 'c' in /usr/share/pear/Log/syslog.php on line 150

Notice: Use of undefined constant - assumed '' in /usr/share/pear/Log/syslog.php on line 150

Notice: Use of undefined constant - assumed '' in /usr/share/pear/Log/syslog.php on line 150

Notice: Use of undefined constant  - assumed '' in /usr/share/pear/Log/syslog.php on line 150

Notice: Use of undefined constant - assumed '' in /usr/share/pear/Log/syslog.php on line 150

Notice: Use of undefined constant 9 - assumed '9' in /usr/share/pear/Log/syslog.php on line 150


This is what happened durring the install.
Code: [Select]

Downloading files from http://mirror.contribs.org/smeserver/contribs/jbennett/horde30


Installing Horde 3.0 on SME 6.5.....

Preparing...                ########################################### [100%]
   1:cpp                    ########################################### [ 25%]
   2:glibc-kernheaders      ########################################### [ 50%]
   3:glibc-devel            ########################################### [ 75%]
   4:gcc                    ########################################### [100%]

Checking pear Modules

Skipping package "pear/Log", already installed as version 1.8.7
No valid packages found
install failed
Skipping package "pear/Date", already installed as version 1.4.3
No valid packages found
install failed
Skipping package "pear/File", already installed as version 1.2.0
No valid packages found
install failed
Skipping package "pear/Mail_Mime", already installed as version 1.3.0
No valid packages found
install failed

If you are not using the Primary I-bay for your Primary Domain web content,
then type in your primary domain I-bay name below, otherwise hit enter to continue.

myprimaryibay

You have typed in the I-bay named: myprimaryibay
as being used for your primary domain web content, is this correct? (Y/N/Enter)

Downloading Horde Components

Uncompressing and moving horde components

Upgrading Horde 2.0 to Horde 3.0 Framework

ERROR 1146 at line 9: Table 'horde.horde_prefs' doesn't exist

Upgrading Turba tables
ERROR 1146 at line 12: Table 'horde.turba_objects' doesn't exist
Installing Kronolith tables
Installing Mnemo tables
Installing Nag tables

Installing base Horde configurations
mv: cannot stat /etc/e-smith/templates/home/httpd/html/horde/turba/config/sources.php': No such file or directory
ln: ./adminhordesetup': File exists
ln: ./adminhordesave': File exists
Finishing up horde installation...

rm: cannot remove /etc/e-smith/events/post-install/S55conf-horde-startup': No such file or directory
rm: cannot remove /etc/e-smith/events/post-install/S60conf-horde': No such file or directory
rm: cannot remove /etc/e-smith/events/post-install/S70conf-turba-startup': No such file or directory
rm: cannot remove /etc/e-smith/events/post-upgrade/S55conf-horde-startup': No such file or directory
rm: cannot remove /etc/e-smith/events/post-upgrade/S60conf-horde': No such file or directory
rm: cannot remove /etc/e-smith/events/post-upgrade/S70conf-turba-startup': No such file or directory
rm: cannot remove /etc/e-smith/events/email-update/S60conf-imp': No such file or directory
rm: cannot remove /etc/e-smith/events/email-update/S70conf-turba': No such file or directory
rm: cannot remove /etc/e-smith/events/bootstrap-console-save/S60conf-imp': No such file or directory
rm: cannot remove /etc/e-smith/events/bootstrap-console-save/S70conf-turba': No such file or directory
Stopping crond:                                            [   OK   ]
Starting crond:                                            [   OK   ]


Stopping httpd-e-smith:                                    [   OK   ]
Starting httpd-e-smith:                                    [   OK   ]

Saving current Horde configuration settings


Rebuilding Web Server Manager Left Panel Cache... Can take up to a minute.

Horde 3.0 Components have been successfully installed

[root@box1 horde]#


I've searched and searched but cannot seem to find any help.

Is there maybe some way I can return it to it's previous state, so I can start the install again.

I have tried this:
http://mirror.contribs.org/smeserver/contribs//jbennett/howto/Horde-SME-Recover.htm

It returns me to the origional horde, but it is still showing the errors.

It's still useable, but you have to scroll past all the errors to get to your mail.

I have looked through the syslog.php file and it would seem that this function is the problem.
Code: [Select]

function _toSyslog($priority)
    {
        static $priorities = array(
            PEAR_LOG_EMERG   => LOG_EMERG,
            PEAR_LOG_ALERT   => LOG_ALERT,
            PEAR_LOG_CRIT    => LOG_CRIT,
            PEAR_LOG_ERR     => LOG_ERR,
            PEAR_LOG_WARNING => LOG_WARNING,
            PEAR_LOG_NOTICE  => LOG_NOTICE,
            PEAR_LOG_INFO    => LOG_INFO,
            PEAR_LOG_DEBUG   => LOG_DEBUG
        );

        /* If we're passed an unknown priority, default to LOG_INFO. */
        if (!is_int($priority) || !in_array($priority, $priorities)) {
            return LOG_INFO;
        }


(I could be wrong). But line 150 is the last line of the $priorities array.
.........

Offline Smitro

  • *
  • 349
  • +0/-0
Horde 3 "Use of undefined constant"
« Reply #1 on: April 29, 2006, 01:09:27 AM »
I seemed to have some how fixed it.

I edited the syslog.php file commented out the array that was causing the problem. It threw more errors at me than before, so I put it back the way it was by uncommenting the lines and then saving. and now, for some reason it works fine. Maybe even a restart might fix this for those that run into this in future.
.........

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Horde 3 "Use of undefined constant"
« Reply #2 on: May 19, 2006, 06:10:54 PM »
on 6.x - pear upgrade Log should fix this issue.

At least it did for me.

YMMV,

JB
......

Offline Smitro

  • *
  • 349
  • +0/-0
Horde 3 "Use of undefined constant"
« Reply #3 on: May 20, 2006, 02:12:39 AM »
I acctually found what I would call the "real" solution to this.

After some googleing and what not, it's acctually part of the config for horde.

The problem is in this file:
/home/httpd/html/horde/config/conf.php

Error reporting is set to E_ALL this means that things that arn't even errors are being displayed. For example if a varible is tested, but not acctually used then it is showing up with a notice.

To fix it.

1. Login to webmail as admin.
2. Click on Administration on the left.
3. Click on Setup
4. Click on Horde in the center frame.
5. You should see all the setup options for horde
 the first opiton is the value of error reporting.
 change that from the default of "E_ALL" to "E_ERROR"
6. Click the "Generate Horde Configuration" button.
7. You then need to apply this config. To do this open the server manager
"https://server-name/server-manager/" and login as admin.
8. Click on "Horde Admin Save"

And you should be done. Then of course test it out.

HTH
.........