Sunday 31 March 2013

Windows 2008 Password Complexity

To ensure that accounts being created on your server meets the standard password requirement . This can be enforced on a Win 2008 server by following below steps:

1. Click Start > Run, type gpedit.msc > click OK

2. Computer Configuration > Windows Settings > Security Settings > Account Policies > Password Policy.

Unable to shrink database log file ( DBCC shrinkfile gives error)

Sometimes when trying to shrink the database log file for Ms SQl Database using DBCC SHRINKFILE ('database-name_Log', 1), which is the name for log file. It gives the following error :

"Could not locate file  xxx_Log for database  in sys.database_files. The file either does not exist, or was dropped. "

Solution :

The file name should be the logical file name and not the physical file name. Look in the Database properties, on the Files tab for the Logical Name of the file you are trying to shrink, and use that name.

Alternately, you can run the following query in the respective database from Ms Sql Managment Studio to get the logical name

SELECT df.name FROM sys.database_files AS df WHERE df.type_desc = 'log'

The media family on device is incorrectly formed. SQL Server cannot process this media family Error: 3241

When you try to restore a backup of the database you get the following error:


The media family on device ” is incorrectly formed. SQL Server cannot process this media family.
RESTORE HEADER ONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)

This error occurs due to the following problems:

1. Backup file is corrupted.
2. Backup was taken on a higher version of SQL Server and restoration is being done on the earlier version.

Fix :

1. If you feel backup could be corrupted take the backup again
2. If you are using FTP then use it in binary mode to copy the backup file into local drive
3. If the versions are different then update the SQL Server on the system into which the backup has to be restored
4. Verify the database backup to check what the issue is.

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

This error you can get while compiling an application in machines like x64 or x86.

There are two solutions to it :
 
1) If you are in development (Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine)
To solve this issue open the project in Visual Studio then:
1. From the solution explorer right-click on project name then click on Properties
2. Click on the Build tab
3. Change Platform target from: Any CPU to x86
4. Re-build your solution
5. You are good to go
 
2) If your application is hosted on IIS(Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine)

This will happen if you have an Ms Office application/DLL incorporated in you application, Very simple steps
1) Open IIS manager
2) Select Application Pools
3) Select the application pool you are using in your website
4) Click on Advanced Settings in the right-pane of the window.  
5) Under General section, set "Enable 32-Bit Applications" to "True".
6) Done.

SQL Warning in Functions.php on line .....The function php_uname()

You get the following error when trying to access your site which uses database :

Warning: The function php_uname(), which your Script uses, was deactivated for safety reasons and cannot not be used.

That isn't an SQL error, it is due to your application is trying to determine the server load and is using a function which your web host must have disabled.

On that line, you should find:

elseif(substr(php_uname()...

Change it to

elseif(substr(@php_uname()..

And you shouldn't receive that message anymore.

Shrinking Truncate SQL SERVER Log File

Following code always shrinks the Truncated Log File to minimum size possible.

USE DatabaseName
GO
DBCC SHRINKFILE(<TransactionLogName>, 1)
BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY
DBCC SHRINKFILE(<TransactionLogName>, 1)
GO 

You are recommended to take full back up right before/after above query.

Roles and Features showing an error HRESULT: 0x800F0818 in Server Manager of windows server 2008 R2

When you open Server Manager both Roles and Features display Error and you are unable to add any role or features. When you select the details link it displays error: HRESULT: 0x800F0818.

You also get the event ID :1601 in event logs.


Rsolution:
1) Browse to c:\Windows\Logs\CBS\


2) Copy the CBS.log to c:\Temp


3) Search the file for errors: corruption or failed


Example:
2012-01-10 19:47:55, Info  CBS  Mark store corruption flag because there is a
mismatch between package identity
package:
Package_for_KB2511455_RTM~31bf3856ad364e35~amd64~~6.1.1.0.
[HRESULT= 0x00000000 - S_OK] 2012-01-10 19:47:55, Info CBS Identity mismatch:
Specified Identity:Package_for_KB2511455_RTM~31bf3856ad364e35~amd64~~6.1.1.0,
actual package Identity:
Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~6.1.7600.16385
[HRESULT = 0x800f0818 - CBS_E_IDENTITY_MISMATCH] 2012-01-10 19:47:55, Info
CBS  Failed to resolve package [HRESULT = 0x800f0818 - CBS_E_IDENTITY_MISMATCH]


4) The above highlighted text indicates that there is an issue with the KB2511455.


5) Download KB2511455 update.


6) Unpack the downloaded KB using the following command:
    Expand -F:* UpdateKBXXXX.msu c:\Temp\KBXXXX_Unpackage


7) After you expand the file you will see UpdateKBXXXX.cab File. Expand it as well using the following command:
    Expand -F:* UpdateKBXXXX.CAB c:\Temp\KBXXXX_Unpackage\CAB


8) Run the following command for taking ownership to the c:\Windows\Servicing\Packages folder.
    takeown /F c:\Windows\Servicing\Packages /D y /R


9) Give a full access to your user account to the c:\Windows\Servicing\Packages folder.


10) Explore c:\Windows\Servicing\Packages folder and rename the following files :
    package_for_kb2511455_rtm~31bf3856ad364e35~amd64~~6.1.1.0.cat
    package_for_kb2511455_rtm~31bf3856ad364e35~amd64~~6.1.1.0.mum


11) Copy the above files from c:\Temp\KBXXXX_Unpackage\CAB
 to c:\Windows\Servicing\Packages folder


12) Server Manager should open as expected now.

Restoring a MSSQL 2005 database stuck in suspect mode

If you happen to notice that your MSSQL database/s are stuck in suspect mode, you can easily run a query that will process the database and restore it for you (restore the status, not the actual database).

To do this, you simply need to run the following query. Keep in mind you will need to change our “your database name” for the actual database name.

