October 23, 2008

PHP configuration

There is a problem when we use imagettftext() in php and we can solve it by take off the comment before this following phrase. (php.ini)

Another common problem is happened when we use the short tag and we should change the value of this following phrase from "off" to "on".(php.ini)
short_open_tag = on

The following solution is for any variable that you want to use without $_POST OR $_GET.(php.ini)

The following solution is for solving the error of DB connection.(php.ini)
error_reporting = E_ERROR & ~E_NOTICE & ~E_STRICT

This one is used to allow other machine to browse our local file. (httpd.conf)
Allow from all

October 03, 2008

Install Ruby on Rails in Ubuntu

Step 1: Install Ruby from apt-get.
~$ sudo apt-get install ruby irb ri rdoc ruby1.8-dev libzlib-ruby libyaml-ruby libreadline-ruby libncurses-ruby libcurses-ruby libruby libruby-extras libfcgi-ruby1.8 build-essential libopenssl-ruby libdbm-ruby libdbi-ruby libdbd-sqlite3-ruby sqlite3 libsqlite3-dev libsqlite3-ruby libxml-ruby libxml2-dev

Step 2: Download and install RubyGems
Just download and extract the latest Gem and run following command.
~$ sudo ruby setup.rb

After successful installation, run this to create the link in /usr/bin
~$ sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

Step 3: Install Rails and Gems
~$ sudo gem install rails
~$ sudo gem install sqlite3-ruby mongrel capistrano

Since I don’t use MySQL anymore, it’s really optional. It’s basically same as before, just make sure you are using following command to get everything you need for MySQL.
~$ sudo apt-get install mysql-server mysql-client libdbd-mysql-ruby libmysqlclient15-dev