2010年11月13日星期六

[fw-auth] Ldap extension not loaded

I am trying to authenticate via LDAP. I am getting the message "0x7002: LDAP
extension not loaded". I have checked everything and compared it to other
servers where I am successfully using LDAP. Everything appears the same.

I decided to create a simple php script like below, utilizing the code from
/Zend/Ldap.php:

<?php

if (!extension_loaded('ldap')) {
echo 'LDAP Extension not loaded!';
} else {
echo 'Good to go!';
}
?>

I ran this script on the other servers from which I can successfully
authenticate via LDAP, and then on the server that I'm getting the "not
loaded" message on.

On all of them I am getting the "Good to go!" message from my script.

So my question is, why is my little test script returning a "Good" on
finding the extension, but the Framework is not? What am I missing? Is there
something else I can check? This is Framework 1.9.6.
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/Ldap-extension-not-loaded-tp3041379p3041379.html
Sent from the Zend Auth mailing list archive at Nabble.com.

2010年11月12日星期五

Re: [fw-db] dynamic databases in the same mysql

One option would be to reference tables with schema-qualified names.
Provided the databases are hosted on the same MySQL instance, you can
query from any database regardless of which database is your "default"
to which you are connected. You can execute joins between tables that
live in different databases. You can even declare inter-database
foreign keys.

Regards,
Bill Karwin

On Nov 9, 2010, at 7:52 PM, seawolf wrote:

> i have a mysql server installed and one or more databases will be
> created
> everyday. for example, today i have databases A and B. tomorrow C
> and D will
> be created by some scripts automatically. so how do i configure my
> zend
> framework to use all my databases in my same mysql server?
>
> --
> seawolf

2010年11月9日星期二

[fw-db] dynamic databases in the same mysql

i have a mysql server installed and one or more databases will be created
everyday. for example, today i have databases A and B. tomorrow C and D will
be created by some scripts automatically. so how do i configure my zend
framework to use all my databases in my same mysql server?

--
seawolf

Re: [fw-auth] Validating Password while logged in and not loosing session

I think that is fair enough, you make a good argument.

Authentication is one of those "cross cutting concerns": it touches the
application layer (session stuff) as well as the model layer (user &
credentials).

By asking for the password again, while not the first authentication,
this prevents against account hijacking the account if the physical user
leaves the session running without logging out.

Either way, as long as you can make a compelling argument as to why you
plan to put code where it goes, and it makes sense from a maintenance of
code perspective, you cannot be wrong.

-ralph

On 11/9/10 10:54 AM, Hector Virgen wrote:
> I think it's reasonable to re-use the auth adapter in this case.
>
> Although the user has previously authenticated (e.g. on the login page), the
> point in asking the user for the password again is to re-enforce
> authentication. If it were simply a matter of trusting the identity
> persisted in the session, there wouldn't be any point in asking for the
> password.
>
> --
> *Hector Virgen*
> Sr. Web Developer
> http://www.virgentech.com
>

Re: [fw-auth] Validating Password while logged in and not loosing session

I think it's reasonable to re-use the auth adapter in this case.

Although the user has previously authenticated (e.g. on the login page), the
point in asking the user for the password again is to re-enforce
authentication. If it were simply a matter of trusting the identity
persisted in the session, there wouldn't be any point in asking for the
password.

--
*Hector Virgen*
Sr. Web Developer
http://www.virgentech.com

On Tue, Nov 9, 2010 at 7:10 AM, Ralph Schindler <ralph.schindler@zend.com>wrote:

> I do not think I would use the authentication adapter to do what you are
> attempting to do.
>
> Basically, if the user is already logged in, they are past the point of
> "authentication", or, "ensuring the validity of an identity to persist".
>
> What you are doing here is a job more specific to the user model itself.
> While you are free to piggy back this functionality into the Zend_Auth layer
> components, I think it better fits in like this:
>
> Your controller would
>
> class UserService {
> public function changePassword(User $u, $oldPassword, $newPassword,
> $confirmPassword) {
> // ensure passwords are the same, old password is ok
> // update the password in the user object
> // persist user object somehow
> }
> }
>
> which would interact with a model via the user object:
>
> class User {
> protected $_password;
> public function setPassword($password) {}
> public function getPassword() {}
> }
>
> That way you are not putting this logic inside of authentication.
>
> -ralph
>
>
> On 11/5/10 9:17 AM, Fozzyuw wrote:
>
>>
>> Hi all,
>>
>> Here's a seemingly simple question.
>>
>> I have a "update your password" form. It asks for:
>>
>> * The current password
>> * The new password
>> * Confirm the new password (repeat it for comparison)
>>
>> What I do is simple:
>>
>> Zend_Form validates the password rules and that the confirmation password
>> matches.
>> I call Zend_Auth to see if the current password is valid.
>> I update the password if all things are valid.
>>
>> The problem I've encountered is that Zend_Auth will kill the session with
>> the "->isValid()" method if the password entered is wrong.
>>
>> In other words, if you want to change your password, and you miss-typed
>> the
>> current password, you will be logged out of the account because Zend_Auth
>> failed.
>>
>> Is there a way to simply ask Zend_Auth to validate the credentials without
>> effecting the session?
>>
>> I've not cracked open the Zend_Auth code, but I've tried to search for any
>> one asking this same question and I'm either not asking the right keywords
>> to search or it's just not that frequently asked.
>>
>> One obvious thing I can do is simply not use Zend_Auth, just do simple SQL
>> password comparison using Zend_Db, which is fine, but I feel like it just
>> makes more sense using Zend_Auth.
>>
>> Thanks in advance for any discussion on this topic!
>> Cheers!
>> Fozzy
>>
>>
>>
>

Re: [fw-auth] Validating Password while logged in and not loosing session

I do not think I would use the authentication adapter to do what you are
attempting to do.

Basically, if the user is already logged in, they are past the point of
"authentication", or, "ensuring the validity of an identity to persist".

What you are doing here is a job more specific to the user model itself.
While you are free to piggy back this functionality into the Zend_Auth
layer components, I think it better fits in like this:

Your controller would

class UserService {
public function changePassword(User $u, $oldPassword, $newPassword,
$confirmPassword) {
// ensure passwords are the same, old password is ok
// update the password in the user object
// persist user object somehow
}
}

which would interact with a model via the user object:

class User {
protected $_password;
public function setPassword($password) {}
public function getPassword() {}
}

That way you are not putting this logic inside of authentication.

-ralph

On 11/5/10 9:17 AM, Fozzyuw wrote:
>
> Hi all,
>
> Here's a seemingly simple question.
>
> I have a "update your password" form. It asks for:
>
> * The current password
> * The new password
> * Confirm the new password (repeat it for comparison)
>
> What I do is simple:
>
> Zend_Form validates the password rules and that the confirmation password
> matches.
> I call Zend_Auth to see if the current password is valid.
> I update the password if all things are valid.
>
> The problem I've encountered is that Zend_Auth will kill the session with
> the "->isValid()" method if the password entered is wrong.
>
> In other words, if you want to change your password, and you miss-typed the
> current password, you will be logged out of the account because Zend_Auth
> failed.
>
> Is there a way to simply ask Zend_Auth to validate the credentials without
> effecting the session?
>
> I've not cracked open the Zend_Auth code, but I've tried to search for any
> one asking this same question and I'm either not asking the right keywords
> to search or it's just not that frequently asked.
>
> One obvious thing I can do is simply not use Zend_Auth, just do simple SQL
> password comparison using Zend_Db, which is fine, but I feel like it just
> makes more sense using Zend_Auth.
>
> Thanks in advance for any discussion on this topic!
> Cheers!
> Fozzy
>
>

Re: [fw-formats] Re: Grouping results in Zend Lucene Search

I'm not sure if there's a method like you mentioned (have you checked the
API docs?) But you might be able to accomplish this by doing three separate
searches.

Also, have you considered the possibility that a search term might match
more than one field? For example, a search for "john" might return the user
name "john" who also has "john" as his first name. In that case he would
appear in two categories. How you plan on tackling that problem (if it's a
problem at all) might affect how you go about implementing this.

--
Hector Virgen
Sent from my Droid X