EXEC sp_resetstatus yourdatabasename;
ALTER DATABASE yourdatabasename SET EMERGENCY
DBCC checkdb(yourdatabasename)
ALTER DATABASE yourdatabasename SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB (yourdatabasename, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE yourdatabasename SET MULTI_USER


This will correct the issue and you can continue using the database.

PowerShell script cannot be loaded because the execution of scripts is disabled on the system.

If you are unable to run the Powershell script on the Windows server and receive the following error:

File C:\test.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.

Resolution:

Change the Windows PowerShell Script Execution Policy with the following command: set-executionpolicy remotesigned

MySQL Password Reset



1. Stop your MySQL server completely.

2. Open your MS-DOS command prompt using “cmd” inside the Run window. Inside it navigate to your MySQL bin folder, such as C:\MySQL\bin using the cd command.

3. Execute the following command in the command prompt: mysqld.exe -u root –skip-grant-tables

4. Leave the current MS-DOS command prompt as it is, and open a new MS-DOS command prompt window.

5. Navigate to your MySQL bin folder, such as C:\MySQL\bin using the cd command.

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(‘NEW_PASSWORD’) WHERE User = ‘root’;

Microsoft JET Database Engine error ''80004005'' - System resource exceeded

The shown error does not mean that the server on which the website is hosted is run out of system resources.

Most of the time this error will show up on Shared Server Environment for any website using "Microsoft Access database".  

===================================
Microsoft JET Database Engine error ''80004005''
System resource exceeded.
===================================

The error shows up while running an extremely large query which Microsoft Access cannot deal with.
To resolve the error, the client needs to compact the database and repair the connection string by adding OLEDB JET driver.

Limit SQL Connections through Windows Advanced Firewall in Server 2008

This article will walk you through creating rules in Windows Advanced Firewall to block remote SQL connections.
By default when enabled Windows Advanced Firewall blocks all incoming traffic unless a rule exists stating otherwise.
Connect to your server via Remote Desktop


* Click Start > Administrative Tools > Windows Firewall with Advanced Security

* Select Windows Firewall with Advanced Security on Local Computer

* Select Windows Firewall Properties

* Ensure Firewall State is On for each tab; Domain Profile, Private Profile, and Public Profile Click OK

* Select Inbound Rules > Select New Rule > Select Port and Click Next

* Enter 1433 under Specific local ports and Click Next

* Select Allow the connection and Click Next

* Click Next

* Enter a Name and Description for the rule and Click Finish

* Right-Click on the newly created Allow Rule and Select Properties

* Click the Scope Tab

* Under Remote IP Address Select These IP addresses and Click Add

* Enter either your IP, IP/subnet or IP Range and click OK

* Click OK

IIS www service fails to start with error ID 1363

You might get the error : Cannot start a new logon session with an ID that is already in use while trying to start the www service.

Follow the below steps to fix the issue :

Ran “regsvr32 qmgr.dll” command.

And reboot server.

The above fix can also be applied if you are getting the  error id 1005 & 7023 while starting World Wide Web Publishing Service.

How to shrink a database log file for MSSQL Using Management Studio?

Shrink a log file for a database:

  1. In Object Explorer, connect to an instance of the SQL Server Database Engine and then expand that instance.
  2. Expand Databases and then right-click the database that you want to shrink.
  3. Point to Tasks, point to Shrink, and then click Files.
  4. Select the Log file that need to be shrunk.

Using the Transact SQL Query:

To shrink a data or log file using the Transact SQL Query:

  1. Connect to the Database Engine.
  2. From the Standard bar, click New Query.


USE <UserDB>;
GO
DBCC SHRINKFILE (UserDB_Log, 1);

How to retireve the password for an email account in Mail Enable Server?

Check the file AUTH.TAB  in the Mail Enable Config Directory.

E.g. "C:\Program Files\Mail Enable\Config\AUTH.TAB"

You can see the password in text for the email accounts configured in the Mail Enable Server.

How to resolve Windows Login Error: "An unauthorized change was made to Windows"

After connecting to windows server via RDC, you receive error “An unauthorized change was made to Windows


Resolution:

1) Click the option that launches an Internet Browser

2) Type: %windir%\system32 into the address field

3) Find the file cmd.exe

4) Right-click on cmd.exe and select Run as Administrator

5) Type:  cscript %windir%\System32\slmgr.vbs /ilc %windir%\System32\licensing\ppdlic\Security-Licensing-SLC-ppdlic.xrm-ms

6) Hit the Enter key

7) Reboot

Later,Go to your system options and Update your Windows License Key and also run if any Windows Updates are available.

How to resolve error ' Error 8004020e '

Problem:

The ASP script returns an error like:

error '8004020e'
email.asp, line xx

the line in script is : objCDOSYSMail.Send

Solution:

Error '8004020e'

Problem:


The ASP script returns an error like:

error '8004020e'
email.asp, line xx

and line xx is:

objCDOSYSMail.Send

Solution:

This error is caused by the email component not being able to send the email. The possible causes of this error are:
  • Access to the mail server through the email component is denied. Make sure you are using a valid SMTP Server in your email.asp file.

  • The SMTP Server requires a valid Login and Password to send the email. You must supply a correct and valid value in your email.asp file.

  • The email address used in the FROM field doesn't contain a valid email address. Verify that you're validating the FROM field value against a valid email address present on the SMTP Server.

  • Some mail servers do not allow sending emails using a From email address with a domain name different than the one is configured in the web server. In this case, you should not use a field of the HTML form as the From. Instead, use a Generic email address with the same domain name as the hosted one.

How to reset a DNN password at the Database

You can use the below steps to reset the DNN password :

1. Open SQL Query Analyzer – Connect to your dotNetNuke database.

2. Paste the following Stored Procedure code into the window,
-------------------------------------
ALTER procedure [dbo].[uap_ResetPassword]
@UserName NVarChar(255),
@NewPassword NVarChar(255)
as
begin
Declare @PasswordSalt NVarChar(128)
Declare @ApplicationID NVarChar(255)
Declare @ApplicationName NVarChar(255)

Set @ApplicationID = (SELECT [ApplicationID] FROM aspnet_Users WHERE UserName=@UserName)
Set @ApplicationName = (SELECT [ApplicationName] FROM aspnet_Applications WHERE ApplicationID=@ApplicationID)
Set @PasswordSalt = (SELECT PasswordSalt FROM aspnet_Membership WHERE UserID IN (SELECT UserID FROM aspnet_Users WHERE UserName=@UserName))

–select @ApplicationID, @ApplicationName
declare @RetVal as int
Exec @RetVal = dbo.aspnet_Membership_ResetPassword @ApplicationName, @UserName, @NewPassword, 10, 10, @PasswordSalt, -5
return @RetVal

end
----------------------

3. Now you can reset your DotNetNuke passwords by simply opening up SQL Query Analyzer, connecting to your dotNetNuke database, then typing uap_ResetPassword ‘username’, ‘newpassword’.

How to reset WordPress admin password

You have to do this through the WordPress database directly. The most convenient way to manage the database is via the phpMyAdmin tool at your web hosting account.

Once in phpMyAdmin select the WordPress database from the drop-down menu on the left. The page will refresh and the database's tables will be displayed on it. Open the SQL tab (look at the top navigation bar).

