Category: Code or Hosting

  • Restore of database ‘NEWDB’ failed. (Microsoft.SqlServer.Management.RelationalEngineTasks) ADDITIONAL INFORMATION: System.Data.SqlClient.SqlError: BACKUP LOG cannot be performed because there is no current database backup. (Microsoft.SqlServer.SmoExtended)

    Restore of database ‘NEWDB’ failed. (Microsoft.SqlServer.Management.RelationalEngineTasks) ADDITIONAL INFORMATION: System.Data.SqlClient.SqlError: BACKUP LOG cannot be performed because there is no current database backup. (Microsoft.SqlServer.SmoExtended) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.2100.60+((SQL11_RTM).120210-1917+)&LinkId=20476 Lets take a look in the SQL Server error log, to do so: In Object Explorer, expand a server, expand Management, and then expand SQL Server Logs. Right-click a…

  • Migrating SQL Server Users

      Are you migrating SQL users?  I recommend migrating their SID’s as well.  There is this article on MSDN.  The sum of it is to run this: USE master GO IF OBJECT_ID (‘sp_hexadecimal’) IS NOT NULL DROP PROCEDURE sp_hexadecimal GO CREATE PROCEDURE sp_hexadecimal @binvalue varbinary(256), @hexvalue varchar (514) OUTPUT AS DECLARE @charvalue varchar (514) DECLARE @i int DECLARE @length…

  • php Warning: Cannot modify header information

    I received the error of “php Warning: Cannot modify header information”, and found the fix is to update my php.ini to include this: output_buffering = On I ‘could’ also set the variable in an include page, if my site was running PHP as a CGI.

  • Forcing IP Resolution of a Domain for Local Testing Purposes

    If you need to test a server using a domain name, but can not repoint the domain to test, you can force your local machine to resolve the domain name to the IP address of your choice.  You do this using the hosts file, on Windows, or the resolv.conf file on a linux OS.  This…

  • Migrating MySQL Users Between Servers

    I want a ONE liner to migrating MySQL users between servers. We know that migrating databases is easy enough using mysqldump, but migrating users from one MySQL instance or server to separate one can be annoying. Based on well known export commands, here is a neat little piped set of commands that you can run…

  • Setting the To, CC, BCC, Subject & Body Fields Using Mailto: Links

    I recently came across a scenario where I needed to have a mailto: link include additional details, and particularly an email address in the cc field.  You can configure an HTML mailto: link to include a number of fields: Basic Mailto: Link To: CC: BCC: Subject: Body:     The Mailto: Link The Mailto: Link is…

  • Setting Up SmarterStats 7

    SmarterStats, and you.  I ♥ SmarterStats, from a usability standpoint as well as from an administrator/troubleshooter standpoint.  The latest iteration is 7.6.4682, as of this writing. Release notes are found here.  After the installation, including the requirement for .NET 4, it will auto open the Getting Started page, likely at http://localhost:9999/GettingStarted.htm.  It seems that in this version, and…

  • Xp_cmdshell and Errors in SQL server.

    This article is essentially a combination of two articles I had read online. One made it easy to find the errors and the other made it easy to find the fix, but I wanted one place where I could find BOTH. What do you need in place in order to use xp_cmdshell? I warn you,…

  • Leverage Browser Caching in .htaccess File

    Leverage browser caching The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources: With a note of: (expiration not specified) To deal with this, I added the following to my .htaccess file: <FilesMatch “\.(ico|jpg|jpeg|png|gif|js|css|swf|woff|ICO|JPG|JPEG|PNG|GIF|JS|CSS|SWF|WOFF)$”> <IfModule mod_expires.c> ExpiresActive on ExpiresDefault “access plus 30…

  • Grouping Customer Origins in EdgeCast Rules

    Edgecast Rules based on Hostname or IP Address, only if you have a common naming convention for the Directory Name, for example: prefix1_example.net prefix2_example.org You can then create a rule: IF ‘URL Path Directory’ ‘Matches’ Value: /123456/prefix1_* (I used 123456 in place of the CDN origin path, update this to your settings) ‘Ignore Case’, ‘Relative…