05 December 2013
How to play .mov video?
Install VLC Media Player.
03 December 2013
How To Enable Services Remote Registry from GPO
http://vicryhc.wordpress.com/2012/12/13/how-to-enable-services-remote-registry-from-gpo/
1. Open Run and type “gpmc.msc”
2. Create New Group Policy Object, example “GPO-Enable Remote Registry”
3. Link “GPO-Enable Remote Registry” in your Organization Unit to push GPO
4. Edit “GPO-Enable Remote Registry”
5. Computer Configuration –> Policies –> Windows Settings –> Security Settings –> System Services
6. Edit “Remote Registry from Not Defined to Automatic”
7. Open Command Prompt then type “gpupdate/force” from Server and client for update Policy immediately.
CMIIW, Thanks
1. Open Run and type “gpmc.msc”
2. Create New Group Policy Object, example “GPO-Enable Remote Registry”
3. Link “GPO-Enable Remote Registry” in your Organization Unit to push GPO
4. Edit “GPO-Enable Remote Registry”
5. Computer Configuration –> Policies –> Windows Settings –> Security Settings –> System Services
6. Edit “Remote Registry from Not Defined to Automatic”
7. Open Command Prompt then type “gpupdate/force” from Server and client for update Policy immediately.
CMIIW, Thanks
14 November 2013
11 November 2013
How to put a Flash animation (swf) onto a web page?
<embed width="480" height="150" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="/dat/files/3378.swf" menu="true" loop="true" play="true"></embed>
31 October 2013
How to determine whether a computer is running a 32-bit version or 64-bit version of the Windows operating system
http://support.microsoft.com/kb/827218
29 October 2013
Database is Read-Only
Problem: After attaching a database to MS SQL Server, the database is displayed as 'Read-Only'.
Description: I created a folder on volume E:\, and put the database I downloaded from SysAid in the folder. After I attached the database to MS SQL Server, the database was displayed as 'Read-Only'.
Solution: Grant 'Everyone' 'Full Control' access to the folder, then attach it.
Description: I created a folder on volume E:\, and put the database I downloaded from SysAid in the folder. After I attached the database to MS SQL Server, the database was displayed as 'Read-Only'.
Solution: Grant 'Everyone' 'Full Control' access to the folder, then attach it.
28 October 2013
How to open an .mdf file? (How to attach a database to MS SQL Server?)
http://www.youtube.com/watch?v=rhIr9Qf-oHw
24 October 2013
Can NOT send emails to a person from Office Outlook, but can from Outlook Web App
Exchange server email accounts
Can NOT send emails to a person from Office Outlook, but can from Outlook Web App
Cause: Outlook saves a cache (offline) address book. It seems to take one or two days to update the cache. After the update, we can send emails to the person from Outlook.
Solution: We can not wait one or two days before sending emails to the person. Click Tools | Account Settings | Change. Clear the check mark in front of 'Use Cached Exchange Mode'. Re-start Outlook.
Can NOT send emails to a person from Office Outlook, but can from Outlook Web App
Cause: Outlook saves a cache (offline) address book. It seems to take one or two days to update the cache. After the update, we can send emails to the person from Outlook.
Solution: We can not wait one or two days before sending emails to the person. Click Tools | Account Settings | Change. Clear the check mark in front of 'Use Cached Exchange Mode'. Re-start Outlook.
21 October 2013
Woodside Copier Driver Installation
Woodside copier driver installation
* Download the driver from Sharp website - MXM260_Win32_SPLC_En_1305a.exe
Note: MXM260_Win32_PCLPS_En_1305a.exe would not work.
* Run it.
* Select 'Connected via network'.
* Select 'LPT1'.
* Add port - 192.168.6.196
* Select 'Custom'. In 'Settings', change 'Raw' into 'LPR' (as long as it is a copier, then change 'Raw' into 'LPR', otherwise you will often meet 'Offline' problem.
* LPR settings - type in 'lp' in Queue Name.
* Done.
* Download the driver from Sharp website - MXM260_Win32_SPLC_En_1305a.exe
Note: MXM260_Win32_PCLPS_En_1305a.exe would not work.
* Run it.
* Select 'Connected via network'.
* Select 'LPT1'.
* Add port - 192.168.6.196
* Select 'Custom'. In 'Settings', change 'Raw' into 'LPR' (as long as it is a copier, then change 'Raw' into 'LPR', otherwise you will often meet 'Offline' problem.
* LPR settings - type in 'lp' in Queue Name.
* Done.
14 October 2013
Reset Forgotten MySql root Password Under Windows
http://www.jovicailic.org/2012/04/reset-forgotten-mysql-root-password-under-windows/
If you forgot root password for your MySQL database server running under Microsoft Windows, there is still a way to access your database and even reset your password using the command prompt.
Follow next steps:
1. Stop your MySQL server completely. This can be done from Wamp(if you use it), or start “services.msc” using Run window, and stop the service there.
2. Open your MS-DOS command prompt using “cmd” inside the Run window. Then go to your MySQL bin folder, such as C:\MySQL\bin. Path is different if you use Wamp.
3. Execute the following command in the command prompt:
5. Go to your MySQL bin folder again.
6. Enter “mysql” and press enter.
7. You should now have the MySQL command prompt working. Type “use mysql;” so that we switch to the “mysql” database.
8. Execute the following command to update the password:
After you are finished close the first command prompt, and type “exit;” in the second command prompt.
You can now start the MySQL service. That’s it.
If you forgot root password for your MySQL database server running under Microsoft Windows, there is still a way to access your database and even reset your password using the command prompt.
Follow next steps:
1. Stop your MySQL server completely. This can be done from Wamp(if you use it), or start “services.msc” using Run window, and stop the service there.
2. Open your MS-DOS command prompt using “cmd” inside the Run window. Then go to your MySQL bin folder, such as C:\MySQL\bin. Path is different if you use Wamp.
3. Execute the following command in the command prompt:
mysqld.exe -u root --skip-grant-tables4. Leave the current MS-DOS command prompt as it is, and open a new MS-DOS command prompt window.
5. Go to your MySQL bin folder again.
6. Enter “mysql” and press enter.
7. You should now have the MySQL command prompt working. Type “use mysql;” so that we switch to the “mysql” database.
8. Execute the following command to update the password:
(UPDATE user SET Password = PASSWORD('your_new_passowrd')
WHERE User = 'root';)
UPDATE user SET authentication_string = PASSWORD('your_new_passowrd')
WHERE User = 'root';However, you can now run almost any SQL command that you wish.
After you are finished close the first command prompt, and type “exit;” in the second command prompt.
You can now start the MySQL service. That’s it.
07 August 2013
Only see a part of the computers, servers and other network resources in a network
Only see a part of the computers, servers and other network resources in a domain?
Solution:
DNS server manager, under DNS, right-click the server name, choose 'Set aging/scavenging for all zones...'.
Tick 'Scavenge stale resource records'.
Right-click 'Reverse Lookup Zones', choose 'Set aging/scavenging for all zones...'.
Tick 'Scavenge stale resource records'.
Solution:
DNS server manager, under DNS, right-click the server name, choose 'Set aging/scavenging for all zones...'.
Tick 'Scavenge stale resource records'.
Right-click 'Reverse Lookup Zones', choose 'Set aging/scavenging for all zones...'.
Tick 'Scavenge stale resource records'.
04 July 2013
How to embed a Youtube video clip?
<iframe height="315" src="http://www.youtube.com/embed/WJO_eox6EsQ" frameborder="0" width="420" allowfullscreen=""></iframe>
A better way -
<embed width="480" height="150" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="/dat/files/3048.swf" menu="true" loop="false" play="true"></embed>
A better way -
<embed width="480" height="150" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="/dat/files/3048.swf" menu="true" loop="false" play="true"></embed>
27 June 2013
Staff's network drives often get disconnected
The static IP address of file server is in the DHCP IP scope. In the IP lease list, we can see the IP address was assigned by another machine. When there is a network connection problem with the file server, its IP address was assigned by another machine. When the network connection problem is fixed, there may be an IP address conflict between the another machine and the file server, resulting that
20 June 2013
Add the Administrator’s Account to the Welcome Screen in XP Pro
http://www.petri.co.il/add_the_administrators_account_to_the_welcome_screen_in_xp_pro.htm
To add the administrator's account to the welcome screen in Windows XP:
- Open Registry Editor.
- In Registry Editor, navigate to the following registry key:
HKEY_LOCAL_MACHINE'SOFTWARE'Microsoft'Windows NT'CurrentVersion'Winlogon'SpecialAccounts'UserList
|
- Create the following entry:
Administrator: REG_DWORD
- Assign a value of 1.
- Close Registry Editor.
18 June 2013
Laptop computer shuts down automatically
Laptop computer shuts down automatically a few minutes after it is powered on.
Solution:
Clean the inside (especially CPU).
Solution:
Clean the inside (especially CPU).
07 May 2013
Not operatable at all when logged on with an account
Symptom: Not operatable at all, e.g. you see nothing or things not relevent when you click Start, etc.
Resolution:
Delete the account, then re-create the account.
Resolution:
Delete the account, then re-create the account.
06 May 2013
Computer automatically restarts
Services | Power | Recovery | First failure, choose 'Take no action'.
24 April 2013
HTML code to play flash swf in IE, Chrome, and Firefox
<object width="400" height="40"
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/
pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
< param name="SRC" value="bookmark.swf">
< embed src="bookmark.swf" width="400" height="40">
< /embed>
< /object>
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/
pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
< param name="SRC" value="bookmark.swf">
< embed src="bookmark.swf" width="400" height="40">
< /embed>
< /object>
HTML code to play WMV video in IE, Chrome and Firefox
Note: Chrome and Firefox would NOT play .wmv
<object width="100%" height="100%"
type="video/x-ms-asf" url="3d.wmv" data="3d.wmv"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param name="url" value="3d.wmv">
<param name="filename" value="3d.wmv">
<param name="autostart" value="1">
<param name="uiMode" value="full">
<param name="autosize" value="1">
<param name="playcount" value="1">
<embed type="application/x-mplayer2" src="3d.wmv" width="100%" height="100%" autostart="true" showcontrols="true" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>
</object>
<object width="100%" height="100%"
type="video/x-ms-asf" url="3d.wmv" data="3d.wmv"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param name="url" value="3d.wmv">
<param name="filename" value="3d.wmv">
<param name="autostart" value="1">
<param name="uiMode" value="full">
<param name="autosize" value="1">
<param name="playcount" value="1">
<embed type="application/x-mplayer2" src="3d.wmv" width="100%" height="100%" autostart="true" showcontrols="true" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>
</object>
15 April 2013
06 April 2013
RRAS will not start
A complete solution to the RRAS won’t start with 8007042a or event ID 7024, aka the “routing remote access unable to load Iprtrmgr.dll” problem.
History: The history of this error, which has mostly gone unsolved, dates back to Windows 2000.
Platforms affected: Windows Server 2008 R2, Server 2008, Server 2003 R2, Server 2003, Server 2000 (both 32-bit and 64-bit installs are affected).
Error Messages:
Event ID: 7024 The Routing and Remote Access service terminated with service-specific error 2 (0x2).
Event ID: 7024 The Routing and Remote Access service terminated with service-specific error 31 (0x1F).
Event ID: 7024 The Routing and Remote Access service terminated with service-specific error 20205 (0x4EED).
Event ID: 7024 The Routing and Remote Access service terminated with service-specific error 193 (0xC1).
Event ID: 20103 Unable to load C:\WINDOWS\System32\iprtrmgr.dll . (32-bit installs).
Event ID: 20103 Unable to load C:\WINDOWS\SysWOW64\iprtrmgr.dll . (64-bit installs).
Cause: There are two basic causes for this error.
An incorrect key in the registry if you are running IPv6.
TCP/IPv4 corruption.
Related causes:
This has happened to me on a couple of Dell Windows 2003 R2 64-bit servers that had Broadcom NetXtreme II adapters. My problem was the second cause above, TCP/IP corruption, which I believe that happens for some reason when you install the driver for the Broadcom adapter. It certainly may happen with other adapters, but there were definitely a high number of unsolved cases on the Internet with various Broadcom adapters.
Additional factors:
This happened even on clean installs as I tested using both the Dell-specific Windows Server 2003 R2 media, and Microsoft media downloaded from the Volume License site. It happens with either media.
Troubleshooting that did not work for me, or most people on the Internet:
Reinstalling clean.
Running sfc /scannow (I got no errors).
Comparing, and replacing, the iprtrmgr.dll’s from a working server.
Reinstalling the NIC’s after deleting them from Device Manager.
Running “NETSH INT IP RESET C:\reset.log” or “NETSH RESET WINSOCK”.
Running “NETSH WINSOCK RESET”.
Checking for ghost adapters after setting devmgr_show_nonpresent_devices=1 and then showing hidden devices in Device Manager (I had none).
Reregistering Oledb32.dll and Oledb32r.dll , and renaming C:\Windows\System32\ias \dnary.mdb, and ias.mdb files and restarting RRAS. Those files are located in the C:\Windows\SysWOW64 directory on 64-bit systems. This was in KB840696 http://support.microsoft.com/kb/840686.
Solutions:
If you have Server 2008, and are running TCP/IPv6, your problem is probably not TCP/IPv4 corruption, but rather that you have this extra key, HKEY_LOCAL_MACHINE\System\currentcontrolset\services\remoteaccess\routermanagers\IPV6, which you will remove after you back it up by exporting it. Removing this key was an easy solution that widely helped many people on the Internet.
If you still want to use the TCP/IPv6 protocol you may have to do more. Since I did not apply to my server, and I could not test it, you may still have IPv6 corruption, and may want to troubleshoot by removing and reinstalling the TCP/IPv6, akin to the solution below. The above solution may just be masking potential corruption by avoiding the issue.
If you are not running IPv6, the chances are that you have TCP/IPv4 corruption, and the solution is to reinstall it. If you have never noticed, if you try to uninstall TCP/IP, it is grayed out. To get around that, I followed KB 325356: http://support.microsoft.com/kb/325356 . That says it is for a domain controller, but works on member servers also. The steps are:
Just in case, disable RRAS in the RRAS mmc, as this will uninstall it.
Backup your registry.
Ignore steps 1-4, and step 21 if you are just on a member server.
1.Restart the domain controller.
2.When the BIOS information appears, press F8.
3.Select Directory Services Restore Mode, and then press ENTER.
4.Use the Directory Services Restore Mode password to log on.
5.Click Start, and then click Run.
6.In the Open box, type regedit, and then click OK.
7.Locate the following registry subkeys:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Winsock
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Winsock2
8.Right-click each key, and then click Delete.
9.Click Yes to confirm the deletion of each key.
10.Close Regedit.
11.Locate the Nettcpip.inf file in %winroot%\inf, and then open the file in Notepad.
12.Locate the [MS_TCPIP.PrimaryInstall] section.
13.Edit the Characteristics = 0xa0 entry and replace 0xa0 with 0x80.
14.Save the file, and then exit Notepad.
15.In Control Panel, double-click Network Connections, right-click Local Area Connection, and then select Properties.
16.On the General tab, click Install, select Protocol, and then click Add.
17.In the Select Network Protocols window, click Have Disk.
18.In the Copy manufacturer's files from: text box, type c:\windows\inf, and then click OK.
19.Select Internet Protocol (TCP/IP), and then click OK. (Note: This step will return you to the Local Area Connection Properties screen, but now the Uninstall button is available).
20.Select Internet Protocol (TCP/IP), click Uninstall, and then click Yes.
21.Restart your computer, and then select Directory Services Restore Mode as mentioned in steps 2 - 4.
22.In Control Panel, double-click Network Connections, right-click Local Area Connection, and then select Properties.
23.On the General tab, click Install, select Protocol, and then click Add.
24.In the Select Network Protocols window, click Have Disk.
25.In the Copy Manufacturer's files from text box, type c:\windows\inf, and then click OK.
26.Select Internet Protocol (TCP/IP), and then click OK.
27.Restart your computer.
Configure and Enable Routing and Remote Access.
At this point, your RRAS should start.
Related problem and solution:
When I would enter a static IP address, although it would hold the static, the properties would reset back to “Obtain an IP address automatically”. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network and delete the Config key. Reenter your static settings, and they should hold, and rebuild that Config key.
I hope this solves this difficult problem for many of you.
Best Regards,
Kevin Cotreau
MCSE+I, MSDBA, MCNE
Edited by KCotreau Monday, June 11, 2012 5:08 AM
History: The history of this error, which has mostly gone unsolved, dates back to Windows 2000.
Platforms affected: Windows Server 2008 R2, Server 2008, Server 2003 R2, Server 2003, Server 2000 (both 32-bit and 64-bit installs are affected).
Error Messages:
Event ID: 7024 The Routing and Remote Access service terminated with service-specific error 2 (0x2).
Event ID: 7024 The Routing and Remote Access service terminated with service-specific error 31 (0x1F).
Event ID: 7024 The Routing and Remote Access service terminated with service-specific error 20205 (0x4EED).
Event ID: 7024 The Routing and Remote Access service terminated with service-specific error 193 (0xC1).
Event ID: 20103 Unable to load C:\WINDOWS\System32\iprtrmgr.dll . (32-bit installs).
Event ID: 20103 Unable to load C:\WINDOWS\SysWOW64\iprtrmgr.dll . (64-bit installs).
Cause: There are two basic causes for this error.
An incorrect key in the registry if you are running IPv6.
TCP/IPv4 corruption.
Related causes:
This has happened to me on a couple of Dell Windows 2003 R2 64-bit servers that had Broadcom NetXtreme II adapters. My problem was the second cause above, TCP/IP corruption, which I believe that happens for some reason when you install the driver for the Broadcom adapter. It certainly may happen with other adapters, but there were definitely a high number of unsolved cases on the Internet with various Broadcom adapters.
Additional factors:
This happened even on clean installs as I tested using both the Dell-specific Windows Server 2003 R2 media, and Microsoft media downloaded from the Volume License site. It happens with either media.
Troubleshooting that did not work for me, or most people on the Internet:
Reinstalling clean.
Running sfc /scannow (I got no errors).
Comparing, and replacing, the iprtrmgr.dll’s from a working server.
Reinstalling the NIC’s after deleting them from Device Manager.
Running “NETSH INT IP RESET C:\reset.log” or “NETSH RESET WINSOCK”.
Running “NETSH WINSOCK RESET”.
Checking for ghost adapters after setting devmgr_show_nonpresent_devices=1 and then showing hidden devices in Device Manager (I had none).
Reregistering Oledb32.dll and Oledb32r.dll , and renaming C:\Windows\System32\ias \dnary.mdb, and ias.mdb files and restarting RRAS. Those files are located in the C:\Windows\SysWOW64 directory on 64-bit systems. This was in KB840696 http://support.microsoft.com/kb/840686.
Solutions:
If you have Server 2008, and are running TCP/IPv6, your problem is probably not TCP/IPv4 corruption, but rather that you have this extra key, HKEY_LOCAL_MACHINE\System\currentcontrolset\services\remoteaccess\routermanagers\IPV6, which you will remove after you back it up by exporting it. Removing this key was an easy solution that widely helped many people on the Internet.
If you still want to use the TCP/IPv6 protocol you may have to do more. Since I did not apply to my server, and I could not test it, you may still have IPv6 corruption, and may want to troubleshoot by removing and reinstalling the TCP/IPv6, akin to the solution below. The above solution may just be masking potential corruption by avoiding the issue.
If you are not running IPv6, the chances are that you have TCP/IPv4 corruption, and the solution is to reinstall it. If you have never noticed, if you try to uninstall TCP/IP, it is grayed out. To get around that, I followed KB 325356: http://support.microsoft.com/kb/325356 . That says it is for a domain controller, but works on member servers also. The steps are:
Just in case, disable RRAS in the RRAS mmc, as this will uninstall it.
Backup your registry.
Ignore steps 1-4, and step 21 if you are just on a member server.
1.Restart the domain controller.
2.When the BIOS information appears, press F8.
3.Select Directory Services Restore Mode, and then press ENTER.
4.Use the Directory Services Restore Mode password to log on.
5.Click Start, and then click Run.
6.In the Open box, type regedit, and then click OK.
7.Locate the following registry subkeys:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Winsock
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Winsock2
8.Right-click each key, and then click Delete.
9.Click Yes to confirm the deletion of each key.
10.Close Regedit.
11.Locate the Nettcpip.inf file in %winroot%\inf, and then open the file in Notepad.
12.Locate the [MS_TCPIP.PrimaryInstall] section.
13.Edit the Characteristics = 0xa0 entry and replace 0xa0 with 0x80.
14.Save the file, and then exit Notepad.
15.In Control Panel, double-click Network Connections, right-click Local Area Connection, and then select Properties.
16.On the General tab, click Install, select Protocol, and then click Add.
17.In the Select Network Protocols window, click Have Disk.
18.In the Copy manufacturer's files from: text box, type c:\windows\inf, and then click OK.
19.Select Internet Protocol (TCP/IP), and then click OK. (Note: This step will return you to the Local Area Connection Properties screen, but now the Uninstall button is available).
20.Select Internet Protocol (TCP/IP), click Uninstall, and then click Yes.
21.Restart your computer, and then select Directory Services Restore Mode as mentioned in steps 2 - 4.
22.In Control Panel, double-click Network Connections, right-click Local Area Connection, and then select Properties.
23.On the General tab, click Install, select Protocol, and then click Add.
24.In the Select Network Protocols window, click Have Disk.
25.In the Copy Manufacturer's files from text box, type c:\windows\inf, and then click OK.
26.Select Internet Protocol (TCP/IP), and then click OK.
27.Restart your computer.
Configure and Enable Routing and Remote Access.
At this point, your RRAS should start.
Related problem and solution:
When I would enter a static IP address, although it would hold the static, the properties would reset back to “Obtain an IP address automatically”. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network and delete the Config key. Reenter your static settings, and they should hold, and rebuild that Config key.
I hope this solves this difficult problem for many of you.
Best Regards,
Kevin Cotreau
MCSE+I, MSDBA, MCNE
Edited by KCotreau Monday, June 11, 2012 5:08 AM
03 April 2013
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 newpwd
or for Windows:
php .\scripts\password-hash.sh newpwd
NOTE: 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$CTo9G7Lx28rzCfpn4WB2hUlknDKv6QTqHaf82WLbhPT2K5TzKzML
Then 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@ss
15 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-tables
option. This enables anyone to connect without a password and with all privileges. Because this is insecure, you might want to use--skip-grant-tables
in conjunction with--skip-networking
to 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;
TheFLUSH
statement 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)