php-general Digest 22 Feb 2012 14:32:20 -0000 Issue 7698

2012-02-22 Thread php-general-digest-help

php-general Digest 22 Feb 2012 14:32:20 - Issue 7698

Topics (messages 316754 through 316759):

Re: Test
316754 by: Tedd Sperling
316755 by: Jay Blanchard
316757 by: Tedd Sperling

Re: Do an LDAP Password Modify Extended Operation?
316756 by: Kirk.Johnson.zootweb.com

Re: SimpleXML and the Single String (SOLVED)
316758 by: Simon Schick
316759 by: marco.behnke.biz

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
On Feb 20, 2012, at 2:49 PM, Daniel Brown wrote:

 On Mon, Feb 20, 2012 at 14:40, Bastien phps...@gmail.com wrote:
 Definitely doesn't work
 
The list works just fine, it's you goofs who need to work now!  ;-P

It still doesn't work and I didn't get this. :-)

Cheers,

tedd


_
tedd.sperl...@gmail.com
http://sperling.com
---End Message---
---BeginMessage---
It's like coming home, I knew I could count on certain of you to make 
light of this and that makes me strangely happy.


On 2/21/2012 7:55 AM, Tedd Sperling wrote:

On Feb 20, 2012, at 2:49 PM, Daniel Brown wrote:


On Mon, Feb 20, 2012 at 14:40, Bastienphps...@gmail.com  wrote:

Definitely doesn't work

The list works just fine, it's you goofs who need to work now!  ;-P

It still doesn't work and I didn't get this. :-)

Cheers,

tedd


_
tedd.sperl...@gmail.com
http://sperling.com



---End Message---
---BeginMessage---
On Feb 21, 2012, at 9:44 AM, Jay Blanchard wrote:

 It's like coming home, I knew I could count on certain of you to make light 
 of this and that makes me strangely happy.

Seek professional help now. :-)

Cheers,

tedd

_
tedd.sperl...@gmail.com
http://sperling.com
---End Message---
---BeginMessage---
Mike Mackintosh mike.mackint...@angrystatic.com wrote on 02/17/2012 
07:25:36 PM:

 [image removed] 
 
 Re: [PHP] Do an LDAP Password Modify Extended Operation?
 
 Mike Mackintosh 
 
 to:
 
 Kirk.Johnson, PHP General List
 
 02/17/2012 07:26 PM
 
 On Feb 17, 2012, at 3:34 PM, kirk.john...@zootweb.com wrote:
 
  Mike Mackintosh mike.mackint...@angrystatic.com wrote on 02/17/2012 
  12:36:06 PM:
  
  On Feb 17, 2012, at 10:57, kirk.john...@zootweb.com wrote:
  
  Is it possible to do an LDAP Password Modify Extended Operation, as 
  specified in RFC 3062? The password hashing scheme in the LDAP 
  directory I 
  am working with may change periodically, so it is my understanding 
  that I 
  can't hash a new password according to a specific scheme, e.g., 
{SHA}, 
  on 
  my side. Instead, I should use an Extended Operation and let the 
  directory 
  do the hashing. Is that correct? The help page for ldap_set_option 
  suggests that it might be possible, but I sure can't find any 
example 
  code 
  anywhere. 
  
  TIA
  
  Kirk
  
  I have an example of this on my lab box at home. I noticed issues 
  depending on if the requesting application was Linux or windows due 
  to the different Linux LDAP libraries. 
  
  When I get home I'll forward you the example of what I have so far
  
  Woohoo! Extended Operation doesn't seem to be a practice that is in 
  wide-spread use. Looking forward to what you've come up with. Thanks.
 
 
 Kirk,
 
 What i've been trying to do, is revive the patch i found here:
 
 http://www.mail-archive.com/internals@lists.php.net/msg19665.html
 
 It provides a lot of the functionality that you can only imagine and
 more, but it fails against versions 5.3.x.
 
 I sent an email to the original maintainer, Pierangelo, but have not
 received a response yet on that status of maintenance.
 
 Do you use OpenLDAP? I am not sure if it built, if it would support AD 
or not.
 
 Mike Mackintosh
 PHP, the drug of choice - www.highonphp.com

Had a nice 3-day weekend ;)

Yes, using OpenLDAP 2.x. I found the same Internals email thread from 
Pierangelo. 