In the text field write the following SQL query:

UPDATE `wp_users` SET `user_pass` = MD5( 'new_password_here' ) WHERE `wp_users`.`user_login` = "admin_username";

"new_password_here" - replace this with the new password you wish to use.
"admin_username" - replace this with the username the password should be updated for.

Once you are ready, click on the GO button to submit the query. If everything goes fine without errors, you should be able to login to WordPress with the new password.

How to change the Data folder for SQL Server from one drive to another

Sometimes you would need to change the DATA folder location of your MSSQL server, quite possible due to disk space limitation.

You just need to follow below steps  :

1. Open the SQL Server Management Studio on the Windows server.

2. Expand SQL Server Group >> MS SQL server <SQL Server_Name>.
   Right click on it and select properties.

3. Go to the Database Settings and then select Database default locations.

4. Before moving the Data folder, create the folder on the particular drive 
   where you want to move.

5. Browse the particular path of the MSSQL data folder on the new drive for Data
   and Log.
For Eg: You want to move the Data folder to the E drive. 
Just change the path to E:\MSSQL\DATA\

6. Click ok and you are done.

Horde logout error

Error: This request cannot be completed because the link you followed or the form you submitted was only valid for minutes. Please try again now.

Solution:

Edit /webmail/horde/lib/Horde.php

if (($_SESSION['horde_form_secrets'][$token] + $GLOBALS['conf']['urls']['token_lifetime'] * 60) < time()) {
            return PEAR::raiseError(sprintf(_("This request cannot be completed because the link you followed or the form you submitted was only valid for %s minutes. Please try again now."), $GLOBALS['conf']['urls']['token_lifetime']));
        }



Replace it with:

