There are two most common issues while restoring the database (usually ending in .bak format).
First error
System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing ‘user_database‘ database. (Microsoft.SqlServer.Express.Smo)
Solution for First error

System.Data.SqlClient.SqlError: Directory lookup for the file “D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\user_database.mdf” failed with the operating system error 3(The system cannot find the path specified.). (Microsoft.SqlServer.Express.Smo)
On an html page, one of our customers was getting this issue. Despite asking him to change the extension to .asp, he insisted to have html extension and still process the HTTP verbs, where it is POST method here.
Situation becomes like this a static page wants to be read a dynamic page and process the values obtaining from POST method. Solution is to make the .html read as .asp with asp dll, just like we do html parse as php in Linux boxes Here are the steps to do it on a Windows 2003 machine
1. Start –> Run –> inetmgr
2. Websites –> website/domain name in question
3. Right Click on the domain –> Properties –> Home Directory –> Configuration
4. In the tab Mappings –> Add an extension for .html and .htm , if it is missing (most cases it will be missing) and edit to add all verbs (POST, GET, HEAD are needed)
5. Fields to be added are as below,
Executable : C:\WINDOWS\system32\inetsrv\asp.dll
Extension : .html
Limit to : GET,HEAD,POST,TRACE
And Click Apply, OK
All is well !!
Recently with a cPanel server, we had this issue of not being able to create postgresql database even after the postgresql package is installed and database server is running. Fixing of one issue lead to another there by needing to fix all the errors.
Cpanel::AdminBin::adminrun(postgres) set error in context postgres
[2010-01-16 12:24:18 -0500] warn [postgres::listdbs] Encountered error in postgres::listdbs: Error from postgres wrapper: PostgreSQL has not been configured by the administrator. Unable to locate pgpass file.
This was fixed by doing these,
Login to WHM => SQL Services => Postgres Config => Click on “Install Config”.
Login to WHM => SQL Services => Postgres Config => “Set a Postgresql password also”
No error in cPanel after doing above. However that followed by an issue of created DBs not being appeared in the List DB page of Postgresql databases. Went to shell. Logged in as root . Switched to postgres. “su – postgres” . Ran the command “psql” and then
-bash-3.2$ psql
Welcome to psql 8.1.18, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
postgres=# \l
List of databases
Name | Owner | Encoding
-----------+----------+----------
postgres | postgres | UTF8
template0 | postgres | UTF8
template1 | postgres | UTF8
(3 rows)
postgres=# \q
No DB was created. Checked the logs /usr/local/cpanel/logs/error_log and it had entries like ERROR: role “username” does not exist which meant, no roles to create the database.
cd /var/cpanel/users && for x in *; do su -c "createuser -S -D -R $x" postgres; done
By default CentOS or RHEL flavours of Linux has Apache 2.2 installed. It often becomes a requirement to enable mod_rewrite on these servers. Techs who have been working with cPanel and server with control panels often finds it difficult to troubleshoot issues with a bare server. There are a few things to check or commands to execute in such case where mod_rewrite is shown enabled in the httpd.conf, but not working.
[root@cave html]# httpd -V
Server version: Apache/2.2.3
[root@cave html]# httpd -M
Loaded Modules:
core_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
auth_basic_module (shared)
auth_digest_module (shared)
….
…….
….
rewrite_module (shared)
proxy_module (shared)
proxy_balancer_module (shared)
proxy_ftp_module (shared)
proxy_http_module (shared)
proxy_connect_module (shared)
[root@cave html]# a2enmod rewrite
a2enmod is only to be used if the rewrite_module is not enabled in httpd.conf
Check for the “AllowOverride” settings. It should be set to “All“. By default it will be “None”
Things should work fine after this. Also I found a small good script to check at this URL to see whether mod_rewrite is enabled or not http://www.webune.com/forums/how-to-test-check-if-mod-rewrite-is-enabled-t40.html
Good Luck guys!
Continue ReadingSometimes Magento admins face the issue of some values missing from the frontend even though the configuration would have shown to be saved from Backend. This could be due the limit in the number of values set by suhosin.
The common override for this issue is to have the following values set in .htaccess
php_value suhosin.mail.protect 0
php_value suhosin.memory_limit 128M
php_value suhosin.post.max_vars 5000
php_value suhosin.post.max_value_length 500000
php_value suhosin.request.max_vars 5000
php_value suhosin.request.max_value_length 500000
php_flag suhosin.session.cryptua off
For php.ini use the variables without php_value or php_flag
Continue Reading