31 March 2013
Animation without Flash or JavaScript
http://www.techrepublic.com/blog/webmaster/html5-and-css3-animation-without-flash-or-javascript/873
03 March 2013
Forgot Drupal 7 site administrator password
http://drupal.org/node/1023428
But first, you have to generate a password hash that is valid for your site.
Execute the following commands from the command line, in the Drupal root directory:
or for Windows:
The script will output a password hash that is valid for the site. Copy this to the clipboard or write it down somewhere; you'll need it for the next step. Be careful not to include more or less characters as the hash. These hashes look somewhat like
Then execute the following query on the Drupal database:
To execute this query it will be necessary to login to the database.
This is typically done through the command line or through a GUI
interface such as phpMyAdmin.
This flood table records username and ip which has failed login attempts.
Anything that follows the double-dash will be passed to password-hash.sh.
Resetting the administrator password with sql-query (Drupal 7)
Last updated February 25, 2013. Created by Heine on January 11, 2011.
Edited by LeeHunter, batigolix, emag, negativefix. Log in to edit this page.
When, in Drupal 7, the password for user 1 (the administrator) is lost and the email notification or drush methods don't work, it is possible to set the password via a database query.Edited by LeeHunter, batigolix, emag, negativefix. Log in to edit this page.
But first, you have to generate a password hash that is valid for your site.
Execute the following commands from the command line, in the Drupal root directory:
./scripts/password-hash.sh newpwdor for Windows:
php .\scripts\password-hash.sh newpwdNOTE: If you receive an error that PHP is not a recognized command then you need to add php to the system PATH. For example: ;c:\wamp\bin\php\php5.3.8\ . This will then work in the Command Prompt. Once completed right click in Command Prompt window to mark the text and copy the hash code.Of course, change "newpwd" to the desired password. If the password contains special characters such as a space, * or ? you must escape them, or wrap the password in quotes appropriate for the shell used.
The script will output a password hash that is valid for the site. Copy this to the clipboard or write it down somewhere; you'll need it for the next step. Be careful not to include more or less characters as the hash. These hashes look somewhat like
$S$CTo9G7Lx28rzCfpn4WB2hUlknDKv6QTqHaf82WLbhPT2K5TzKzMLThen execute the following query on the Drupal database:
UPDATE users SET pass ='$S$CTo9G7Lx28rzCfpn4WB2hUlknDKv6QTqHaf82WLbhPT2K5TzKzML' WHERE uid = 1;Clear flood table
If you have reset password either by using script or "request new password" but still receive "Sorry, there have been more than 5 failed login attempts for this account. It is temporarily blocked." then you may delete the corresponding entry in flood table.This flood table records username and ip which has failed login attempts.
Reset using a PHP-file
No command-line access? You can reset the password using a PHP-file as well, but keep in mind that this opens a arises a huge security issue if not handled correctly.Pass root param
If you're on windows and you want to pass the root param to the script, you'll need this:php -f password-hash.sh -- --root "C:\wamp\www\" newp@ss15 February 2013
How to reset password of mysql to none?
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
For Windows, use
mysql\bin>mysqld-nt --skip-grant-tables
For Windows, use
mysql\bin>mysqld-nt --skip-grant-tables
C.5.4.1.3. Resetting the Root Password: Generic Instructions
The preceding sections provide password-resetting instructions for Windows and Unix systems. Alternatively, on any platform, you can set the new password using the mysql client (but this approach is less secure):
- Stop mysqld and restart it with the
--skip-grant-tablesoption. This enables anyone to connect without a password and with all privileges. Because this is insecure, you might want to use--skip-grant-tablesin conjunction with--skip-networkingto prevent remote clients from connecting. - Connect to the mysqld server with this command:
shell>
mysql - Issue the following statements in the mysql client. Replace the password with the password that you want to use.
mysql>
UPDATE mysql.user SET authentication_string=PASSWORD('MyNewPass')->WHERE User='root';mysql>FLUSH PRIVILEGES;TheFLUSHstatement tells the server to reload the grant tables into memory so that it notices the password change.
You should now be able to connect to the MySQL server as
root using the new password. Stop the server, then restart it normally (without the --skip-grant-tables and --skip-networking options).14 February 2013
How to set up Mercury email server within xampp?
http://www.larryullman.com/forums/index.php?/topic/433-setting-up-mercury-mail-with-xampp/
How to set up Mercury email server within xampp?
How to add email accounts?
How to send an email from PHP?
How to set up Mercury email server within xampp?
How to add email accounts?
How to send an email from PHP?
23 January 2013
09 January 2013
01 January 2013
MySQL does not display Chinese
NOTE: Generally, 3 places - (1) When creating a database, you should include character set; (2) In head section of html code of a web page, you should define character set; (3) after mysql_select_db, you should include mysql_query("set names gbk;"). That is all.
(1) In the file 'my.ini', add the following two lines:
[client]
default-character-set=gbk
[mysqld]
character-set-server=gbk
Restarted MySQL server.
(2) When creating a database, use -
create database [database name] character set 'gbk' collate 'gbk_chinese_ci';
(3) Run the command 'show create table ...'.
mysql>show create table [table name];
Check what the default default charset is.
If it is not 'gbk', change it into 'gbk'.
The method is -
create table if not exists '[table name]' (
...
) engine=InnoDB default charset=gbk;
(4) In the PHP page, after the statement -
mysql_select_db("dbname", $db);
Add the following statement -
mysql_query("set names gbk;");
After the above 3 actions, Chinese will be displayed.
(1) In the file 'my.ini', add the following two lines:
[client]
default-character-set=gbk
[mysqld]
character-set-server=gbk
Restarted MySQL server.
(2) When creating a database, use -
create database [database name] character set 'gbk' collate 'gbk_chinese_ci';
(3) Run the command 'show create table ...'.
mysql>show create table [table name];
Check what the default default charset is.
If it is not 'gbk', change it into 'gbk'.
The method is -
create table if not exists '[table name]' (
...
) engine=InnoDB default charset=gbk;
(4) In the PHP page, after the statement -
mysql_select_db("dbname", $db);
Add the following statement -
mysql_query("set names gbk;");
After the above 3 actions, Chinese will be displayed.
Subscribe to:
Posts (Atom)