if ((($_SESSION['horde_form_secrets'][$token] + $GLOBALS['conf']['urls']['token_lifetime']) * 60) < time()) {
            return PEAR::raiseError(sprintf(_("This request cannot be completed because the link you followed or the form you submitted was only valid for %s minutes. Please try again now."), $GLOBALS['conf']['urls']['token_lifetime']));

Force Visitor Browser to use SSL

This article will go through the steps to force a visitor's browser to use SSL and view the site securely. That is when a customer goes to http://www.domain.com it will display and error and force the site to use the SSL version.

* Remote Desktop into the server. If you are unfamiliar with Remote Desktop, please see How do I connect to my server using Remote Desktop Connection? Note: if you're on a shared server, you will need to contact us
Open Internet Information Services (IIS)

* Expand the + sign next to the domain in question and locate the directory which should be viewed securely. Click the directory and in the right pane, you will see an icon under IIS named SSL Settings. You must have an SSL setup for the domain prior to clicking this and the bindings set to port 443

* In the SSL Settings screen, check the check-box for Require SSL and click Apply. Now when going to the site, you should be asked to append https:// to the URL

Error: mailManager->turnOnDomain() failed: mailmng failed: SOAP failed. Failed in sending message

When you try to manage the email accounts through the Plesk control panel and get the following error:

Error: mailManager->turnOnDomain() failed: mailmng failed: SOAP failed. Failed in sending message

Please refer to the following steps to resolve the issue:

1. On the Windows server, go the path "%plesk_bin%" through the command prompt.

2. Execute the following command:

mchk.exe --all --fix=DOMAIN.COM

Error: Access for administrator from address 'XX.XX.XX.XX' is restricted in accordance with IP Access restriction policy currently applied.

If you are facing theproblem while logging to the Plesk control panel:

Error: Access for administrator from address 'XX.XX.XX.XX' is restricted in accordance with IP Access restriction policy currently applied.

Please follow the steps to resolve the issue:

1. Login to the Windows server and go the path %plesk_bin% from the command prompt.
2. You can retrieve the current policy and restricted/allowed IPs  from the following commands:

%plesk_bin%\dbclient.exe --direct-sql --sql="select * from cp_access"

OUTPUT
id      type    netaddr            netmask
1       allow   XX.X.XX.XX      255.255.255.255
2       deny    XX.X.XX.XX      255.255.255.255

%plesk_bin%\dbclient.exe --direct-sql --sql="select * from misc where param='access_policy'";

OUTPUT
param             val
access_policy   deny

3. To clear the access policy settings remove all the records from the "cp_access" table and set policy to "allow"

%plesk_bin%\dbclient.exe --direct-sql --sql="update misc set val='allow' where param='access_policy'";

Error - "Failed to retrieve data for this request (Microsoft.SqlServer.Management.sdk.sfc)"

ErrError    - In Microsoft SQL Management Studio 2008, you receive the following error message when you try to expand the Databases:

                 "Failed to retrieve data for this request (Microsoft.SqlServer.Management.sdk.sfc)"

ReSolution - This problem occurs because of the following reason:

                   1. One or more databases are in an "offline" mode.


                   2. SQL Server Management Studio cannot correctly read one or more databases.Therefore,certain properties of a database cannot be retrieved. To Resolve this error, perform the following steps.

===========================================================


1. Login to the SQL Management Studio and expand the databases.

2. Close the error message "Failed to retrieve data for this request...."


3. Press F7 to open the Object Explorer Details pane.


4. Right-click the column headers, and make sure that only the following columns are selected:


Name
Date Created
Policy Health
Owner


5. Finally, Right-click the Databases node, and then click Refresh.
===========================================================

Enable wildcard SSL certificate for the subdomains through the command prompt

A wildcard SSL certificate can be applied for the all the sub-domains having same end-domain name hosted on the Windows server using same IP and port combination.The certificate can be installed only on the end-domain name. In order to enable the SSL certificate for the sub-domains for example: 

test.demo.com through command prompt, please execute the following command :

C:\Inetpub\AdminScripts>cscript.exe adsutil.vbs set /w3svc/<site identifier>/SecureBindings ":443:<host header>" 


For example:
C:\Inetpub\AdminScripts>cscript.exe adsutil.vbs set /w3svc/3/SecureBindings ":443:test.demo.com"

Enable multiple RDC sessions from one user in Windows 2008 / Windows 2008 R2

Windows 2008 only allows one remote desktop connection to the server from a user by default. This article will give instructions on how to turn this off and allow more than one session for Remote Desktop from the same user name.

Windows 2008
1. Log into your server through Remote Desktop Connection (instructions for connecting to your server through RDC can be found here).

2. Open MMC by navigating to Start > Run and typing "mmc". Click OK.

3. Go to File > Add/Remove Snap-In and choose Group Policy Object. Click Add and then Finish. Click OK.

4. Expand Computer Configuration > Administrative Templates > Windows Components > Terminal Services > Terminal Server > Connections.

5. Right-click Restrict Remote Desktop Services users to a single Remote Desktop session and choose Properties.  Select the radio button for Disabled and click OK.

6. Close out of MMC and you can now connect with the same login username with multiple sessions.


Windows 2008 R2

1. Log into your server through Remote Desktop Connection (instructions for connecting to your server through RDC can be found here).

2. Open MMC by navigating to Start > Run and typing "mmc". Click OK.

3. Go to File > Add/Remove Snap-In and choose Group Policy Object. Click Add and then Finish. Click OK.
4. Expand Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections.

5. Right-click Restrict Terminal Services users to a single Remote Desktop session and choose Properties.  Select the radio button for Disabled and click OK.

6.Close out of MMC and you can now connect with the same login username with multiple sessions.

Disallowed Parent Path

If you are unable to access the website and facing the below error:

Active Server Pages error 'ASP 0131'

Disallowed Parent Path

/admin/Index.asp, line 1

The Include file '../Includes/data123.asp' cannot contain '..' to indicate the parent directory.

Please follow the steps to resolve the issue:

1. From the IIS Manager, select the particular Website right click on it and select "Properties".


2. Under the "Home Directory", Click "Configuration".


3. Go to the "Options" tab. Make sure that the option of "Enable parent paths" is enabled.


Disable Shutdown option in Windows

This article will walk you through removing the shutdown option from Windows Server 2003/2008

1. Go to Start > Run

2. Type in gpedit.msc in the Open field

3. The Group Policy window will appear. Choose User Configuration > Administrative Templates > Start Menu & Taskbar from the left-hand side panel as shown below

4. In the right-hand side panel, double-click on Remove And Prevent Access To Shut Down Command
A pop will appear. Set it to Enabled

This will remove the Shutdown option from the Start menu immediately after clicking Apply. The system can only be shutdown via the command prompt from this point forward.

Difference between CNAME and A records, and when they should be used.

Websites are served from locations that are uniquely identified by a group of numbers, which are known as IP addresses; but to access these sites we usually type in their corresponding domain names, which are easier to remember. To find the correct IP address, your browser will contact a Domain Name Server (DNS) and query its database for the IP address.

What is an A Record?

An A record is a record in these Domain Name Servers that links or maps a domain directly to its corresponding IP address.

For example, when you type mydomain.com into your browser, your browser will perform a DNS lookup which will return the corresponding IP address eg. 111.222.333.444.
What is a CNAME Record?

A CNAME, or Canonical Name record, is a record that points to another domain address rather than an IP address.

For example, say you have several subdomains, like www.mydomain.com, ftp.mydomain.com, mail.mydomain.com etc and you want these sub domains to point to your main domain name mydomain.com. Instead of creating A records for each sub-domain and binding it to the IP address of your domain you can create CNAME records.

Examples of using CNAME records :


Domains registered in different countries
CNAME records can also be handy in the case that you registered your domain name in several countries and you want to redirect them all to your main domain. For example mydomain.com.au and/or mydomain.co.nz can be redirected to mydomain.com

Products and brand names
In case you have registered several domain names, for example for your different products or brand names and you want to redirect them all to your main domain, you create CNAME records for all these other domains. For example: myproduct.com > mydomain.com.

Limitations of CNAME records :
1. Usage of CNAME records means that there is an additional request sent to the DNS servers, which can cause a delay of a few milliseconds.

2. You cannot create a CNAME record for the main domain name (mydomain.com) itself, this must be an A record.
For example, you cannot map mydomain.com to google.com, however, you can map google.mydomain.com to google.com.

3. MX or NS (nameserver) records may never point to a CNAME record, only A records.

Difference between Active and Passive modes in FTP

Active and passive modes are the two connection modes that FTP can communicate with. FTP is somewhat unique in that it uses two channels between client and server, the command channel and the data channel, which are usually on separate TCP connections. Typically the command channel is on port 21 and the data on port 20. The command channel handles the delivery of commands and responses typically, the data channel handles the actual transfer of files.

The difference between Active and Passive FTP connections lies in whether the server or the client initiate the data connection. In active mode, the server initiates the data connection with the client after the client has established a connection on the command channel. In passive mode it is the other way round, the client initiates the data connection with the server.
The sequence of events in Active mode is:
  1. Your client (filezilla for example) connects to the FTP server by establishing an FTP control connection to port 21 of the server
  2. Whenever the client requests data over the control connection, the server initiate data transfer connections back to the client. The source port of these data transfer connections is always port 20 on the server, and the destination port is a high port (greater than 1024) on the client.
Active FTP may fail in cases where the client is behind a firewall and protected from many to one NAT (masquerading). This is because the firewall will not know which of the many servers behind it should receive the return connection.
Active mode is more secure for the server as it does not require unsecured ports to be open at the server end, because it is the server that initiates the data connection to the client.
Passive mode works differently:
  1. Your client connects to the FTP server by establishing an FTP control connection to port 21 of the server.
  2. Whenever the client requests data over the control connection, the client initiates the data transfer connections to the server. The source port of these data transfer connections is always a high port on the client with a destination port of a high port on the server.
Passive mode should be viewed as the server never making an active attempt to connect to the client for FTP data transfers. Because client always initiates the required connections, Passive mode works better for clients protected by a firewall.

annot open database "DATABASENAME" requested by the login. The login failed. Login failed for user 'DATABASEUSER\IWAM_plesk(default)'.

If your website shows following error while accessing, then refer to the steps mentioned below to resolve it:

Cannot open database "DATABASENAME" requested by the login. The login failed.
Login failed for user 'DATABASEUSER\IWAM_plesk(default)'.

   1. On the windows server, right-click "My Computer" and select "Manage".

   2. Navigate to Local Users and Groups >> Users >> <Username>.


   3. Right-click on <User> and select Properties.


   4. Under the "Member Of" tab, click on Add >> Advanced >> Find Now.


   5. Select SQLServer2005MSSQLUser$<MachineName>$SQLExpress and click OK and OK to add this user to the group.


   6. Restart IIS services.

Block IP address with Windows Firewall 2008

If you ever feel that someone may be trying to break into your server or know an IP address that you want to block from accessing your server there is a built in firewall on all of our 2008 DDS servers. You can use this firewall to block either a range of IP addresses or a single address.

1. Log into your server via RDP.

2. Click on start > administrative tools > windows firewall with advanced security.

3. On the left side of the firewall window click on the inbound rules option.

4. On the right side of the screen click on New Rule.

5. Click on the custom radio button and then click next.

6. Make sure the All programs radio is selected then click next.

7. On the protocol and ports options leave everything at its defaults and click next.

8. On the scope screen you will see two boxes the top one is for local IP addresses and the bottom is for remote IP addresses. In this scenario we are trying to block an outside (remote) IP from accessing anything on the server so we will need to add the IP address to this section only as it will not be a local IP address.

9. Click on the radio that says "these IP addresses " in the remote section

10. Click on the Add button.

11. In the next window we will be adding a single IP address to the rule, you can also add an entire range at this point if you wish.

12. Click ok, click next.

13. Make sure you select the Block the connection radio on the next screen and then click next.

14. Leave all of the options on the next screen checked this will be sure to block the IP no matter the connection they are trying to use. Click next.

15. Name the rule on the next screen something you can remember in case you wish to remove or edit it in the future. Click finish and thats it.

An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

If you are facing the following error while accessing the website:

Error Summary


HTTP Error 500.24 - Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

Please refer to the following steps:

1. Switch the application of the website to an application pool using Classic .NET mode through IIS7 Manager.


2. From the IIS7 Manager, right click the respective application pool >> click Advance Settings.


3. Change Integration to Classic from the Managed Pipeline Mode. 


4. Click Ok.

Adjust Page File / Virtual Memory on Server 2008

* Before making any changes we strongly suggest reading the following guide from Microsoft on how to determine the appropriate page file size for 64-bit versions of Windows.

http://support.microsoft.com/kb/889654

* Click Start > Right Click Computer > Select Properties

* Click Advanced System Settings

* Select Advanced Tab and Click Settings Button

* Click Advanced Tab

* On this screen you can change how Windows handles processor importance, for Programs or Background Services.

"The processor scheduling section controls how much processor time Windows devotes to a program or process. The processor has a finite amount of resources to divide among the various applications. Choosing the Programs option will devote the most processor time to the program running in the foreground. Choosing Background Services allocates equal processor time to all running services. If have are experiencing slow-running programs, you could try setting the processor scheduling to Programs."

* Click Change which will load the Virtual Memory Window

* If you remove the check from 'Automatically manage paging file for all drives' you can set a custom size that you wish.

Note that any change you make here will require a restart of the server before changes can take place.

Access Smartermail without port

Steps to access Smartermail without port:

1. Create the website through IIS. Assigned the application pool in the name of "Smartermail".


2. The path to the Smartermail website has to be pointed towards MRS directory.


3. From the Windows server, stop the smartemail webserver.


4. Once the Smartermail website has been created through the IIS, add mail.sample.com (Replace sample.com with your domains) as a host header. You can add multiple websites in the host header.


5. Try to access the URL: http://mail.sample.com, it will show you the smartermail login page.

503 This mail server requires authentication when attempting to send to a non-local e-mail address

If you are facing the following error in receiving the emails for Plesk Webmail on Windows server:

We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 503 503 This mail server requires authentication when attempting to send to a non-local e-mail address

Resolution:
1. Open the Mailenable and go to the SMTP properties.

2. Under "Advance SMTP" tab, go to the Inbound authentication and select the option of "Do not require authentication" from the drop down list.

3. Click Apply and Ok.

4. Restart the SMTP service.

Error : 425 Can't Open Data Connection

When trying to ftp to a server using Internet browser.

Assuming you are using:


  • Windows Server 2008
  • IIS 6 (By default)
Problems:

When connecting to a FTP server using Internet Browser, FTP passive mode is being used.


Usually it is due to the firewall.


Solution:

Assuming you are using Windows Firewall in Windows Server 2008.

By default setting, all outbound ports are opened.


To define a range of port for FTP passive mode.
===============================================
cscript.exe adsutil.vbs set /MSFTPSVC/PassivePortRange "60000-60999"
===============================================

Open the range of port in Windows Firewall (without having to key in one by one)
==========================================================
FOR /L %I IN (60000,1,60999) DO netsh firewall add portopening TCP %I "Passive FTP"%I
==========================================================

"502 Bad Gateway" - Resolution

HTTP Error 502.1 – Bad Gate way
In this situation, IIS sends a request to the specified CGI process, and then IIS waits for a response. If IIS does not receive a response from the CGI process within the configured CGI time-out period, you receive the error message that is mentioned in the "Symptoms" section.
Server Error in Application "application name"
HTTP Error 502.1 – Bad Gateway
HRESULT: 0x00000000
Description of HRESULT
The CGI application exceeded the time allowed for processing and the process was shut down.       
=================================================                       
Fix :
 > Start > Run > inetmgr> OK.
 > Expand server name > expand Web sites > and then click the Web site that you want to modify.
 > In Features view, double-click CGI.
 > Type the appropriate time-out value in the Timeout (hh:mm:ss) text box, press ENTER, and then click Apply.

OR
Make PHP run as ISAPI rather than CGI.
   >Login to plesk
   > domain administration page
   >. Setup -> Services -> PHP Support
   >. make sure "run as ISAPI extension" is checked

==================================================

Error 15023: User already exists in current database.

An annoying thing that can happen with MSSQL Server, when you move a database to a new server by backing it up on one and then restoring it on the other, is that the server can tell you the username already exists, when you attempt to create it.


The specific error is:

    Error 15023: User already exists in current database.


 RESOLUTION:

    1. Open a new query.
    2. Run the query: USE databasename
    3. Run the query (this will show the users for the DB): EXEC sp_change_users_login ‘Report’ 
    4. Run the query: EXEC sp_change_users_login ‘Auto_Fix’, ‘username‘, NULL, ‘password‘
        *Note: Replace 'username' with database user name  and 'password' with its respective password.

Basic Mysql Commands

Creating a database

Now we are going to create our database.

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+

The SHOW DATABASES statement shows all available databases on our system. Note that SQL statements are terminated with a semicolon. There are four databases present. The information_schema, mysql and performance_schema are MySQL system databases. The test database is available as a workspace for users to try things out. It is empty; there are no tables.

mysql> CREATE DATABASE My_Database;

This statement creates a new database. Throughout this tutorial, we will use the My_Database database. To create a new database, we need to have certain privileges. Remember that we have connected to the server with the root user, which is a superuser and has all privileges.

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| My_Database               |
| mysql              |
| performance_schema |
| test               |
+--------------------+

Showing all databases, the My_Database database is among them.

mysql> use My_Database;
Database changed

In order to work with a database, we must first select it. We select a specific database with a use command.

mysql> SHOW TABLES;
Empty set (0.00 sec)

The SHOW TABLES statement shows all available tables in a database. Since it is a newly created database, no tables are found.

mysql> source cars.sql
Database changed
Query OK, 0 rows affected (0.20 sec)

Query OK, 1 row affected (0.08 sec)

...

In the first chapter, we have provided some sql scripts to create some tables. We use the source command to execute the cars.sql script, which creates a Cars table for us.

mysql> SHOW TABLES;
+----------------+
| Tables_in_My_Database |
+----------------+
| Cars           |
+----------------+

Now the SHOW TABLES statement displays one table available.

mysql> SELECT * FROM Cars;
+----+------------+--------+
| Id | Name       | Cost   |
+----+------------+--------+
|  1 | Audi       |  52642 |
|  2 | Mercedes   |  57127 |
|  3 | Skoda      |   9000 |
|  4 | Volvo      |  29000 |
|  5 | Bentley    | 350000 |
|  6 | Citroen    |  21000 |
|  7 | Hummer     |  41400 |
|  8 | Volkswagen |  21600 |
+----+------------+--------+

And this is the data in the table.
Creating a new user

Similarly to Unix root account, it is advised not to use the MySQL superuser root account for our tasks. We should use the root account only when it is necessary. We rather create a new account that we will use for our tasks. This user will have limited privileges. When using the root user we could accidentally do a lot of harm to our data.

mysql> CREATE USER test_user@localhost IDENTIFIED BY '34klq*';

The above statement created a new user called test_user. The accout has password 34klq*. The user is created, but he has no privileges.

mysql> GRANT ALL ON My_Database.* to test_user@localhost;

This statement grants all privileges to test_user for all database objects on the My_Database database.

Basic FTP Commands

The following examples illustrate typical uses of the command ftp for remotely copying, renaming, and deleting files.

 ftp server.test.com


This command will attempt to connect to the ftp server at server.test.com. If it succeeds, it will ask you to log in using a username and password. Public ftp servers often allow you to log in using the username "anonymous" and your email address as password. Once you are logged in you can get a list of the available ftp commands using the help function:

 ftp> help
This lists the commands that you can use to show the directory contents, transfer files, and delete files.

 ftp> ls
This command prints the names of the files and subdirectories in the current directory on the remote computer.

 ftp> cd customers
This command changes the current directory to the subdirecotry "customers", if it exists.

 ftp> cd ..
Changes the current directory to the parent direcotry.

 ftp> lcd images
Changes the current directory [em]on the local computer[/em] to "images", if it exists.

 ftp> ascii
Changes to "ascii" mode for transferring text files.

 ftp> binary
Changes to "binary" mode for transferring all files that are not text files.

 ftp> get image1.jpg
Downloads the file image1.jpg from the remote computer to the local computer. Warning: If there already is file with the same name it will be overwritten.

 ftp> put image2.jpg
Uploads the file image2.jpg from the local computer to the remote computer. Warning: If there already is file with the same name it will be overwritten.

 ftp> !ls
A '!' in front will execute the specified command on the local computer. So '!ls' lists the file names and directory names of the current directory on the local computer.

 ftp> mget *.jpg
With mget you can download multiple images. This command downloads all files that end with ".jgp".

 ftp> mput *.jpg
Uploads all files that end with ".jgp".

 ftp> mdelete *.jpg
Deletes all files that end with ".jgp".

 ftp> prompt
Turns iteractive mode on or off so that commands on multiple files are executed without user confirmation.

 ftp> quit
Exits the ftp program.

Unable to start MySQL "Error 1067: The process terminated unexpectedly."

In Windows, If you get the following error when you start MySQL service,

Could not start the MySQL service on Local Computer
Error 1067: The process terminated unexpectedly.


Then, follow the fix mentioned below.

1. Start >> Run >> type “cmd”.

2. Go to MySQL binary directory.

In my server, it is “C:\Program Files\MySQL Server 5.0\bin”.

3. Execute the following command “mysqld-nt.exe –console”. If it executes fine, then you need to check the file “my.ini”.

4. Edit the file “my.ini” with the following details and save it.
[mysqld]
port = 3306
basedir=”C:\Program Files\MySQL Server 5.0″
datadir=”c:\Program Files\MySQL Server 5.0\Data”


5. Now you can start MySQL service.

Cannot Add Attachments Using the SmarterMail Web Interface

Problem : 

End users are unable to attach files to emails they send through the webmail interface.

Resolution :


First, verify that the permissions on the MailProcessing folder are set correctly.  To verify the permissions, do the following:

Log in to SmarterMail as the system administrator.
Click the settings icon.
Expand the Activation folder.
Click SmarterMail Self Diagnostic.
A new window will open and display folder permissions. It will also indicate if they passed or failed.

If any of the permission tests fail, you can fix it by doing the following:

Using the Windows Explorer, right-click the default folder C:\Program Files\SmareterTools\SmarterMail\MRS\Mailprocessing directory.
Select Properties and then click the Security tab.
Select Network Service and make sure that Modify is checked and then click Apply and OK.
Repeat the process for the Config directory.
Log in to SmarterMail as the system administrator.
Click the settings icon.
Expand the Activation folder.
Click SmarterMail Self Diagnostic.
A new window will open and display folder permissions. It will also indicate if they passed or failed.

Another possible cause for this problem is that disk quotas have enabled on the Network Services Account and it has reached its limit. If so, disable disk quotas on this account and then once this is done rerun the SmarterMail Self Diagnostic to check if the permissions test passes.

How to use a MySQL test script to verify if your MySQL server is allowing remote connection?

How to use a MySQL test script to verify if your MySQL server is allowing remote connection as well as to confirm if you are using the proper server address, database name, username and password. please be sure that you have enabled PHP functionality as this script does require PHP.

1. Connect to the server where are hosting the MySQL server instance.

2. Open up a text editor and use this example however be sure to replace the server, username, password and database variables with your own.
=====================
<?php
$link = mysql_connect(‘<server>’, ‘<username>’, ‘<password>’);
if (!$link) {
die(‘Could not connect: ‘ . mysql_error());
}
echo ‘Connected successfully’;
mysql_select_db(<database>);
?>
=====================

3. Save the script into a PHP file and call it something that you will remember. Make sure that where you save the file is also web accessible.

4. Open up a web browser can enter the path of where the script is located. If the test is successfully you will see the message "Connected Successfully". If not then you will receive a blank screen meaning that either you can not connect remotely or the username, password, server or database name is incorrect and you will need to recheck the value.

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) Error with Plesk 9.5

