6.0.0-beta1
8/9/25

[#2896] sources.php IMSP bug fix
Summary sources.php IMSP bug fix
Queue Turba
Queue Version 2.0.4
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester af325798 (at) ohio (dot) edu
Created 10/31/2005 (7222 days ago)
Due
Updated 11/03/2005 (7219 days ago)
Assigned
Resolved 11/01/2005 (7221 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
11/03/2005 08:44:23 PM Michael Rubinsky Comment #5 Reply to this comment
Never mind about the print_r() statement.  I see what your doing.   
Your grabbing the internal params from the IMSP preference 
driver....which will only be present while IMSP is being used as your 
pref. backend.  Why not just put the hostname etc directly in 
sources.php itself?
Can you provide me the print_r statement you are using and the line
number and file that you are calling it so I can see how IMSP
configuration settings are getting into the prefs - as I cannot
reproduce this?

Thanks.
Mike
11/03/2005 08:29:31 PM Michael Rubinsky Comment #4 Reply to this comment
I think I misunderstood something:

the Turba's INSTALL document clearly states:

.. Important:: Turba 2.0 requires version 3.0+ of the Horde Framework -
                  earlier versions of Horde will **not** work.
The same document also states:



<pre>

  Documentation on the format and purpose of those files can be found in each

    file.  You may edit these files if you wish to customize Turba's appearance

    and behaviour. ** With the exception of the ``sources.php`` file 
the defaults

    will be correct for most sites.**



   ** You must configure ``sources.php`` to list your data sources 
(both SQL and

    LDAP if necessary).  This configuration file contains a large number of

    **examples**.  Please remove or comment out those examples that **you don't

    need**.**

</pre>



(emphasis mine)



And in sources.php.dist:



<pre>

  This file is where you specify the sources of contacts available to users

  * at your installation. It contains a large number of EXAMPLES.

</pre>



and in the imsp example section:



<pre>

// Check that IMSP is configured in Horde but fall through if there is no

// configuration at all - in case we aren't using up to date Horde install.

// In that case, be sure to change the params array below to suit your needs.

</pre>



I agree it might not have been clear enough as to what 'up to date' 
Horde install meant and a change in the comments has been added to CVS 
to help make this more clear.
Nevertheless they are correct: I am no longer getting any messages in
the error log, I checked. I even checked the contents of
$GLOBALS['prefs'] using print_r -- with second argument, it's all
there.
Can you provide me the print_r statement you are using and the line 
number and file that you are calling it so I can see how IMSP 
configuration settings are getting into the prefs - as I cannot 
reproduce this?



Thanks.

Mike
11/02/2005 04:57:11 PM af325798 (at) ohio (dot) edu Comment #3 Reply to this comment
I think I misunderstood something:



the Turba's INSTALL document clearly states:



.. Important:: Turba 2.0 requires version 3.0+ of the Horde Framework -

                   earlier versions of Horde will **not** work.



so that, I used version 3.0.4 whch was also the latest *stable* 
version at the time. I had no way of knowing that I am supposed to use 
version 3.1.



Also the "white screen" and errors persisted *after* I fixed the typo, 
that's why I started doing all this in first place.



I admit that the walues that I have assigned are from the 
inappropriate source -- prefferences and address book don't have to 
use the same protocol or server.



Nevertheless they are correct: I am no longer getting any messages in 
the error log, I checked. I even checked the contents of 
$GLOBALS['prefs'] using print_r -- with second argument, it's all there.


11/01/2005 03:16:41 AM Michael Rubinsky Comment #2
State ⇒ Not A Bug
Priority ⇒ 1. Low
Reply to this comment
I am using Turba 2.0.4 with Horde 3.0.5 and Imp H3 4.0.4, I
configured Horde to use IMAP and store prefferences in IMSP. After I
installed Turba, and picked 'imsp'  in the 'Name of client
addressbook' field. I also fixed typo at line  491: $GLOBASL instead
of $GLOBALS.
This typo has already been fixed in CVS.
What I discovered is: '$GLOBALS[conf][imsp]' is undefied, and that is
why the lines 490-492 in sources.php:
It is undefined because you are not using 3.1 version of Horde.   
Perhaps I should make it clearer in sources.php where it notes you 
need to configure those values to suit your needs.



The values you are assigning are not correct.  Check you log, you 
still see 'undefined property' errors.  The only reason they are 
working is because the IMSP code in the horde framework is assigning 
default values for you that happen to work for your installation. (You 
are running IMSP on the same machine as horde (localhost), on the 
standard port with plaintext authentication).  The spelling error in 
the example configuration is what gave you the 'white screen'.






10/31/2005 09:45:32 PM af325798 (at) ohio (dot) edu Comment #1
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ sources.php IMSP bug fix
Queue ⇒ Turba
Reply to this comment
I am using Turba 2.0.4 with Horde 3.0.5 and Imp H3 4.0.4, I configured 
Horde to use IMAP and store prefferences in IMSP. After I installed 
Turba, and picked 'imsp'  in the 'Name of client addressbook' field. I 
also fixed typo at line  491: $GLOBASL instead of $GLOBALS.



The address book would not work (blank frame) and there would be the 
following messages in the php_error_log:



[28-Oct-2005 16:34:20] PHP Notice:  Undefined index:  imsp in 
/opt/webmail/apache/htdocs/horde/turba/config/sources.php on line 490

[28-Oct-2005 16:34:20] PHP Notice:  Undefined index:  imsp in 
/opt/webmail/apache/htdocs/horde/turba/config/sources.php on line 491

[28-Oct-2005 16:34:20] PHP Notice:  Undefined index:  imsp in 
/opt/webmail/apache/htdocs/horde/turba/config/sources.php on line 492



What I discovered is: '$GLOBALS[conf][imsp]' is undefied, and that is 
why the lines 490-492 in sources.php:

             'server'   => $GLOBALS['conf']['imsp']['server'],

             'port'     => $GLOBASL['conf']['imsp']['port'],

             'auth_method' => $GLOBALS['conf']['imsp']['auth_method'],



don't work properly, essentially leaving 'server', 'port', and 
'auth_method' empty. I have replaced them with:



             'server'   => $GLOBALS['prefs']->params['server'],

             'port'     => $GLOBALS['prefs']->params['port'],

             'auth_method' => $GLOBALS['prefs']->params['auth_method'],



and the IMSP address book started to work OK.

Hope this helps.



Alexander



P.S. This issue was also mentioned in this mailing list message:



Author: John Jacob

Date: 2005-10-21 18:31 -400

To: turba

Subject: [turba] Turba 2.0.4 undefined index


Saved Queries