Tanmaya Thopate, Chincholi Morachi, Low cost WEBSITE development in Pune, Windows Tips n Tricks

Thursday, January 15, 2009

Home directory inaccessible in Plesk control panel

This is commonly observed error on Plesk based windows FTP service while connecting remotely. Locally you can easily connect to FTP, but remotely it will show "Home directory inaccessible" error.
You can for following solution on this error,

a. Repair permissions on home folders of problem domains.

b. Re-configure FTP configuration using Plesk command line tool ftpmng.exe as follows:
Login to RDP of the server, open command prompt, navigate to %plesk_bin% directory. Execute following commands,

ftpmng.exe --remove-vhost --vhost-name=yourdomain.com
ftpmng.exe --reconfigure-vhost --vhost-name=yourdomain.com

c. If this issue happens to every domain you can repair FTP configuration for all domains using commands as below:
Login to RDP of the server, open command prompt, navigate to %plesk_bin% directory. Execute following commands,

ftpmng.exe --remove-all
ftpmng.exe --reconfigure-all

The system cannot find the file specified

Some times a problem returns on the www.domainname.com which are hosted under Plesk control panel; the problem is that on the URL http://www.domainname.com/virtualdirectory/cartsummary.asp the browser displays "The system cannot find the file specified".

Restarting IIS 6.0 Server or Plesk control panel can sort the problem but some times it returns.

Simple solution will be helpful on this issue.
Login to Plesk control, navigate to your domain which is causing "The system cannot find the file specified" error. Under domain panel click on Hotlink protection which will have some extensions like asp and mdf extensions in them; turn hotlink protection OFF and that solves the problem.

Something to bear in mind, the error only comes up on that page as there is a META REFRESH on the previous page hence the hotlink protection kicking in.

Friday, November 14, 2008

Check heart beat of SQL Server services

Helpful for Database administrators to test the heart beat of SQL Server services daily.

Step1
Create c:\HeartBeat folder and a file ServiceList.txt which will contains following text in it with all the servers and services would like to check.

SQL,MSSQLServer
SQL,SQLSERVERAGENT
YUKON,MSSQLServer
YUKON,SQLSERVERAGENT
YUKON,MSSQLServerOLAPService
ETL,MSSQLServer
ETL,SQLSERVERAGENT
Note: Need to add server names and its related service names.

Step2
Make a file c:\HeartBeat\CheckHeartbeat.vbs and copy the below code into the file.

'Objective: TO check the Heartbeat of all SQL Server services

on error resume next
Set iFSO = CreateObject("Scripting.FilesyStemObject")
Set oFSO = CreateObject("Scripting.FilesyStemObject")

InputFile="c:\Heartbeat\Servicelist.txt"
Outputfile="c:\Heartbeat\Status.txt"

Set ifile = iFSO.OpenTextFile(inputfile)
Set ofile = ofso.createTextFile(OutputFile, True)

Do until ifile.AtEndOfLine
servicelist= ifile.ReadLine
strcomputer=left(servicelist,instr(servicelist,",")-1)
Service =right(servicelist,len(servicelist)-instr(servicelist,","))
ofile.writeline Now()
ofile.writeline "ServerName: " & strcomputer
ofile.writeline "ServiceName: " & Service

Set objWMIService =nothing
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

if err.number<>0 then
ofile.writeline "Error: " & err.number
ofile.writeline "Error: " & err.description
else

Set colItems = nothing
query=""
query = "Select * from Win32_Service where name = '" & Service & "'"
'msgbox query
Set colItems = objWMIService.ExecQuery(query,,48)
if err.number<>0 then
ofile.writeline "Error: " & err.number
ofile.writeline "Error: " & err.description
else
For Each objItem in colItems
ofile.writeline "Status: " & objItem.Status
ofile.writeline "State: " & objItem.State
next

next
end if
end if
err.number=0
Loop

msgbox "SQL Service Status Check completed"
Step3
Execute the above VB script. The message will show the status of it.
In addition, it creates a file c:\HeartBeat\Status.txt with detailed logs for the status.

Ref: Check MSSQL Server's status

Tuesday, October 28, 2008

How hacker exploits a website?

Hacking Web Sites:

Hackers are with tons of mechanisms attack, they decide the one most appropriate to vulnerability. Its organized plan to exploit.
There are so many techniques of hacking used by hackers, following are couple of them explained in details.

How hacker exploits a website

MySQL memcache

In current web scenario, the access speed of website is more crucial. If your web site is running on MySQL database with number of records in it, can be slow processed as each record needs execution of the SQL query and resulting of the data from the database. So that queries on tables, which are in the process, are locked, this may result in delay of query and reduce the speed.
memcache for MySQL

Tuesday, October 21, 2008

Hindi supported on Joomla


Here is how you can enable Joomla to write in Indian languages.

Step 1:Install indiaPlugin for tinyMCE

Upload files to hosting server,
• Download the India Plugin
• Extract this file in a folder named indiaplugin.
• Now FTP the indiaplugin folder and all files inside it, to “plugins\editors\tinymce\jscripts\tiny_mce\plugins ” in case of Joomla 1.5.x
Modify the ‘tinymce.php‘ file
• Edit tinymce.php file in “editors\tinymce”.
In Joomla 1.0.x

For further detailed steps, follow Indian Language support on Joomla

Tuesday, October 7, 2008

SQL Server 2005 Deployment on Windows Shared Server Hosting

SQL Server 2005 Deployment management on Windows Shared Server Hosting Plan

Requirement:

Windows shared hosting Server should be with 32-bit processor and minimum of 3GB of RAM including Windows Server™ 2003 operating system.

Possibilities:

a) In various situations, managing several instances of SQL Server on a particular server can support additional users than a single instance of SQL Server.

b) CLR integration with SQL Server offers developers who are well-known with .NET programming the skill to code database objects by using the programming language they previously know.

EXEC sp_configure ‘show advanced options’, 1
RECONFIGURE
GO

EXEC sp_configure ‘clr enabled’, 1
RECONFIGURE
GO

c) Using the query cost governor
can avoid run off queries from overwhelming lots of resources on a Windows shared hosting server.

Whenever SQL Server obtains a query, the query optimizer produces probable time that the query is likely to take. The query cost governor limit can be used to stop all queries that are probable to take more than a particular amount of time. However, it is possible for the probable time to be inaccurate, which will cause fast-running queries to be cancelled. The choice to apply query cost governor limits is a negotiation between maintaining suitable server performance under load versus the possible for generating client support issues.

EXEC sp_configure ‘show advanced options’, 1
RECONFIGURE
GO

EXEC sp_configure ‘query governor cost limit’, 300

RECONFIGURE
GO

d)
Disabling or Renaming the Built-in SA Account
In SQL Server 2005, the built-in system administrator (SA) account was kept for backward compatibility. As long as it is not necessary, this account ought to be disabled or renamed.
These commands can be used to disable or rename SA account:
ALTER LOGIN sa DISABLE;
ALTER LOGIN sa WITH NAME = [sys-admin];
 
Add to Technorati Favorites