WIth Server 2008 R2, Plesk 9.5 has a bad habbit of not giving itself permissions to the C:\Windows\Assemblies folder. Due to this, ASP and ASP.NET applications will not function correctly. In order to fix this you must follow the steps below.
  1. With Windows Explorer, browse to C:\Program Files (x86)\Parallels\Plesk\etc\DiskSecurity\DiskSecurity.xml
  2. Right click on DiskSecurity.xml and edit the file with Notepad or another plain text editor.
  3. Insert the following line at the bottom of the file, BEFORE </Entries>:

    <
    Entry AccounType="1" Account="Psacln" Path="C:\Windows\assembly" AceFlags="FilesOnly" AccessMask="Read" EntryFlags="0x0" />

  4. Save and close the file.
  5. Open a CMD Prompt and navigate to C:\Program Files (x86)\Parallels\Plesk\admin\bin
  6. Once you are at the root of the foler type the following command:

    ApplySecurity --apply

  7. Execute the command, open Task Manager, look at the Processes tab, and find ApplySecurity.exe
  8. Wait for the process to terminate, close task manager.
  9. Stop Plesk, Reset IIS, Start Plesk
  10. Verify that ASP is now working correctly by visiting an ASP Page or ASP based application hosted on the server.

Set a Fixed Amount of Memory (SQL Server Management Studio)

