[PHP] PEAR::Auth

2004-10-10 Thread 22
Concerning PEAR::Auth

I can't tune interaction between PEAR::Auth and MySQL.

 

Typical code

";

echo "";

echo "";

echo "";

echo "";

}

$a = new Auth("DB", $dsn, "loginFunction");

$a->start();

if ($a->getAuth()){

echo "OK";

}

?>

 

With typical  SQL statement:

CREATE TABLE auth(
username VARCHAR(50) default '' NOT NULL,
password VARCHAR(32) default '' NOT NULL,
PRIMARY KEY (username),
KEY (password));

 

I tried:

INSERT INTO auth VALUES ('qq', 'pp');

 

after submitting the login form the process buzzes on the procedure start();

I tried too:

INSERT INTO auth VALUES ('qq', PASSWORD('pp'));

 

I tried (using phpMyAdmin):

GRANT SELECT ,  INSERT , UPDATE , DELETE , CREATE , INDEX , ALTER ON * . * 

TO "qq"@ localhost" WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 
0 MAX_UPDATES_PER_HOUR 0 ;

 

But process buzzes on the procedure start() as before;

How to set username and password?

 

 

 

Vlad Alivanov

 

 


[PHP] PEAR::Auth

2004-10-13 Thread 22
Concerning PEAR::Auth
I can't tune interaction between PEAR::Auth and MySQL auth table .
 
Typical code from manual
";
echo "";
echo "";
echo "";
echo "";
}
$a = new Auth("DB", $dsn, "loginFunction");
$a->start();
if ($a->getAuth()){
echo "OK";
}
?>
 
With typical  SQL statement from manual:
CREATE TABLE auth(
username VARCHAR(50) default '' NOT NULL,
password VARCHAR(32) default '' NOT NULL,
PRIMARY KEY (username),
KEY (password));


I tried:
INSERT INTO auth VALUES ('qq', 'pp');
 After submitting the login form the process buzzes on the procedure start();
I tried too:
INSERT INTO auth VALUES ('qq', PASSWORD('pp'));
I tried (using phpMyAdmin):
GRANT SELECT ,  INSERT , UPDATE , DELETE , CREATE , INDEX , ALTER ON * . * 
TO "qq"@ localhost" WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 
0 MAX_UPDATES_PER_HOUR 0 ;
But process buzzes on the procedure 'start()' as before;
 
 
 
Could you show me the simple 
but concrete example of MySQL query 
that make the above php-code working with
login (for instance) 'qq' and password 'pp'.
 
 
Thank you
Vlad Alivanov
 





[PHP] password in the mysql table 'auth'

2004-10-07 Thread 22
Concerning Auth
How to set username and password in the  mysql table 'auth'.
Nothing has resulted from  direct entry into the table.

Vlad Alivanov 


[PHP] php reference behavior

2002-12-17 Thread 22 manopohuji

hi, i'm running into some weird behavior with php references.  i
distilled it down to some test code below:

 'dean' );

$var1['arrayref']  =  & $array;

$var2  =  $var1;

echo "var1:\n";
print_r( $var1 );

echo "var2:\n";
print_r( $var2 );

$var1['arrayref']  =  NULL;

echo "var1:\n";
print_r( $var1 );

echo "var2:\n";
print_r( $var2 );

?>

it seems that setting a hash key to a reference to something, and then
repointing that key to NULL, apparently sets the original 'something' to
NULL instead of just 'repointing' the hash key!  am i missing something
obvious here, or is this behavior not what you'd normally expect?  i
wrote similar code in perl, and it behaved as i expected: the second
hash still pointed to the original target (i am almost certain c/c++ and
java also behave this way).  so what is going on with php?  does anyone
know how to get it to do what i want it to do --  i.e., merely unset the
key mapping of one of the hashes, leaving the other hash still pointing
at the target?  thansk for any insight you might be able to give!

xomina





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