Saturday, June 16, 2012

Reset Administrator Password in Windows Server 2008

- Boot from your Windows 2008 Installation CD
- Click 'Repair your Computer' option
- Follow through until you get the option 'Open the Command Prompt' -> Click it and open the Command Window
- Type in the following Command:

"Move C:\Windows\System32\Utilman.exe C:\Windows\System32\Utilman.exe.bak"

Now copy 'cmd.exe' and rename to 'Utilman.exe'. Here is the command for that:

COPY C:\Windows\System32\cmd.exe C:\Windows\System32\Utilman.exe

Now go ahead and 'Reboot' your PC

At the logon screen -> Click the 'Ease of access' icon

This will open a command prompt window where you can reset the 'Administrator' password

Commands for that below:

net user administrator *

Press Enter

Type in the new password and confirm it

Note: You won't see the password as you type it, but its there in the memory..

Once you log in to your PC normally, delete the 'Utilman.exe' file and rename 'Utilman.exe..bak' to exe..


:)

Wednesday, May 30, 2012

CODEIGNITER URL REWRITING ON IIS 7

Below configs helped me fixing issue with pages other than homepage which was giving a 404 error because of url rewrite issue.

Make sure URL Rewrite module is installed on IIS.

Open IIS Manager -> go to your site -> “URL Rewrite” so double-click it.

In the top-right click “Add Rule(s)”

Select “Blank Rule” under “Inbound Rules” and click OK.

Enter “Strip index.php” in the Rule Name text box.

Enter “^(.*)$” into the pattern text box.

Expand Conditions and add a rule each for “Is not a file” and “Is not a directory”
Under Actions, in the Rewrite URL text box enter “index.php/{R:1}” and untick “Append query string”
Click “Apply”

Edit your CI system/application/config/config.php file and set   $config[‘index_page’] = “”;

Good Luck :)

Wednesday, May 9, 2012

Custom Run Command


Create your own Run Command 
========================
Step 1: Go to “Start,” “Run,”  and type regedit.
Step 2: Navigate to the following:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Apps Path
Step 3: Create a new folder/key under Apps Path. (Right-Click Apps Path and click “New,” “Key.”)
Step 4: Title the new folder/key the name of the application, e.g. firefox.exe.
Step 5: Right-Click the default string value and click Modify.
Step 6: Change the value to the path of the executable you are attempting to run. E.g. C:\Program Files\Mozilla Firefox\firefox.exe.
Step 7: Create a new “String Value” by right-clicking under the default value  and select “New,” “String Value.” Name it Path and enter the value as the same path you previously entered.

Step 8: Done! Now, all you need to do is go to “Start,” “Run,” and type the name of your command!

(I haven't tested it yet, if u guys find any probs, pls comment)

Wednesday, May 2, 2012

Set adodb connection in Windows Server 2008

Use the below tool for setting Adodb connection in Windows 2008 Server

c:\Windows\SysWOW64\odbcad32.exe


:)

Enable ASP error on IIS7


As a result of security paranoia, ASP's default behavior of sending script errors (including line number and code snippet to the browser has been turned off .  So instead of seeing the typical error you would see ASP throw, you will now see this:
------------------------------------------------------------------------------------------------------------
An error occurred on the server when processing the URL. Please contact the system administrator
------------------------------------------------------------------------------------------------------------

To revert back to IIS6- behavior, simply run the following command:
%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true

Enjoy :)

Monday, February 6, 2012

Client does not support authentication protocol requested by server; consider upgrading MySQL client

Website was developed in .NET framework and DB in MySQL.

In my scenario, client was using 'ByteFX.Data.MySqlClient.' to establish the connection to db.


Issue was because, new kind of password encryption was not support in this case. So need to update DB user password to use old method.


Solution :

Login to MySQL

Reset the password using command : 

SET PASSWORD FOR ''=OLD_PASSWORD('');

Eg: SET PASSWORD FOR 'tradsigns' = OLD_PASSWORD('abcdefg');


:)

Wednesday, February 1, 2012

Set ODBTP Connection (Connect to MS SQL server from Linux Web Server)

You need to install ODBTP client service in MS SQL Server machine when you try to connect to a MS SQL Database from a Linux Web Server.

Error often showed on this is:

Warning: [ODBTPERR][0]Unable to connect to server (Connection refused)


Solution:
------------
Download the package from http://sourceforge.net/projects/odbtp/


Installing the ODBTP Service on Windows NT / 2000 / XP Pro
===========================================

1. Create a directory for ODBTP service executables, i.e.,
   "md C:\ODBTP".

2. Copy odbtpctl.exe, odbtpsrv.exe and odbtpsrv.ini into directory.
   These files are stored in /winservice.

3. Open a command prompt window, change to the directory where you
   put the service executables, and then run the following commands:

        odbtpctl install
        odbtpctl start

Note: Once installed, the service can be stopped / started via
the Windows Service Control Manager.

Make sure that the service is set to start 'Automatic'

Do below things on the Linux Box
=======================

Installation of ODBTP PHP Extension
--------------------------------------

Static Version:

1. Make a directory called "odbtp" under the /ext
   directory.

2. Copy all files from /php/ext/odbtp to
   /ext/odbtp.

3. "cd" to and run ./buildconf.

4. Run ./configure and include the --with-odbtp option along
   with any other desired configure options.

5. Make and install PHP.


Shared Version:

1. Change to the directory /php/ext.

2. Open the file Makefile with a plain text editor, such as vi, and
   change the value of PHP_INCROOT, if necessary.

3. Run "make".

4. Copy the file php_odbtp.so to a location where it can be loaded in
   a PHP script with the dl() function.


Example PHP scripts that can be used for testing are contained in
/php/examples. The file odbtptest.sql can be used
to build the table and stored procedures used by the init.php,
list.php and rollback.php scripts.


***************************************************