Some times the SQL database uses large amount of RAM on the server which causes issues on the server, you can set a fixed amount of memory using the below steps. 

  1. In Object Explorer, right-click a server and select Properties.

  2. Click the Memory node.

  3. Under Server Memory Options, enter the amount that you want for Minimum server memory and Maximum server memory.

    Use the default settings to allow SQL Server to change its memory requirements dynamically based on available system resources. The default setting for min server memory is 0, and the default setting for max server memory is 2147483647 megabytes (MB).

Could not load file or assembly \'CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0

If you face the below crystal report related error, kindly search the required crystal report from following link and install it.

http://scn.sap.com/docs/DOC-7824

Parser Error Message: Could not load file or assembly \'CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304\' or one of its dependencies. The system cannot find the file specified.

Thursday 28 March 2013

Custom php.ini per domain in Plesk Windows server


There will always be the scenarios where we need to set some special php settings for a particular domain or for a particular directory. This can be easily done in a Linux server, but with Windows it is always issues. But we can done this windows servers also and tell you what i have verified this by myself.

Prerequisites:-

*Custom php,ini file only works with php handler as “cgi” and not with “fastcgi” nor with ISAPI extension. So you need to verify this before you proceed further.

Follow the below steps to set the correct php mode.

1. Log in to your Hosting Control Panel
2. Select your domain name
3. Under “Web Site” tab, click on “Web Hosting Settings”
4. Under “PHP Support”, select your desired “PHP Mode” settings(cgi mode)
5. Hit the “Ok” button to activate.

