Pages

Wednesday, February 25, 2015

mssql_connect() not working on centos 6.2 / 6.5

server: centos 6.2
PHP Version 5.3.3

had install: freetds; ODBC; php_mssql
selinux was disable
mssql.so was enable in php.ini

for install freetds on centos click here 

if finish restart your server

How to Install Configure FreeTDS on centos 6.5

FreeTDS is a set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase databases.

Technically speaking, FreeTDS is an open source implementation of the TDS (Tabular Data Stream) protocol used by these databases for their own clients. It supports many different flavors of the protocol and three APIs to access it.
Additionally FreeTDS works with other software such as Perl and PHP, providing access from those languages as well.


Well i will use this to connect my Perl Scripts to SQL Server Databases in CentOS.
Currently in 6.5 using yum, version installed is not working correct with Perl DBD Module. By this reason i need to do this task manually from scratch.

Requirement

RHE EPEL Repository
You must have make and gcc commands installed on your system
1.Install UnixODBC Package

[root@localhost ~]# yum install unixODBC unixODBC-devel

2. Install freeTDS Package

[root@localhost tmp]# wget ftp://ftp.astron.com/pub/freetds/stable/freetds-stable.tgz
[root@localhost tmp]# tar xfvz freetds-stable.tgz
[root@localhost freetds-stable]# cd [your freetds folder]
[root@localhost freetds-stable]# ./configure --prefix=/usr/local/freetds
[root@localhost freetds-stable]# make
[root@localhost freetds-stable]# make install
[root@localhost freetds-stable]# ln -s /usr/local/freetds/etc/freetds.conf /etc/freetds.conf


Friday, February 20, 2015

jquery loading animation

you can add loading animation on even submit.
before add loading animation, you can make a loading animation here
download  and then make id default value on ready function $('#wait').hide();
and then show loading animation like here,

$('#form').submit(function() {
    $.ajax({
        url: '/whatever.php',
        beforeSend: function() { $('#wait').show(); },
        complete: function() { $('#wait').hide(); }
    });
    return false;
});

Tuesday, February 10, 2015

how to install virtualBox 4.3 on Fedora/CentOS/RHEL


Oracle VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. VirtualBox is a general-purpose full virtualizer for x86 hardware. Targeted at server, desktop and embedded use, it is now the only professional-quality virtualization solution that is also Open Source Software.
VirtualBox supports a large number of guest operating systems:
Windows 3.x
Windows NT 4.0
Windows 2000
Windows XP
Windows Server 2003
Windows Vista
Windows 7
Windows 8
Windows 8.1
DOS
Linux (2.4, 2.6, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11)
Solaris
OpenSolaris
OpenBSD
This guide shows howto install VirtualBox 4.3 (currently 4.3.20) on Fedora 21/20/19/18/17, CentOS 7/6.6/5.11, Red Hat (RHEL) 7/6.6/5.11. This guide uses Virtual Box own yum repositories.
Note: Fedora 16 users can install VirtualBox 4.2, Fedora 15/14 users can install VirtualBox 4.1, Fedora 13 users can install VirtualBox 4.0 and Fedora 12 users can install VirtualBox 3.2.

1. Change to root User
#su -

2. Install Fedora or RHEL Repo Files
#cd /etc/yum.repos.d/


Fedora 21/20/19/18/17/16/15/14/13/12 users
#wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo

CentOS 7/6.6/5.11 and Red Hat (RHEL) 7/6.6/5.11 users
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo


How to install google chrome on centos 6

Download application from 
# wget http://chrome.richardlloyd.org.uk/install_chrome.sh

Change user access
# chmod +x install_chrome.sh

and then Install application 
# sh install_chrome.sh