I am still trying to setup a second instance of Horde on my server. I am
trying to setup Horde 3 for development while Horde 2.2 functions on the
default directory. I have setup Horde 3 under directory "hordexp." I have
changed the cookie path in the conf.php file, and updated the path info in
registry.php. When I go to the main Horde webpage to login, I am getting the
below message:
Fatal error: Call to a member function on a non-object
in /usr/home2/hordexp/index.php on line 28
I am showing Line 28 of index.php to be:
$initial_app = $prefs->getValue('initial_application');
Now I have not setup any users or preferences with in the MySQL database
currently being used for login and preference settings. Could this be causing
the problem, or is the variable 'initial_application' not setup someone in the
PHP files?
I have also copied my 'horde' application entry from the registry.php file
below in case it helps.
==== Registry.php file extract ====
$this->applications['horde'] = array(
'fileroot' => dirname(__FILE__) . '/..',
'webroot' => '/hordexp',
'initial_page' => 'login.php',
'icon' => '/hordexp/graphics/horde.gif',
'name' => _("Horde"),
'allow_guests' => true,
'status' => 'active',
'templates' => dirname(__FILE__) . '/../templates',
'provides' => 'horde'
);
Any assistance would be greatly appreciated.
-James
--
Horde mailing list
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: horde-un...@lists.horde.org
$_prefs['initial_application'] = array(
'value' => '',
'locked' => false,
'shared' => true,
'type' => 'select',
'desc' => sprintf(_("What application should %s display after login?"), $GLO
BALS['registry']->getParam('name'))
);
-James
Quoting Chuck Hagenbuch <ch...@horde.org>:
> Quoting James Van Sickle <goth...@spamcop.net>:
>
> > Fatal error: Call to a member function on a non-object
> > in /usr/home2/hordexp/index.php on line 28
>
> What does your 'prefs' config look like in horde/config/conf.php.
>
> -chuck
>
> --
> Charles Hagenbuch, <ch...@horde.org>
> The alligators were there, too, in a bathtub inside the house.
> Here is what the section on 'intial_application' looks like. Let me know
> if you would like me to include more of the file.
No ...
> > What does your 'prefs' config look like in horde/config/conf.php.
^^^^^^^^^^^^^^^^^^^^^
$conf['prefs']['driver'] = 'sql';
$conf['prefs']['params'] = array();
$conf['prefs']['maxsize'] = null;
I have left the rest of the pref settings such as LDAP driver info commented
out.
-James
> Doh! Need coffee. Here are the Prefs settings from the conf.php file.
>
> $conf['prefs']['driver'] = 'sql';
> $conf['prefs']['params'] = array();
> $conf['prefs']['maxsize'] = null;
And do you have valid connection params in $conf['sql']? Do you successfully
connect to the db? What do the db logs say?
I noticed there was no "$conf['prefs']['params']['table'] = 'horde_prefs';"
setting in the conf.php file for Horde 3, but am not sure if that is still
valid on this version.
$conf['sql']['phptype'] = 'mysql';
$conf['sql']['protocol'] = 'tcp';
// $conf['sql']['socket'] = '/var/lib/mysql/mysql.sock';
// $conf['sql']['port'] = 5432;
$conf['sql']['hostspec'] = 'localhost';
$conf['sql']['username'] = 'hordexp'
$conf['sql']['password'] = '****';
$conf['sql']['database'] = 'hordexp';
$conf['sql']['charset'] = 'iso-8859-1';
-James
> Here is what I have for the settings. I can use these same settings to
> access the db on the command prompt. I also changed the settings to match
> the second database I use for my production Horde 2.2 app. I still get
> the same message in both cases, however.
What do you see if you put a var_dump($prefs) on the line before it dies?
NULL
Fatal error: Call to a member function on a non-object
in /usr/home2/hordexp/index.php on line 2
-James
> I added "var_dump($prefs);" and got the following results:
>
> NULL
Okay... why is it not in context? Does var_dump($GLOBALS['prefs']) work
better? Can you put in a debug_backtrace() to see the call stack?
debug_backtrace();
var_dump($GLOBALS['prefs']);
Results:
NULL NULL
Fatal error: Call to a member function on a non-object
in /usr/home2/hordexp/index.php on line 31
-James (DBA learning PHP)
> I added those the below two lines before the "var_dump($prefs);" line. I
> am getting roughly the same results, except an additional NULL added
> before the error message. I did not get anything from the debug_trace(),
> but am not sure if this correct location you wanted?
>
> debug_backtrace();
You need to var_dump(debug_backtrace()), or otherwise capture the output of
it.
Results: array(0) { }
-James
> I added "var_dump(debug_backtrace());" to the file and got:
I give up, then. No idea what's going on.