Assumptions:-

    The default location of php.ini for PHP5 is the PleskPHP5 base directory %plesk_dir%AdditionalPleskPHP5 (Eg: c:Program FilesParallelsPleskAdditionalPleskPHP5). If you place an PHP info page, you can easily find out from where the current php settings is loaded.
    The document root of the domain “maindomain.com” is “d:Inetpubvhostsmaindomain.comhttpdocs”. Please note that this may be different in your hosting environment.
    The server I am working on is a x86 based server.
    Plesk version is 10.3.1, but it should work with others also.

Turn off the register_globals

I will explain the procedures with an example to turn off the register globals . There are two ways to configure php values for a particular domain:-

1. By placing an customized php.ini page on the corresponding directory or in domain.
2. By creating a Windows registry value for the particular php settings.
Placing an customized php.ini page on the corresponding directory
You need to place the php.ini file in “maindomain.com/httpdocs” directory or if you want to apply the only to a addon domain or a directory, then use the directory “maindomain.com/httpdocs/addondomain.com”.

Follow the below steps:-

1. Copy the PHP version 5 (php.ini-recommended or php.ini) ini file from the PHP location %plesk_dir%\AdditionalPleskPHP5 to the location “maindomain.com/httpdocs”
2. Rename the copied file to the exact name as ‘php-cgi-fcgi.ini‘. This is the most important step and won’t work otherwise.
3. You can make the changes needed to the above ini file, say set the “register_globals = Off”.
3. Create a php info page the corresponding directory and verify it is loading the correct “php.ini” (check the loaded configuration file section). Also verify whether the value you have changed is now updated under the ‘PHP info’ page.

This should do the work. If this method doesn’t work for you, here is the second method.

Creating a Windows registry value

Even though this is a simple procedure, i do not recommend anyone to edit the Windows Registry because if you screw up anything with Registry, you will also screwed up :)

When running PHP on Windows, the configuration values can be modified on a per-directory basis using the Windows registry. The configuration values are stored in the registry key HKLMSOFTWAREPHP5Per Directory Values, in the sub-keys corresponding to the path names. For example, configuration values for the directory c:inetpubwwwroot would be stored in the key HKLMSOFTWAREPHP5Per Directory Valuescinetpubwwwroot. The settings for the directory would be active for any script running from this directory or any subdirectory of it. The values under the key should have the name of the PHP configuration directive and the string value.

Simply, you can only add individual php configuration value inside of php.ini through the registry, which means that you have to set up keys to the file path ( where the client’s hosting folder located ) and then add a string value, string name will be the php.ini configuration name and value will be how you want it to be. So for setting register_globals to off for the maindomain.com, you have to setup keys to the path “HKEY_LOCAL_MACHINE > SOFTWARE > Wow6432Node > PHP > Per Directory Values > C > Inetpub > vhosts > maindomain.com > httpdocs” and then add a string value, string name will be “register_globals” and value will be 0 to put register_globals= off.
Note:

For 32 bit Windows registry path is ,  HKLMSOFTWAREPHP5Per Directory Values
For x64 based Windows registry path is,  HKEY_LOCAL_MACHINESOFTWAREWow6432NodePHP5Per Directory Values

Reference:-

http://forum.parallels.com

http://www.php.net

How to upgrade Zen Cart 1.3.9 to Zen Cart 1.5



To upgrade your Zen Cart 1.3.9 to Zen Cart 1.5, follow the following steps. (For this tutorial, I assume you are using cpanel web hosting)

1. Backup your existing Zen Cart 1.3.9 website by logging on to your Cpanel > File Manager and select all files and then click compress and save the zip file. If your zencart is in a folder e.g /zen then select this folder and click compress to zip the files.

2. Now backup your existing mysql database, go to phpmyadmin in your cpanel hosting and then click the database name on the left and then click export to export the database dump.

