Hi All,

I've just tried my python-ldap + webware hello world program under
linux(suse9) and it works fine.

I've now confirmed the same "can't connect to ldap server error" under
solaris 8 and solaris 10.

Here's the code I'm using which works fine under linux, but pukes
under solaris. (Note the ldap libs work find under solaris when I run
either under apache or from the command line)

from ExamplePage import ExamplePage
from time import *
import ldap

class ShowTime(ExamplePage):

        def __init__( self ):
                ExamplePage.__init__( self )

                self.l = ldap.open( 'MYHOST.mydomain.com', 389 )
                self.l.bind( "", "" )

                self.searchScope   = ldap.SCOPE_SUBTREE
                self.baseDN_people = "ou=people,ou=global,dc=mycompany,dc=com"
                
        def awake( self, trans ):
                ExamplePage.awake( self, trans )

        def writeContent(self):

                l             = self.l
                rattrs        = None
                resid         = None
                searchFilter  = "(&(cn=jpasko))"
                
                resid = l.search( self.baseDN_people,
self.searchScope, searchFilter, rattrs )
                res = []
                while 1:

                        result_type, result_data = l.result( resid, 0 )
                        
                        if (result_data == []):
                                break
                        else:
                                res.append( result_data )

                self.write( res )
                
        def sleep(  self, trans ):
                self.l.unbind()


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Webware-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to