Saturday, June 25, 2011

Installing SugarCRM on Apache Web Server

Steps:
1. Create a database say 'sugarcrm'.

2. If you want to use open source SugarCRM, download SugarCRM Community Edition
   http://www.sugarcrm.com/crm/download/sugar-suite.html

3. Unzip it and place inside your application server deployment folder. Rename it with some name for e.g. sugarcrm.

4. Open your browser and type the url of your sugarcrm. For e.g. http://localhost/sugarcrm in my case. You will then see the sugarcrm page, click next. After that you will see a page as shown below.



  • Check if  php, database and web server are of supported version. If you are working in linux:     
    • You might need to give enough write permission to session variables by giving read and write access to 'session' located in  /var/lib/php/session
    •  Give appropriate read and write permission to config.php file located inside sugarcrm folder
    •  Give appropriate read and write permission to folders inside sugarcrm like custom, cache and modules
    • To install MB string and curl
      • yum install php_curl, php_mbstring (for CentOS)
    • If you are working in windows and want to  install MB strings, go to php.ini and    
      • ;extension=php_mbstring.dll with
      • extension=php_mbstring.dll
        check if php_mbstring.dll is present inside php 'ext' folder. 
      • To enable curl, uncheck php_curl.dll and check if it is present inside php 'ext' folder
    • Restart web server

5. Finally, you should be able to see 'Confirm Setting' page as shown below. In this page, if you see some of the modules not found, then you can enable the modules in php.ini as mentioned in step 4.


Now, after some steps, you will be redirected to sugarcrm login page. Login to the page and make the settings according to your requirement.

Connect MSSQL using ODBC in Linux (CentOS)

For connecting MSSQL using ODBC in Linux you can use unixODBC and freeTDS.  unixODBC is a tool for using ODBC in Non Windows platform. MSSQL uses Tabular Data Stream (TDS) as a communication protocol which is same like in Sybase. freeTDS is an implementation of TDS protocol.

Installing unixODBC
      1.      Install gcc
#yum install gcc

      2.      Download unixODBC and untar it
#mkdir /root/downloads
#cd /root/downloads
#wget ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.0.tar.gz
#tar –xzf unixODBC-2.3.0.tar.gz
#cd unixODBC-2.3.0

      3.      Install unixODBC
#./configure
#make
#make install

Installing freeTDS
     1.      Set environmental variable at /etc/profile. Add following lines at end
#nano /etc/profile


# TDS
SYBASE=/usr/local 
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$SYBASE/lib 
export SYBASE LD_LIBRARY_PATH 
/etc/profile

     2.      Download freeTDS and untar it
#cd /root/downloads
#wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-0.82.tar.gz
#tar –xzf freetds-0.82.tar.gz
#cd freetds-0.82
     3.      Install freeTDS
# ./configure --with-tdsver=8.0 --with-unixodbc=/usr/local
#make
#make install

     4.      Now all your library will be inside /usr/local/lib and configuration files inside /usr/local/etc

     5.      Make template to register ODBC driver with unixODBC
#nano /usr/local/etc/tds.driver.template


[FreeTDS]
Description     = v0.63 with protocol v8.0
Driver          = /usr/local/lib/libtdsodbc.so
tds.driver.template
     6.      Now install the driver entry using above template
# odbcinst -i -d -f /usr/local/etc/tds.driver.template

     7.      Make template to create ODBC data source name
#nano /usr/local/etc/tds.datasource.template


[MSSQLTest]
Driver  = FreeTDS
Description     = Sample Database
Trace   = No
Server      = 192.168.0.1
Port      = 1433
Database        = TestDB
tds.datasource.template
     8.      Now create odbc data source using above template
# odbcinst -i -s -f /usr/local/etc/tds.datasource.template

     9.      Finish. You can test it by giving command
                       # isql -v MSSQLTest username password 

Friday, June 17, 2011

CakePHP for beginners

This is my attempt to help you out if you are starting to learn cakephp.

If you want to install CakePHP in xampp, the below link will be helpful for you.
http://narenbimal.blogspot.com/2008/07/cake-is-php-web-development-framework.html

For the basic knowledge and tutorial you can go to the site.
http://book.cakephp.org/view/879/Beginning-With-CakePHP

To start learning with CakePHP, I found tutorials on youtube. It makes learning easy and convenient as we get the clear idea of what should be done. The uploader 'Andrew Perk' has made 10 tutorials starting from:
http://www.youtube.com/watch?v=nO9oSQhRa9s
You can view the rest 9 tutorials from the suggestions.

He has also made 3 more tutorials for authentication i.e. for login and logout which starts from:
http://www.youtube.com/watch?v=FjXAnizmR94
You can also see other tutorials there.

Hope you found this information useful.
Happy Coding!!