3. Login to your admin and make a list of all the modules that are installed like shipping modules (ups/usps), image handler etc in a notepad file.

4. Download the latest zen-cart 1.5 from zen-cart.com and then using ftp upload the zip file to your public_html folder. Extract the zip file to your desktop as well for later reference.

5. Using File Manager again, select the zip file and then click extract to extract the files in a folder e.g /newzen

6. When you will extract the zip file, it will create another folder “zen-cart-v150-full-release-12302011″  inside newzen so open that folder and then select all the files and move them out of this folder to /newzen folder.

7. Now create a new database by going to phpmyadmin and then click import to import the database dump that you exported before, mysql database of your Zen Cart 1.3.9 website (Step 2)

8. Extract your Zen Cart 1.3.9 backup files and then edit Zencart 1.3.9 backup folder/includes/configure.php and update the path, database name, database user and password and then using ftp upload it to public_html/newzen/includes folder. Similarly, edit the admin configure file by going to Zencart 1.3.9 backup folder/youradminfolder/includes/configure.php and upload it to your public_html/newzen/admin/includes folder

9. Copy the images folder from your 1.3.9 backup folder and upload it to /public_html/newzen

10. Now go to http://yourdomainname.com/newzen/zc_install and then choose “Database Upgrade”.  If Database Upgrade option is not there, then you will have to look at the configure files as the installer was not able to connect to the database.

11. Delete the zc_install folder and then rename the admin folder. When you rename the admin folder also update the configure file (youradminfolder/includes/configure.php)

12. You may have made many changes to your languages folder so use the tool (WinMerge) to compare the zen cart 1.3.9 backup folder with the zen cart 1.5 folder and note the files that are different. You may have installed custom template so there will be extra files as well. So copy the custom template folders/files to the new upgraded store.

13. Re-Install all the modules (Shipping/Payment) and other modules that you had on your old zencart store. (All mods may not be compatible with the new version)

14  Test everything.

15. Now move your Zen Cart 1.3.9 files from public_html folder to /oldsite and move the contents of /newzen folder to the root and then update the configure files. And if you had the zencart in a folder then rename the newzen to store or catalog.

You are finally done with the upgrade of your zen cart store.

How to bulk import products into Zencart 1.5

If you want to import products in bulk into Zen cart then follow the steps below

1. Download EasyPopulate 4.0 (EP4) module for Zencart by going to https://github.com/chaddro/EasyPopulate-4.0

2. Change the name of the admin directory to match your Zen Cart Installation.

3. Using Filezilla (ftp), upload all the files in admin directory to your site maintaining the directory structure.

4. Upload the additional file in zencart 1.5 extra files folder.

5. Create a folder ‘temp’ in the root of your zencart store. You may edit the uploads folder by going to Configuration -> Easy Populate 4

6. Add 2-3 categories and products manually.

7. Then go to Tools >Easy Populate 4

8. Click on Complete Products (with Metatags) to export the csv. This will save the csv to the uploads directory (temp folder)


9. Download this csv file and open it with Open Office Calc or Microsoft Excel.

10. Populate this csv file with your products data.
        v_products_model has to be unique, any record with blank v_products_model will be skipped
        Upload all your images in your zencart images folder and add the name of the image with extension to v_products_image column in the csv.

11. When your csv is ready, go to Tools > Easy Populate 4 and Upload EP File (Choose File and then click Import File)

12. When the file is imported, click “Import” against that file and your products will be imported into your zencart store.

13. After the import is complete, you can have a look at Import Results for the no of records inserted and updated.

How to move wordpress site to a new Website


In this tutorial I will explain how you can transfer your wordpress site from one domain to another. I’ll assume you are using cpanel web hosting.

1. Login to your cpanel hosting and go to File Manager and select all the wordpress files and then click compress to create a backup (backup.zip) of your wordpress site.

2. Download the backup.zip file by going to yourdomain.com/backup.zip

3. Then go to phpmyadmin and on your left click on the database name and then click Export. Select Custom Export Method and choose Output “Save output to a file “ and then choose Compression “zipped or gzipped” and click Go. This will download the compressed database/mysql dump file.

4. Extract the database file and then open it with an editor (e.g notepad++) and press Cntrl+H to replace all the occurrences of domain with the new domain name.

5. Now login to your new hosting’s cpanel (If the new domain is hosted on the new hosting)

6. Under Databases click on MySQL® Databases and create a new database for the new domain, Add new database user and then add that user to that database.

7. Then go to phpmyadmin and on your left click on the new database that you created and click Import and then click Choose File to browse for the mysql file and then click Go. Database will be imported.

8. Using ftp (Filezilla) upload the wordpress files (backup.zip) and then using File Manager in Cpanel, extract the zip file. You are in public_html folder, so when you will extract the zip file it will create a new folder backup in public_html so open this folder and move all the contents of this folder to public_html folder. If you have added the domain as an addon domain then move the wordpress files to its respective folder.

9. Update the wp-config file with the new database details (database name, username and password)
 

You are done with moving your wordpress site to a new website.

An error has occurred. Furthermore, Horde encountered an error attempting to log this error. Please check your Horde logging configuration in horde/config/conf.php

When you get the error "An error has occurred. Furthermore, Horde encountered an error attempting to log this error. Please check your Horde logging configuration in horde/config/conf.php."


Most probably this error occurs due to soft-failed Horde upgrade. AFAIK starting from Horde 3.2 they reimplemented logging solution, so if not all files were replaced you might suffer from compatibility problems.

To solve the issue, please follow the below steps :

Open the conf.php file which usually can be found at :

'/etc/psa-webmail/horde/horde/conf.php' (for linux)
or 'C:\inetpub\vhosts\webmail\horde\config\config.php ' (for windows), pathes may vary on different Plesk and OS versions.

Once you have opened the file, search for : $conf['log']['enabled']
It will be enabled by default. Just change the value from 'true'  to 'false' so that it looks like :

$conf['log']['enabled'] = 'false';

This will solve you issue.

HTTP Error 403.19 – Forbidden The configured user for this application pool does not have sufficient privileges to run CGI applications.

If you get the error

“HTTP Error 403.19 – Forbidden
The configured user for this application pool does not have sufficient privileges to run CGI applications.”


Try this (for IIS 7 and above)

1. Open IIS Manager

2. In the IIS Manager, click sites >> double click on the website on which you are getting the error.

3. Under website settings click on CGI.

4. Change Impersonate User from True to False.

5. Click Apply on the right.

Now try to access the site.