![]() |
New LDAP Library! - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: New LDAP Library! (/showthread.php?tid=13211) |
New LDAP Library! - El Forum - 11-16-2008 [eluser]ray73864[/eluser] username isn't sent to the server, which is what makes it difficult, but even if it was, in a multi-domain environment you would still have to work out which domain they are viewing the page from. New LDAP Library! - El Forum - 11-16-2008 [eluser]Milos Dakic[/eluser] Hopefully someone has made something that recognises the user on the server. This would be a very cool thing to have in a very large business. But for now I think having AD and CodeIgniter in one is a good start. New LDAP Library! - El Forum - 11-17-2008 [eluser]Iverson[/eluser] [quote author="ray73864" date="1226898446"]username isn't sent to the server, which is what makes it difficult, but even if it was, in a multi-domain environment you would still have to work out which domain they are viewing the page from.[/quote] You can get a username. The problem is that I can't figure out how to get the $auth var without sending the headers (see code below). So far I can get definitely get the username from this code. I'm posting my code in hopes of getting more eyes on this. This is definitely needed in the PHP community so I'm trying to focus most of my spare time in solving this :coolsmirk: Code: <?php New LDAP Library! - El Forum - 12-01-2008 [eluser]Unknown[/eluser] I merely copied the Ldap.php file into the libraries folder, but I after a page reload I recieved the following message. Quote:Severity: Notice Line 1001 is the return of the following function. Code: function random_controller() Did I miss something? New LDAP Library! - El Forum - 12-18-2008 [eluser]jbawarren[/eluser] [quote author="traveler" date="1228160724"]I merely copied the Ldap.php file into the libraries folder, but I after a page reload I recieved the following message. Quote:Severity: Notice[/quote] I get the same error. New LDAP Library! - El Forum - 12-19-2008 [eluser]Iverson[/eluser] The example I provided in the user guide shows that you have to specify domain controllers. I would expect you to get an error if you didn't tell the lib what domain controllers to use. Code: // The constant "LDAP_SERVER1" has been defined in config/constants.php New LDAP Library! - El Forum - 12-19-2008 [eluser]Iverson[/eluser] On another note, I think using CI and enjoying it's "plug & play" mentality, too many times we don't read through documentation and just expect stuff to work. I just saw a post that asked if there was a CI function to use to get the number of items in an array. C'mon guys. Let's not let CI spoil us to the point where we forget to declare variables and forget functions that come built in with PHP. New LDAP Library! - El Forum - 01-13-2009 [eluser]sidog[/eluser] I get the same error: Code: A PHP Error was encountered Here is what I have in the constants.php: define ('LDAP_SERVER1', 'our-ad.ad.ppeservices.com'); I'm running CI 1.7. Has this been an issue? Also, the note below in the example could be worded better: // The constant "LDAP_SERVER1" has been defined in config/constants.php it has? Who did it for me? You mean, "must be defined" and not "has been defined". New LDAP Library! - El Forum - 01-13-2009 [eluser]Iverson[/eluser] [quote author="sidog" date="1231897523"]I get the same error: Here is what I have in the constants.php: define ('LDAP_SERVER1', 'our-ad.ad.ppeservices.com'); I'm running CI 1.7. Has this been an issue? Also, the note below in the example could be worded better: // The constant "LDAP_SERVER1" has been defined in config/constants.php it has? Who did it for me? You mean, "must be defined" and not "has been defined".[/quote] I'm also running CI 1.7. There is a certain level of competency expect when members post code. At least there is for me. If some doesn't understand certain PHP concepts, then that's where they need to start instead of trying to jump headfirst into CI. I would ASSUME that you the programmer would know that when I said that the Ldap server has been defined that I didn't magically predict what ldap server you were going to use this helper with and define it in YOUR constants.php file (that I don't have access to). If we're being technical, saying "must be defined" would also be incorrect because that constant doesn't HAVE to be defined in constants.php. It can be defined where you want to successfully define it. I've never seen a domain in that format so I have no idea why you're getting that error. As far as the last error, have you actually installed the php5-ldap module? Use phpinfo() to find out. Guess I should have mentioned that too. Don't know what OS (or should I say Operating System) you're running, but in the Windows environment, that error can be caused by old DLLs after all other settings are tuned the right way. http://www.incredium.com/php-ldap-connect-error New LDAP Library! - El Forum - 01-13-2009 [eluser]sidog[/eluser] Hey Iverson, Glad you didn't take my suggestion for a more grammatically correct example comment too hard. There are probably people that would have feelings of hurt and anger if someone pointed out that their English language skills may not be as strong as their PHP language skills. At any rate, I will use your suggestions and links and try to work out a fix. Thank you P.S. Sorry, I'm just very frustrated with this ldap stuff. I'm very grateful that you took the time to release and support such a badly needed library. |