Current time: 05-05-2024, 11:17 PM Hello There, Guest! (LoginRegister)


Post Reply 
Cambiar pass mail desde MYSQL
Author Message
fedeagostini Offline
Junior Member
*

Posts: 15
Joined: Jun 2011
Reputation: 0
Post: #4
RE: Cambiar pass mail desde MYSQL
kdhernan, para resolver tu inconveniente, prueba con
system("/var/www/ispcp/engine/ispcp-rqst-mngr");
Lo mío es más raro, te muestro el script:
PHP Code:
#!/usr/bin/php -q
<?php
$SQLHST  
"localhost";
$SQLUSR  "root";
$ISPCPDB "ispcp;
$SQLPW = "******";

require '/var/www/ispcp/gui/include/ispcp-lib.php';

$link = mysql_connect( $SQLHST$SQLUSR$SQLPW$ISPCPDB);

if (!
$link) {
    die('no es posible establecer la conexion: ' . mysql_error());
}

$file = "/tmp/MailPwd.txt";
$f = fopen($file, "r");

while (
$line = fgets($f, 1000)){
    
$arrLinea = split(" ", $line);
    
$QUERY = "UPDATE `ispcp`.`mail_usersSET `mail_users`.`mail_pass` = '".encrypt_db_password($arrLinea[1])."', `mail_users`.`status` = 'change' WHERE `mail_users`.`mail_addrLIKE  '".$arrLinea[0]."';";
    print 
$QUERY;
    mysql_query(
$QUERY);
    printf ("
\n");
    system("
/var/www/ispcp/engine/ispcp-rqst-mngr");
}
printf ("
\n");
mysql_close(
$link);
?>
Lo que hago es leer del archivo los 1400 pares "mail" "passwd", que tengo.
pero solo me toma el cambio del último del listado.
07-24-2013 01:50 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
Cambiar pass mail desde MYSQL - kdhernan - 04-08-2013, 09:27 PM
RE: Cambiar pass mail desde MYSQL - fedeagostini - 07-24-2013 01:50 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)