Archive for February, 2009
MSSQL Connection Error with PHP
Written by Mike on February 28, 2009 – 10:15 pm -mssql_connect() is a function which establishes a connection to a MS SQL server using PHP. To use MSSQL database in PHP page make sure that MSSQL dll is enabled in PHP. To check open php.ini file and search for following
extension=php_mssql.dll
Sometime it happens that when you try to connect MSSQL database using PHP it throws following Error (espiceally when you have installed PHP 5)
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: SERVER\SQLEXPRESS in C:\Inetpub\wwwroot\dbconnection.php on line 6
The problem come due to higher version ntwdblib.dll available with PHP 5. The simple fix for this problem is to replace the ntwdblib.dll with old version. You can download the Old version of dll file from http://trulymanaged.com/downloads/ntwdblib.dll OR if you have Plesk Control Panel you can directly copy/replace C:\WINDOWS\system32\ntwdblib.dll with C:\Parallels\Plesk\additional\PleskPHP5\ntwdblib.dll
Tags: "Unable to connect to server", function.mssql-connect, mssql_connect(), php_mssql.dll
Posted in Plesk For Windows, VPS hosting, Windows VPS | No Comments »
SSH Error: /etc/shells is either world writable or not a normal file
Written by Mike on February 26, 2009 – 11:52 pm -Recently while trying to login into a VPS; SSH was not accepting Password for the user root. So, I logged into the VPS from Hardware Node (Host Server) and checked /var/log/messages to get exact Error. Following are the logs which were stored in /var/log/messages file
Feb 23 23:51:10 server PAM-shells[13512]: /etc/shells is either world writable or not a normal file
Feb 23 23:51:14 server PAM-shells[13512]: /etc/shells is either world writable or not a normal file
Feb 23 23:51:17 server PAM-shells[13535]: /etc/shells is either world writable or not a normal file
Feb 23 23:52:49 server sshd(pam_unix)[15414]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=server.example.com user=root
When I checked the permissions of the file /etc/shells and it was set to 777 (universal writable).
root@server [~]# ll /etc/shells
-rwxrwxrwx 1 root root 32 Feb 23 23:54 /etc/shells*
So, I changed the permission of the file to 644 and able to login into SSH.
root@server [~]# chmod 644 /etc/shells
root@server [~]# ll /etc/shells
-rw-r--r-- 1 root root 32 Feb 23 23:55 /etc/shells
root@server [~]#
Hope this fix will work for you too… waiting for your comments.
Tags: /etc/shells, /etc/shells is either world writable or not a normal file, not a normal file, root password not working, SSH Password not working, world writable
Posted in Linux VPS Hosting, linux | No Comments »
CPanel Error: Error while connecting to MySQL. Failover enacted
Written by Mike on February 21, 2009 – 12:36 pm -CPanel of any domain shows following Error on MySQL Databases Section of Left Hand Side Panel
Error while connecting to MySQL. Failover enacted.
SOLUTION:
This error comes when Perl modules for database are outdated OR not installed. You can install them using following Commands:
root@server [~]# perl -MCPAN -e shell cpan> install Bundle::CPAN cpan> reload cpan cpan> install HTTP:ateate cpan> install HTTP:Date cpan> install Net::AIM::Connection cpan> install Net::AIM cpan> install Tie::IxHash cpan> install DBI cpan> install DBD::mysql
Restart MySQL.
Tags: Failover enacted
Posted in Linux VPS Hosting | 2 Comments »





