Posts

Repair Ntldr in Windows Xp

To resolve this behavior, replace the Windows XP Ntldr and Ntdetect.com files. Follow these steps: Start the Recovery Console, type fixboot at the prompt, and then press ENTER. If the Recovery Console does not appear, follow these steps: Use one of the following methods to start the computer so that you can access the file system of the boot partition: Specify another operating system on the Boot menu. Start from the Windows XP CD-ROM, and then at the Windows Setup screen, press "R" to use the Recovery Console to repair the Windows installation. Use a Windows NT 4.0 boot disk that also contains the Windows XP boot files. If your boot partition is a basic disk that is formatted with the FAT file system, use an MS-DOS boot disk. Copy the Ntldr and Ntdetect.com files from the I386 folder on the Windows XP CD-ROM to the root folder of your boot drive. The boot drive is typically drive C. If you are using MS-DOS to perform this file replacement, you may have to remove the ...

Prevent USB Drives from Spreading Viruses

Disable the autorun feature 1. Launch the Registry editor ( Start | Run | regedit ); 2. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\ CurrentVersion\Policies\Explorer; 3. Double-click NoDriveTypeAutoRun in the right-hand pane and set its value to hexadecimal FF .

Phpize give error

I'm trying to execute phpize: phpize: line 57: aclocal: command not found I've just installed: automake autoconf by using RPMs.

Apache:400 Bad request

Error message in Browser- Bad Request Your browser sent a request that this server could not understand. Apache/2.2.0 (Fedora) Server at 10.129.150.205 Port 80 Entry in Apache Error Log- [Wed Dec 17 13:15:23 2008] [error] [client 10.129.150.205] ModSecurity: Access denied with code 400 (phase 2). Pattern match "^[\\\\d\\\\.]+$" at REQUEST_HEADERS:Host. [id "960017"] [msg "Host header is a numeric IP address"] [severity "CRITICAL"] [hostname "10.129.150.205"] [uri "/"] [unique_id "Qi9cCgqBls0AACJ-VCgAAAAF"] Solution- Check "/etc/httpd/modsecurity.d" directory and modify file "modsecurity_crs_21_protocol_anomalies.conf " modsecurity_crs_21_protocol_anomalies.conf ---------------------------------------------------------------- # # Check that the host header is not an IP address # SecRule REQUEST_HEADERS:Host "^[\d\.]+$" "deny,log,auditlog,status:400,msg:'Host header is a numeric ...

Run SQL query from shell prompt

mysql -u user -p -e 'SQL Query' database Where, -u : Specify mysql database user name -p : Prompt for password -e : Execute sql query database : Specify database name To list all database, enter: $ mysql -u replicant -p -e 'show databases;' To list count all rows, enter: $ mysql -u replicant -p -e 'SELECT COUNT(*) FROM remote_logs' Sample output: Enter password: +----------+ | count(*) | +----------+ | 471 | +----------+ Tell mysql to display output a page at a time, by using more or less pager: $ mysql --pager=/usr/bin/less -u replicant -p -e 'SELECT COUNT(*) FROM remote_logs' Redirect out to a file: $ mysql -u replicant -p 'PassWord' -e 'SELECT COUNT(*) FROM quotes' remote_logs > sql.output.txta To avoid password prompt just create ~/my.cnf file: [client] # for local server #host=localhost host=10.128.150.205 user=replicant password=myPassword [mysql] pager=/usr/bin/less

Html performance

HTML is a very flexible language. It never generates errors, and often provides many different ways to accomplish a single task. For example, a list item can be specified as <LI>description or <LI>description</LI>. The only difference is the closing </LI> tag, but it might be biggest mistake. If these tags don't close, the browser renders pages just fine. But if tags are closed then it will render the pages even faster. Take a look at the following code segment: <P>Here is a list of names: <UL> <LI>Kanpur <LI>Jhanshi <LI>Lucknow <LI>Pune <LI>Bangalore </UL> In above example, the <P> and <LI> items are included without their closing counterparts. When parsing such HTML code, the browser needs to look ahead to find out where the paragraph or list item ends. The following code generates the same output in a more efficient method: <P>Here is a list of names :</P> <UL> <LI>Kanpu...

Mysql Prompts

You can change the prompt on the MySQL command-line tool to show user name, time, current database or many other useful facts. mysql> prompt \R:\m:\s> PROMPT set to '\R:\m:\s>' 11:46:16>show tables; +----------------------+ | Tables_in_wordpress | +----------------------+ | wp_categories | | wp_comments | | wp_linkcategories | +---------------------+ 9 rows in set (0.00 sec) 11:46:24> If you specify the prompt command with no argument, mysql resets the prompt to the default of mysql> . The prompt command reconfigures the default mysql> prompt. The string for defining the prompt can contain the following special sequences: Option Description \c A counter that increments for each statement you issue \D The full current date \d The default database \h The server host \l The current delimiter (new in 5.0.25) \m Minutes of the current...