Looking at Example #2 in the documentation for ldap_set_option, it appears 
that exop's might be supported, since the example uses an OID. Did you 
play around with the LDAP_OPT_SERVER_CONTROLS option at all, or am I 
completely off track there?

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
---End Message---
---BeginMessage---
Hi, Jay

If you're not using the variable *$xmlCompany* somewhere else I'd try to
skip the array and just do it with this single line:
*$arrayLead[0]-Company = (string)
$xml-SignonRq-SignonTransport-CustId-SPName;*

The result should not differ from what you have now.

Bye
Simon

2012/2/21 Jay Blanchard jay.blanch...@sigmaphinothing.org

 Howdy,

 My PHP chops are a little rough around the edges so I know that I am
 missing something. I am working with SimpleXML to 

Re: [PHP] SimpleXML and the Single String (SOLVED)

2012-02-22 Thread ma...@behnke.biz
 There is another nice way.
You can pass a second value to the simple xml constructor which is a class
name to be used instead of SimpleXMLElement.
You can write your own class that extends SimpleXMLElement and override the
magic methods to skip the casting


Simon Schick simonsimc...@googlemail.com hat am 22. Februar 2012 um 00:16
geschrieben:

 Hi, Jay

 If you're not using the variable *$xmlCompany* somewhere else I'd try to
 skip the array and just do it with this single line:
 *$arrayLead[0]-Company = (string)
 $xml-SignonRq-SignonTransport-CustId-SPName;*

 The result should not differ from what you have now.

 Bye
 Simon

 2012/2/21 Jay Blanchard jay.blanch...@sigmaphinothing.org

  Howdy,
 
  My PHP chops are a little rough around the edges so I know that I am
  missing something. I am working with SimpleXML to retrieve values from
an
  XML file like this -
 
  $xmlCompany = $xml-SignonRq-SignonTransport-CustId-SPName;
 
  If I echo $xmlCompany I get the proper information.
 
  If I use $xmlCompany as an array value though, I get this object -
 
  $arrayLead[0]-Company = $xmlCompany; // what I did
  [Company] = SimpleXMLElement Object // what I got
 (
 [0] = Dadgummit
 )
  I tried casting AND THEN AS I TYPED THIS I figured it out...
 
  $xmlCompany = array((string)
  $xml-SignonRq-SignonTransport-CustId-SPName); // becomes an array
  $arrayLead[0]-Company = $xmlCompany[0]; // gets the right bit of the
array
 
  and the result is
 
   [Company] = Dadgummit
  Thanks for bearing with me!
 
 
 
 
 
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: ma...@behnke.biz

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SimpleXML and the Single String (SOLVED)

2012-02-22 Thread Jay Blanchard

On 2/22/2012 8:32 AM, ma...@behnke.biz wrote:

  There is another nice way.
You can pass a second value to the simple xml constructor which is a class
name to be used instead of SimpleXMLElement.
You can write your own class that extends SimpleXMLElement and override the
magic methods to skip the casting

I don't really see a need to add an extra layer or class extension when 
casting works fine. Am I wrong? Why add several lines of code in an 
extension class?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SimpleXML and the Single String (SOLVED)

2012-02-22 Thread Marco Behnke
Am 22.02.12 16:04, schrieb Jay Blanchard:
 On 2/22/2012 8:32 AM, ma...@behnke.biz wrote:
   There is another nice way.
 You can pass a second value to the simple xml constructor which is a
 class
 name to be used instead of SimpleXMLElement.
 You can write your own class that extends SimpleXMLElement and
 override the
 magic methods to skip the casting

 I don't really see a need to add an extra layer or class extension
 when casting works fine. Am I wrong? Why add several lines of code in
 an extension class?

To keep the code readable?

$value = $xml-node;

vs.

$value = (String)$xml-node;

I like the first one. Plus you handle it to dynamically to the right type

function __get($value)
{
if is float return float casted value
if is boolean ...
and so on
}

-- 
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: ma...@behnke.biz

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz




signature.asc
Description: OpenPGP digital signature


Re: [PHP] SimpleXML and the Single String (SOLVED)

2012-02-22 Thread Jay Blanchard
 I don't really see a need to add an extra layer or class extension
 when casting works fine. Am I wrong? Why add several lines of code in
 an extension class?
 
 To keep the code readable?
 
 $value = $xml-node;
 
 vs.
 
 $value = (String)$xml-node;
 
 I like the first one. Plus you handle it to dynamically to the right type
 
 function __get($value)
 {
if is float return float casted value
if is boolean ...
and so on
 }

The code is no less readable my way, YMMV

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php