<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4522516677868669101</id><updated>2012-01-31T14:04:27.533+07:00</updated><category term='Linux Viet'/><category term='Linux'/><category term='Intro me'/><category term='PHP MySQL'/><title type='text'>Linux Apache MySQL PHP Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>62</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-4091492720513777524</id><published>2011-07-25T16:26:00.004+07:00</published><updated>2011-12-05T06:30:18.321+07:00</updated><title type='text'>Disk full error message on Skype</title><content type='html'>&lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:arial;"&gt;Disk full error message on Skype&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;I got it one time and I solved like this:&lt;br /&gt;I exit Skype then delete this folder C:\user\&lt;userdir&gt;&lt;span style="font-weight: bold;"&gt;nguyen&lt;/span&gt;\app data\roaming\skype\&lt;profile&gt;&lt;span style="font-weight: bold;"&gt;nhakhtn&lt;/span&gt;&lt;br /&gt;note: &lt;span style="font-weight: bold;"&gt;nguyen&lt;/span&gt; is my computer account. &lt;span style="font-weight: bold;"&gt;nhakhtn&lt;/span&gt; is my skype account&lt;br /&gt;then start Skype again.&lt;br /&gt;That's it.&lt;br /&gt;&lt;/profile&gt;&lt;/userdir&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-4091492720513777524?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/4091492720513777524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=4091492720513777524' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/4091492720513777524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/4091492720513777524'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2011/07/disk-full-error-message-on-skype.html' title='Disk full error message on Skype'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-4575202639087110619</id><published>2007-12-23T07:40:00.000+07:00</published><updated>2007-12-24T02:37:47.492+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Clean install packages for save your hard disk</title><content type='html'>&lt;span style="font-family:arial;"&gt;After you install new software by "sudo apt-get install .... ", packages need by software will be downloaded and archived in /var/cache/apt/archive, and those occupy space hard disk. How to clean up those?&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;- You can remove them with root permittion: sudo rm /var/cache/apt/archive/*.deb&lt;/span&gt; &lt;span style="font-weight: bold;font-family:arial;" &gt;&lt;br /&gt;- sudo apt-get autoremove&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-4575202639087110619?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/4575202639087110619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=4575202639087110619' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/4575202639087110619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/4575202639087110619'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/12/clean-install-packages-for-save-your.html' title='Clean install packages for save your hard disk'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-7892533576367804629</id><published>2007-12-07T11:04:00.000+07:00</published><updated>2007-12-07T11:07:04.757+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Installing LAMP on Ubuntu 7.10</title><content type='html'>Lately I’ve been using ubuntu 7.10 for all my projects/daily work.&lt;br /&gt;As a web developer i should have LAMP on my machine and now i would guide you through installing it on yours.&lt;br /&gt;&lt;br /&gt;This guide is divided into 3 steps: installing/tesing Apache, PHP and finally MySQL.&lt;br /&gt;&lt;br /&gt;Lets start with Apache:&lt;br /&gt;1. Open the terminal (we will be using it through most of my guide) from Applications &gt; Accessories &gt; Terminal&lt;br /&gt;2. Install apache2 using apt-get by typing the following&lt;br /&gt;sudo apt-get install apache2&lt;br /&gt;&lt;br /&gt;Note that you should know the root password.&lt;br /&gt;Now everything should be downloaded and installed automatically.&lt;br /&gt;To start/stop apache2 write:&lt;br /&gt;sudo /etc/init.d/apache2 start&lt;br /&gt;sudo /etc/init.d/apache2 stop&lt;br /&gt;&lt;br /&gt;Your www folder should be in: /var/www/&lt;br /&gt;&lt;br /&gt;If everything is OK you should see an ordinary HTML page when you type: http://localhost in your firefox browser&lt;br /&gt;&lt;br /&gt;Finished with Apache ? lets conquer PHP:&lt;br /&gt;1. Also in terminal write:&lt;br /&gt;sudo apt-get install php5 libapache2-mod-php5&lt;br /&gt;&lt;br /&gt;or any php version you like&lt;br /&gt;2. restart apache&lt;br /&gt;sudo /etc/init.d/apache2 restart&lt;br /&gt;&lt;br /&gt;This is it for PHP :D&lt;br /&gt;Wanna test it ? Just create an ordinary PHP page in /var/www/ and run it.&lt;br /&gt;Example:&lt;br /&gt;sudo gedit /var/www/test.php&lt;br /&gt;&lt;br /&gt;and write in it: &lt; ?php echo "Hello World"; ?&gt;&lt;br /&gt;&lt;br /&gt;Now run it by typing http://localhost/test.php in firefox… You should see your ” Hello World ”&lt;br /&gt;&lt;br /&gt;66 % is over, lets continue to installing MySQL:&lt;br /&gt;1. Again and again in terminal execute:&lt;br /&gt;sudo apt-get install mysql-server&lt;br /&gt;&lt;br /&gt;2. (optional) If you are running a server you should probably bind your address by editing bind-address in /etc/mysql/my.cnf and replacing its value (127.0.0.1) by your IP address&lt;br /&gt;3. set your root password (although mysql should ask you about that when installing)&lt;br /&gt;mysql&gt; SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(’xxxxxx’);&lt;br /&gt;&lt;br /&gt;4. Try running it&lt;br /&gt;mysql -uroot -pxxx&lt;br /&gt;&lt;br /&gt;where xxx is your password.&lt;br /&gt;Note: You can install PHPMyAdmin for a graphical user interface of MySQL by executing&lt;br /&gt;sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin&lt;br /&gt;&lt;br /&gt;5. restart apache for the last time&lt;br /&gt;sudo /etc/init.d/apache2 restart&lt;br /&gt;&lt;br /&gt;Congratulions your LAMP system is installed and running :D&lt;br /&gt;Happy Coding&lt;br /&gt;&lt;br /&gt;//Jo&lt;br /&gt;&lt;br /&gt;UPDATE:&lt;br /&gt;Due to the large number of people emailing about installing/running phpmyadmin.&lt;br /&gt;Do the following:&lt;br /&gt;sudo apt-get install phpmyadmin&lt;br /&gt;&lt;br /&gt;The phpmyadmin configuration file will be installed in: /etc/phpmyadmin&lt;br /&gt;Now you will have to edit the apache config file by typing&lt;br /&gt;sudo vi /etc/apache2/apache2.conf&lt;br /&gt;&lt;br /&gt;and include the following line:&lt;br /&gt;Include /etc/phpmyadmin/apache.conf&lt;br /&gt;&lt;br /&gt;Restart Apache&lt;br /&gt;sudo /etc/init.d/apache2 restart&lt;br /&gt;&lt;br /&gt;Another issue was making mysql run with php5&lt;br /&gt;First install these packages:&lt;br /&gt;sudo apt-get install php5-mysql mysql-client&lt;br /&gt;&lt;br /&gt;then edit php.ini and add to it this line : ” extensions=mysql.so” if it isnt already there&lt;br /&gt;sudo vi /etc/php5/apache2/php.ini&lt;br /&gt;&lt;br /&gt;Restart Apache&lt;br /&gt;sudo /etc/init.d/apache2 restart&lt;br /&gt;&lt;br /&gt;Hope this helps :)&lt;br /&gt;&lt;br /&gt;Popularity: 44%&lt;br /&gt;&lt;br /&gt;From : &lt;a href="http://joeabiraad.com"&gt;http://joeabiraad.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-7892533576367804629?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/7892533576367804629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=7892533576367804629' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7892533576367804629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7892533576367804629'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/12/installing-lamp-on-ubuntu-710.html' title='Installing LAMP on Ubuntu 7.10'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-1823658430026359980</id><published>2007-09-28T08:32:00.001+07:00</published><updated>2007-09-28T08:56:00.826+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Cài Ubuntu từ a-&gt;z (tiep theo)</title><content type='html'>&lt;b&gt;8. Cài startdic từ điển đa ngôn ngữ.&lt;br /&gt;$ ./configure&lt;/b&gt;&lt;br /&gt;gặp lỗi: configure: error: Package requirements (libgnomeui-2.0 &gt;= 2.2.0) were not met:&lt;br /&gt;No package 'libgnomeui-2.0' found&lt;br /&gt;sửa:&lt;br /&gt;&lt;b&gt;$ sudo apt-get install libgnomeui-dev&lt;/b&gt;&lt;br /&gt;&lt;b&gt;config lại:&lt;br /&gt;./configure&lt;br /&gt;make&lt;br /&gt;sudo make install&lt;/b&gt;&lt;br /&gt;Tạo thư mục chứa file từ điển&lt;br /&gt;&lt;b&gt;$ mkdir /home/nha/.stardict&lt;/b&gt; (nha là tại vì username của tôi là nha các bạn có thể thay bằng username của các bạn)&lt;br /&gt;&lt;b&gt;$ mkdir /home/nha/.stardict/dic&lt;br /&gt;$ cd /home/nha/.stardict/dic&lt;br /&gt;$ wget http://jaist.dl.sourceforge.net/sourceforge/stardict/stardict-dictd_anh-viet-2.4.2.tar.bz2&lt;br /&gt;$ wget http://nchc.dl.sourceforge.net/sourceforge/stardict/stardict-dictd_viet-anh-2.4.2.tar.bz2&lt;br /&gt;$ tar -xjvf stardict-dictd_anh-viet-2.4.2.tar.bz2&lt;br /&gt;$ tar -xjvf stardict-dictd_viet-anh-2.4.2.tar.bz2&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Vậy là xong phần cài.&lt;br /&gt;Tạo icon ở trên desktop và trên taskbar.&lt;br /&gt;a. Tạo trên desktop:&lt;br /&gt;click chuột phải ngoài màn hình desktop. Chọn create Launcher, name bạn gõ "từ điển" command bạn gõ "stardict" xong ok&lt;br /&gt;b. Tạo trên taskbar&lt;br /&gt;click chuột phải vào taskbar chọn Add to panel chọn tiếp custom application launcher làm tương tự tạo icon bên desktop.&lt;br /&gt;(phần hình cho icon bạn có thể browse từ thư mục usr/local/share/stardict/pixmap)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-1823658430026359980?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/1823658430026359980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=1823658430026359980' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/1823658430026359980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/1823658430026359980'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/09/ci-ubuntu-t-z_28.html' title='Cài Ubuntu từ a-&gt;z (tiep theo)'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-7502984094172669144</id><published>2007-09-20T18:41:00.000+07:00</published><updated>2007-09-24T08:45:29.020+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Cài Ubuntu từ a-&gt;z</title><content type='html'>Mình đang cài lại Ubuntu, nói chung là cài từ đầu, thế nên mình viết bài nầy để các bạn đang muốn chuyển sang sử dụng Ubuntu có thể làm theo một cách tuần tự dễ dàng và có một máy tính được cài đặt hoàn chỉnh.&lt;br /&gt;&lt;br /&gt;Về phần cài Ubuntu thì mình khỏi nói lại, chắc các bạn cũng đã cài được rồi, mình sẽ bắt đầu vào phần cấu hình, cập nhật và cài đặt các phần mềm cần thiết.&lt;br /&gt;&lt;br /&gt;(bài viết nầy sẽ được viết dần dần và khi mình cài xong cũng là lúc hoàn thành bài viết nầy :-))&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Cập nhật Ubuntu.&lt;/b&gt;&lt;br /&gt;- Lựa chọn nguồn cài đặt.&lt;br /&gt;Sau khi cài đặt xong, các bạn click vào menu System-&gt;Administration-&gt;Software Sources. Trong thẻ Ubuntu software, phần Download from bạn chọn Other... và sau đó chọn japan-&gt;ftp.ecc.u-tokyo.ac.jp. Thực ra thì bạn có thể chọn Select best Server nhưng nói chung là nó không chính xác lắm. Sau một thời gian sử dụng mình thấy server Nhật software đầy đủ và nhanh nhất. Khi bạn chọn tuỳ chọn nầy xong máy tính của chúng ta sẽ cập nhật lại nguồn các gói phần mềm cài đặt .v.v... &lt;br /&gt;- Cập nhật Ubuntu: &lt;br /&gt;Bạn để ý thấy góc phải trên của màn hình Desktop chúng ta có một biểu tượng màu cam, rê chuột vào nó sẽ xuất hiện một yêu cầu cập nhật lại hệ điều hành. Click vào đó và cập nhật ngay nhé, việc nầy hơi mất thời gian, có thể là mấy tiếng đồng hồ tuỳ theo số lượng phần mềm bạn cần update.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Cài xvnkb để gõ tiếng Việt&lt;/b&gt;&lt;br /&gt;Bạn mở terminal lên (Applications-&gt;Accesories-&gt;terminal) bạn nên click chuột phải lên nó và click chọn: Add this launcher to panel, nó sẽ xuất hiện trên top panel cho bạn lần sau bạn chỉ cần click vào nó là mở được terminal.&lt;br /&gt;Sau khi mở terminal bạn gõ các dòng sau vào:&lt;br /&gt;&lt;b&gt;$ sudo apt-get install build-essential&lt;br /&gt;$ sudo apt-get install xorg-dev&lt;/b&gt;&lt;br /&gt;Hai lệnh nầy dùng để cài thư viện cần thiết cho việc biên dịch và các thư viện để xvnkb hoạt động được, hai lệnh nầy cũng chạy khá là lâu đó nhé các bạn, xin hãy kiên nhẫn (bạn có thể để máy tính ở đó cho nó chạy còn bạn thì kiếm gì thư giãn ;-).&lt;br /&gt;Tải xvnkb về vào link &lt;a href="http://xvnkb.sourceforge.net/xvnkb-0.2.9a.tar.bz2"&gt;http://xvnkb.sourceforge.net/xvnkb-0.2.9a.tar.bz2&lt;/a&gt;&lt;br /&gt;giải nén&lt;br /&gt;&lt;b&gt;$ cd Desktop/&lt;/b&gt;   (chuyển vào thư mục Desktop vì chúng ta download về bằng firefox sẽ lưu file vàoDesktop)&lt;br /&gt;&lt;b&gt;$ tar -xjvf xvnkb-0.2.9a.tar.bz2&lt;/b&gt;&lt;br /&gt;&lt;b&gt;$ cd xvnkb-0.2.9a/&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$ ./autogen.sh&lt;br /&gt;$ gedit config.h&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;sửa file config.h lại như sau:&lt;br /&gt;&lt;br /&gt;#define __VK_CONFIG_H&lt;br /&gt;#define VK_CHECK_SPELLING&lt;br /&gt;#define VK_USE_EXTSTROKE&lt;br /&gt;#define VK_NEED_UCHAR&lt;br /&gt;&lt;br /&gt;(bỏ -e ở đầu file đi)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$ ./configure&lt;br /&gt;$ make&lt;br /&gt;$ sudo make install&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;khởi động xvnkb:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$ xvnkb&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Cấu hình:&lt;/b&gt; click chuột fải lên biểu tuợng xvnkb góc dưới phải màn hình (chọn charset = unicode, input method là vni)&lt;br /&gt;để xnvkb tự chạy khi khởi động trong terminal gõ:&lt;br /&gt;&lt;b&gt;$ gnome-session-properties&lt;/b&gt; &lt;br /&gt;thêm một tác vụ mới vào (cái nầy tự mò nhé các bạn)&lt;br /&gt;(khi khởi động máy lại bạn cũng phải cấu hình lại cho xvnkb, nó mặc định là off)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Cài flash player&lt;/b&gt;&lt;br /&gt;Mở firefox và gõ vào tuoitre.com.vn&lt;br /&gt;sẽ có một thông báo là bạn cần cài flug-in để play file flash bạn chọn install plug-in và theo hướng dẫn để cài flash player.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4. Cài thêm fonts&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Cài microsoft font.&lt;br /&gt;&lt;b&gt;$ sudo apt-get install msttcorefonts&lt;br /&gt;$ sudo fc-cache -fv&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Cài font vni 8 bit (vni-times....)&lt;br /&gt;Tải các font vni-times.ttf .... từ trang web &lt;a href="http://www.dpi.hochiminhcity.gov.vn/vie/webappDN/fonts/index.htm"&gt;http://www.dpi.hochiminhcity.gov.vn/vie/webappDN/fonts/index.htm&lt;/a&gt; rồi copy vào một thư mục nào đó ví dụ vni_fonts&lt;br /&gt;sau đó copy thư mục nầy vào /usr/share/fonts&lt;br /&gt;&lt;b&gt;$ sudo cp -R Desktop/vni_fonts /usr/share/fonts&lt;/b&gt;&lt;br /&gt;cập nhật lại font&lt;br /&gt;&lt;b&gt;$ sudo fc-cache -fv&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5. Đọc và ghi dĩa cứng định dạng ntfs : &lt;/b&gt;bạn có nhu cầu đọc và ghi dữ liệu từ các ổ đĩa ntfs thì phải làm thế nào?  Rất đơn giản chỉ cần 2 bước:&lt;br /&gt;Bước 1 vào terminal gõ: &lt;br /&gt;&lt;b&gt;$ sudo apt-get install ntfs-config&lt;/b&gt;&lt;br /&gt;Bước 2: menu Applications &gt; System Tools &gt; NTFS Configuration Tool. Sẽ có một màn hình yêu cầu bạn nhập mật khẩu của bạn vào, rồi đến cửa sổ cấu hình rất đơn giản. Đánh dấu vào tuỳ chọn bạn thấy cần rồi nhấn OK là xong (internal device là hỗ trợ cho ổ cứng gắn trong, bao gồm những phân vùng Windows trên đĩa cứng của bạn, external device là cho thiết bị gắn ngoài như ổ cứng di động, USB…). Từ giờ bạn có thể làm việc thoải mái với phân vùng NTFS rồi.&lt;br /&gt;Chú ý: Nếu trước đó Ubuntu chưa nhận diện phân vùng NTFS thì có thể sẽ xuất hiện thêm một cửa sổ liệt kê danh sách những phân vùng NTFS có trên máy (mà chưa được kết nối (mount)) để bạn xác nhận có muốn kết nối và sử dụng phân vùng đó không. Bạn cứ làm theo những tuỳ chọn mặc định là được.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;6. Nghe nhạc mp3, wma, wmv ....&lt;/b&gt;&lt;br /&gt;&lt;b&gt;$ sudo apt-get install ubuntu-restricted-extras&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$ sudo gedit /etc/apt/sources.list&lt;/b&gt;&lt;br /&gt;Thêm hai dòng&lt;br /&gt;deb http://medibuntu.sos-sts.com/repo/ feisty free non-free&lt;br /&gt;deb-src http://medibuntu.sos-sts.com/repo/ feisty free non-free&lt;br /&gt;Save và đóng file lại.&lt;br /&gt;&lt;br /&gt;chạy các dòng sau&lt;br /&gt;&lt;b&gt;$ sudo apt-get update&lt;br /&gt;$ sudo apt-get install w32codecs&lt;br /&gt;$ sudo apt-get install libxine-extracodecs gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-pitfdll&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;cuối cùng nghe nhạc: applications-&gt;sound &amp; video -&gt; Movie player&lt;br /&gt;&lt;br /&gt;cài xmms:&lt;br /&gt;&lt;b&gt;$ sudo apt-get install xmms xmms-skins xmms-wma&lt;/b&gt;&lt;br /&gt;sử dụng: applications-&gt;sound &amp; video -&gt;xmms&lt;br /&gt;cài amarok&lt;br /&gt;&lt;b&gt;$ sudo apt-get install amarok&lt;/b&gt;&lt;br /&gt;sử dụng: Applications -&gt; Sound &amp; Video -&gt; amaroK&lt;br /&gt;&lt;br /&gt;&lt;b&gt;7. cài plug-in cản quảng cáo và play flash của trình duyệt (đỡ tốn tiền internet), làm đẹp firefox&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Cài block ads plus vào https://addons.mozilla.org/en-US/firefox/addon/1865 nhấn install now.&lt;br /&gt;Cài flash block vào https://addons.mozilla.org/en-US/firefox/addon/433 nhấn install now.&lt;br /&gt;Cách sử dụng: click phải vào banner quảng cáo chọn Adblock Images.&lt;br /&gt;&lt;br /&gt;Làm đẹp firefox&lt;br /&gt;Mở cửa sổ dòng lệnh Terminal bằng cách vào menu Applications &gt; Accessories &gt; Terminal. Bạn gõ và thực hiện tuần tự các lệnh sau:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;$ wget http://users.tkk.fi/~otsaloma/art/firefox-form-widgets.tar.gz&lt;br /&gt;$ tar -xvf firefox-form-widgets.tar.gz&lt;br /&gt;$ sudo cp /usr/lib/mozilla-firefox/res/forms.css /usr/lib/mozilla-firefox/res/forms.css.bak&lt;br /&gt;$ cat firefox-form-widgets/res/forms-extra.css | sudo tee --append /usr/lib/mozilla-firefox/res/forms.css &gt; /dev/null&lt;br /&gt;$ sudo cp -r firefox-form-widgets/res/form-widgets /usr/lib/mozilla-firefox/res&lt;br /&gt;$ rm -rf firefox-form-widgets*&lt;/b&gt;&lt;br /&gt;Quá trình này thực chất là thay những thiết lập mặc định của Firefox bằng một vài thứ hay hơn. Phương pháp mình học được từ Forum của cộng đồng Ubuntu đấy.&lt;br /&gt;&lt;br /&gt;(Còn tiếp)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-7502984094172669144?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/7502984094172669144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=7502984094172669144' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7502984094172669144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7502984094172669144'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/09/ci-ubuntu-t-z.html' title='Cài Ubuntu từ a-&gt;z'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-5607300715764807971</id><published>2007-09-20T11:30:00.000+07:00</published><updated>2007-09-20T11:48:12.438+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Cài đặt phần mềm từ một file RPM</title><content type='html'>Nếu bạn có một file đuôi .rpm (thường download từ trang chủ của Red Hat) và bạn muốn cài đặt nó, và bạn cũng không thể tìm thấy gói .deb tương ứng thì bạn có thể sử dụng &lt;b&gt;alien&lt;/b&gt; để cài file .rpm nầy.&lt;br /&gt;"Alien là một chương trình dịch gói .rpm và .deb. Nếu bạn muốn sử dụng một gói cài đặt của một distro Linux khác bạn nên dùng chương trình nầy để chuyển định dạng gói và cài nó bình thường."&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Hướng dẫn cài Alien&lt;/b&gt;&lt;br /&gt;$sudo apt-get update (dùng lệnh nầy nếu lệnh sau không chạy được)&lt;br /&gt;$sudo apt-get install alien&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Cài từ the file .rpm&lt;/b&gt;&lt;br /&gt;1. Chuyển vào thư mục chứa file .rpm&lt;br /&gt;2. Convert&lt;br /&gt;$sudo alien -k tên-của-file-rpm.rpm&lt;br /&gt;- Lệnh nầy sẽ chuyển gói .rpm thành gói .deb.&lt;br /&gt;- Tham số -k sẽ giữ nguyên số phiên bản.&lt;br /&gt;3. cài&lt;br /&gt;$sudo dpkg -i tên-của-file-deb.deb&lt;br /&gt;- lệnh nầy sẽ cài gói .deb vừa convert được.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-5607300715764807971?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/5607300715764807971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=5607300715764807971' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/5607300715764807971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/5607300715764807971'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/09/ci-t-phn-mm-t-mt-file-rpm.html' title='Cài đặt phần mềm từ một file RPM'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-6853307957901105019</id><published>2007-09-18T17:43:00.000+07:00</published><updated>2007-09-18T17:49:27.429+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Download nhạc từ nhacso.net</title><content type='html'>Nhạc số chấm net dùng giao thức mms để chuyển dữ liệu từ server về web browser, để download và ghi lại file nhạc nầy các bạn phải cài đặt mimms. Vào terminal gõ:&lt;br /&gt;sudo apt-get install mimms&lt;br /&gt;Khi bạn mở một bài nhạc trên trang nhạc số, click chuột phải chọn copy location. sau đó vào terminal gõ:&lt;br /&gt;mimms đường_dẫn_vừa copy_được&lt;br /&gt;Vậy là đã download được nhạc từ nhạc số rồi đó các bạn.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-6853307957901105019?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/6853307957901105019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=6853307957901105019' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6853307957901105019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6853307957901105019'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/09/download-nhc-t-nhacsonet.html' title='Download nhạc từ nhacso.net'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-3073883167384707825</id><published>2007-09-15T21:01:00.000+07:00</published><updated>2007-09-15T21:09:58.375+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Một kinh nghiệm nhỏ về cấu hình file xorg.conf</title><content type='html'>Thực ra thì chỉ là một kinh nghiệm phá phách thôi !&lt;br /&gt;Tôi soạn thảo file xorg.conf (/etc/X11/xorg.conf) 2,3 lần gì đó nên file backup cũng bị đè luôn, lúc khởi động lại máy thì nó báo file xofg.conf bị cấu hình sai, mà mình thì chẳng biết sửa thế nào.&lt;br /&gt;Bí quá mới lấy dĩa cài Ubuntu ra, bỏ vào cho nó boot, xong copy file xorg.conf của nó lại, khởi động lại máy ở chế độ recovery, chép file vừa copy hồi nãy vào đúng vị trí, khởi động lại máy, ok :), tưởng đâu tiêu luôn, phải cài lại chứ.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-3073883167384707825?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/3073883167384707825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=3073883167384707825' title='70 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3073883167384707825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3073883167384707825'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/09/mt-kinh-nghim-nh-v-cu-hnh-file-xorgconf.html' title='Một kinh nghiệm nhỏ về cấu hình file xorg.conf'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>70</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-8248674211763431225</id><published>2007-09-04T22:52:00.000+07:00</published><updated>2007-09-04T22:53:03.622+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Ubuntu 7.04 (Feisty Fawn) LAMP Server Setup</title><content type='html'>Automatic LAMP (Linux, Apache, MySQL and PHP) In about 15 minutes, the time it takes to install Ubuntu Feisty Server Edition, you can have a LAMP server up and ready to go. This feature, exclusive to Ubuntu Server Edition, is available at the time of installation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The LAMP option saves the trouble of installing and integrating each of the four separate LAMP components, a process which can take hours and requires someone who is skilled in the installation and configuration of the individual applications. You get increased security, reduced time to install, and reduced risk of misconfiguration, all of which results in a lower cost of ownership.&lt;br /&gt;&lt;br /&gt;Ubuntu LAMP server Install the following Versions&lt;br /&gt;&lt;br /&gt;Ubuntu Feisty Fawn 7.04&lt;br /&gt;Apache 2.2.3&lt;br /&gt;Mysql 5.0.38&lt;br /&gt;PHP 5.2.1&lt;br /&gt;&lt;br /&gt;First you need to download server version of Ubuntu version from here after that you create a CD and start booting with the CD Once it starts booting you should see the following screen in this you need to select second option “Install to the Hard disk Option” and press enter&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Choose you language and press enter you can see we have selected english in the follwoing screen&lt;br /&gt;&lt;br /&gt;Choose your location and press enter you can see we have have selected United Kingdom in the follwoing screen&lt;br /&gt;&lt;br /&gt;If you want to try to have your keyboard layout detected by pressing a series of keys you need to select yes option and if you don’t want that and you want to choose from a list click no in this example we have selected no and press enter&lt;br /&gt;&lt;br /&gt;Select Origin of keyboard and press enter&lt;br /&gt;&lt;br /&gt;Select keyboard layout and press enter&lt;br /&gt;&lt;br /&gt;Detecting hardware to find CD-ROM Drivers in progress&lt;br /&gt;&lt;br /&gt;Scanning CD-ROM in Progress&lt;br /&gt;&lt;br /&gt;Loading additional components progress bar&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Configures the network with DHCP if there is a DHCP server in the network&lt;br /&gt;&lt;br /&gt;Enter the Hostname of the system so in this example i enter here as ubuntulamp&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Detecting Disks and Hardware in progress&lt;br /&gt;&lt;br /&gt;Startingup the partitioner in progress&lt;br /&gt;&lt;br /&gt;you have to partition your hard disk in this example i have selected use entire disk option if you want to edit manually you can choose manual and press enter&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Warning message about data lost on your hard disk&lt;br /&gt;&lt;br /&gt;Creating partitions in your harddisk&lt;br /&gt;&lt;br /&gt;Write the changes to disk option here you need to select yes and press enter&lt;br /&gt;Creating ext3 filesystem in progress&lt;br /&gt;&lt;br /&gt;Configuring the clock option here if you want to leave UTC Select yes otherwise no and press enter&lt;br /&gt;&lt;br /&gt;You need enter the Full name of the user you want to create for your server in this example i have created administrator user select continue and press enter&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;username for your account in this i have entered test select continue and press enter&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Entered the password for test user select continue and press enter&lt;br /&gt;&lt;br /&gt;Confirm the password for test user select continue and press enter&lt;br /&gt;&lt;br /&gt;Installing the base system in progress&lt;br /&gt;&lt;br /&gt;Configuring package mirror this will be related to your country option&lt;br /&gt;&lt;br /&gt;Now it will start Installing software and here you need to select the server options if you want DNS or LAMP i have selected as LAMP for our LAMP server installation&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Software Installation in Progress&lt;br /&gt;&lt;br /&gt;Installing GRUB Boot loader in progress&lt;br /&gt;&lt;br /&gt;Installation complete message here you need to remove your CD select continue and press enter it will reboot your server&lt;br /&gt;&lt;br /&gt;After rebooting you can see the following screen prompt for username&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This will complete the Ubuntu LAMP Server Installation and your server is ready for installing applications which supports apache,mysql and php.&lt;br /&gt;&lt;br /&gt;Enable root Account in Ubuntu server (Not Recommended for security Reasons this is just Optional)&lt;br /&gt;&lt;br /&gt;After the reboot you can login with your previously created username (test). Now we will enable the root account using the following command&lt;br /&gt;&lt;br /&gt;sudo passwd root&lt;br /&gt;&lt;br /&gt;and give root a password.&lt;br /&gt;&lt;br /&gt;Now onwards we become root by running the following command&lt;br /&gt;&lt;br /&gt;su&lt;br /&gt;&lt;br /&gt;Configuring Static ip address in Ubuntu server&lt;br /&gt;&lt;br /&gt;Ubuntu installer has configured our system to get its network settings via DHCP, Now we will change that to a static IP address for this you need to edit Edit /etc/network/interfaces and enter your ip address details (in this example setup I will use the IP address 172.19.0.10):&lt;br /&gt;&lt;br /&gt;sudo vi /etc/network/interfaces&lt;br /&gt;&lt;br /&gt;and enter the following save the file and exit&lt;br /&gt;&lt;br /&gt;# The primary network interface&lt;br /&gt;&lt;br /&gt;auto eth0&lt;br /&gt;iface eth0 inet static&lt;br /&gt;address 172.19.0.10&lt;br /&gt;netmask 255.255.255.0&lt;br /&gt;network 172.19.0.0&lt;br /&gt;broadcast 172.19.0.255&lt;br /&gt;gateway 172.19.0.1&lt;br /&gt;&lt;br /&gt;Now you need to restart your network services using the following command&lt;br /&gt;&lt;br /&gt;sudo /etc/init.d/networking restart&lt;br /&gt;&lt;br /&gt;You need to setup manually DNS servers in resolv.conf file when you are not using DHCP.&lt;br /&gt;&lt;br /&gt;sudo vi /etc/resolv.conf&lt;br /&gt;&lt;br /&gt;You need to add look something like this&lt;br /&gt;&lt;br /&gt;search domain.com&lt;br /&gt;&lt;br /&gt;nameserver xxx.xxx.xxx.xxx&lt;br /&gt;&lt;br /&gt;Install SSH Server&lt;br /&gt;&lt;br /&gt;If you want to access your server remotely through SSH you need to install SSH server for this you need to run the following command&lt;br /&gt;&lt;br /&gt;sudo apt-get install ssh openssh-server&lt;br /&gt;&lt;br /&gt;You will be prompted to insert the installation CD again and this will complete SSH server in your edgy lamp server.This is really simple and easy server installation for new users and who wants a quick server.&lt;br /&gt;&lt;br /&gt;GUI Installation for Ubuntu LAMP Server&lt;br /&gt;&lt;br /&gt;If you are a new user and not familiar with command prompt you can install GUI for your ubuntu LAMP server for this you need to make sure you have enabled Universe and multiverse repositories in /etc/apt/sources.list file once you have enable you need to use the following command to install GUI&lt;br /&gt;&lt;br /&gt;sudo apt-get update&lt;br /&gt;&lt;br /&gt;sudo apt-get install ubuntu-desktop&lt;br /&gt;&lt;br /&gt;The above command will install GNOME desktop if you want to install KDE desktop use the following command&lt;br /&gt;&lt;br /&gt;sudo apt-get install kubuntu-desktop&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-8248674211763431225?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/8248674211763431225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=8248674211763431225' title='46 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/8248674211763431225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/8248674211763431225'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/09/ubuntu-704-feisty-fawn-lamp-server.html' title='Ubuntu 7.04 (Feisty Fawn) LAMP Server Setup'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>46</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-7728215888648080257</id><published>2007-09-04T22:45:00.000+07:00</published><updated>2007-09-04T22:48:08.031+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Upgrade Ubuntu Server 6.10 (Edgy Eft) to 7.04 (Feisty Fawn)</title><content type='html'>Ubuntu 7.04 is the current stable version of the Ubuntu operating system. The common name given to this release from the time of its early development was “Feisty Fawn”.&lt;br /&gt;&lt;br /&gt;Before Upgrading You need to remember the following point&lt;br /&gt;&lt;br /&gt;Take comple backup of your server before upgrading Now you need to upgraded Ubuntu Edgy Server to Ubuntu Feisty.&lt;br /&gt;&lt;br /&gt;You have to update the sources.list file to apt-get be able to find the update-manager-core package&lt;br /&gt;&lt;br /&gt;sudo vi /etc/apt/sources.list&lt;br /&gt;&lt;br /&gt;and Change every occurrence of edgy to feisty&lt;br /&gt;&lt;br /&gt;deb http://archive.ubuntu.com/ubuntu/ edgy main restricted&lt;br /&gt;to&lt;br /&gt;&lt;br /&gt;deb http://archive.ubuntu.com/ubuntu/ feisty main restricted&lt;br /&gt;&lt;br /&gt;Update the new lists of packages by doing&lt;br /&gt;&lt;br /&gt;sudo apt-get update&lt;br /&gt;&lt;br /&gt;Install update-manager-core&lt;br /&gt;&lt;br /&gt;sudo apt-get install update-manager-core&lt;br /&gt;&lt;br /&gt;Launch the upgrade tool&lt;br /&gt;&lt;br /&gt;sudo do-release-upgrade&lt;br /&gt;&lt;br /&gt;Follow the on-screen instructions&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-7728215888648080257?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/7728215888648080257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=7728215888648080257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7728215888648080257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7728215888648080257'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/09/upgrade-ubuntu-server-610-edgy-eft-to.html' title='Upgrade Ubuntu Server 6.10 (Edgy Eft) to 7.04 (Feisty Fawn)'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-2331456223315814170</id><published>2007-09-02T18:37:00.000+07:00</published><updated>2007-09-23T11:48:52.411+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP MySQL'/><title type='text'>Cài đặt Apache, MySQL, PHP, Perl từ source.</title><content type='html'>&lt;span style="font-family: arial; color: rgb(0, 0, 0);font-family:arial;" &gt;Hôm nay tôi xin trình bày cách cài đặt web server Apache, database server MySQL, PHP, Perl lên hệ điều hành Ubuntu (linux nói chung) bằng mã nguồn.&lt;br /&gt;Trước tiên cài MySQL:&lt;br /&gt;vào đây download mã nguồn:&lt;a href="http://dev.mysql.com/downloads/mysql/5.0.html#source"&gt; &lt;span style="text-decoration: underline;"&gt;http://dev.mysql.com/downloads/mysql/5.0.html#source&lt;/span&gt;&lt;/a&gt;&lt;a href="http://dev.mysql.com/downloads/mysql/5.0.html#downloads"&gt;&lt;/a&gt;&lt;br /&gt;Chọn gói &lt;/span&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;"Compressed GNU TAR archive (tar.gz)" (đầu tiên) để download.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;Chạy các lệnh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     groupadd mysql&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     useradd -g mysql mysql&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     tar -xzvf mysql-5.0.45.tar.gz&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     cd mysql-5.0.45&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     ./configure --prefix=/usr/local/mysql&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     make&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     sudo make install&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     cp support-files/my-medium.cnf /etc/my.cnf&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     cd /usr/local/mysql&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     chown -R mysql .&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     chgrp -R mysql .&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     bin/mysql_install_db --user=mysql&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     chown -R &lt;/span&gt;&lt;span style="font-weight: bold; font-family: arial; color: rgb(0, 0, 0);"&gt;nhakhtn&lt;/span&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt; .&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     chown -R mysql var&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;     sudo /usr/local/mysql/bin/mysqld_safe --user=mysql &amp;          (dòng nầy dùng để chạy MySQL server)&lt;/span&gt;&lt;br /&gt;   &lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;ở dòng " chown -R &lt;/span&gt;&lt;span style="font-weight: bold; font-family: arial; color: rgb(0, 0, 0);"&gt;nhakhtn&lt;/span&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt; . " bạn thay bằng tài khoản đăng nhập của bạn.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;Sau khi cài bạn mở file &lt;/span&gt;&lt;span style="font-weight: bold; font-family: arial; color: rgb(0, 0, 0);"&gt;/etc/my.cnf&lt;/span&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt; để config lại cho MySQL ở cả hai dòng socket (client và server) thành :&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;            socket        = /var/run/mysqld/mysqld.sock&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;Kết nối với MySQL server ở chế độ dòng lệnh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;/usr/local/mysql/bin/mysql -u root&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);"&gt;Bây giờ cài Apache:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);font-family:arial;" &gt;Vào đây download mã nguồn: &lt;a href="http://www.devlib.org/apache/httpd/httpd-2.2.4.tar.bz2"&gt;http://www.devlib.org/apache/httpd/httpd-2.2.4.tar.bz2&lt;/a&gt;&lt;br /&gt;Giải nén:&lt;br /&gt;tar -xjvf httpd-2.2.4.tar.bz2&lt;br /&gt;vào thư mục giải nén:&lt;br /&gt;cd httpd-2.2.4/&lt;br /&gt;&lt;br /&gt;config mã nguồn:&lt;br /&gt;&lt;br /&gt;//phần nầy build apr cho apache&lt;br /&gt;&lt;/span&gt;&lt;code style="font-family: arial; color: rgb(0, 0, 0);"&gt;cd srclib/apr&lt;br /&gt;       ./configure --prefix=/usr/local/apr-httpd/&lt;br /&gt;       make&lt;br /&gt;sudo make install&lt;br /&gt;     &lt;br /&gt; //tiếp tục build apr-util 1.2&lt;br /&gt;       cd ../apr-util&lt;br /&gt;       ./configure --prefix=/usr/local/apr-util-httpd/            --with-apr=/usr/local/apr-httpd/&lt;br /&gt;       make&lt;br /&gt;sudo make install&lt;br /&gt;     &lt;br /&gt;  //configure apache&lt;br /&gt;cd ../../&lt;br /&gt;&lt;/code&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);font-family:arial;" &gt;./configure --prefix=/usr/local/apache2/ --with-perl --with-apr=/usr/local/apr-httpd/ --with-apr-util=/usr/local/apr-util-httpd/ --enable-so&lt;br /&gt;Một số giải thích:&lt;br /&gt;with-perl là để cài apache mà chạy được perl trên web server.&lt;br /&gt;with-apr ; hổng biết: hì: cái nầy do trong document của apache chỉ nếu bà con hông thích thì đừng buil hai thằng apr và apr-util và trong lệnh configure apache bỏ hai cái with đó đi.&lt;br /&gt;make&lt;br /&gt;sudo make install.&lt;br /&gt;để cấu hình apache thì mở file /usr/local/apache/config/httpd.conf&lt;br /&gt;Nội dung đề nghị:&lt;br /&gt;-----------------------------------------------------------&lt;br /&gt;#&lt;br&gt;# This is the main Apache HTTP server configuration file.  It contains the&lt;br&gt;# configuration directives that give the server its instructions.&lt;br&gt;# See &amp;lt;URL:&lt;a target="_BLANK" href="http://httpd.apache.org/docs/2.2"&gt;http://httpd.apache.org/docs/2.2&lt;/a&gt;&amp;gt; for detailed information.&lt;br&gt;# In particular, see &lt;br&gt;# &amp;lt;URL:&lt;a target="_BLANK" href="http://httpd.apache.org/docs/2.2/mod/directives.html"&gt;http://httpd.apache.org.../2.2/mod/directives.html&lt;/a&gt;&amp;gt;&lt;br&gt;# for a discussion of each configuration directive.&lt;br&gt;#&lt;br&gt;# Do NOT simply read the instructions in here without understanding&lt;br&gt;# what they do.  They're here only as hints or reminders.  If you are unsure&lt;br&gt;# consult the online docs. You have been warned.  &lt;br&gt;#&lt;br&gt;# Configuration and logfile names: If the filenames you specify for many&lt;br&gt;# of the server's control files begin with &amp;quot;/&amp;quot; (or &amp;quot;drive:/&amp;quot; for Win32), the&lt;br&gt;# server will use that explicit path.  If the filenames do *not* begin&lt;br&gt;# with &amp;quot;/&amp;quot;, the value of ServerRoot is prepended -- so &amp;quot;logs/foo.log&amp;quot;&lt;br&gt;# with ServerRoot set to &amp;quot;/usr/local/apache2&amp;quot; will be interpreted by the&lt;br&gt;# server as &amp;quot;/usr/local/apache2/logs/foo.log&amp;quot;.&lt;br&gt;&lt;br&gt;#&lt;br&gt;# ServerRoot: The top of the directory tree under which the server's&lt;br&gt;# configuration, error, and log files are kept.&lt;br&gt;#&lt;br&gt;# Do not add a slash at the end of the directory path.  If you point&lt;br&gt;# ServerRoot at a non-local disk, be sure to point the LockFile directive&lt;br&gt;# at a local disk.  If you wish to share the same ServerRoot for multiple&lt;br&gt;# httpd daemons, you will need to change at least LockFile and PidFile.&lt;br&gt;#&lt;br&gt;ServerRoot &amp;quot;/usr/local/apache2&amp;quot;&lt;br&gt;&lt;br&gt;#&lt;br&gt;# Listen: Allows you to bind Apache to specific IP addresses and/or&lt;br&gt;# ports, instead of the default. See also the &amp;lt;VirtualHost&amp;gt;&lt;br&gt;# directive.&lt;br&gt;#&lt;br&gt;# Change this to Listen on specific IP addresses as shown below to &lt;br&gt;# prevent Apache from glomming onto all bound IP addresses.&lt;br&gt;#&lt;br&gt;#Listen 12.34.56.78:80&lt;br&gt;Listen 80&lt;br&gt;&lt;br&gt;#&lt;br&gt;# Dynamic Shared Object (DSO) Support&lt;br&gt;#&lt;br&gt;# To be able to use the functionality of a module which was built as a DSO you&lt;br&gt;# have to place corresponding `LoadModule' lines at this location so the&lt;br&gt;# directives contained in it are actually available _before_ they are used.&lt;br&gt;# Statically compiled modules (those listed by `httpd -l') do not need&lt;br&gt;# to be loaded here.&lt;br&gt;#&lt;br&gt;# Example:&lt;br&gt;# LoadModule foo_module modules/mod_foo.so&lt;br&gt;LoadModule php5_module        modules/libphp5.so&lt;br&gt;#&lt;br&gt;&lt;br&gt;&amp;lt;IfModule !mpm_netware_module&amp;gt;&lt;br&gt;#&lt;br&gt;# If you wish httpd to run as a different user or group, you must run&lt;br&gt;# httpd as root initially and it will switch.  &lt;br&gt;#&lt;br&gt;# User/Group: The name (or #number) of the user/group to run httpd as.&lt;br&gt;# It is usually good practice to create a dedicated user and group for&lt;br&gt;# running httpd, as with most system services.&lt;br&gt;#&lt;br&gt;User daemon&lt;br&gt;Group daemon&lt;br&gt;&amp;lt;/IfModule&amp;gt;&lt;br&gt;&lt;br&gt;# 'Main' server configuration&lt;br&gt;#&lt;br&gt;# The directives in this section set up the values used by the 'main'&lt;br&gt;# server, which responds to any requests that aren't handled by a&lt;br&gt;# &amp;lt;VirtualHost&amp;gt; definition.  These values also provide defaults for&lt;br&gt;# any &amp;lt;VirtualHost&amp;gt; containers you may define later in the file.&lt;br&gt;#&lt;br&gt;# All of these directives may appear inside &amp;lt;VirtualHost&amp;gt; containers,&lt;br&gt;# in which case these default settings will be overridden for the&lt;br&gt;# virtual host being defined.&lt;br&gt;#&lt;br&gt;&lt;br&gt;#&lt;br&gt;# ServerAdmin: Your address, where problems with the server should be&lt;br&gt;# e-mailed.  This address appears on some server-generated pages, such&lt;br&gt;# as error documents.  e.g. &lt;a href="mailto:admin@your"&gt;admin@your&lt;/a&gt;-domain.com&lt;br&gt;#&lt;br&gt;ServerAdmin &lt;a href="mailto:you@example.com"&gt;you@example.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;#&lt;br&gt;# ServerName gives the name and port that the server uses to identify itself.&lt;br&gt;# This can often be determined automatically, but we recommend you specify&lt;br&gt;# it explicitly to prevent problems during startup.&lt;br&gt;#&lt;br&gt;# If your host doesn't have a registered DNS name, enter its IP address here.&lt;br&gt;#&lt;br&gt;#ServerName &lt;a target="_BLANK" href="http://:www.example.com"&gt;www.example.com&lt;/a&gt;:80&lt;br&gt;&lt;br&gt;#&lt;br&gt;# DocumentRoot: The directory out of which you will serve your&lt;br&gt;# documents. By default, all requests are taken from this directory, but&lt;br&gt;# symbolic links and aliases may be used to point to other locations.&lt;br&gt;#&lt;br&gt;#start modify by ducnha&lt;br&gt;DocumentRoot &amp;quot;/var/www&amp;quot;&lt;br&gt;#end modify by ducnha&lt;br&gt;&lt;br&gt;#&lt;br&gt;# Each directory to which Apache has access can be configured with respect&lt;br&gt;# to which services and features are allowed and/or disabled in that&lt;br&gt;# directory (and its subdirectories). &lt;br&gt;#&lt;br&gt;# First, we configure the &amp;quot;default&amp;quot; to be a very restrictive set of &lt;br&gt;# features.  &lt;br&gt;#&lt;br&gt;&amp;lt;Directory /&amp;gt;&lt;br&gt;    Options FollowSymLinks&lt;br&gt;    AllowOverride None&lt;br&gt;    Order deny,allow&lt;br&gt;    Deny from all&lt;br&gt;&amp;lt;/Directory&amp;gt;&lt;br&gt;&lt;br&gt;#&lt;br&gt;# Note that from this point forward you must specifically allow&lt;br&gt;# particular features to be enabled - so if something's not working as&lt;br&gt;# you might expect, make sure that you have specifically enabled it&lt;br&gt;# below.&lt;br&gt;#&lt;br&gt;&lt;br&gt;#&lt;br&gt;# This should be changed to whatever you set DocumentRoot to.&lt;br&gt;#&lt;br&gt;&amp;lt;Directory &amp;quot;/var/www&amp;quot;&amp;gt;&lt;br&gt;    #start add by ducnha&lt;br&gt;    Options +ExecCGI&lt;br&gt;    #end add by ducnha&lt;br&gt;    #&lt;br&gt;    # Possible values for the Options directive are &amp;quot;None&amp;quot;, &amp;quot;All&amp;quot;,&lt;br&gt;    # or any combination of:&lt;br&gt;    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews&lt;br&gt;    #&lt;br&gt;    # Note that &amp;quot;MultiViews&amp;quot; must be named *explicitly* --- &amp;quot;Options All&amp;quot;&lt;br&gt;    # doesn't give it to you.&lt;br&gt;    #&lt;br&gt;    # The Options directive is both complicated and important.  Please see&lt;br&gt;    # &lt;a target="_BLANK" href="http://httpd.apache.org/docs/2.2/mod/core.html"&gt;http://httpd.apache.org/docs/2.2/mod/core.html&lt;/a&gt;#options&lt;br&gt;    # for more information.&lt;br&gt;    #&lt;br&gt;    Options Indexes FollowSymLinks&lt;br&gt;&lt;br&gt;    #&lt;br&gt;    # AllowOverride controls what directives may be placed in .htaccess files.&lt;br&gt;    # It can be &amp;quot;All&amp;quot;, &amp;quot;None&amp;quot;, or any combination of the keywords:&lt;br&gt;    #   Options FileInfo AuthConfig Limit&lt;br&gt;    #&lt;br&gt;    AllowOverride None&lt;br&gt;&lt;br&gt;    #&lt;br&gt;    # Controls who can get stuff from this server.&lt;br&gt;    #&lt;br&gt;    Order allow,deny&lt;br&gt;    Allow from all&lt;br&gt;&lt;br&gt;&amp;lt;/Directory&amp;gt;&lt;br&gt;&lt;br&gt;#&lt;br&gt;# DirectoryIndex: sets the file that Apache will serve if a directory&lt;br&gt;# is requested.&lt;br&gt;#&lt;br&gt;#start modify by ducnha&lt;br&gt;&amp;lt;IfModule dir_module&amp;gt;&lt;br&gt;    DirectoryIndex index.html index.php&lt;br&gt;&amp;lt;/IfModule&amp;gt;&lt;br&gt;#end modify by ducnha&lt;br&gt;&lt;br&gt;#&lt;br&gt;# The following lines prevent .htaccess and .htpasswd files from being &lt;br&gt;# viewed by Web clients. &lt;br&gt;#&lt;br&gt;&amp;lt;FilesMatch &amp;quot;^\.ht&amp;quot;&amp;gt;&lt;br&gt;    Order allow,deny&lt;br&gt;    Deny from all&lt;br&gt;    Satisfy All&lt;br&gt;&amp;lt;/FilesMatch&amp;gt;&lt;br&gt;&lt;br&gt;#&lt;br&gt;# ErrorLog: The location of the error log file.&lt;br&gt;# If you do not specify an ErrorLog directive within a &amp;lt;VirtualHost&amp;gt;&lt;br&gt;# container, error messages relating to that virtual host will be&lt;br&gt;# logged here.  If you *do* define an error logfile for a &amp;lt;VirtualHost&amp;gt;&lt;br&gt;# container, that host's errors will be logged there and not here.&lt;br&gt;#&lt;br&gt;ErrorLog logs/error_log&lt;br&gt;&lt;br&gt;#&lt;br&gt;# LogLevel: Control the number of messages logged to the error_log.&lt;br&gt;# Possible values include: debug, info, notice, warn, error, crit,&lt;br&gt;# alert, emerg.&lt;br&gt;#&lt;br&gt;LogLevel warn&lt;br&gt;&lt;br&gt;&amp;lt;IfModule log_config_module&amp;gt;&lt;br&gt;    #&lt;br&gt;    # The following directives define some format nicknames for use with&lt;br&gt;    # a CustomLog directive (see below).&lt;br&gt;    #&lt;br&gt;    LogFormat &amp;quot;%h %l %u %t \&amp;quot;%r\&amp;quot; %&amp;gt;s %b \&amp;quot;%{Referer}i\&amp;quot; \&amp;quot;%{User-Agent}i\&amp;quot;&amp;quot; combined&lt;br&gt;    LogFormat &amp;quot;%h %l %u %t \&amp;quot;%r\&amp;quot; %&amp;gt;s %b&amp;quot; common&lt;br&gt;&lt;br&gt;    &amp;lt;IfModule logio_module&amp;gt;&lt;br&gt;      # You need to enable mod_logio.c to use %I and %O&lt;br&gt;      LogFormat &amp;quot;%h %l %u %t \&amp;quot;%r\&amp;quot; %&amp;gt;s %b \&amp;quot;%{Referer}i\&amp;quot; \&amp;quot;%{User-Agent}i\&amp;quot; %I %O&amp;quot; combinedio&lt;br&gt;    &amp;lt;/IfModule&amp;gt;&lt;br&gt;&lt;br&gt;    #&lt;br&gt;    # The location and format of the access logfile (Common Logfile Format).&lt;br&gt;    # If you do not define any access logfiles within a &amp;lt;VirtualHost&amp;gt;&lt;br&gt;    # container, they will be logged here.  Contrariwise, if you *do*&lt;br&gt;    # define per-&amp;lt;VirtualHost&amp;gt; access logfiles, transactions will be&lt;br&gt;    # logged therein and *not* in this file.&lt;br&gt;    #&lt;br&gt;    CustomLog logs/access_log common&lt;br&gt;&lt;br&gt;    #&lt;br&gt;    # If you prefer a logfile with access, agent, and referer information&lt;br&gt;    # (Combined Logfile Format) you can use the following directive.&lt;br&gt;    #&lt;br&gt;    #CustomLog logs/access_log combined&lt;br&gt;&amp;lt;/IfModule&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;IfModule alias_module&amp;gt;&lt;br&gt;    #&lt;br&gt;    # Redirect: Allows you to tell clients about documents that used to &lt;br&gt;    # exist in your server's namespace, but do not anymore. The client &lt;br&gt;    # will make a new request for the document at its new location.&lt;br&gt;    # Example:&lt;br&gt;    # Redirect permanent /foo &lt;a target="_BLANK" href="http://www.example.com/bar"&gt;http://www.example.com/bar&lt;/a&gt;&lt;br&gt;&lt;br&gt;    #&lt;br&gt;    # Alias: Maps web paths into filesystem paths and is used to&lt;br&gt;    # access content that does not live under the DocumentRoot.&lt;br&gt;    # Example:&lt;br&gt;    # Alias /webpath /full/filesystem/path&lt;br&gt;    #&lt;br&gt;    # If you include a trailing / on /webpath then the server will&lt;br&gt;    # require it to be present in the URL.  You will also likely&lt;br&gt;    # need to provide a &amp;lt;Directory&amp;gt; section to allow access to&lt;br&gt;    # the filesystem path.&lt;br&gt;&lt;br&gt;    #&lt;br&gt;    # ScriptAlias: This controls which directories contain server scripts. &lt;br&gt;    # ScriptAliases are essentially the same as Aliases, except that&lt;br&gt;    # documents in the target directory are treated as applications and&lt;br&gt;    # run by the server when requested rather than as documents sent to the&lt;br&gt;    # client.  The same rules about trailing &amp;quot;/&amp;quot; apply to ScriptAlias&lt;br&gt;    # directives as to Alias.&lt;br&gt;    #&lt;br&gt;    ScriptAlias /cgi-bin/ &amp;quot;/var/cgi-bin/&amp;quot;&lt;br&gt;&lt;br&gt;&amp;lt;/IfModule&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;IfModule cgid_module&amp;gt;&lt;br&gt;    #&lt;br&gt;    # ScriptSock: On threaded servers, designate the path to the UNIX&lt;br&gt;    # socket used to communicate with the CGI daemon of mod_cgid.&lt;br&gt;    #&lt;br&gt;    #Scriptsock logs/cgisock&lt;br&gt;&amp;lt;/IfModule&amp;gt;&lt;br&gt;&lt;br&gt;#&lt;br&gt;# &amp;quot;/usr/local/apache2/cgi-bin&amp;quot; should be changed to whatever your ScriptAliased&lt;br&gt;# CGI directory exists, if you have that configured.&lt;br&gt;#&lt;br&gt;&amp;lt;Directory &amp;quot;/var/cgi-bin&amp;quot;&amp;gt;&lt;br&gt;    #start add by ducnha&lt;br&gt;    Options +ExecCGI&lt;br&gt;    #end add by ducnha&lt;br&gt;    AllowOverride None&lt;br&gt;    Options None&lt;br&gt;    Order allow,deny&lt;br&gt;    Allow from all&lt;br&gt;&amp;lt;/Directory&amp;gt;&lt;br&gt;&lt;br&gt;#&lt;br&gt;# DefaultType: the default MIME type the server will use for a document&lt;br&gt;# if it cannot otherwise determine one, such as from filename extensions.&lt;br&gt;# If your server contains mostly text or HTML documents, &amp;quot;text/plain&amp;quot; is&lt;br&gt;# a good value.  If most of your content is binary, such as applications&lt;br&gt;# or images, you may want to use &amp;quot;application/octet-stream&amp;quot; instead to&lt;br&gt;# keep browsers from trying to display binary files as though they are&lt;br&gt;# text.&lt;br&gt;#&lt;br&gt;DefaultType text/plain&lt;br&gt;&lt;br&gt;&amp;lt;IfModule mime_module&amp;gt;&lt;br&gt;    #&lt;br&gt;    # TypesConfig points to the file containing the list of mappings from&lt;br&gt;    # filename extension to MIME-type.&lt;br&gt;    #&lt;br&gt;    TypesConfig conf/mime.types&lt;br&gt;&lt;br&gt;    #&lt;br&gt;    # AddType allows you to add to or override the MIME configuration&lt;br&gt;    # file specified in TypesConfig for specific file types.&lt;br&gt;    #&lt;br&gt;    #AddType application/x-gzip .tgz&lt;br&gt;    #&lt;br&gt;    # AddEncoding allows you to have certain browsers uncompress&lt;br&gt;    # information on the fly. Note: Not all browsers support this.&lt;br&gt;    #&lt;br&gt;    #AddEncoding x-compress .Z&lt;br&gt;    #AddEncoding x-gzip .gz .tgz&lt;br&gt;    #&lt;br&gt;    # If the AddEncoding directives above are commented-out, then you&lt;br&gt;    # probably should define those extensions to indicate media types:&lt;br&gt;    #&lt;br&gt;    AddType application/x-compress .Z&lt;br&gt;    AddType application/x-gzip .gz .tgz&lt;br&gt;&lt;br&gt;    #&lt;br&gt;    # AddHandler allows you to map certain file extensions to &amp;quot;handlers&amp;quot;:&lt;br&gt;    # actions unrelated to filetype. These can be either built into the server&lt;br&gt;    # or added with the Action directive (see below)&lt;br&gt;    #&lt;br&gt;    # To use CGI scripts outside of ScriptAliased directories:&lt;br&gt;    # (You will also need to add &amp;quot;ExecCGI&amp;quot; to the &amp;quot;Options&amp;quot; directive.)&lt;br&gt;    #&lt;br&gt;    &lt;br&gt;    #start add by ducnha&lt;br&gt;    AddHandler cgi-script .cgi .pl&lt;br&gt;    #end add by ducnha&lt;br&gt;&lt;br&gt;    # For type maps (negotiated resources):&lt;br&gt;    #AddHandler type-map var&lt;br&gt;&lt;br&gt;    #&lt;br&gt;    # Filters allow you to process content before it is sent to the client.&lt;br&gt;    #&lt;br&gt;    # To parse .shtml files for server-side includes (SSI):&lt;br&gt;    # (You will also need to add &amp;quot;Includes&amp;quot; to the &amp;quot;Options&amp;quot; directive.)&lt;br&gt;    #&lt;br&gt;    #AddType text/html .shtml&lt;br&gt;    #AddOutputFilter INCLUDES .shtml&lt;br&gt;&amp;lt;/IfModule&amp;gt;&lt;br&gt;&lt;br&gt;#&lt;br&gt;# The mod_mime_magic module allows the server to use various hints from the&lt;br&gt;# contents of the file itself to determine its type.  The MIMEMagicFile&lt;br&gt;# directive tells the module where the hint definitions are located.&lt;br&gt;#&lt;br&gt;#MIMEMagicFile conf/magic&lt;br&gt;&lt;br&gt;#&lt;br&gt;# Customizable error responses come in three flavors:&lt;br&gt;# 1) plain text 2) local redirects 3) external redirects&lt;br&gt;#&lt;br&gt;# Some examples:&lt;br&gt;#ErrorDocument 500 &amp;quot;The server made a boo boo.&amp;quot;&lt;br&gt;#ErrorDocument 404 /missing.html&lt;br&gt;#ErrorDocument 404 &amp;quot;/cgi-bin/missing_handler.pl&amp;quot;&lt;br&gt;#ErrorDocument 402 &lt;a target="_BLANK" href="http://www.example.com/subscription_info.html"&gt;http://www.example.com/subscription_info.html&lt;/a&gt;&lt;br&gt;#&lt;br&gt;&lt;br&gt;#&lt;br&gt;# EnableMMAP and EnableSendfile: On systems that support it, &lt;br&gt;# memory-mapping or the sendfile syscall is used to deliver&lt;br&gt;# files.  This usually improves server performance, but must&lt;br&gt;# be turned off when serving from networked-mounted &lt;br&gt;# filesystems or if support for these functions is otherwise&lt;br&gt;# broken on your system.&lt;br&gt;#&lt;br&gt;#EnableMMAP off&lt;br&gt;#EnableSendfile off&lt;br&gt;&lt;br&gt;# Supplemental configuration&lt;br&gt;#&lt;br&gt;# The configuration files in the conf/extra/ directory can be &lt;br&gt;# included to add extra features or to modify the default configuration of &lt;br&gt;# the server, or you may simply copy their contents here and change as &lt;br&gt;# necessary.&lt;br&gt;&lt;br&gt;# Server-pool management (MPM specific)&lt;br&gt;#Include conf/extra/httpd-mpm.conf&lt;br&gt;&lt;br&gt;# Multi-language error messages&lt;br&gt;#Include conf/extra/httpd-multilang-errordoc.conf&lt;br&gt;&lt;br&gt;# Fancy directory listings&lt;br&gt;#Include conf/extra/httpd-autoindex.conf&lt;br&gt;&lt;br&gt;# Language settings&lt;br&gt;#Include conf/extra/httpd-languages.conf&lt;br&gt;&lt;br&gt;# User home directories&lt;br&gt;#Include conf/extra/httpd-userdir.conf&lt;br&gt;&lt;br&gt;# Real-time info on requests and configuration&lt;br&gt;#Include conf/extra/httpd-info.conf&lt;br&gt;&lt;br&gt;# Virtual hosts&lt;br&gt;#Include conf/extra/httpd-vhosts.conf&lt;br&gt;&lt;br&gt;# Local access to the Apache HTTP Server Manual&lt;br&gt;#Include conf/extra/httpd-manual.conf&lt;br&gt;&lt;br&gt;# Distributed authoring and versioning (WebDAV)&lt;br&gt;#Include conf/extra/httpd-dav.conf&lt;br&gt;&lt;br&gt;# Various default settings&lt;br&gt;#Include conf/extra/httpd-default.conf&lt;br&gt;&lt;br&gt;# Secure (SSL/TLS) connections&lt;br&gt;#Include conf/extra/httpd-ssl.conf&lt;br&gt;#&lt;br&gt;# Note: The following must must be present to support&lt;br&gt;#       starting without SSL on platforms with no /dev/random equivalent&lt;br&gt;#       but a statically compiled-in mod_ssl.&lt;br&gt;#&lt;br&gt;&amp;lt;IfModule ssl_module&amp;gt;&lt;br&gt;SSLRandomSeed startup builtin&lt;br&gt;SSLRandomSeed connect builtin&lt;br&gt;&amp;lt;/IfModule&amp;gt;&lt;br&gt;&lt;br&gt;#start add by ducnha&lt;br&gt;ServerName localhost&lt;br&gt;#LoadModule php5_module modules/libphp5.so&lt;br&gt;#AddModule mod_php5.c&lt;br&gt;AddType application/x-httpd-php .php .phtml&lt;br&gt;AddType application/x-httpd-php-source .phps&lt;br&gt;#end add by ducnha&lt;br /&gt;-----------------------------------------------------------&lt;br /&gt;nội dung file nầy thì đã cấu hình để chạy PHP script luôn rồi.&lt;br /&gt;xong thằng apache.&lt;br /&gt;Chạy apache:  sudo /usr/local/apache2/bin/apachectl start&lt;br /&gt;(start, stop, restart ..)&lt;br /&gt;&lt;br /&gt;Tới PHP:&lt;br /&gt;Vào đây download về : &lt;a href="http://www.php.net/get/php-5.2.4.tar.bz2/from/a/mirror"&gt;http://www.php.net/get/php-5.2.4.tar.bz2/from/a/mirror&lt;/a&gt;&lt;br /&gt;giải nén:&lt;br /&gt;tar -xjvf php-5.2.3.tar.bz2&lt;br /&gt;cd php-5.2.3/&lt;br /&gt;./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/local/lib&lt;br /&gt;make&lt;br /&gt;sudo make install&lt;br /&gt;&lt;/span&gt;cp php.ini-dist /usr/local/lib/php.ini&lt;br /&gt;&lt;span style="font-family: arial; color: rgb(0, 0, 0);font-family:arial;" &gt;xong.&lt;br /&gt;Cấu hình Apache : khỏi, đã làm ở phần trên rồi.&lt;br /&gt;Cấu hình PHP: mở file&lt;/span&gt; /usr/local/lib/php.ini&lt;br /&gt;Đề nghị:&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;[PHP]&lt;br /&gt;&lt;br /&gt;;;;;;;;;;;;&lt;br /&gt;; WARNING ;&lt;br /&gt;;;;;;;;;;;;&lt;br /&gt;; This is the default settings file for new PHP installations.&lt;br /&gt;; By default, PHP installs itself with a configuration suitable for&lt;br /&gt;; development purposes, and *NOT* for production purposes.&lt;br /&gt;; For several security-oriented considerations that should be taken&lt;br /&gt;; before going online with your site, please consult php.ini-recommended&lt;br /&gt;; and http://php.net/manual/en/security.php.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;; About php.ini   ;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;; This file controls many aspects of PHP's behavior.  In order for PHP to&lt;br /&gt;; read it, it must be named 'php.ini'.  PHP looks for it in the current&lt;br /&gt;; working directory, in the path designated by the environment variable&lt;br /&gt;; PHPRC, and in the path that was defined in compile time (in that order).&lt;br /&gt;; Under Windows, the compile-time path is the Windows directory.  The&lt;br /&gt;; path in which the php.ini file is looked for can be overridden using&lt;br /&gt;; the -c argument in command line mode.&lt;br /&gt;;&lt;br /&gt;; The syntax of the file is extremely simple.  Whitespace and Lines&lt;br /&gt;; beginning with a semicolon are silently ignored (as you probably guessed).&lt;br /&gt;; Section headers (e.g. [Foo]) are also silently ignored, even though&lt;br /&gt;; they might mean something in the future.&lt;br /&gt;;&lt;br /&gt;; Directives are specified using the following syntax:&lt;br /&gt;; directive = value&lt;br /&gt;; Directive names are *case sensitive* - foo=bar is different from FOO=bar.&lt;br /&gt;;&lt;br /&gt;; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one&lt;br /&gt;; of the INI constants (On, Off, True, False, Yes, No and None) or an expression&lt;br /&gt;; (e.g. E_ALL &amp; ~E_NOTICE), or a quoted string ("foo").&lt;br /&gt;;&lt;br /&gt;; Expressions in the INI file are limited to bitwise operators and parentheses:&lt;br /&gt;; |        bitwise OR&lt;br /&gt;; &amp;        bitwise AND&lt;br /&gt;; ~        bitwise NOT&lt;br /&gt;; !        boolean NOT&lt;br /&gt;;&lt;br /&gt;; Boolean flags can be turned on using the values 1, On, True or Yes.&lt;br /&gt;; They can be turned off using the values 0, Off, False or No.&lt;br /&gt;;&lt;br /&gt;; An empty string can be denoted by simply not writing anything after the equal&lt;br /&gt;; sign, or by using the None keyword:&lt;br /&gt;;&lt;br /&gt;;  foo =         ; sets foo to an empty string&lt;br /&gt;;  foo = none    ; sets foo to an empty string&lt;br /&gt;;  foo = "none"  ; sets foo to the string 'none'&lt;br /&gt;;&lt;br /&gt;; If you use constants in your value, and these constants belong to a&lt;br /&gt;; dynamically loaded extension (either a PHP extension or a Zend extension),&lt;br /&gt;; you may only use these constants *after* the line that loads the extension.&lt;br /&gt;;&lt;br /&gt;;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;; About this file ;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;; All the values in the php.ini-dist file correspond to the builtin&lt;br /&gt;; defaults (that is, if no php.ini is used, or if you delete these lines,&lt;br /&gt;; the builtin defaults will be identical).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;; Language Options ;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;&lt;br /&gt;; Enable the PHP scripting language engine under Apache.&lt;br /&gt;engine = On&lt;br /&gt;&lt;br /&gt;; Enable compatibility mode with Zend Engine 1 (PHP 4.x)&lt;br /&gt;zend.ze1_compatibility_mode = Off&lt;br /&gt;&lt;br /&gt;; Allow the &lt;? tag.  Otherwise, only &lt;?php tags are recognized.&lt;br /&gt;; NOTE: Using short tags should be avoided when developing applications or&lt;br /&gt;; libraries that are meant for redistribution, or deployment on PHP&lt;br /&gt;; servers which are not under your control, because short tags may not&lt;br /&gt;; be supported on the target server. For portable, redistributable code,&lt;br /&gt;; be sure not to use short tags.&lt;br /&gt;short_open_tag = On&lt;br /&gt;&lt;br /&gt;; Allow ASP-style &lt;% %&gt; tags.&lt;br /&gt;asp_tags = Off&lt;br /&gt;&lt;br /&gt;; The number of significant digits displayed in floating point numbers.&lt;br /&gt;precision    =  12&lt;br /&gt;&lt;br /&gt;; Enforce year 2000 compliance (will cause problems with non-compliant browsers)&lt;br /&gt;y2k_compliance = On&lt;br /&gt;&lt;br /&gt;; Output buffering allows you to send header lines (including cookies) even&lt;br /&gt;; after you send body content, at the price of slowing PHP's output layer a&lt;br /&gt;; bit.  You can enable output buffering during runtime by calling the output&lt;br /&gt;; buffering functions.  You can also enable output buffering for all files by&lt;br /&gt;; setting this directive to On.  If you wish to limit the size of the buffer&lt;br /&gt;; to a certain size - you can use a maximum number of bytes instead of 'On', as&lt;br /&gt;; a value for this directive (e.g., output_buffering=4096).&lt;br /&gt;output_buffering = Off&lt;br /&gt;&lt;br /&gt;; You can redirect all of the output of your scripts to a function.  For&lt;br /&gt;; example, if you set output_handler to "mb_output_handler", character&lt;br /&gt;; encoding will be transparently converted to the specified encoding.&lt;br /&gt;; Setting any output handler automatically turns on output buffering.&lt;br /&gt;; Note: People who wrote portable scripts should not depend on this ini&lt;br /&gt;;       directive. Instead, explicitly set the output handler using ob_start().&lt;br /&gt;;       Using this ini directive may cause problems unless you know what script&lt;br /&gt;;       is doing.&lt;br /&gt;; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"&lt;br /&gt;;       and you cannot use both "ob_gzhandler" and "zlib.output_compression".&lt;br /&gt;; Note: output_handler must be empty if this is set 'On' !!!!&lt;br /&gt;;       Instead you must use zlib.output_handler.&lt;br /&gt;;output_handler =&lt;br /&gt;&lt;br /&gt;; Transparent output compression using the zlib library&lt;br /&gt;; Valid values for this option are 'off', 'on', or a specific buffer size&lt;br /&gt;; to be used for compression (default is 4KB)&lt;br /&gt;; Note: Resulting chunk size may vary due to nature of compression. PHP&lt;br /&gt;;       outputs chunks that are few hundreds bytes each as a result of&lt;br /&gt;;       compression. If you prefer a larger chunk size for better&lt;br /&gt;;       performance, enable output_buffering in addition.&lt;br /&gt;; Note: You need to use zlib.output_handler instead of the standard&lt;br /&gt;;       output_handler, or otherwise the output will be corrupted.&lt;br /&gt;zlib.output_compression = On&lt;br /&gt;;zlib.output_compression_level = -1&lt;br /&gt;&lt;br /&gt;; You cannot specify additional output handlers if zlib.output_compression&lt;br /&gt;; is activated here. This setting does the same as output_handler but in&lt;br /&gt;; a different order.&lt;br /&gt;;zlib.output_handler =&lt;br /&gt;&lt;br /&gt;; Implicit flush tells PHP to tell the output layer to flush itself&lt;br /&gt;; automatically after every output block.  This is equivalent to calling the&lt;br /&gt;; PHP function flush() after each and every call to print() or echo() and each&lt;br /&gt;; and every HTML block.  Turning this option on has serious performance&lt;br /&gt;; implications and is generally recommended for debugging purposes only.&lt;br /&gt;implicit_flush = Off&lt;br /&gt;&lt;br /&gt;; The unserialize callback function will be called (with the undefined class'&lt;br /&gt;; name as parameter), if the unserializer finds an undefined class&lt;br /&gt;; which should be instantiated.&lt;br /&gt;; A warning appears if the specified function is not defined, or if the&lt;br /&gt;; function doesn't include/implement the missing class.&lt;br /&gt;; So only set this entry, if you really want to implement such a&lt;br /&gt;; callback-function.&lt;br /&gt;unserialize_callback_func=&lt;br /&gt;&lt;br /&gt;; When floats &amp; doubles are serialized store serialize_precision significant&lt;br /&gt;; digits after the floating point. The default value ensures that when floats&lt;br /&gt;; are decoded with unserialize, the data will remain the same.&lt;br /&gt;serialize_precision = 100&lt;br /&gt;&lt;br /&gt;; Whether to enable the ability to force arguments to be passed by reference&lt;br /&gt;; at function call time.  This method is deprecated and is likely to be&lt;br /&gt;; unsupported in future versions of PHP/Zend.  The encouraged method of&lt;br /&gt;; specifying which arguments should be passed by reference is in the function&lt;br /&gt;; declaration.  You're encouraged to try and turn this option Off and make&lt;br /&gt;; sure your scripts work properly with it in order to ensure they will work&lt;br /&gt;; with future versions of the language (you will receive a warning each time&lt;br /&gt;; you use this feature, and the argument will be passed by value instead of by&lt;br /&gt;; reference).&lt;br /&gt;allow_call_time_pass_reference = On&lt;br /&gt;&lt;br /&gt;;&lt;br /&gt;; Safe Mode&lt;br /&gt;;&lt;br /&gt;safe_mode = Off&lt;br /&gt;&lt;br /&gt;; By default, Safe Mode does a UID compare check when&lt;br /&gt;; opening files. If you want to relax this to a GID compare,&lt;br /&gt;; then turn on safe_mode_gid.&lt;br /&gt;safe_mode_gid = Off&lt;br /&gt;&lt;br /&gt;; When safe_mode is on, UID/GID checks are bypassed when&lt;br /&gt;; including files from this directory and its subdirectories.&lt;br /&gt;; (directory must also be in include_path or full path must&lt;br /&gt;; be used when including)&lt;br /&gt;safe_mode_include_dir =&lt;br /&gt;&lt;br /&gt;; When safe_mode is on, only executables located in the safe_mode_exec_dir&lt;br /&gt;; will be allowed to be executed via the exec family of functions.&lt;br /&gt;safe_mode_exec_dir =&lt;br /&gt;&lt;br /&gt;; Setting certain environment variables may be a potential security breach.&lt;br /&gt;; This directive contains a comma-delimited list of prefixes.  In Safe Mode,&lt;br /&gt;; the user may only alter environment variables whose names begin with the&lt;br /&gt;; prefixes supplied here.  By default, users will only be able to set&lt;br /&gt;; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR).&lt;br /&gt;;&lt;br /&gt;; Note:  If this directive is empty, PHP will let the user modify ANY&lt;br /&gt;; environment variable!&lt;br /&gt;safe_mode_allowed_env_vars = PHP_&lt;br /&gt;&lt;br /&gt;; This directive contains a comma-delimited list of environment variables that&lt;br /&gt;; the end user won't be able to change using putenv().  These variables will be&lt;br /&gt;; protected even if safe_mode_allowed_env_vars is set to allow to change them.&lt;br /&gt;safe_mode_protected_env_vars = LD_LIBRARY_PATH&lt;br /&gt;&lt;br /&gt;; open_basedir, if set, limits all file operations to the defined directory&lt;br /&gt;; and below.  This directive makes most sense if used in a per-directory&lt;br /&gt;; or per-virtualhost web server configuration file. This directive is&lt;br /&gt;; *NOT* affected by whether Safe Mode is turned On or Off.&lt;br /&gt;;open_basedir =&lt;br /&gt;&lt;br /&gt;; This directive allows you to disable certain functions for security reasons.&lt;br /&gt;; It receives a comma-delimited list of function names. This directive is&lt;br /&gt;; *NOT* affected by whether Safe Mode is turned On or Off.&lt;br /&gt;disable_functions =&lt;br /&gt;&lt;br /&gt;; This directive allows you to disable certain classes for security reasons.&lt;br /&gt;; It receives a comma-delimited list of class names. This directive is&lt;br /&gt;; *NOT* affected by whether Safe Mode is turned On or Off.&lt;br /&gt;disable_classes =&lt;br /&gt;&lt;br /&gt;; Colors for Syntax Highlighting mode.  Anything that's acceptable in&lt;br /&gt;; &lt;span style="color: ???????"&gt; would work.&lt;br /&gt;;highlight.string  = #DD0000&lt;br /&gt;;highlight.comment = #FF9900&lt;br /&gt;;highlight.keyword = #007700&lt;br /&gt;;highlight.bg      = #FFFFFF&lt;br /&gt;;highlight.default = #0000BB&lt;br /&gt;;highlight.html    = #000000&lt;br /&gt;&lt;br /&gt;; If enabled, the request will be allowed to complete even if the user aborts&lt;br /&gt;; the request. Consider enabling it if executing long request, which may end up&lt;br /&gt;; being interrupted by the user or a browser timing out.&lt;br /&gt;; ignore_user_abort = On&lt;br /&gt;&lt;br /&gt;; Determines the size of the realpath cache to be used by PHP. This value should&lt;br /&gt;; be increased on systems where PHP opens many files to reflect the quantity of&lt;br /&gt;; the file operations performed.&lt;br /&gt;; realpath_cache_size=16k&lt;br /&gt;&lt;br /&gt;; Duration of time, in seconds for which to cache realpath information for a given&lt;br /&gt;; file or directory. For systems with rarely changing files, consider increasing this&lt;br /&gt;; value.&lt;br /&gt;; realpath_cache_ttl=120&lt;br /&gt;&lt;br /&gt;;&lt;br /&gt;; Misc&lt;br /&gt;;&lt;br /&gt;; Decides whether PHP may expose the fact that it is installed on the server&lt;br /&gt;; (e.g. by adding its signature to the Web server header).  It is no security&lt;br /&gt;; threat in any way, but it makes it possible to determine whether you use PHP&lt;br /&gt;; on your server or not.&lt;br /&gt;expose_php = On&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;; Resource Limits ;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;&lt;br /&gt;max_execution_time = 30     ; Maximum execution time of each script, in seconds&lt;br /&gt;max_input_time = 60    ; Maximum amount of time each script may spend parsing request data&lt;br /&gt;;max_input_nesting_level = 64 ; Maximum input variable nesting level&lt;br /&gt;memory_limit = 128M      ; Maximum amount of memory a script may consume (128MB)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;; Error handling and logging ;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;&lt;br /&gt;; error_reporting is a bit-field.  Or each number up to get desired error&lt;br /&gt;; reporting level&lt;br /&gt;; E_ALL             - All errors and warnings (doesn't include E_STRICT)&lt;br /&gt;; E_ERROR           - fatal run-time errors&lt;br /&gt;; E_RECOVERABLE_ERROR  - almost fatal run-time errors&lt;br /&gt;; E_WARNING         - run-time warnings (non-fatal errors)&lt;br /&gt;; E_PARSE           - compile-time parse errors&lt;br /&gt;; E_NOTICE          - run-time notices (these are warnings which often result&lt;br /&gt;;                     from a bug in your code, but it's possible that it was&lt;br /&gt;;                     intentional (e.g., using an uninitialized variable and&lt;br /&gt;;                     relying on the fact it's automatically initialized to an&lt;br /&gt;;                     empty string)&lt;br /&gt;; E_STRICT          - run-time notices, enable to have PHP suggest changes&lt;br /&gt;;                     to your code which will ensure the best interoperability&lt;br /&gt;;                     and forward compatibility of your code&lt;br /&gt;; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup&lt;br /&gt;; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's&lt;br /&gt;;                     initial startup&lt;br /&gt;; E_COMPILE_ERROR   - fatal compile-time errors&lt;br /&gt;; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)&lt;br /&gt;; E_USER_ERROR      - user-generated error message&lt;br /&gt;; E_USER_WARNING    - user-generated warning message&lt;br /&gt;; E_USER_NOTICE     - user-generated notice message&lt;br /&gt;;&lt;br /&gt;; Examples:&lt;br /&gt;;&lt;br /&gt;;   - Show all errors, except for notices and coding standards warnings&lt;br /&gt;;&lt;br /&gt;;error_reporting = E_ALL &amp; ~E_NOTICE&lt;br /&gt;;&lt;br /&gt;;   - Show all errors, except for notices&lt;br /&gt;;&lt;br /&gt;;error_reporting = E_ALL &amp; ~E_NOTICE | E_STRICT&lt;br /&gt;;&lt;br /&gt;;   - Show only errors&lt;br /&gt;;&lt;br /&gt;;error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR&lt;br /&gt;;&lt;br /&gt;;   - Show all errors except for notices and coding standards warnings&lt;br /&gt;;&lt;br /&gt;error_reporting  =  E_ALL &amp; ~E_NOTICE&lt;br /&gt;&lt;br /&gt;; Print out errors (as a part of the output).  For production web sites,&lt;br /&gt;; you're strongly encouraged to turn this feature off, and use error logging&lt;br /&gt;; instead (see below).  Keeping display_errors enabled on a production web site&lt;br /&gt;; may reveal security information to end users, such as file paths on your Web&lt;br /&gt;; server, your database schema or other information.&lt;br /&gt;display_errors = On&lt;br /&gt;&lt;br /&gt;; Even when display_errors is on, errors that occur during PHP's startup&lt;br /&gt;; sequence are not displayed.  It's strongly recommended to keep&lt;br /&gt;; display_startup_errors off, except for when debugging.&lt;br /&gt;display_startup_errors = Off&lt;br /&gt;&lt;br /&gt;; Log errors into a log file (server-specific log, stderr, or error_log (below))&lt;br /&gt;; As stated above, you're strongly advised to use error logging in place of&lt;br /&gt;; error displaying on production web sites.&lt;br /&gt;log_errors = Off&lt;br /&gt;&lt;br /&gt;; Set maximum length of log_errors. In error_log information about the source is&lt;br /&gt;; added. The default is 1024 and 0 allows to not apply any maximum length at all.&lt;br /&gt;log_errors_max_len = 1024&lt;br /&gt;&lt;br /&gt;; Do not log repeated messages. Repeated errors must occur in same file on same&lt;br /&gt;; line until ignore_repeated_source is set true.&lt;br /&gt;ignore_repeated_errors = Off&lt;br /&gt;&lt;br /&gt;; Ignore source of message when ignoring repeated messages. When this setting&lt;br /&gt;; is On you will not log errors with repeated messages from different files or&lt;br /&gt;; source lines.&lt;br /&gt;ignore_repeated_source = Off&lt;br /&gt;&lt;br /&gt;; If this parameter is set to Off, then memory leaks will not be shown (on&lt;br /&gt;; stdout or in the log). This has only effect in a debug compile, and if&lt;br /&gt;; error reporting includes E_WARNING in the allowed list&lt;br /&gt;report_memleaks = On&lt;br /&gt;&lt;br /&gt;;report_zend_debug = 0&lt;br /&gt;&lt;br /&gt;; Store the last error/warning message in $php_errormsg (boolean).&lt;br /&gt;track_errors = Off&lt;br /&gt;&lt;br /&gt;; Disable the inclusion of HTML tags in error messages.&lt;br /&gt;; Note: Never use this feature for production boxes.&lt;br /&gt;;html_errors = Off&lt;br /&gt;&lt;br /&gt;; If html_errors is set On PHP produces clickable error messages that direct&lt;br /&gt;; to a page describing the error or function causing the error in detail.&lt;br /&gt;; You can download a copy of the PHP manual from http://www.php.net/docs.php&lt;br /&gt;; and change docref_root to the base URL of your local copy including the&lt;br /&gt;; leading '/'. You must also specify the file extension being used including&lt;br /&gt;; the dot.&lt;br /&gt;; Note: Never use this feature for production boxes.&lt;br /&gt;;docref_root = "/phpmanual/"&lt;br /&gt;;docref_ext = .html&lt;br /&gt;&lt;br /&gt;; String to output before an error message.&lt;br /&gt;;error_prepend_string = "&lt;span style="color:ff0000;"&gt;"&lt;br /&gt;&lt;br /&gt;; String to output after an error message.&lt;br /&gt;;error_append_string = "&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;; Log errors to specified file.&lt;br /&gt;;error_log = filename&lt;br /&gt;&lt;br /&gt;; Log errors to syslog (Event Log on NT, not valid in Windows 95).&lt;br /&gt;;error_log = syslog&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;;;;;;;;;;;;;;;;;&lt;br /&gt;; Data Handling ;&lt;br /&gt;;;;;;;;;;;;;;;;;;&lt;br /&gt;;&lt;br /&gt;; Note - track_vars is ALWAYS enabled as of PHP 4.0.3&lt;br /&gt;&lt;br /&gt;; The separator used in PHP generated URLs to separate arguments.&lt;br /&gt;; Default is "&amp;".&lt;br /&gt;;arg_separator.output = "&amp;amp;"&lt;br /&gt;&lt;br /&gt;; List of separator(s) used by PHP to parse input URLs into variables.&lt;br /&gt;; Default is "&amp;".&lt;br /&gt;; NOTE: Every character in this directive is considered as separator!&lt;br /&gt;;arg_separator.input = ";&amp;"&lt;br /&gt;&lt;br /&gt;; This directive describes the order in which PHP registers GET, POST, Cookie,&lt;br /&gt;; Environment and Built-in variables (G, P, C, E &amp; S respectively, often&lt;br /&gt;; referred to as EGPCS or GPC).  Registration is done from left to right, newer&lt;br /&gt;; values override older values.&lt;br /&gt;variables_order = "EGPCS"&lt;br /&gt;&lt;br /&gt;; Whether or not to register the EGPCS variables as global variables.  You may&lt;br /&gt;; want to turn this off if you don't want to clutter your scripts' global scope&lt;br /&gt;; with user data.  This makes most sense when coupled with track_vars - in which&lt;br /&gt;; case you can access all of the GPC variables through the $HTTP_*_VARS[],&lt;br /&gt;; variables.&lt;br /&gt;;&lt;br /&gt;; You should do your best to write your scripts so that they do not require&lt;br /&gt;; register_globals to be on;  Using form variables as globals can easily lead&lt;br /&gt;; to possible security problems, if the code is not very well thought of.&lt;br /&gt;register_globals = Off&lt;br /&gt;&lt;br /&gt;; Whether or not to register the old-style input arrays, HTTP_GET_VARS&lt;br /&gt;; and friends.  If you're not using them, it's recommended to turn them off,&lt;br /&gt;; for performance reasons.&lt;br /&gt;register_long_arrays = On&lt;br /&gt;&lt;br /&gt;; This directive tells PHP whether to declare the argv&amp;argc variables (that&lt;br /&gt;; would contain the GET information).  If you don't use these variables, you&lt;br /&gt;; should turn it off for increased performance.&lt;br /&gt;register_argc_argv = On&lt;br /&gt;&lt;br /&gt;; When enabled, the SERVER and ENV variables are created when they're first&lt;br /&gt;; used (Just In Time) instead of when the script starts. If these variables&lt;br /&gt;; are not used within a script, having this directive on will result in a&lt;br /&gt;; performance gain. The PHP directives register_globals, register_long_arrays,&lt;br /&gt;; and register_argc_argv must be disabled for this directive to have any affect.&lt;br /&gt;auto_globals_jit = On&lt;br /&gt;&lt;br /&gt;; Maximum size of POST data that PHP will accept.&lt;br /&gt;post_max_size = 8M&lt;br /&gt;&lt;br /&gt;; Magic quotes&lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;; Magic quotes for incoming GET/POST/Cookie data.&lt;br /&gt;magic_quotes_gpc = On&lt;br /&gt;&lt;br /&gt;; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.&lt;br /&gt;magic_quotes_runtime = Off&lt;br /&gt;&lt;br /&gt;; Use Sybase-style magic quotes (escape ' with '' instead of \').&lt;br /&gt;magic_quotes_sybase = Off&lt;br /&gt;&lt;br /&gt;; Automatically add files before or after any PHP document.&lt;br /&gt;auto_prepend_file =&lt;br /&gt;auto_append_file =&lt;br /&gt;&lt;br /&gt;; As of 4.0b4, PHP always outputs a character encoding by default in&lt;br /&gt;; the Content-type: header.  To disable sending of the charset, simply&lt;br /&gt;; set it to be empty.&lt;br /&gt;;&lt;br /&gt;; PHP's built-in default is text/html&lt;br /&gt;default_mimetype = "text/html"&lt;br /&gt;;default_charset = "iso-8859-1"&lt;br /&gt;&lt;br /&gt;; Always populate the $HTTP_RAW_POST_DATA variable.&lt;br /&gt;;always_populate_raw_post_data = On&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;; Paths and Directories ;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;&lt;br /&gt;; UNIX: "/path1:/path2"&lt;br /&gt;;include_path = ".:/php/includes"&lt;br /&gt;;&lt;br /&gt;; Windows: "\path1;\path2"&lt;br /&gt;;include_path = ".;c:\php\includes"&lt;br /&gt;&lt;br /&gt;; The root of the PHP pages, used only if nonempty.&lt;br /&gt;; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root&lt;br /&gt;; if you are running php as a CGI under any web server (other than IIS)&lt;br /&gt;; see documentation for security issues.  The alternate is to use the&lt;br /&gt;; cgi.force_redirect configuration below&lt;br /&gt;doc_root =&lt;br /&gt;&lt;br /&gt;; The directory under which PHP opens the script using /~username used only&lt;br /&gt;; if nonempty.&lt;br /&gt;user_dir =&lt;br /&gt;&lt;br /&gt;; Directory in which the loadable extensions (modules) reside.&lt;br /&gt;extension_dir = "./"&lt;br /&gt;&lt;br /&gt;; Whether or not to enable the dl() function.  The dl() function does NOT work&lt;br /&gt;; properly in multithreaded servers, such as IIS or Zeus, and is automatically&lt;br /&gt;; disabled on them.&lt;br /&gt;enable_dl = On&lt;br /&gt;&lt;br /&gt;; cgi.force_redirect is necessary to provide security running PHP as a CGI under&lt;br /&gt;; most web servers.  Left undefined, PHP turns this on by default.  You can&lt;br /&gt;; turn it off here AT YOUR OWN RISK&lt;br /&gt;; **You CAN safely turn this off for IIS, in fact, you MUST.**&lt;br /&gt;; cgi.force_redirect = 1&lt;br /&gt;&lt;br /&gt;; if cgi.nph is enabled it will force cgi to always sent Status: 200 with&lt;br /&gt;; every request.&lt;br /&gt;; cgi.nph = 1&lt;br /&gt;&lt;br /&gt;; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape&lt;br /&gt;; (iPlanet) web servers, you MAY need to set an environment variable name that PHP&lt;br /&gt;; will look for to know it is OK to continue execution.  Setting this variable MAY&lt;br /&gt;; cause security issues, KNOW WHAT YOU ARE DOING FIRST.&lt;br /&gt;; cgi.redirect_status_env = ;&lt;br /&gt;&lt;br /&gt;; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's&lt;br /&gt;; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok&lt;br /&gt;; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting&lt;br /&gt;; this to 1 will cause PHP CGI to fix it's paths to conform to the spec.  A setting&lt;br /&gt;; of zero causes PHP to behave as before.  Default is zero.  You should fix your scripts&lt;br /&gt;; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.&lt;br /&gt;; cgi.fix_pathinfo=0&lt;br /&gt;&lt;br /&gt;; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate&lt;br /&gt;; security tokens of the calling client.  This allows IIS to define the&lt;br /&gt;; security context that the request runs under.  mod_fastcgi under Apache&lt;br /&gt;; does not currently support this feature (03/17/2002)&lt;br /&gt;; Set to 1 if running under IIS.  Default is zero.&lt;br /&gt;; fastcgi.impersonate = 1;&lt;br /&gt;&lt;br /&gt;; Disable logging through FastCGI connection&lt;br /&gt;; fastcgi.log = 0&lt;br /&gt;&lt;br /&gt;; cgi.rfc2616_headers configuration option tells PHP what type of headers to&lt;br /&gt;; use when sending HTTP response code. If it's set 0 PHP sends Status: header that&lt;br /&gt;; is supported by Apache. When this option is set to 1 PHP will send&lt;br /&gt;; RFC2616 compliant header.&lt;br /&gt;; Default is zero.&lt;br /&gt;;cgi.rfc2616_headers = 0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;;;;;;;;;;;;;;;;&lt;br /&gt;; File Uploads ;&lt;br /&gt;;;;;;;;;;;;;;;;;&lt;br /&gt;&lt;br /&gt;; Whether to allow HTTP file uploads.&lt;br /&gt;file_uploads = On&lt;br /&gt;&lt;br /&gt;; Temporary directory for HTTP uploaded files (will use system default if not&lt;br /&gt;; specified).&lt;br /&gt;;upload_tmp_dir =&lt;br /&gt;&lt;br /&gt;; Maximum allowed size for uploaded files.&lt;br /&gt;upload_max_filesize = 8M&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;;;;;;;;;;;;;;;;;;&lt;br /&gt;; Fopen wrappers ;&lt;br /&gt;;;;;;;;;;;;;;;;;;;&lt;br /&gt;&lt;br /&gt;; Whether to allow the treatment of URLs (like http:// or ftp://) as files.&lt;br /&gt;allow_url_fopen = On&lt;br /&gt;&lt;br /&gt;; Whether to allow include/require to open URLs (like http:// or ftp://) as files.&lt;br /&gt;allow_url_include = Off&lt;br /&gt;&lt;br /&gt;; Define the anonymous ftp password (your email address)&lt;br /&gt;;from="john@doe.com"&lt;br /&gt;&lt;br /&gt;; Define the User-Agent string&lt;br /&gt;; user_agent="PHP"&lt;br /&gt;&lt;br /&gt;; Default timeout for socket based streams (seconds)&lt;br /&gt;default_socket_timeout = 60&lt;br /&gt;&lt;br /&gt;; If your scripts have to deal with files from Macintosh systems,&lt;br /&gt;; or you are running on a Mac and need to deal with files from&lt;br /&gt;; unix or win32 systems, setting this flag will cause PHP to&lt;br /&gt;; automatically detect the EOL character in those files so that&lt;br /&gt;; fgets() and file() will work regardless of the source of the file.&lt;br /&gt;; auto_detect_line_endings = Off&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;; Dynamic Extensions ;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;;&lt;br /&gt;; If you wish to have an extension loaded automatically, use the following&lt;br /&gt;; syntax:&lt;br /&gt;;&lt;br /&gt;;   extension=modulename.extension&lt;br /&gt;;&lt;br /&gt;; For example, on Windows:&lt;br /&gt;;&lt;br /&gt;;   extension=msql.dll&lt;br /&gt;;&lt;br /&gt;; ... or under UNIX:&lt;br /&gt;;&lt;br /&gt;;   extension=msql.so&lt;br /&gt;;&lt;br /&gt;; Note that it should be the name of the module only; no directory information&lt;br /&gt;; needs to go here.  Specify the location of the extension with the&lt;br /&gt;; extension_dir directive above.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;; Windows Extensions&lt;br /&gt;; Note that ODBC support is built in, so no dll is needed for it.&lt;br /&gt;; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)&lt;br /&gt;; extension folders as well as the separate PECL DLL download (PHP 5).&lt;br /&gt;; Be sure to appropriately set the extension_dir directive.&lt;br /&gt;&lt;br /&gt;;extension=php_bz2.dll&lt;br /&gt;;extension=php_curl.dll&lt;br /&gt;;extension=php_dba.dll&lt;br /&gt;;extension=php_dbase.dll&lt;br /&gt;;extension=php_exif.dll&lt;br /&gt;;extension=php_fdf.dll&lt;br /&gt;;extension=php_gd2.dll&lt;br /&gt;;extension=php_gettext.dll&lt;br /&gt;;extension=php_gmp.dll&lt;br /&gt;;extension=php_ifx.dll&lt;br /&gt;;extension=php_imap.dll&lt;br /&gt;;extension=php_interbase.dll&lt;br /&gt;;extension=php_ldap.dll&lt;br /&gt;;extension=php_mbstring.dll&lt;br /&gt;;extension=php_mcrypt.dll&lt;br /&gt;;extension=php_mhash.dll&lt;br /&gt;;extension=php_mime_magic.dll&lt;br /&gt;;extension=php_ming.dll&lt;br /&gt;;extension=php_msql.dll&lt;br /&gt;;extension=php_mssql.dll&lt;br /&gt;extension=php_mysql.so&lt;br /&gt;;extension=php_mysqli.dll&lt;br /&gt;;extension=php_oci8.dll&lt;br /&gt;;extension=php_openssl.dll&lt;br /&gt;;extension=php_pdo.dll&lt;br /&gt;;extension=php_pdo_firebird.dll&lt;br /&gt;;extension=php_pdo_mssql.dll&lt;br /&gt;;extension=php_pdo_mysql.dll&lt;br /&gt;;extension=php_pdo_oci.dll&lt;br /&gt;;extension=php_pdo_oci8.dll&lt;br /&gt;;extension=php_pdo_odbc.dll&lt;br /&gt;;extension=php_pdo_pgsql.dll&lt;br /&gt;;extension=php_pdo_sqlite.dll&lt;br /&gt;;extension=php_pgsql.dll&lt;br /&gt;;extension=php_pspell.dll&lt;br /&gt;;extension=php_shmop.dll&lt;br /&gt;;extension=php_snmp.dll&lt;br /&gt;;extension=php_soap.dll&lt;br /&gt;;extension=php_sockets.dll&lt;br /&gt;;extension=php_sqlite.dll&lt;br /&gt;;extension=php_sybase_ct.dll&lt;br /&gt;;extension=php_tidy.dll&lt;br /&gt;;extension=php_xmlrpc.dll&lt;br /&gt;;extension=php_xsl.dll&lt;br /&gt;;extension=php_zip.dll&lt;br /&gt;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;; Module Settings ;&lt;br /&gt;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;&lt;br /&gt;[Date]&lt;br /&gt;; Defines the default timezone used by the date functions&lt;br /&gt;;date.timezone =&lt;br /&gt;&lt;br /&gt;;date.default_latitude = 31.7667&lt;br /&gt;;date.default_longitude = 35.2333&lt;br /&gt;&lt;br /&gt;;date.sunrise_zenith = 90.583333&lt;br /&gt;;date.sunset_zenith = 90.583333&lt;br /&gt;&lt;br /&gt;[filter]&lt;br /&gt;;filter.default = unsafe_raw&lt;br /&gt;;filter.default_flags =&lt;br /&gt;&lt;br /&gt;[iconv]&lt;br /&gt;;iconv.input_encoding = ISO-8859-1&lt;br /&gt;;iconv.internal_encoding = ISO-8859-1&lt;br /&gt;;iconv.output_encoding = ISO-8859-1&lt;br /&gt;&lt;br /&gt;[sqlite]&lt;br /&gt;;sqlite.assoc_case = 0&lt;br /&gt;&lt;br /&gt;[xmlrpc]&lt;br /&gt;;xmlrpc_error_number = 0&lt;br /&gt;;xmlrpc_errors = 0&lt;br /&gt;&lt;br /&gt;[Pcre]&lt;br /&gt;;PCRE library backtracking limit.&lt;br /&gt;;pcre.backtrack_limit=100000&lt;br /&gt;&lt;br /&gt;;PCRE library recursion limit.&lt;br /&gt;;Please note that if you set this value to a high number you may consume all&lt;br /&gt;;the available process stack and eventually crash PHP (due to reaching the&lt;br /&gt;;stack size limit imposed by the Operating System).&lt;br /&gt;;pcre.recursion_limit=100000&lt;br /&gt;&lt;br /&gt;[Syslog]&lt;br /&gt;; Whether or not to define the various syslog variables (e.g. $LOG_PID,&lt;br /&gt;; $LOG_CRON, etc.).  Turning it off is a good idea performance-wise.  In&lt;br /&gt;; runtime, you can define these variables by calling define_syslog_variables().&lt;br /&gt;define_syslog_variables  = Off&lt;br /&gt;&lt;br /&gt;[mail function]&lt;br /&gt;; For Win32 only.&lt;br /&gt;SMTP = localhost&lt;br /&gt;smtp_port = 25&lt;br /&gt;&lt;br /&gt;; For Win32 only.&lt;br /&gt;;sendmail_from = me@example.com&lt;br /&gt;&lt;br /&gt;; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").&lt;br /&gt;;sendmail_path =&lt;br /&gt;&lt;br /&gt;; Force the addition of the specified parameters to be passed as extra parameters&lt;br /&gt;; to the sendmail binary. These parameters will always replace the value of&lt;br /&gt;; the 5th parameter to mail(), even in safe mode.&lt;br /&gt;;mail.force_extra_parameters =&lt;br /&gt;&lt;br /&gt;[SQL]&lt;br /&gt;sql.safe_mode = Off&lt;br /&gt;&lt;br /&gt;[ODBC]&lt;br /&gt;;odbc.default_db    =  Not yet implemented&lt;br /&gt;;odbc.default_user  =  Not yet implemented&lt;br /&gt;;odbc.default_pw    =  Not yet implemented&lt;br /&gt;&lt;br /&gt;; Allow or prevent persistent links.&lt;br /&gt;odbc.allow_persistent = On&lt;br /&gt;&lt;br /&gt;; Check that a connection is still valid before reuse.&lt;br /&gt;odbc.check_persistent = On&lt;br /&gt;&lt;br /&gt;; Maximum number of persistent links.  -1 means no limit.&lt;br /&gt;odbc.max_persistent = -1&lt;br /&gt;&lt;br /&gt;; Maximum number of links (persistent + non-persistent).  -1 means no limit.&lt;br /&gt;odbc.max_links = -1&lt;br /&gt;&lt;br /&gt;; Handling of LONG fields.  Returns number of bytes to variables.  0 means&lt;br /&gt;; passthru.&lt;br /&gt;odbc.defaultlrl = 4096&lt;br /&gt;&lt;br /&gt;; Handling of binary data.  0 means passthru, 1 return as is, 2 convert to char.&lt;br /&gt;; See the documentation on odbc_binmode and odbc_longreadlen for an explanation&lt;br /&gt;; of uodbc.defaultlrl and uodbc.defaultbinmode&lt;br /&gt;odbc.defaultbinmode = 1&lt;br /&gt;&lt;br /&gt;[MySQL]&lt;br /&gt;; Allow or prevent persistent links.&lt;br /&gt;mysql.allow_persistent = On&lt;br /&gt;&lt;br /&gt;; Maximum number of persistent links.  -1 means no limit.&lt;br /&gt;mysql.max_persistent = -1&lt;br /&gt;&lt;br /&gt;; Maximum number of links (persistent + non-persistent).  -1 means no limit.&lt;br /&gt;mysql.max_links = -1&lt;br /&gt;&lt;br /&gt;; Default port number for mysql_connect().  If unset, mysql_connect() will use&lt;br /&gt;; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the&lt;br /&gt;; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look&lt;br /&gt;; at MYSQL_PORT.&lt;br /&gt;mysql.default_port = 3306&lt;br /&gt;&lt;br /&gt;; Default socket name for local MySQL connects.  If empty, uses the built-in&lt;br /&gt;; MySQL defaults.&lt;br /&gt;mysql.default_socket = /var/run/mysqld/mysqld.sock&lt;br /&gt;&lt;br /&gt;; Default host for mysql_connect() (doesn't apply in safe mode).&lt;br /&gt;mysql.default_host = localhost&lt;br /&gt;&lt;br /&gt;; Default user for mysql_connect() (doesn't apply in safe mode).&lt;br /&gt;mysql.default_user = root&lt;br /&gt;&lt;br /&gt;; Default password for mysql_connect() (doesn't apply in safe mode).&lt;br /&gt;; Note that this is generally a *bad* idea to store passwords in this file.&lt;br /&gt;; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")&lt;br /&gt;; and reveal this password!  And of course, any users with read access to this&lt;br /&gt;; file will be able to reveal the password as well.&lt;br /&gt;mysql.default_password = ''&lt;br /&gt;&lt;br /&gt;; Maximum time (in seconds) for connect timeout. -1 means no limit&lt;br /&gt;mysql.connect_timeout = 60&lt;br /&gt;&lt;br /&gt;; Trace mode. When trace_mode is active (=On), warnings for table/index scans and&lt;br /&gt;; SQL-Errors will be displayed.&lt;br /&gt;mysql.trace_mode = Off&lt;br /&gt;&lt;br /&gt;[MySQLi]&lt;br /&gt;&lt;br /&gt;; Maximum number of links.  -1 means no limit.&lt;br /&gt;mysqli.max_links = -1&lt;br /&gt;&lt;br /&gt;; Default port number for mysqli_connect().  If unset, mysqli_connect() will use&lt;br /&gt;; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the&lt;br /&gt;; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look&lt;br /&gt;; at MYSQL_PORT.&lt;br /&gt;mysqli.default_port = 3306&lt;br /&gt;&lt;br /&gt;; Default socket name for local MySQL connects.  If empty, uses the built-in&lt;br /&gt;; MySQL defaults.&lt;br /&gt;mysqli.default_socket =&lt;br /&gt;&lt;br /&gt;; Default host for mysql_connect() (doesn't apply in safe mode).&lt;br /&gt;mysqli.default_host =&lt;br /&gt;&lt;br /&gt;; Default user for mysql_connect() (doesn't apply in safe mode).&lt;br /&gt;mysqli.default_user =&lt;br /&gt;&lt;br /&gt;; Default password for mysqli_connect() (doesn't apply in safe mode).&lt;br /&gt;; Note that this is generally a *bad* idea to store passwords in this file.&lt;br /&gt;; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")&lt;br /&gt;; and reveal this password!  And of course, any users with read access to this&lt;br /&gt;; file will be able to reveal the password as well.&lt;br /&gt;mysqli.default_pw =&lt;br /&gt;&lt;br /&gt;; Allow or prevent reconnect&lt;br /&gt;mysqli.reconnect = Off&lt;br /&gt;&lt;br /&gt;[mSQL]&lt;br /&gt;; Allow or prevent persistent links.&lt;br /&gt;msql.allow_persistent = On&lt;br /&gt;&lt;br /&gt;; Maximum number of persistent links.  -1 means no limit.&lt;br /&gt;msql.max_persistent = -1&lt;br /&gt;&lt;br /&gt;; Maximum number of links (persistent+non persistent).  -1 means no limit.&lt;br /&gt;msql.max_links = -1&lt;br /&gt;&lt;br /&gt;[OCI8]&lt;br /&gt;; enables privileged connections using external credentials (OCI_SYSOPER, OCI_SYSDBA)&lt;br /&gt;;oci8.privileged_connect = Off&lt;br /&gt;&lt;br /&gt;; Connection: The maximum number of persistent OCI8 connections per&lt;br /&gt;; process. Using -1 means no limit.&lt;br /&gt;;oci8.max_persistent = -1&lt;br /&gt;&lt;br /&gt;; Connection: The maximum number of seconds a process is allowed to&lt;br /&gt;; maintain an idle persistent connection. Using -1 means idle&lt;br /&gt;; persistent connections will be maintained forever.&lt;br /&gt;;oci8.persistent_timeout = -1&lt;br /&gt;&lt;br /&gt;; Connection: The number of seconds that must pass before issuing a&lt;br /&gt;; ping during oci_pconnect() to check the connection validity. When&lt;br /&gt;; set to 0, each oci_pconnect() will cause a ping. Using -1 disables&lt;br /&gt;; pings completely.&lt;br /&gt;;oci8.ping_interval = 60&lt;br /&gt;&lt;br /&gt;; Tuning: This option enables statement caching, and specifies how&lt;br /&gt;; many statements to cache. Using 0 disables statement caching.&lt;br /&gt;;oci8.statement_cache_size = 20&lt;br /&gt;&lt;br /&gt;; Tuning: Enables statement prefetching and sets the default number of&lt;br /&gt;; rows that will be fetched automatically after statement execution.&lt;br /&gt;;oci8.default_prefetch = 10&lt;br /&gt;&lt;br /&gt;; Compatibility. Using On means oci_close() will not close&lt;br /&gt;; oci_connect() and oci_new_connect() connections.&lt;br /&gt;;oci8.old_oci_close_semantics = Off&lt;br /&gt;&lt;br /&gt;[PostgresSQL]&lt;br /&gt;; Allow or prevent persistent links.&lt;br /&gt;pgsql.allow_persistent = On&lt;br /&gt;&lt;br /&gt;; Detect broken persistent links always with pg_pconnect().&lt;br /&gt;; Auto reset feature requires a little overheads.&lt;br /&gt;pgsql.auto_reset_persistent = Off&lt;br /&gt;&lt;br /&gt;; Maximum number of persistent links.  -1 means no limit.&lt;br /&gt;pgsql.max_persistent = -1&lt;br /&gt;&lt;br /&gt;; Maximum number of links (persistent+non persistent).  -1 means no limit.&lt;br /&gt;pgsql.max_links = -1&lt;br /&gt;&lt;br /&gt;; Ignore PostgreSQL backends Notice message or not.&lt;br /&gt;; Notice message logging require a little overheads.&lt;br /&gt;pgsql.ignore_notice = 0&lt;br /&gt;&lt;br /&gt;; Log PostgreSQL backends Noitce message or not.&lt;br /&gt;; Unless pgsql.ignore_notice=0, module cannot log notice message.&lt;br /&gt;pgsql.log_notice = 0&lt;br /&gt;&lt;br /&gt;[Sybase]&lt;br /&gt;; Allow or prevent persistent links.&lt;br /&gt;sybase.allow_persistent = On&lt;br /&gt;&lt;br /&gt;; Maximum number of persistent links.  -1 means no limit.&lt;br /&gt;sybase.max_persistent = -1&lt;br /&gt;&lt;br /&gt;; Maximum number of links (persistent + non-persistent).  -1 means no limit.&lt;br /&gt;sybase.max_links = -1&lt;br /&gt;&lt;br /&gt;;sybase.interface_file = "/usr/sybase/interfaces"&lt;br /&gt;&lt;br /&gt;; Minimum error severity to display.&lt;br /&gt;sybase.min_error_severity = 10&lt;br /&gt;&lt;br /&gt;; Minimum message severity to display.&lt;br /&gt;sybase.min_message_severity = 10&lt;br /&gt;&lt;br /&gt;; Compatibility mode with old versions of PHP 3.0.&lt;br /&gt;; If on, this will cause PHP to automatically assign types to results according&lt;br /&gt;; to their Sybase type, instead of treating them all as strings.  This&lt;br /&gt;; compatibility mode will probably not stay around forever, so try applying&lt;br /&gt;; whatever necessary changes to your code, and turn it off.&lt;br /&gt;sybase.compatability_mode = Off&lt;br /&gt;&lt;br /&gt;[Sybase-CT]&lt;br /&gt;; Allow or prevent persistent links.&lt;br /&gt;sybct.allow_persistent = On&lt;br /&gt;&lt;br /&gt;; Maximum number of persistent links.  -1 means no limit.&lt;br /&gt;sybct.max_persistent = -1&lt;br /&gt;&lt;br /&gt;; Maximum number of links (persistent + non-persistent).  -1 means no limit.&lt;br /&gt;sybct.max_links = -1&lt;br /&gt;&lt;br /&gt;; Minimum server message severity to display.&lt;br /&gt;sybct.min_server_severity = 10&lt;br /&gt;&lt;br /&gt;; Minimum client message severity to display.&lt;br /&gt;sybct.min_client_severity = 10&lt;br /&gt;&lt;br /&gt;[bcmath]&lt;br /&gt;; Number of decimal digits for all bcmath functions.&lt;br /&gt;bcmath.scale = 0&lt;br /&gt;&lt;br /&gt;[browscap]&lt;br /&gt;;browscap = extra/browscap.ini&lt;br /&gt;&lt;br /&gt;[Informix]&lt;br /&gt;; Default host for ifx_connect() (doesn't apply in safe mode).&lt;br /&gt;ifx.default_host =&lt;br /&gt;&lt;br /&gt;; Default user for ifx_connect() (doesn't apply in safe mode).&lt;br /&gt;ifx.default_user =&lt;br /&gt;&lt;br /&gt;; Default password for ifx_connect() (doesn't apply in safe mode).&lt;br /&gt;ifx.default_password =&lt;br /&gt;&lt;br /&gt;; Allow or prevent persistent links.&lt;br /&gt;ifx.allow_persistent = On&lt;br /&gt;&lt;br /&gt;; Maximum number of persistent links.  -1 means no limit.&lt;br /&gt;ifx.max_persistent = -1&lt;br /&gt;&lt;br /&gt;; Maximum number of links (persistent + non-persistent).  -1 means no limit.&lt;br /&gt;ifx.max_links = -1&lt;br /&gt;&lt;br /&gt;; If on, select statements return the contents of a text blob instead of its id.&lt;br /&gt;ifx.textasvarchar = 0&lt;br /&gt;&lt;br /&gt;; If on, select statements return the contents of a byte blob instead of its id.&lt;br /&gt;ifx.byteasvarchar = 0&lt;br /&gt;&lt;br /&gt;; Trailing blanks are stripped from fixed-length char columns.  May help the&lt;br /&gt;; life of Informix SE users.&lt;br /&gt;ifx.charasvarchar = 0&lt;br /&gt;&lt;br /&gt;; If on, the contents of text and byte blobs are dumped to a file instead of&lt;br /&gt;; keeping them in memory.&lt;br /&gt;ifx.blobinfile = 0&lt;br /&gt;&lt;br /&gt;; NULL's are returned as empty strings, unless this is set to 1.  In that case,&lt;br /&gt;; NULL's are returned as string 'NULL'.&lt;br /&gt;ifx.nullformat = 0&lt;br /&gt;&lt;br /&gt;[Session]&lt;br /&gt;; Handler used to store/retrieve data.&lt;br /&gt;session.save_handler = files&lt;br /&gt;&lt;br /&gt;; Argument passed to save_handler.  In the case of files, this is the path&lt;br /&gt;; where data files are stored. Note: Windows users have to change this&lt;br /&gt;; variable in order to use PHP's session functions.&lt;br /&gt;;&lt;br /&gt;; As of PHP 4.0.1, you can define the path as:&lt;br /&gt;;&lt;br /&gt;;     session.save_path = "N;/path"&lt;br /&gt;;&lt;br /&gt;; where N is an integer.  Instead of storing all the session files in&lt;br /&gt;; /path, what this will do is use subdirectories N-levels deep, and&lt;br /&gt;; store the session data in those directories.  This is useful if you&lt;br /&gt;; or your OS have problems with lots of files in one directory, and is&lt;br /&gt;; a more efficient layout for servers that handle lots of sessions.&lt;br /&gt;;&lt;br /&gt;; NOTE 1: PHP will not create this directory structure automatically.&lt;br /&gt;;         You can use the script in the ext/session dir for that purpose.&lt;br /&gt;; NOTE 2: See the section on garbage collection below if you choose to&lt;br /&gt;;         use subdirectories for session storage&lt;br /&gt;;&lt;br /&gt;; The file storage module creates files using mode 600 by default.&lt;br /&gt;; You can change that by using&lt;br /&gt;;&lt;br /&gt;;     session.save_path = "N;MODE;/path"&lt;br /&gt;;&lt;br /&gt;; where MODE is the octal representation of the mode. Note that this&lt;br /&gt;; does not overwrite the process's umask.&lt;br /&gt;session.save_path = "/tmp"&lt;br /&gt;&lt;br /&gt;; Whether to use cookies.&lt;br /&gt;session.use_cookies = 1&lt;br /&gt;&lt;br /&gt;;session.cookie_secure =&lt;br /&gt;&lt;br /&gt;; This option enables administrators to make their users invulnerable to&lt;br /&gt;; attacks which involve passing session ids in URLs; defaults to 0.&lt;br /&gt;; session.use_only_cookies = 1&lt;br /&gt;&lt;br /&gt;; Name of the session (used as cookie name).&lt;br /&gt;session.name = PHPSESSID&lt;br /&gt;&lt;br /&gt;; Initialize session on request startup.&lt;br /&gt;session.auto_start = 0&lt;br /&gt;&lt;br /&gt;; Lifetime in seconds of cookie or, if 0, until browser is restarted.&lt;br /&gt;session.cookie_lifetime = 0&lt;br /&gt;&lt;br /&gt;; The path for which the cookie is valid.&lt;br /&gt;session.cookie_path = /&lt;br /&gt;&lt;br /&gt;; The domain for which the cookie is valid.&lt;br /&gt;session.cookie_domain =&lt;br /&gt;&lt;br /&gt;; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript.&lt;br /&gt;session.cookie_httponly =&lt;br /&gt;&lt;br /&gt;; Handler used to serialize data.  php is the standard serializer of PHP.&lt;br /&gt;session.serialize_handler = php&lt;br /&gt;&lt;br /&gt;; Define the probability that the 'garbage collection' process is started&lt;br /&gt;; on every session initialization.&lt;br /&gt;; The probability is calculated by using gc_probability/gc_divisor,&lt;br /&gt;; e.g. 1/100 means there is a 1% chance that the GC process starts&lt;br /&gt;; on each request.&lt;br /&gt;&lt;br /&gt;session.gc_probability = 1&lt;br /&gt;session.gc_divisor     = 100&lt;br /&gt;&lt;br /&gt;; After this number of seconds, stored data will be seen as 'garbage' and&lt;br /&gt;; cleaned up by the garbage collection process.&lt;br /&gt;session.gc_maxlifetime = 1440&lt;br /&gt;&lt;br /&gt;; NOTE: If you are using the subdirectory option for storing session files&lt;br /&gt;;       (see session.save_path above), then garbage collection does *not*&lt;br /&gt;;       happen automatically.  You will need to do your own garbage&lt;br /&gt;;       collection through a shell script, cron entry, or some other method.&lt;br /&gt;;       For example, the following script would is the equivalent of&lt;br /&gt;;       setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):&lt;br /&gt;;          cd /path/to/sessions; find -cmin +24 | xargs rm&lt;br /&gt;&lt;br /&gt;; PHP 4.2 and less have an undocumented feature/bug that allows you to&lt;br /&gt;; to initialize a session variable in the global scope, albeit register_globals&lt;br /&gt;; is disabled.  PHP 4.3 and later will warn you, if this feature is used.&lt;br /&gt;; You can disable the feature and the warning separately. At this time,&lt;br /&gt;; the warning is only displayed, if bug_compat_42 is enabled.&lt;br /&gt;&lt;br /&gt;session.bug_compat_42 = 1&lt;br /&gt;session.bug_compat_warn = 1&lt;br /&gt;&lt;br /&gt;; Check HTTP Referer to invalidate externally stored URLs containing ids.&lt;br /&gt;; HTTP_REFERER has to contain this substring for the session to be&lt;br /&gt;; considered as valid.&lt;br /&gt;session.referer_check =&lt;br /&gt;&lt;br /&gt;; How many bytes to read from the file.&lt;br /&gt;session.entropy_length = 0&lt;br /&gt;&lt;br /&gt;; Specified here to create the session id.&lt;br /&gt;session.entropy_file =&lt;br /&gt;&lt;br /&gt;;session.entropy_length = 16&lt;br /&gt;&lt;br /&gt;;session.entropy_file = /dev/urandom&lt;br /&gt;&lt;br /&gt;; Set to {nocache,private,public,} to determine HTTP caching aspects&lt;br /&gt;; or leave this empty to avoid sending anti-caching headers.&lt;br /&gt;session.cache_limiter = nocache&lt;br /&gt;&lt;br /&gt;; Document expires after n minutes.&lt;br /&gt;session.cache_expire = 180&lt;br /&gt;&lt;br /&gt;; trans sid support is disabled by default.&lt;br /&gt;; Use of trans sid may risk your users security.&lt;br /&gt;; Use this option with caution.&lt;br /&gt;; - User may send URL contains active session ID&lt;br /&gt;;   to other person via. email/irc/etc.&lt;br /&gt;; - URL that contains active session ID may be stored&lt;br /&gt;;   in publically accessible computer.&lt;br /&gt;; - User may access your site with the same session ID&lt;br /&gt;;   always using URL stored in browser's history or bookmarks.&lt;br /&gt;session.use_trans_sid = 0&lt;br /&gt;&lt;br /&gt;; Select a hash function&lt;br /&gt;; 0: MD5   (128 bits)&lt;br /&gt;; 1: SHA-1 (160 bits)&lt;br /&gt;session.hash_function = 0&lt;br /&gt;&lt;br /&gt;; Define how many bits are stored in each character when converting&lt;br /&gt;; the binary hash data to something readable.&lt;br /&gt;;&lt;br /&gt;; 4 bits: 0-9, a-f&lt;br /&gt;; 5 bits: 0-9, a-v&lt;br /&gt;; 6 bits: 0-9, a-z, A-Z, "-", ","&lt;br /&gt;session.hash_bits_per_character = 4&lt;br /&gt;&lt;br /&gt;; The URL rewriter will look for URLs in a defined set of HTML tags.&lt;br /&gt;; form/fieldset are special; if you include them here, the rewriter will&lt;br /&gt;; add a hidden &lt;input&gt; field with the info which is otherwise appended&lt;br /&gt;; to URLs.  If you want XHTML conformity, remove the form entry.&lt;br /&gt;; Note that all valid entries require a "=", even if no value follows.&lt;br /&gt;url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="&lt;br /&gt;&lt;br /&gt;[MSSQL]&lt;br /&gt;; Allow or prevent persistent links.&lt;br /&gt;mssql.allow_persistent = On&lt;br /&gt;&lt;br /&gt;; Maximum number of persistent links.  -1 means no limit.&lt;br /&gt;mssql.max_persistent = -1&lt;br /&gt;&lt;br /&gt;; Maximum number of links (persistent+non persistent).  -1 means no limit.&lt;br /&gt;mssql.max_links = -1&lt;br /&gt;&lt;br /&gt;; Minimum error severity to display.&lt;br /&gt;mssql.min_error_severity = 10&lt;br /&gt;&lt;br /&gt;; Minimum message severity to display.&lt;br /&gt;mssql.min_message_severity = 10&lt;br /&gt;&lt;br /&gt;; Compatibility mode with old versions of PHP 3.0.&lt;br /&gt;mssql.compatability_mode = Off&lt;br /&gt;&lt;br /&gt;; Connect timeout&lt;br /&gt;;mssql.connect_timeout = 5&lt;br /&gt;&lt;br /&gt;; Query timeout&lt;br /&gt;;mssql.timeout = 60&lt;br /&gt;&lt;br /&gt;; Valid range 0 - 2147483647.  Default = 4096.&lt;br /&gt;;mssql.textlimit = 4096&lt;br /&gt;&lt;br /&gt;; Valid range 0 - 2147483647.  Default = 4096.&lt;br /&gt;;mssql.textsize = 4096&lt;br /&gt;&lt;br /&gt;; Limits the number of records in each batch.  0 = all records in one batch.&lt;br /&gt;;mssql.batchsize = 0&lt;br /&gt;&lt;br /&gt;; Specify how datetime and datetim4 columns are returned&lt;br /&gt;; On =&gt; Returns data converted to SQL server settings&lt;br /&gt;; Off =&gt; Returns values as YYYY-MM-DD hh:mm:ss&lt;br /&gt;;mssql.datetimeconvert = On&lt;br /&gt;&lt;br /&gt;; Use NT authentication when connecting to the server&lt;br /&gt;mssql.secure_connection = Off&lt;br /&gt;&lt;br /&gt;; Specify max number of processes. -1 = library default&lt;br /&gt;; msdlib defaults to 25&lt;br /&gt;; FreeTDS defaults to 4096&lt;br /&gt;;mssql.max_procs = -1&lt;br /&gt;&lt;br /&gt;; Specify client character set.&lt;br /&gt;; If empty or not set the client charset from freetds.comf is used&lt;br /&gt;; This is only used when compiled with FreeTDS&lt;br /&gt;;mssql.charset = "ISO-8859-1"&lt;br /&gt;&lt;br /&gt;[Assertion]&lt;br /&gt;; Assert(expr); active by default.&lt;br /&gt;;assert.active = On&lt;br /&gt;&lt;br /&gt;; Issue a PHP warning for each failed assertion.&lt;br /&gt;;assert.warning = On&lt;br /&gt;&lt;br /&gt;; Don't bail out by default.&lt;br /&gt;;assert.bail = Off&lt;br /&gt;&lt;br /&gt;; User-function to be called if an assertion fails.&lt;br /&gt;;assert.callback = 0&lt;br /&gt;&lt;br /&gt;; Eval the expression with current error_reporting().  Set to true if you want&lt;br /&gt;; error_reporting(0) around the eval().&lt;br /&gt;;assert.quiet_eval = 0&lt;br /&gt;&lt;br /&gt;[COM]&lt;br /&gt;; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs&lt;br /&gt;;com.typelib_file =&lt;br /&gt;; allow Distributed-COM calls&lt;br /&gt;;com.allow_dcom = true&lt;br /&gt;; autoregister constants of a components typlib on com_load()&lt;br /&gt;;com.autoregister_typelib = true&lt;br /&gt;; register constants casesensitive&lt;br /&gt;;com.autoregister_casesensitive = false&lt;br /&gt;; show warnings on duplicate constant registrations&lt;br /&gt;;com.autoregister_verbose = true&lt;br /&gt;&lt;br /&gt;[mbstring]&lt;br /&gt;; language for internal character representation.&lt;br /&gt;;mbstring.language = Japanese&lt;br /&gt;&lt;br /&gt;; internal/script encoding.&lt;br /&gt;; Some encoding cannot work as internal encoding.&lt;br /&gt;; (e.g. SJIS, BIG5, ISO-2022-*)&lt;br /&gt;;mbstring.internal_encoding = EUC-JP&lt;br /&gt;&lt;br /&gt;; http input encoding.&lt;br /&gt;;mbstring.http_input = auto&lt;br /&gt;&lt;br /&gt;; http output encoding. mb_output_handler must be&lt;br /&gt;; registered as output buffer to function&lt;br /&gt;;mbstring.http_output = SJIS&lt;br /&gt;&lt;br /&gt;; enable automatic encoding translation according to&lt;br /&gt;; mbstring.internal_encoding setting. Input chars are&lt;br /&gt;; converted to internal encoding by setting this to On.&lt;br /&gt;; Note: Do _not_ use automatic encoding translation for&lt;br /&gt;;       portable libs/applications.&lt;br /&gt;;mbstring.encoding_translation = Off&lt;br /&gt;&lt;br /&gt;; automatic encoding detection order.&lt;br /&gt;; auto means&lt;br /&gt;;mbstring.detect_order = auto&lt;br /&gt;&lt;br /&gt;; substitute_character used when character cannot be converted&lt;br /&gt;; one from another&lt;br /&gt;;mbstring.substitute_character = none;&lt;br /&gt;&lt;br /&gt;; overload(replace) single byte functions by mbstring functions.&lt;br /&gt;; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),&lt;br /&gt;; etc. Possible values are 0,1,2,4 or combination of them.&lt;br /&gt;; For example, 7 for overload everything.&lt;br /&gt;; 0: No overload&lt;br /&gt;; 1: Overload mail() function&lt;br /&gt;; 2: Overload str*() functions&lt;br /&gt;; 4: Overload ereg*() functions&lt;br /&gt;;mbstring.func_overload = 0&lt;br /&gt;&lt;br /&gt;[FrontBase]&lt;br /&gt;;fbsql.allow_persistent = On&lt;br /&gt;;fbsql.autocommit = On&lt;br /&gt;;fbsql.show_timestamp_decimals = Off&lt;br /&gt;;fbsql.default_database =&lt;br /&gt;;fbsql.default_database_password =&lt;br /&gt;;fbsql.default_host =&lt;br /&gt;;fbsql.default_password =&lt;br /&gt;;fbsql.default_user = "_SYSTEM"&lt;br /&gt;;fbsql.generate_warnings = Off&lt;br /&gt;;fbsql.max_connections = 128&lt;br /&gt;;fbsql.max_links = 128&lt;br /&gt;;fbsql.max_persistent = -1&lt;br /&gt;;fbsql.max_results = 128&lt;br /&gt;&lt;br /&gt;[gd]&lt;br /&gt;; Tell the jpeg decode to libjpeg warnings and try to create&lt;br /&gt;; a gd image. The warning will then be displayed as notices&lt;br /&gt;; disabled by default&lt;br /&gt;;gd.jpeg_ignore_warning = 0&lt;br /&gt;&lt;br /&gt;[exif]&lt;br /&gt;; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.&lt;br /&gt;; With mbstring support this will automatically be converted into the encoding&lt;br /&gt;; given by corresponding encode setting. When empty mbstring.internal_encoding&lt;br /&gt;; is used. For the decode settings you can distinguish between motorola and&lt;br /&gt;; intel byte order. A decode setting cannot be empty.&lt;br /&gt;;exif.encode_unicode = ISO-8859-15&lt;br /&gt;;exif.decode_unicode_motorola = UCS-2BE&lt;br /&gt;;exif.decode_unicode_intel    = UCS-2LE&lt;br /&gt;;exif.encode_jis =&lt;br /&gt;;exif.decode_jis_motorola = JIS&lt;br /&gt;;exif.decode_jis_intel    = JIS&lt;br /&gt;&lt;br /&gt;[Tidy]&lt;br /&gt;; The path to a default tidy configuration file to use when using tidy&lt;br /&gt;;tidy.default_config = /usr/local/lib/php/default.tcfg&lt;br /&gt;&lt;br /&gt;; Should tidy clean and repair output automatically?&lt;br /&gt;; WARNING: Do not use this option if you are generating non-html content&lt;br /&gt;; such as dynamic images&lt;br /&gt;tidy.clean_output = Off&lt;br /&gt;&lt;br /&gt;[soap]&lt;br /&gt;; Enables or disables WSDL caching feature.&lt;br /&gt;soap.wsdl_cache_enabled=1&lt;br /&gt;; Sets the directory name where SOAP extension will put cache files.&lt;br /&gt;soap.wsdl_cache_dir="/tmp"&lt;br /&gt;; (time to live) Sets the number of second while cached file will be used&lt;br /&gt;; instead of original one.&lt;br /&gt;soap.wsdl_cache_ttl=86400&lt;br /&gt;&lt;br /&gt;; Local Variables:&lt;br /&gt;; tab-width: 4&lt;br /&gt;; End:&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;Thế là xong. Khởi động lại Apache.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-2331456223315814170?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/2331456223315814170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=2331456223315814170' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/2331456223315814170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/2331456223315814170'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/09/ci-t-apache-mysql-php-perl-t-source.html' title='Cài đặt Apache, MySQL, PHP, Perl từ source.'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-4413012044626159777</id><published>2007-08-22T15:02:00.000+07:00</published><updated>2007-08-22T15:24:40.986+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP MySQL'/><title type='text'>Compiling PHP and Apache 2 from source on Linux OS</title><content type='html'>&lt;h3&gt;&lt;a name="introduction"&gt;Introduction&lt;/a&gt;&lt;/h3&gt;&lt;br /&gt;    &lt;blockquote&gt;This article will provide beginners and others new to Apache 2 and PHP compilation,&lt;br /&gt;    detailed information about how to compile PHP and&lt;br /&gt;    Apache 2 on Linux system. Even if you just want to learn how to compile software from source&lt;br /&gt;    on Linux like OS, this article will provide enough information to get you started. After&lt;br /&gt;    reading this article any person, who hasn't yet compiled any software from source, will be&lt;br /&gt;    able to compile and run PHP and Apache on his Linux Machine (hopefully).&lt;/blockquote&gt;&lt;br /&gt;    &lt;p&gt;In this article we are going to compile PHP as Apache 2 shared module because there is no&lt;br /&gt;    option, in case of Apache 2, to compile PHP as Apache static module. It was possible with&lt;br /&gt;  Apache versions prior to version 2.&lt;/p&gt;&lt;br /&gt;    &lt;blockquote&gt;&lt;br /&gt;      &lt;p&gt;&lt;b&gt;{Note}&lt;/b&gt;I am using PHP 4 source code here, but users have reported that they have been able to successfully &lt;b&gt;compile PHP 5 and Apache 2 &lt;/b&gt;also following this article. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;/blockquote&gt;      &lt;p&gt;If you just want steps, those are given &lt;a href="http://www.blogger.com/steps.php" title="Steps to compile php and Apache" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;    &lt;blockquote&gt;&lt;br /&gt;      &lt;p&gt;&lt;b&gt;{Note}&lt;/b&gt; Compiling PHP as Apache 2 filter (shared module) is experimental at this time. &lt;/p&gt;&lt;br /&gt;    &lt;/blockquote&gt;&lt;br /&gt;   &lt;br /&gt;    &lt;h3&gt;&lt;a name="why"&gt;Why &lt;/a&gt;compile from source&lt;/h3&gt;&lt;br /&gt;    &lt;p&gt;You may ask, why we need to compile PHP and Apache from source when binary RPMs&lt;br /&gt;    are already available and which don't take much effort to setup. The reason is, it provides&lt;br /&gt;    you much more flexibility. Instead of being dependent on other people's RPMs you can decide&lt;br /&gt;    what PHP and Apache functionality you want to enable. Another reason is that these RPMs are&lt;br /&gt;    weeks or months out of date. When compiling from source, you can also specify the directory where software will be&lt;br /&gt;    installed. Also, after you see your compiled software working, it really provides great&lt;br /&gt;    satisfaction. Compilation process is really very straight forward.&lt;/p&gt;&lt;br /&gt;   &lt;br /&gt;    &lt;h3&gt;&lt;a name="assumptions"&gt;Assumptions&lt;/a&gt;&lt;/h3&gt;&lt;br /&gt;    I assume that you have basic skills required to operate Linux Operating System and you have &lt;i&gt;root&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;    privileges. No prior knowledge of compiling software from source code is assumed.&lt;br /&gt;   &lt;br /&gt;    &lt;h3&gt;&lt;a name="need"&gt;What you need&lt;/a&gt;&lt;/h3&gt;&lt;br /&gt;    &lt;ul&gt;&lt;br /&gt;      &lt;li&gt;A Linux machine with enough RAM for your OS. I am using Red Hat Linux 7.1 because it is&lt;br /&gt;        the most used Linux distribution. This may also work on other Unix like systems with&lt;br /&gt;        little or no change but I haven't tested.&lt;br /&gt;&lt;br /&gt;      &lt;/li&gt;&lt;br /&gt;      &lt;li&gt;PHP source distribution available from &lt;a href="http://www.php.net/downloads.php" target="_blank"&gt;http://www.php.net/&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      &lt;/li&gt;&lt;br /&gt;      &lt;li&gt;Apache 2 source distribution available from &lt;a href="http://www.apache.org/dist/httpd/" target="_blank"&gt;http://www.apache.org&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;      &lt;/li&gt;&lt;br /&gt;      &lt;li&gt;Ansi C (Gnu C) compiler and other utilities like &lt;i&gt;make&lt;/i&gt;, &lt;i&gt;bison&lt;/i&gt; and &lt;i&gt;flex&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;        etc. These are usually installed when you install your Linux OS. But it depends on Linux&lt;br /&gt;        distribution you are using. You can check if &lt;i&gt;gcc&lt;/i&gt; is installed by typing &lt;i&gt;gcc&lt;/i&gt;&lt;br /&gt;        at shell prompt. Similarly you can type &lt;i&gt;make&lt;/i&gt; to check if it is installed or not. If&lt;br /&gt;        these are not installed you can install these now from your Linux distribution's Cds. Or&lt;br /&gt;        you can download these from &lt;a href="http://www.gnu.org/" target="_blank"&gt;http://www.gnu.org&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;      &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;      &lt;li&gt;Utilities like &lt;i&gt;gunzip&lt;/i&gt; and &lt;i&gt;tar&lt;/i&gt;, to extract source code from .tar.gz files.&lt;/li&gt;&lt;br /&gt;    &lt;/ul&gt;&lt;br /&gt;   &lt;br /&gt;    &lt;h3&gt;&lt;a name="before"&gt;Before &lt;/a&gt;you start&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Before starting to compile Apache and PHP you must uninstall all previous Apache and PHP&lt;br /&gt;    related RPMs installed on your system. To uninstall these packages you can use Red Hat Package&lt;br /&gt;    Manager (&lt;i&gt;rpm&lt;/i&gt;) utility. If you are using X Windows you can also use GUI utilities like &lt;i&gt;gnorpm&lt;/i&gt;&lt;br /&gt;    and &lt;i&gt;kpackge&lt;/i&gt;, if installed, to uninstall these RPMs.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Then download &lt;a href="http://www.apache.org/dist/httpd/" target="_blank"&gt;apache 2.0 source&lt;br /&gt;    &lt;/a&gt;and &lt;a href="http://www.php.net/downloads.php" target="_blank"&gt;PHP source &lt;/a&gt;. These&lt;br /&gt;    files have .tar.gz extension. Save these files to any directory of your choice. I am using PHP&lt;br /&gt;    4.3.0 and Apache 2.0.44 and have these files in /usr/src directory.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;blockquote&gt;&lt;br /&gt;      &lt;a name="problems"&gt;&lt;/a&gt;&lt;br /&gt;   &lt;p&gt;&lt;b&gt;{Note}&lt;/b&gt; I faced no problems with Apache 2.0.44 and PHP 4.3.0. When you try to use&lt;br /&gt;      other latest versions of PHP and Apache 2 or try to use older versions of PHP with&lt;br /&gt;      latest version of Apache 2 or vice-versa, which are not compatible, you may face problems.&lt;br /&gt;      Some did face these problems, three of which are mentioned &lt;a href="http://www.blogger.com/problems.php" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;              &lt;p&gt;Most others faced no problems with Apache 2.0.40 / 2.0.43 and PHP 4.2.3 and Apache 2.0.44&lt;br /&gt;      and PHP 4.3.0. So, you shouldn't face any compatibility problem, if using Apache 2.0.44 and&lt;br /&gt;      PHP 4.3.0.&lt;/p&gt;&lt;br /&gt;    &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Compilation &lt;a name="process"&gt;Process&lt;/a&gt;&lt;/h3&gt;&lt;br /&gt;    &lt;p&gt;&lt;b&gt;Login as root to follow these steps.&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;As I earlier said, we are going to build PHP as Apache 2 shared module. Apache provides a&lt;br /&gt;    facility to extend its functionality using separate modules. When PHP is compiled as Apache&lt;br /&gt;    shared module its object code is not included in httpd binary. Instead, it works as a separate&lt;br /&gt;    module which can be loaded by Apache and can also be disabled.&lt;/p&gt;&lt;br /&gt;    &lt;h4&gt;&lt;a name="apache"&gt;Compiling Apache&lt;/a&gt;&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Using shell, (or open a new virtual console window if working in X Windows) change to&lt;br /&gt;    directory where you have downloaded Apache 2 source. In my case it is /usr/src.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ cd /usr/src&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;blockquote&gt;&lt;b&gt;{Note}&lt;/b&gt; Beginners please note that $ is the just shell prompt symbol and it shouldn't be typed. It&lt;br /&gt;    is used just to show that these lines should be typed at shell prompt.&lt;/blockquote&gt;&lt;br /&gt;    &lt;p&gt;Then we have to extract Apache source code from compressed httpd-2.0.44.tar.gz. To&lt;br /&gt;    decompress this file use:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ gunzip httpd-2.0.44.tar.gz&lt;/code&gt; or &lt;code&gt;gzip -d httpd-2.0.44.tar.gz&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Now you will have a new file named httpd-2.0.44.tar in your current directory. Now to&lt;br /&gt;    extract its contents use:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ tar -xvf httpd-2.0.44.tar&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Both above steps can be completed with a single command:&lt;/p&gt;&lt;br /&gt;    &lt;code&gt;$ tar -zxvf httpd-2.0.44.tar.gz&lt;/code&gt;&lt;br /&gt;    &lt;p&gt;A new directory httpd-2.0.44 will be created in your current directory. For me it is /usr/src/httpd-2.0.44.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Now change to this directory:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ cd /usr/src/httpd-2.0.44&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Now we have to configure apache for compilation.&lt;/p&gt;&lt;br /&gt;    &lt;h5&gt;&lt;a name="configure"&gt;Configure &lt;/a&gt;Script&lt;/h5&gt;&lt;br /&gt;    &lt;p&gt;Almost every software which comes with its source code contains a &lt;i&gt;configure&lt;/i&gt; script,&lt;br /&gt;    which performs many checks and then prepares software for compilation. For example, it checks&lt;br /&gt;    which kind of compiler is available and whether required libraries are installed or not. It&lt;br /&gt;    also enables us to customize software according to our requirements. For example, we can&lt;br /&gt;    specify where software will be installed.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Name of this script is normally &lt;i&gt;configure&lt;/i&gt;. Apache also provides a configure script&lt;br /&gt;    file named &lt;i&gt;configure&lt;/i&gt; in its source directory (/usr/src/httpd-2.0.44 in my case). Using&lt;br /&gt;    this script we can decide where Apache will be installed and which optional modules we want to&lt;br /&gt;    compile etc. There are many options which can be supplied to &lt;i&gt;configure&lt;/i&gt;. To see a list&lt;br /&gt;    of options supported by configure, type:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;&lt;br /&gt;    &lt;code&gt;$ ./configure --help&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;It will show a complete list of all options supported by the version of Apache that you have&lt;br /&gt;    downloaded.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;These options&lt;br /&gt;    normally start with a "--with-xxx" and "--enable-xxx" and are separated by&lt;br /&gt;    space. Where xxx is the name of the option like &lt;i&gt;--enable-so&lt;/i&gt; (for apache configure&lt;br /&gt;    script) and &lt;i&gt;--with-mysql&lt;/i&gt; (for PHP configure script). Options we will be using for&lt;br /&gt;    Apache are &lt;i&gt;--prefix&lt;/i&gt; and &lt;i&gt;--enable-so&lt;/i&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Execute this command in the Apache source directory:&lt;/p&gt;&lt;br /&gt;    &lt;code&gt;$ ./configure --prefix=/wwwroot --enable-so&lt;/code&gt;&lt;br /&gt;    &lt;p&gt;&lt;b&gt;First option&lt;/b&gt; &lt;i&gt;--prefix&lt;/i&gt; tells &lt;i&gt;configure&lt;/i&gt; script that we want Apache to be&lt;br /&gt;    installed in directory /wwwroot. If we don't provide a prefix option than it'll be installed&lt;br /&gt;    in default location, which is /usr/local/apache2.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;I am installing everything in /wwwroot because:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;ol&gt;&lt;br /&gt;      &lt;li&gt;when a new version of PHP and Apache is released, I only have to rename /wwwroot&lt;br /&gt;        directory to some other name like /wwwrootold and then I can install new versions in&lt;br /&gt;        /wwwroot directory again. If new installation works properly then I can simply copy&lt;br /&gt;        configuration files from old directory to /wwwroot.&lt;/li&gt;&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;      &lt;li&gt;users new to compiling software from source, after compiling and installing it, try to&lt;br /&gt;        find a way to uninstall the software. So, benefit of keeping everything at one place is;&lt;br /&gt;        if someone wants to uninstall Apache and PHP then he just has to delete /wwwroot directory&lt;br /&gt;        (After stopping Apache, if it is running).&lt;/li&gt;&lt;br /&gt;    &lt;/ol&gt;&lt;br /&gt;    &lt;p&gt;&lt;b&gt;Second option&lt;/b&gt; &lt;i&gt;--enable-so&lt;/i&gt; tells configure to enable module &lt;i&gt;so&lt;/i&gt;, which&lt;br /&gt;    allows Apache to load shared modules. We need this option because we are compiling PHP as&lt;br /&gt;    Apache shared module.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;&lt;a name="apacheex"&gt;&lt;/a&gt;Example Apache configure command line looks like &lt;a href="http://www.blogger.com/apache2.php" title="Example Apache configure command line" target="_blank" onmouseover="window.status='Apache Configure Example';return true;" onmouseout="window.status='';return true"&gt;this&lt;/a&gt;. After configure finishes we have to compile Apache.&lt;/p&gt;&lt;br /&gt;    &lt;h5&gt;&lt;a name="make"&gt;make&lt;/a&gt;&lt;/h5&gt;&lt;br /&gt;    &lt;p&gt;To compile Apache a utility called &lt;i&gt;make&lt;/i&gt; is used. &lt;i&gt;make&lt;/i&gt; reads a file named&lt;br /&gt;    Makefile in the source directory. In the Makefile step by step instructions are written about&lt;br /&gt;    how to compile the software. Benefit of using make is that if some of the source files are&lt;br /&gt;    changed and we compile software again, then only files which are changed and files which&lt;br /&gt;    depend on changed files are recompiled.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;To compile Apache source we have to issue this command in the Apache source directory&lt;br /&gt;    (/usr/src/httpd-2.0.44):&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ make&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;When you type make It will start compiling Apache. It will take several minutes depending&lt;br /&gt;    upon the speed of your computer. After make finishes, shell prompt is available. Now source has&lt;br /&gt;    been compiled. We will use &lt;i&gt;make install&lt;/i&gt; command to install Apache&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ make install&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;This will install Apache to /wwwroot directory. Now test your Apache installation by&lt;br /&gt;    starting Apache:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ /wwwroot/bin/apachectl start&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;If you are returned to shell prompt and no error etc. is displayed then Apache is started.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Now you can open a web browser like lynx and visit Apache homepage:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ lynx &lt;a href="http://localhost/" target="_blank"&gt;http://localhost&lt;/a&gt;&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;It'll show Apache homepage, where you can read Apache documentation to know more about&lt;br /&gt;    Apache.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;To stop Apache you can use:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ /wwwroot/bin/apachectl stop&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;   &lt;br /&gt;  &lt;h4&gt;Compiling &lt;a name="php"&gt;PHP&lt;/a&gt;&lt;/h4&gt;&lt;br /&gt;    &lt;p&gt;Change to directory where you have downloaded PHP source.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ cd /usr/src&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Then we have to extract PHP source files from php-4.3.0.tar.gz file.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;To decompress the compressed file use:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ gunzip php-4.3.0.tar.gz&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;You will have a file named php-4.3.0.tar in your current directory. Now to extract its&lt;br /&gt;    contents use:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ tar -xvf php-4.3.0.tar&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Both above steps can be completed by using this command:&lt;/p&gt;&lt;br /&gt;    &lt;code&gt;$ tar -zxvf php-4.3.0.tar.gz&lt;/code&gt;&lt;br /&gt;    &lt;p&gt;A new directory php-4.3.0 will be created in your current directory. For me its&lt;br /&gt;    /usr/src/php-4.3.0.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Now change to this directory:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ cd /usr/src/php-4.3.0&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Now we have to configure PHP for compilation process. There are hundreds of options which&lt;br /&gt;    can be provided to configure script. These options include the option to specify where PHP&lt;br /&gt;    should be installed, which functionality should be enabled, like functionality to access mysql&lt;br /&gt;    databases from PHP and which extensions have to be compiled etc. To see a list&lt;br /&gt;    of options supported by PHP configure, type:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;&lt;br /&gt;    &lt;code&gt;$ ./configure --help&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;It'll show a list of all options supported by the version of PHP that you are using.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Extensions provide additional&lt;br /&gt;    functionality which core PHP doesn't provide. For example to create images &lt;i&gt;--with-gd&lt;/i&gt;&lt;br /&gt;    option can be used. But for these extensions to work, appropriate libraries must have been&lt;br /&gt;    installed. If you use some &lt;i&gt;--with&lt;/i&gt; option and that library isn't installed on your&lt;br /&gt;    system then configure will fail. So, my advice is, for the first time don't try to use any&lt;br /&gt;    extension.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;To compile PHP as Apache shared module we have to provide path to apache &lt;i&gt;apxs&lt;/i&gt;&lt;br /&gt;    utility, which in our case was installed in /wwwroot/bin/ when we installed Apache. So, in PHP&lt;br /&gt;    source directory (/usr/src/php-4.3.0) execute this command :&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code style="font-size: 10px;"&gt;$ ./configure --prefix=/wwwroot/php&lt;br /&gt;    --with-apxs2=/wwwroot/bin/apxs --with-config-file-path=/wwwroot/php --with-mysql&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;b&gt;First option&lt;/b&gt; &lt;i&gt;--prefix=/wwwroot/php&lt;/i&gt; tells configure script that we want PHP to&lt;br /&gt;    be installed in /wwwroot/php directory. Otherwise it'll be installed in some default location&lt;br /&gt;    (/usr/local).&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;&lt;b&gt;Second option&lt;/b&gt; &lt;i&gt;--with-apxs2&lt;/i&gt; specifies that we want to install PHP as Apache 2&lt;br /&gt;    shared module.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;b&gt;Third option&lt;/b&gt; &lt;i&gt;--with-config-file-path&lt;/i&gt; specifies that PHP should look for&lt;br /&gt;    php.ini file in /wwwroot/php directory. Php.ini file contains various settings, which can be&lt;br /&gt;    used to configure PHP after it has been installed. Settings like path to directory where php&lt;br /&gt;    extensions are installed. Options like &lt;i&gt;max_execution_time&lt;/i&gt; in php.ini specifies maximum&lt;br /&gt;    time a script is allowed to run before it is terminated by PHP parser.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;blockquote&gt;&lt;br /&gt;      &lt;b&gt;{Note}&lt;/b&gt; You don't have to specify name of the php.ini file when using&lt;i&gt;&lt;br /&gt;      --with-config-file-path&lt;/i&gt; option. Only directory path where php.ini file will be stored&lt;br /&gt;      has to be specified. So, &lt;b&gt;don't&lt;/b&gt; use &lt;i&gt;--with-config-file-path=/wwwroot/php/php.ini&lt;/i&gt;,&lt;br /&gt;      but instead &lt;b&gt;use&lt;/b&gt; &lt;i&gt;--with-config-file-path=/wwwroot/php&lt;/i&gt;.&lt;br /&gt;    &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;&lt;b&gt;Fourth option&lt;/b&gt; &lt;i&gt;--with-mysql&lt;/i&gt; enables support to access mysql databases through&lt;br /&gt;    PHP. After &lt;i&gt;--with-mysql&lt;/i&gt; we can optionally specify directory where mysql is installed&lt;br /&gt;    like&lt;i&gt; --with-mysql=/usr/local/mysql&lt;/i&gt;. To use mysql database functions you must have mysql&lt;br /&gt;    database installed on your system. If you don't have mysql installed you can remove this&lt;br /&gt;    option. If this option is not used then library, which is bundled with PHP is used to access&lt;br /&gt;    mysql databases.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;a name="phpex"&gt;&lt;/a&gt;Example PHP configure command line looks like &lt;a href="http://www.blogger.com/php4.php" title="Example PHP configure command line" target="_blank" onmouseover="window.status='Php Configure Example';return true;" onmouseout="window.status='';return true"&gt;this&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;After &lt;i&gt;configure&lt;/i&gt; finishes. You have to type &lt;i&gt;make&lt;/i&gt; to compile PHP:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ make&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;It will take several minutes to compile. After make finishes and, no error etc. is&lt;br /&gt;    displayed then PHP has been compiled successfully. If any warning is displayed then,&lt;br /&gt;    normally, you can ignore it.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;After this, if Apache is running stop Apache:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ /wwwroot/bin/apachectl stop&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Now you can execute &lt;i&gt;make install&lt;/i&gt; from within PHP source directory to install PHP to&lt;br /&gt;    /wwwroot/php directory:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ make install&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;i&gt;make install&lt;/i&gt; will install PHP4 module to Apache's modules sub-directory (/wwwroot/modules)&lt;br /&gt;    and add a&lt;br /&gt;    line like this:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;LoadModule php4_module modules/libphp4.so&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;    to apache configuration file (/wwwroot/conf/httpd.conf). This line allows Apache to&lt;br /&gt;    automatically load PHP module when Apache starts. If this line is not added by PHP install,&lt;br /&gt;    which in my case wasn't,  then you can add it yourself. To add this line yourself, search&lt;br /&gt;    for a word LoadModule in /wwwroot/conf/httpd.conf file. This word will be somewhere under&lt;br /&gt;    section "Dynamic Shared Object (DSO) Support". Under this section, on a new&lt;br /&gt;    line, add the above line.&lt;/p&gt;&lt;br /&gt;    &lt;blockquote&gt;&lt;b&gt;{Note}&lt;/b&gt; All lines that start with a # are comments and are ignored&lt;br /&gt;    by Apache.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Now you have to add another line to this httpd.conf file so that Apache invokes PHP parser&lt;br /&gt;    whenever a file with extension php (.php) is accessed. When PHP parser is invoked by Apache it&lt;br /&gt;    reads .php file which contains PHP code blocks, html tags and other text. Parser then executes&lt;br /&gt;    PHP code found inside &amp;lt;?php and ?&amp;gt; blocks and then merges PHP code results and other&lt;br /&gt;    html content (as is). Resulting output is then sent back to Apache which in turn sends it to&lt;br /&gt;    web browser which requested the file.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;The line to be added is:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;AddType application/x-httpd-php .php&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;To add this line search for word AddType in httpd.conf file. There will be a line like&lt;br /&gt;    this:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;i&gt;AddType application/x-tar .tgz&lt;/i&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Below this line add (on a new line):&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;AddType application/x-httpd-php .php&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;blockquote&gt;&lt;br /&gt;      &lt;b&gt;{Note}&lt;/b&gt; If you are unable to find any AddType line, then add the above line at the end&lt;br /&gt;      of the file.&lt;br /&gt;    &lt;/blockquote&gt;&lt;br /&gt;    &lt;blockquote&gt;&lt;br /&gt;      &lt;b&gt;{Note}&lt;/b&gt; With Apache 2_0_28-beta line to be added at the end of httpd.conf file was:&lt;br /&gt;      &lt;p&gt;&lt;code&gt;&amp;lt;Files *.php&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      SetOutputFilter PHP&lt;br /&gt;&lt;br /&gt;      SetInputFilter PHP&lt;br /&gt;&lt;br /&gt;      &amp;lt;/Files&amp;gt; &lt;/code&gt;&lt;/p&gt;&lt;br /&gt;      &lt;p&gt;But with Apache 2.0.44 AddType syntax has to be used.&lt;/p&gt;&lt;br /&gt;    &lt;/blockquote&gt;&lt;br /&gt;    You can add any file extension in addition to .php if you want to invoke PHP parser for any&lt;br /&gt;    other file extension also. Like:&lt;br /&gt;    &lt;p&gt;&lt;code&gt;AddType application/x-httpd-php .phtml&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;will invoke PHP parser whenever any file with phtml extension (.phtml) is accessed.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Save this file and then start Apache:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ /wwwroot/bin/apachectl start&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;a name="error"&gt;&lt;/a&gt; If no error message is displayed and everything is fine, Apache is&lt;br /&gt;    started and you are returned to shell prompt.&lt;/p&gt;&lt;br /&gt;    &lt;blockquote&gt;&lt;br /&gt;      &lt;p&gt;&lt;b&gt;{Note}&lt;/b&gt; With version 2.0.43 / 2.0.44 of Apache I have noticed a small problem. When&lt;br /&gt;      you are experimenting with various PHP settings and trying to stop and start Apache again&lt;br /&gt;      and again, then sometimes when you stop Apache all httpd processes are not stopped. Then if&lt;br /&gt;      you try to start Apache again it displays error message like port is already used etc. and&lt;br /&gt;      it doesn't start. It happens only sometimes and not always. To solve this problem you have&lt;br /&gt;      to manually kill that httpd process, using its process id (pid). To see the &lt;i&gt;pid&lt;/i&gt; of&lt;br /&gt;      that httpd process you can use:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;      &lt;p&gt;&lt;code&gt;ps -A&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;      &lt;p&gt;it will display processes that are running. If there is any httpd process in the list&lt;br /&gt;      displayed, then note its pid and then use:&lt;/p&gt;&lt;br /&gt;      &lt;p&gt;&lt;code&gt;kill -9 &amp;lt;pid&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;      &lt;p&gt;replace &lt;i&gt;&amp;lt;pid&amp;gt;&lt;/i&gt; with the actual process id of the httpd process. Also&lt;br /&gt;      sometimes more than one httpd processes are displayed and you have to kill all httpd process&lt;br /&gt;      otherwise you won't be able to start Apache.&lt;/p&gt;&lt;br /&gt;    &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;a name="testing"&gt;Testing &lt;/a&gt;the PHP Installation&lt;/h3&gt;&lt;br /&gt;    &lt;p&gt;Now create a PHP file named info.php, using any editor like vi or emacs, in the&lt;br /&gt;    /wwwroot/htdocs directory and enter three lines, shown &lt;a href="http://www.blogger.com/post-create.g?blogID=4522516677868669101#infophp"&gt;below&lt;/a&gt;, in this&lt;br /&gt;    file. Directory /wwwroot/htdocs is Apache root directory. Apache publishes all files present&lt;br /&gt;    in this directory to web users. This directory can be changed by editing httpd.conf file and&lt;br /&gt;    changing &lt;i&gt;DocumentRoot&lt;/i&gt; value to some other directory.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;b&gt;&lt;a name="infophp"&gt;info.php&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;&amp;lt;?php&lt;br /&gt;&lt;br /&gt;    phpinfo();&lt;br /&gt;&lt;br /&gt;    ?&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Save this file and then access this file using a web browser like lynx or Netscape&lt;br /&gt;    Navigator by entering a url like this:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;&lt;a href="http://localhost/info.php" target="_blank"&gt;http://localhost/info.php&lt;/a&gt;&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;If PHP was installed successfully a page, shown in the &lt;a href="http://www.blogger.com/post-create.g?blogID=4522516677868669101#ss"&gt;image &lt;/a&gt;below, will&lt;br /&gt;    be displayed containing detailed information about your PHP installation, Apache environment&lt;br /&gt;    and PHP extensions loaded etc.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p align="center"&gt;&lt;a href="http://www.blogger.com/images/phpinfo.jpg" target="_blank" name="ss"&gt;&lt;img src="http://www.blogger.com/images/phpinfo_small.jpg" alt="Screenshot of result of info.php. Click to enlarge." border="0" height="225" width="300" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;    &lt;i&gt;Click for a larger image.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;    &lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Now you can copy /usr/src/php-4.3.0/php.ini-dist to /wwwroot/php/ directory as php.ini.&lt;/p&gt;&lt;br /&gt;    &lt;blockquote&gt;&lt;br /&gt;      &lt;b&gt;{Note}&lt;/b&gt; Default location of php.ini is &amp;lt;installpath&amp;gt;/lib (if not changed at&lt;br /&gt;      compile time using --with-config-file-path option).&lt;br /&gt;    &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ cp /usr/src/php-4.3.0/php.ini-dist /wwwroot/php/php.ini&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;You can change your PHP settings by editing php.ini file. For information about php.ini and&lt;br /&gt;    its different settings see &lt;a href="http://www.php.net/manual/en/configuration.html" target="_blank"&gt;http://www.php.net/manual/en/configuration.html&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;    Now restart apache:&lt;br /&gt;    &lt;p&gt;&lt;code&gt;$ /wwwroot/bin/apachectl restart&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;    &lt;h3&gt;&lt;a name="enabling"&gt;Enabling &lt;/a&gt;some PHP extensions&lt;/h3&gt;&lt;br /&gt;    &lt;p&gt;If you are feeling comfortable about compiling PHP and Apache and everything is&lt;br /&gt;    working fine then you can enable some PHP extensions or use some other configure options. First you have to run PHP configure&lt;br /&gt;    script again and add relevant --with-xxx or --enable-xxx option, where xxx is the name of the extension or option you&lt;br /&gt;    want to enable.&lt;br /&gt;      &lt;!-- commented on 18-05-2005     For complete list of extensions and other configure options supported by PHP       see &lt;a href="http://www.php.net/manual/en/install.configure.php" target="_blank"&gt;http://www.php.net/manual/en/install.configure.php&lt;/a&gt;.&lt;br /&gt;   --&gt;&lt;br /&gt;  For a list of core configure options supported by PHP&lt;br /&gt;    see &lt;a href="http://www.php.net/manual/en/configure.php" target="_blank"&gt;http://www.php.net/manual/en/configure.php&lt;/a&gt;.&lt;br /&gt;    To find out all configure options  supported by version of PHP source code that you have downloaded, you have to run &lt;b&gt;./configure --help&lt;/b&gt; in your PHP source directory.&lt;br /&gt;&lt;br /&gt;    It will display a list of all the configure options supported by that PHP version. As I already said, for any extension to work its library must have been installed otherwise&lt;br /&gt;    configure will fail. These extensions just provide an interface to the actual library. Then,&lt;br /&gt;    after stopping Apache,&lt;br /&gt;    you'll have to run &lt;i&gt;make&lt;/i&gt; followed &lt;i&gt;by make install&lt;/i&gt; again in PHP source directory.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;For example if you want to create images using PHP, you first need to install &lt;a href="http://www.boutell.com/gd/" target="_blank"&gt;gd&lt;br /&gt;    library &lt;/a&gt;using RPMs or by compiling from source. Then you can use --with-gd option to&lt;br /&gt;    enable gd support from PHP like this:&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;&lt;code style="font-size: 10px;"&gt;$ ./configure --prefix=/wwwroot/php&lt;br /&gt;    --with-apxs2=/wwwroot/bin/apxs --with-config-file-path=/wwwroot/php --with-gd&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;blockquote&gt;&lt;br /&gt;      &lt;b&gt;{Note} &lt;/b&gt;GD depends on some other libraries to create images in different formats. So,&lt;br /&gt;      some other libraries like &lt;a href="http://www.libpng.org/pub/png/libpng.html" target="_blank"&gt;png&lt;/a&gt;,&lt;br /&gt;      &lt;a href="ftp://ftp.uu.net/graphics/jpeg/" target="_blank"&gt;jpeg&lt;/a&gt;, &lt;a href="http://www.gzip.org/zlib/" target="_blank"&gt;zlib&lt;/a&gt; also have to be installed.&lt;br /&gt;    &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;PHP configure will try to find directory where gd and other libraries and their header&lt;br /&gt;    files are installed by searching some default library and include paths, like /usr and&lt;br /&gt;    /usr/local. Header files are normally found inside &lt;i&gt;include&lt;/i&gt; directory, like &lt;i&gt;/usr/local/include&lt;/i&gt;,&lt;br /&gt;    and library files are found inside &lt;i&gt;lib&lt;/i&gt; directory e.g. &lt;i&gt;/usr/local/lib&lt;/i&gt;. If &lt;i&gt;configure&lt;/i&gt;&lt;br /&gt;    is unable to find gd library then you can specify path where you installed gd library like&lt;br /&gt;    this:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;&lt;code style="font-size: 10px;"&gt;$ ./configure --prefix=/wwwroot/php&lt;br /&gt;    --with-apxs2=/wwwroot/bin/apxs --with-config-file-path=/wwwroot/php --with-gd=/usr&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;If you compile gd from source then it'll be installed by default in /usr/local. There was&lt;br /&gt;    no configure script provided with gd library I used, and I had to edit Makefile to change&lt;br /&gt;    default install location.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Since PHP version 4.3.0, gd library is bundled with PHP distribution. This version of gd&lt;br /&gt;    has support for some more image related features. PHP documentation suggests that this bundled&lt;br /&gt;    version should be used in preference to the external gd library which you may install&lt;br /&gt;    yourself.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;So, if you are using PHP 4.3.0, you just have to use &lt;em&gt;--with-gd&lt;/em&gt; option without&lt;br /&gt;    specifying any path and PHP will use the bundled gd library. But not all libraries on which gd&lt;br /&gt;    depends are bundled with PHP 4.3.0. So, you still need to install some other libraries like &lt;a href="ftp://ftp.uu.net/graphics/jpeg/" target="_blank"&gt;jpeg&lt;br /&gt;    &lt;/a&gt;, &lt;a href="http://www.libpng.org/pub/png/libpng.html" target="_blank"&gt;png &lt;/a&gt;and &lt;a href="http://www.gzip.org/zlib/" target="_blank"&gt;zlib&lt;br /&gt;    &lt;/a&gt;(for png) to create jpeg and png images with gd. In my case configure was unable to find&lt;br /&gt;    zlib, so I had to use --with-zlib-dir=/usr/local option. More detailed information about&lt;br /&gt;    installing this bundled gd library can be found &lt;a href="http://www.oreillynet.com/pub/a/php/2003/03/27/php_gd.html" target="_blank"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Back to &lt;a href="http://www.blogger.com/post-create.g?blogID=4522516677868669101#top"&gt;Top&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;    &lt;!--&lt;h3&gt;&lt;a name="prob"&gt;Problems &lt;/a&gt;with swf and java extensions&lt;/h3&gt;&lt;br /&gt;      &lt;p&gt;&lt;b&gt;If you are using PHP 4.3.0 or later then you can ignore this section.&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;      &lt;p&gt;SWF extension can be used to create shockwave flash movies using PHP code. There was a &lt;a href="http://bugs.php.net/15703" target="_blank"&gt;bug&lt;br /&gt;      &lt;/a&gt;in swf extension of some 4.1.x and 4.2.x versions of PHP, which caused segmentation fault and PHP also failed. But this bug has been fixed in PHP 4.3.0.&lt;/p&gt;&lt;br /&gt;      &lt;p&gt;Java extension allows us to create java objects from within PHP. Java extension also had&lt;br /&gt;      some bugs which caused segmentation fault when used with JDK 1.4.0 (may be JDK 1.3.0 also). It&lt;br /&gt;      worked fine with JDK 1.2.2. This bug seems to have been fixed in this (4.3.0) version of PHP.&lt;br /&gt;      But, when using JDK 1.4.0 some effort still has to be made to enable this Java extension.&lt;/p&gt;&lt;br /&gt;      &lt;p&gt;If you face problems with java extension, like those mentioned at &lt;a href="http://bugs.php.net/15702" target="_blank"&gt;http://bugs.php.net/15702&lt;/a&gt;,&lt;br /&gt;      then do report them using the &lt;a href="http://bugs.php.net/15702" target="_blank"&gt;same page&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;      &lt;p&gt;Back to &lt;a href="#top"&gt;Top&lt;/a&gt;&lt;/p&gt;--&gt;&lt;br /&gt;    &lt;h3&gt;&lt;a name="conclusion"&gt;Conclusion&lt;/a&gt;&lt;/h3&gt;&lt;br /&gt;    &lt;p&gt;I think now you should feel comfortable about compiling software from source code. It is easy.&lt;br /&gt;    Now you can download php manual from PHP &lt;a href="http://www.php.net/manual/en/index.php" target="_blank"&gt;documentation&lt;/a&gt;&lt;br /&gt;    &lt;a href="http://www.php.net/download-docs.php" target="_blank"&gt;&lt;br /&gt;&lt;br /&gt;    download&lt;/a&gt; page (&lt;a href="http://www.php.net/download-docs.php" target="_blank"&gt;http://www.php.net/download-docs.php&lt;/a&gt;)&lt;br /&gt;    and start exploring PHP. If you faced problems when trying to compile PHP&lt;br /&gt;    then you can subscribe to many related mailing lists (given &lt;a href="http://www.blogger.com/post-create.g?blogID=4522516677868669101#resources"&gt;below &lt;/a&gt;)&lt;br /&gt;    and post your problems there.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Do &lt;a href="mailto:ssruprai@hotmail.com?subject=Compiling%20PHP%20and%20Apache%202%20from%20source"&gt;tell&lt;br /&gt;    me &lt;/a&gt;if you were able to compile PHP and Apache 2 from source after reading this information&lt;br /&gt;    and whether you found this information useful. I do check each and every mail I receive and&lt;br /&gt;    update this page according to any feedback provided. Also write to me if any links etc. don't&lt;br /&gt;    work or about any other problem with this page. &lt;!--If you don't have time to write an email, then       just rate this article using form below.--&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Back to &lt;a href="http://www.blogger.com/post-create.g?blogID=4522516677868669101#top"&gt;Top&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;    &lt;h3&gt;&lt;a name="resources"&gt;Resources&lt;/a&gt;&lt;/h3&gt;&lt;br /&gt;    &lt;h4&gt;Mailing Lists&lt;/h4&gt;&lt;br /&gt;    &lt;p&gt;Mailing list for installation related issues is &lt;a href="mailto:php-install-subscribe@lists.php.net"&gt;php-install@lists.php.net&lt;br /&gt;    &lt;/a&gt;. You can subscribe to general PHP mailing list by sending mail to &lt;a href="mailto:php-general-subscribe@lists.php.net"&gt;php-general-subscribe@lists.php.net&lt;br /&gt;    &lt;/a&gt;. Information about mailing lists related to different PHP subjects can be found on &lt;a href="http://www.php.net/support.php" target="_blank"&gt;PHP&lt;br /&gt;    support page&lt;/a&gt; (&lt;a href="http://www.php.net/support.php" target="_blank"&gt;http://www.php.net/support.php&lt;/a&gt;).&lt;br /&gt;    There is a &lt;a href="http://www.php.net/mailing-lists.php" target="_blank"&gt;page &lt;/a&gt;on &lt;a href="http://www.php.net/" target="_blank"&gt;http://www.php.net&lt;br /&gt;    &lt;/a&gt;where you can subscribe to and unsubscribe from various mailing lists using web interface.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;But before posting your problems at those mailing lists you &lt;b&gt;should&lt;/b&gt; read faq at &lt;a href="http://www.php.net/manual/en/faq.php" target="_blank"&gt;http://www.php.net/manual/en/faq.php&lt;br /&gt;    &lt;/a&gt;because solution to many problems is already given there. After reading faq if solution&lt;br /&gt;    isn't found, then try to search mailing list archives to see if question that you have isn't&lt;br /&gt;    already answered. Links to archive sites are given at PHP &lt;a href="http://www.php.net/support.php" target="_blank"&gt;support&lt;br /&gt;    &lt;/a&gt;page. If you still cannot find an answer only then post your problem at those mailing&lt;br /&gt;    lists.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;But you &lt;b&gt;must&lt;/b&gt; remember that you have to provide complete details about what problem&lt;br /&gt;    you are facing,  what you were doing when problem occurred, what was your configure line etc.&lt;br /&gt;    You should copy program's output, like error messages, from command line or log files and&lt;br /&gt;    append it to your message, only then someone will be able to help you on these mailing lists.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;If you don't know how mailing list works, &lt;a href="http://www.blogger.com/mailingList.php" title="How mailing list works" target="_blank" onmouseover="window.status='What is a mailing list';return true;" onmouseout="window.status='';return true"&gt;click&lt;br /&gt;    here&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;    &lt;h4&gt;Other Links&lt;/h4&gt;&lt;br /&gt;    &lt;p&gt;PHP news server is &lt;a target="_blank" href="news://news.php.net/"&gt;news://news.php.net/ &lt;/a&gt;and&lt;br /&gt;    can be accessed with a news client. Web interface for the news server is available at &lt;a target="_blank" href="http://news.php.net/"&gt;http://news.php.net/.&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Information about latest books related to PHP can be found on &lt;a href="http://www.php.net/books.php" target="_blank"&gt;http://www.php.net/books.php.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;    Other PHP related information can be found on &lt;a href="http://www.php.net/links.php" target="_blank"&gt;http://www.php.net/links.php&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;    &lt;p&gt;Back to &lt;a href="http://www.blogger.com/post-create.g?blogID=4522516677868669101#top"&gt;Top&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;    &lt;h3&gt;&lt;a name="aboutme"&gt;About the Author &lt;/a&gt;&lt;/h3&gt;&lt;br /&gt;    &lt;p&gt;After doing his graduation in 1996 Sukhwinder started learning about computers and this is the thing&lt;br /&gt;    he is still doing. He used to spend most of his time in trying to learn languages and technologies. He has tried to learn almost all popular languages, OSes and software on his own, by experimenting or by getting information from books or web. This article is the result of that. He wrote it to help others like him. These days he doesn't  have&lt;br /&gt;    any time for experimenting because he is working as a freelancer full time. If you&lt;br /&gt;    have any freelancing work related web development using &lt;a href="http://www.blogger.com/freelance/php_programmer_india/freelance_php_programmer_india.php"&gt;php / mysql&lt;/a&gt;, asp /&lt;br /&gt;    sql server, java servlets or jsp, you can &lt;a href="mailto:ssruprai@hotmail.com?subject=Freelancing%20web%20development%20work"&gt;contact Sukhwinder&lt;/a&gt; (+91-98158-00532). See his CV &lt;a href="http://www.blogger.com/freelance/php_programmer_india/freelance_php_programmer_india.php"&gt;here.&lt;/a&gt; If you liked the article and want to  support author, please visit some of the google sponsers. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;  &lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-9423727416925887"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text"; google_ad_channel = ""; google_color_border = "333333"; google_color_bg = "FFFFFF"; google_color_link = "6666FF"; google_color_text = "000000"; google_color_url = "009933"; //--&gt;&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-4413012044626159777?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/4413012044626159777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=4413012044626159777' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/4413012044626159777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/4413012044626159777'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/08/compiling-php-and-apache-2-from-source.html' title='Compiling PHP and Apache 2 from source on Linux OS'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-2566794860401310608</id><published>2007-08-13T21:20:00.001+07:00</published><updated>2007-08-13T21:20:23.045+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Install gPHPEdit in Ubuntu, a good PHP editor review</title><content type='html'>gPHPEdit is not the most complete editor that you will ever use and has a simple and unclutered interface which makes writing code easy. Its based on the Scintilla editor and takes it a step further than SciTE and uses Gnome 2. What it lacks in features it makes up with pure speed. It’s opened at exactly the last place you left it before you can blink your eye. The main features are:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Syntax highlighting for all functions up to PHP 4.3&lt;/li&gt;&lt;li&gt;Code assistance (function, parameter assistance PHP 4.3 only)&lt;/li&gt;&lt;li&gt;Syntax checking&lt;/li&gt;&lt;li&gt;Tabbed viewing&lt;/li&gt;&lt;li&gt;Support for HTML and CSS&lt;/li&gt;&lt;/ol&gt; syntax highlighting works but if you’re like me as you can tell from the site I like to work with a black background (otherwise after a while I have very sore eyes) and after changing all the setting there still remained some portions of the code with the default white background. On searching the site this bug has been fixed and will be included for the 1.0 release or can be downloaded via cvs. Another thing working with a black background when selecting text that is white you can’t read it anymore as there is no way to change the hight lighting color. &lt;p&gt;The PHP code assistance is great and just like the application is displayed very quickly and can be adjusted. The syntax checker is manual and has to be called using the menu or F9 this can be quite annoying and it does not check any functions or parameters within the file.&lt;/p&gt; &lt;p&gt;The search facilities are very basic in that only one file can be searched and the searching only highlights the first occurrence at the top of the file and you must continue through each occurance within the file. This can be quite tedious for large files with many partial matches.&lt;/p&gt; &lt;p&gt;If you’re working on a large project with multiple folders navigation can be quite tedious although on smaller projects where all files are in a small number of folders the handy list of classes with their functions can be displayed on the left of the screen for easy navigation but beware of files that have functions only as they will be listed so a folder containing numerous files of this type can be very difficult to navigate.&lt;/p&gt; &lt;p&gt;Overall, this editor is quick and easy to work with but without some more advanced features it feels a bit naked, the lack of automated indentation and auto syntax checking become more and more frustrating after long term use. Quick folder navigation would be an enormous improvement and these three feature would alone push this application onto the desktop of many more developers. Despite the lack of more advanced features it isn’t a tool I would quickly uninstall. If you’re an Eclipse user for example and you want to quickly open a couple of files to view and perform small edits this is where it excels. In the time that eclipse starts you can open edit and save and be doing something else. This application is reaching version 1.0 and is showing the some good signs that with some further development and added features would be a much more useful application.&lt;/p&gt;&lt;p&gt;Download gPHPedit source for Ubuntu &lt;a href="http://www.gphpedit.org/download/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;Các bạn có thể xem bài dịch tiếng Việt &lt;span style="text-decoration: underline;"&gt;http://binkun-linux.blogspot.com/2007/08/hng-dn-ci-gphpedit-lp-trnh-php-trong.html&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-2566794860401310608?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/2566794860401310608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=2566794860401310608' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/2566794860401310608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/2566794860401310608'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/08/install-gphpedit-in-ubuntu-good-php_13.html' title='Install gPHPEdit in Ubuntu, a good PHP editor review'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-8139765290323673773</id><published>2007-08-13T21:19:00.001+07:00</published><updated>2007-08-13T21:19:46.429+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Hướng dẫn cài gPHPEdit để lập trình PHP trong Ubuntu dễ dàng</title><content type='html'>gPHPedit không như hầu hết các trình biên tập( tạm dịch editor như vậy) hoàn chỉnh mà bạn đã từng xài. Có một giao diện đơn giản và không fức tạp, một điều thật tuyệt để code. Nó thiết kế trên nền Scintilla editor, là một bước tiến so với SciTE và dùng Gnome 2. Nó mở file chính xác theo lần cuối mà đóng trước trong nháy mắt.&lt;br /&gt;&lt;p&gt;Những chức năng chính của gPHPedit :&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Làm nổi bật các hàm trong PHP 4.3.&lt;/li&gt;&lt;li&gt;Hỗ trợ code( hỗ trợ các hàm, tham số chỉ trong PHP 4.3).&lt;/li&gt;&lt;li&gt;Kiểm tra cú pháp.&lt;/li&gt;&lt;li&gt;Hỗ trợ kiểu cửa sổ Tab( mở nhiều tài liệu cùng 1 cửa sổ, nhưng các tài liệu trên các phiếu khác nhau).&lt;/li&gt;&lt;li&gt;Hỗ trợ cho cả CSS và HTML nữa.&lt;/li&gt;&lt;/ul&gt;Sự hỗ trợ cho code PHP thì thật tuyệt và giống như gPHPedit, nó hiển thị rất nhanh chóng và có thể chỉnh sửa. Tiện ích kiểm tra cú pháp( syntax) đươc chạy thủ công fải được gọi bằng menu hay nhấn F9 để gọi, điều này có lẽ khá khó chịu nhưng nó sẽ không check bất cứ hàm hay tham số nào trong file.&lt;br /&gt;Tiện ích tìm kiếm từ là rất cơ bản trong các chương trình hỗ trợ lập trình, nhưng gPHPedit chỉ tìm trên một file thôi, điều này thật khó chịu cho ai làm việc với các project nhìu file hay các file wá lớn.&lt;br /&gt;Sau cùng, chương trình này làm việc rất nhanh chóng và dễ dàng. Nhưng nếu như không có các tiện ích ưu việt hơn nó sẽ trở nên khá đơn điệu, thiếu hỗ trợ thụt đầu dòng và tự động kiểm tra lỗi cú pháp sẽ gây khó khăn cho việc sử dụng lâu dài sau này. Việc thíu một số tính năng hấp dẫn có thể sẽ làm bạn nhanh chóng gỡ bỏ nó, nhưng khoan đó lại là ưu điểm của nó đó bạn. Khi bạn cần chỉnh sửa chi tiết nhỏ một file nó sẽ rất hữu ích, như NotePad trong Window OS hay gEdit trong Ubuntu này, nó thật vô vị bù lại "nhỏ mà có zõ".&lt;br /&gt;Các bạn có thể xem bài gốc tiếng Anh tại đây : &lt;a href="http://binkun-linux.blogspot.com/2007/08/install-gphpedit-in-ubuntu-good-php.html"&gt;http://binkun-linux.blogspot.com/2007/08/install-gphpedit-in-ubuntu-good-php.html&lt;/a&gt;&lt;br /&gt;Và download gPHPedit &lt;a href="http://www.gphpedit.org/download/"&gt;tại đây&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-8139765290323673773?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/8139765290323673773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=8139765290323673773' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/8139765290323673773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/8139765290323673773'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/08/hng-dn-ci-gphpedit-lp-trnh-php-trong_13.html' title='Hướng dẫn cài gPHPEdit để lập trình PHP trong Ubuntu dễ dàng'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-977550669230594385</id><published>2007-08-13T21:17:00.000+07:00</published><updated>2007-08-13T21:18:27.328+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Install wxDownloadFast in Ubuntu to fastly download</title><content type='html'>wxDownload Fast (also known as wxDFast) is an open source download manager.&lt;br /&gt;&lt;p&gt;It is a multi-threaded download manager. This means that it can split a file into several pieces and download the pieces simultaneously.&lt;br /&gt;Some features are:&lt;/p&gt; &lt;p&gt;Faster downloads&lt;br /&gt;Download resuming&lt;br /&gt;Available in multiple languages and easily translated.&lt;br /&gt;Connection to HTTP/FTP servers which require a password&lt;br /&gt;Calculates the MD5/SHA1 checksum of downloaded files so they can be easily verified&lt;br /&gt;Firefox integration through FlashGot&lt;br /&gt;and more. &lt;/p&gt;You open Terminal window, then type there :&lt;br /&gt;&lt;blockquote style="color: rgb(51, 102, 255);"&gt;sudo apt-get install build-essential libwxgtk2.6-0 libmad0 libsndfile1 libwxgtk2.6-dev gettext&lt;br /&gt;wget http://nchc.dl.sourceforge.net/sourceforge/dfast/wxdfast_0.6.0-1_ubuntu_i386.deb&lt;br /&gt;sudo dpkg -i wxdfast_0.6.0-1_ubuntu_i386.deb&lt;/blockquote&gt;The first line get some necessary library.&lt;br /&gt;Home page: &lt;a href="http://dfast.sourceforge.net/"&gt;http://dfast.sourceforge.net/&lt;/a&gt;&lt;br /&gt;Bạn có thể xem bài dịch tiếng Việt tại đây : &lt;a href="http://binkun-linux.blogspot.com/2007/08/install-wxdownload-fast-to-fastly.html"&gt;http://binkun-linux.blogspot.com/2007/08/install-wxdownload-fast-to-fastly.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-977550669230594385?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/977550669230594385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=977550669230594385' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/977550669230594385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/977550669230594385'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/08/install-wxdownloadfast-in-ubuntu-to.html' title='Install wxDownloadFast in Ubuntu to fastly download'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-4066105925041450472</id><published>2007-08-08T00:00:00.000+07:00</published><updated>2007-08-08T00:01:00.537+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Read and write in NTFS partitions on Ubuntu - Đọc ghi phân vùng NTFS trong Ubuntu</title><content type='html'>&lt;p&gt;Nếu bạn cài Ubuntu và Windows trên cùng một máy, ắt hẳn sẽ có lúc bạn muốn “chia sẻ” dữ liệu giữa 2 hệ điều hành. Ubuntu nói riêng và Linux nói chung có thể đọc ghi phân vùng FAT tốt, nhưng với NTFS thì chưa được “mượt” lắm. Có lẽ vì thế mà sau khi cài đặt, Ubuntu mặc định chỉ cho bạn đọc từ phân vùng NTFS. Việc cấu hình để Ubuntu có thể ghi lên phân vùng NTFS là vô cùng dễ dàng, chỉ cần thao tác vài bước là xong. Tại sao lại không làm chứ?! &lt;/p&gt;&lt;p&gt;&lt;span id="more-53"&gt;&lt;/span&gt;&lt;br /&gt;Bạn chọn menu &lt;code&gt;Applications &gt; Accessories &gt; Terminal&lt;/code&gt; để mở cửa sổ dòng lệnh. Gõ lệnh sau:&lt;/p&gt; &lt;p&gt;&lt;code&gt;sudo apt-get install ntfs-config&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Sau khi quá trình cài đặt kết thúc bạn, bạn chọn menu &lt;code&gt;Applications &gt; System Tools &gt; NTFS Configuration Tool&lt;/code&gt;. Sẽ có một màn hình yêu cầu bạn nhập mật khẩu của bạn vào, rồi đến cửa sổ cấu hình rất đơn giản sau:&lt;/p&gt;  &lt;p style="text-align: center;"&gt;&lt;a href="http://saylinux.files.wordpress.com/2007/05/ntfs-config.png" title="Cưả sổ cấu hình NTFS Configuration Tool"&gt;&lt;img src="http://saylinux.files.wordpress.com/2007/05/ntfs-config.png" alt="Cưả sổ cấu hình NTFS Configuration Tool" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Đánh dấu vào tuỳ chọn bạn thấy cần rồi nhấn &lt;code&gt;OK&lt;/code&gt; là xong (&lt;em&gt;internal device&lt;/em&gt; là hỗ trợ cho ổ cứng gắn trong, bao gồm những phân vùng Windows trên đĩa cứng của bạn, &lt;em&gt;external device&lt;/em&gt; là cho thiết bị gắn ngoài như ổ cứng di động, USB…). Từ giờ bạn có thể làm việc thoải mái với phân vùng NTFS rồi.&lt;/p&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;Chú ý:&lt;/strong&gt;&lt;/em&gt; Nếu trước đó Ubuntu chưa nhận diện phân vùng NTFS thì có thể sẽ xuất hiện thêm một cửa sổ liệt kê danh sách những phân vùng NTFS có trên máy (mà chưa được kết nối &lt;em&gt;(mount)&lt;/em&gt;) để bạn xác nhận có muốn kết nối và sử dụng phân vùng đó không. Bạn cứ làm theo những tuỳ chọn mặc định là được.&lt;/p&gt;by saylinux.wordpress.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-4066105925041450472?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/4066105925041450472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=4066105925041450472' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/4066105925041450472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/4066105925041450472'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/08/read-and-write-in-ntfs-partitions-on.html' title='Read and write in NTFS partitions on Ubuntu - Đọc ghi phân vùng NTFS trong Ubuntu'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-1904385541606707029</id><published>2007-08-07T23:58:00.002+07:00</published><updated>2007-08-07T23:59:07.968+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Hướng dẫn cài đặt Apache, MySQL và PHP5 cho người mới học</title><content type='html'>&lt;span style="font-weight: bold;"&gt;I. &lt;/span&gt;Cài&lt;span style="font-weight: bold;"&gt; Apache :&lt;/span&gt;&lt;br /&gt;Mở Terminal (Applications &gt; Accessories &gt; Terminal) và khỏ zô dòng sau :&lt;span class="bodytxt"&gt;&lt;span style="font-family: Times New Roman,Times,serif; font-size: 100%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: arial; font-size: 100%;"&gt;&lt;blockquote&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;sudo apt-get install apache2&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;sudo apt-get install libapache2-mod-php5&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;sudo apt-get install &lt;/span&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;libapache2-mod-security&lt;/span&gt;&lt;span class="bodytxt"&gt;&lt;span style="font-family: Times New Roman,Times,serif; font-size: 100%;"&gt;&lt;span style="color: rgb(128, 0, 0); font-family: Courier New; font-size: 85%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt; Gói &lt;/span&gt;mod-security là tuỳ chọn.&lt;br /&gt;Để khởi động cái Apache server lên mình gõ zô Terminal dòng sau :&lt;br /&gt;&lt;span style="font-family: arial; font-size: 100%;"&gt;&lt;blockquote style="color: rgb(51, 102, 255);"&gt;sudo /etc/init.d/apache2 start&lt;/blockquote&gt;Để kiểm tra coi Apache cài được chưa , zô webbrowser( như FireFox hay InternetExplorer) gõ vào addressbar :&lt;br /&gt;&lt;blockquote&gt;http://localhost&lt;/blockquote&gt;Nếu nó ra chữ "It's work" là thành công ròi.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;II.Cài đặt PHP&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;Mở Terminal (Applications &gt; Accessories &gt; Terminal) và khỏ zô dòng sau :&lt;br /&gt;&lt;blockquote style="color: rgb(51, 204, 255);"&gt;&lt;pre style="font-family: arial;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;sudo apt-get install php5&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;sudo apt-get install php5-ldap php5-odbc php5-xsl php5-gd php-pear &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;sudo /etc/init.d/apache2 restart&lt;/span&gt;&lt;span style="font-size: 100%;"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt;Các gói cài đặt trong dòng lệnh thứ hai là tuỳ chọn. Dòng lệnh cúi là để restart lai server của mình, cho mục đích test của mình sau này.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    Test PHP&lt;br /&gt;&lt;/span&gt;&lt;span class="bodytxt"&gt;&lt;span style="font-family: Times New Roman,Times,serif; font-size: 100%;"&gt;&lt;span style="color: rgb(128, 0, 0); font-family: Courier New; font-size: 85%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Trong Terminal gõ :&lt;br /&gt;&lt;blockquote style="color: rgb(51, 102, 255);"&gt;sudo gedit /var/www/testphp.php&lt;/blockquote&gt;Chúng ta code mã PHP sau vào và save lại. Vào web browser vào address bar gõ zô :&lt;br /&gt;&lt;blockquote&gt;http://localhost/testphp.php&lt;/blockquote&gt;&lt;span class="bodytxt"&gt;&lt;span style="font-family: Times New Roman,Times,serif; font-size: 100%;"&gt;&lt;span style="color: rgb(128, 0, 0); font-family: Courier New; font-size: 85%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Nếu thấy jống hình sau là cài Apache và PHP ổn ròi.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_AsD3tdEP1wA/RrGzgSjgcbI/AAAAAAAAAB8/UYqfAvu8OI4/s1600-h/Screenshot-phpinfo%28%29+-+Mozilla+Firefox.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_AsD3tdEP1wA/RrGzgSjgcbI/AAAAAAAAAB8/UYqfAvu8OI4/s320/Screenshot-phpinfo%28%29+-+Mozilla+Firefox.png" alt="" id="BLOGGER_PHOTO_ID_5094050020850692530" border="0" /&gt;&lt;/a&gt;&lt;span style="font-family: arial; font-size: 100%;"&gt;&lt;span style="font-weight: bold;"&gt;III. Cài đặt MySQL:&lt;/span&gt;&lt;br /&gt;Lại mở Terminal ra và khỏ :&lt;br /&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;sudo apt-get install mysql-server&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span class="bodytxt"&gt;&lt;blockquote dir="ltr" style="margin-right: 0px;"&gt; &lt;p align="justify"&gt;&lt;span style="font-family: Times New Roman,Times,serif; font-size: 100%;"&gt;&lt;span style="color: rgb(128, 0, 0); font-family: Courier New; font-size: 85%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/span&gt;Để các máy khác trong mạng có thể coi được máy bạn, vào file my.cnf sửa lại chút xíu. Trong Terminal khỏ :&lt;br /&gt;&lt;blockquote style="color: rgb(51, 204, 255);"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;sudo gedit /etc/mysql/my.cnf&lt;/span&gt;   &lt;/blockquote&gt;Tại dòng   : bind-address = 127.0.0.1  &lt;span class="bodytxt"&gt;&lt;/span&gt;Sửa lại 127.0.0.1 thành IP của bạn.&lt;br /&gt;Bi jờ, bạn cài đặt thêm phpMyAdmin để tiện cho việc wản trị database của bạn. Trong Terminal khỏ :&lt;br /&gt;&lt;blockquote style="color: rgb(51, 102, 255);"&gt;sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin&lt;/blockquote&gt;Để cho PHP và MySQL làm việc với nhau, bạn vào file php.ini sửa lại một chút. Vào Terminal gõ :&lt;br /&gt;&lt;blockquote style="color: rgb(51, 102, 255);"&gt;&lt;span class="bodytxt"&gt;&lt;span style="font-family: Times New Roman,Times,serif; font-size: 100%;"&gt;&lt;span style="font-family: Courier New; font-size: 85%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;sudo gedit /etc/php5/apache2/php.ini&lt;/span&gt;&lt;/blockquote&gt;Sửa &lt;span style="color: rgb(51, 102, 255);"&gt;;extension=mysql.so&lt;/span&gt; thành &lt;span style="color: rgb(51, 102, 255);"&gt;extension=mysql.so&lt;br /&gt;&lt;/span&gt;Jờ thì bạn vào Terminal gõ lệnh sau để khởi động lại Apache và PHP, ròi típ tục làm việc với nó được ròi.&lt;br /&gt;Để bảo mật hơn bạn nên đổi password ngay.&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;blockquote style="color: rgb(51, 102, 255);"&gt;sudo /etc/init.d/apache2 restart&lt;br /&gt;mysql -u root&lt;br /&gt;mysql&gt; SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');&lt;/blockquote&gt;Đổi "yourpassword" thành mật khẩu tuỳ ý của bạn.&lt;br /&gt;&lt;span class="bodytxt"&gt;&lt;span style="font-family: Times New Roman,Times,serif; font-size: 100%;"&gt;&lt;span style="color: rgb(128, 0, 0); font-family: Courier New; font-size: 85%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Chúc bạn thành công !&lt;span class="bodytxt"&gt;&lt;span style="font-family: Times New Roman,Times,serif; font-size: 100%;"&gt;&lt;span style="color: rgb(128, 0, 0); font-family: Courier New; font-size: 85%;"&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-1904385541606707029?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/1904385541606707029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=1904385541606707029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/1904385541606707029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/1904385541606707029'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/08/hng-dn-ci-t-apache-mysql-v-php5-cho-ngi.html' title='Hướng dẫn cài đặt Apache, MySQL và PHP5 cho người mới học'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_AsD3tdEP1wA/RrGzgSjgcbI/AAAAAAAAAB8/UYqfAvu8OI4/s72-c/Screenshot-phpinfo%28%29+-+Mozilla+Firefox.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-8574247459639039718</id><published>2007-08-07T23:58:00.001+07:00</published><updated>2007-08-07T23:58:24.205+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>How to install LAMP( Linux, Apache, MySQL, PHP) on Ubuntu 7.04( Feisty Fawn)</title><content type='html'>&lt;p&gt;Ubuntu is a free, open source Linux-based operating system that starts with the breadth of Debian and adds regular releases (every six months), a clear focus on the user and usability (it should "Just Work", TM) and a commitment to security updates with 18 months of support for every release (and with 6.06 LTS you get 3 years on the desktop and 5 on the server!). Ubuntu ships with the latest GNOME release as well as a selection of server and desktop software that makes for a comfortable desktop experience off a single installation CD.&lt;br /&gt;I have found very easy steps to install Apache 2, PHP 5, MySQL 5 and PostgreSQL 8. All you need to do is to run the following command from the shell in Ubuntu, Upon password request, just enter the password for your personal account.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;To install Apache 2&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;sudo apt-get install apache2-mpm-worker&lt;br /&gt;&lt;br /&gt;&lt;b&gt;To install MySQL 5&lt;/b&gt;&lt;br /&gt;sudo apt-get install mysql-server&lt;br /&gt;&lt;b&gt;To install PHP 5&lt;/b&gt;&lt;br /&gt;autoconf automake1.4 autotools-dev libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php-pear php5-ldap php5-mhash php5-mysql php5-pgsql php5-mysqli php5-snmp php5-sqlite php5-xmlrpc php5-xsl php5-imap php5-mcrypt php5-pspell php5-gd&lt;br /&gt;This command will install most commonly used PHP libraries.&lt;br /&gt;It used to take me the whole day even without successfully installing and configure those software packages, but it only took me less than 2 hours to finish all the installation and configure properly to suit my needs on Ubuntu. Plus, I really like the interface of Ubuntu desktop and now I will move my freelance project development to Ubuntu environment from Windows.&lt;br /&gt;&lt;b&gt;A few reasons to install Ubuntu:&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Absolutely Free of Charge - you can download any time from their official website&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Fast, Easy Install - only around 10 mins&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Immediately Useful - contains all basic software for home and office applications&lt;/li&gt;&lt;br /&gt;&lt;li&gt;More securer than Windows&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;by www.edreaminghome.com - Eric Lin&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-8574247459639039718?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/8574247459639039718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=8574247459639039718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/8574247459639039718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/8574247459639039718'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/08/how-to-install-lamp-linux-apache-mysql.html' title='How to install LAMP( Linux, Apache, MySQL, PHP) on Ubuntu 7.04( Feisty Fawn)'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-3467290289397263124</id><published>2007-08-07T23:57:00.001+07:00</published><updated>2007-08-07T23:57:52.474+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Install gPHPEdit in Ubuntu, a good PHP editor review</title><content type='html'>&lt;p&gt;gPHPEdit is not the most complete editor that you will ever use and has a simple and unclutered interface which makes writing code easy. Its based on the Scintilla editor and takes it a step further than SciTE and uses Gnome 2. What it lacks in features it makes up with pure speed. It’s opened at exactly the last place you left it before you can blink your eye. The main features are:&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Syntax highlighting for all functions up to PHP 4.3&lt;/li&gt;&lt;li&gt;Code assistance (function, parameter assistance PHP 4.3 only)&lt;/li&gt;&lt;li&gt;Syntax checking&lt;/li&gt;&lt;li&gt;Tabbed viewing&lt;/li&gt;&lt;li&gt;Support for HTML and CSS&lt;/li&gt;&lt;/ol&gt; syntax highlighting works but if you’re like me as you can tell from the site I like to work with a black background (otherwise after a while I have very sore eyes) and after changing all the setting there still remained some portions of the code with the default white background. On searching the site this bug has been fixed and will be included for the 1.0 release or can be downloaded via cvs. Another thing working with a black background when selecting text that is white you can’t read it anymore as there is no way to change the hight lighting color. &lt;p&gt;The PHP code assistance is great and just like the application is displayed very quickly and can be adjusted. The syntax checker is manual and has to be called using the menu or F9 this can be quite annoying and it does not check any functions or parameters within the file.&lt;/p&gt; &lt;p&gt;The search facilities are very basic in that only one file can be searched and the searching only highlights the first occurrence at the top of the file and you must continue through each occurance within the file. This can be quite tedious for large files with many partial matches.&lt;/p&gt; &lt;p&gt;If you’re working on a large project with multiple folders navigation can be quite tedious although on smaller projects where all files are in a small number of folders the handy list of classes with their functions can be displayed on the left of the screen for easy navigation but beware of files that have functions only as they will be listed so a folder containing numerous files of this type can be very difficult to navigate.&lt;/p&gt; &lt;p&gt;Overall, this editor is quick and easy to work with but without some more advanced features it feels a bit naked, the lack of automated indentation and auto syntax checking become more and more frustrating after long term use. Quick folder navigation would be an enormous improvement and these three feature would alone push this application onto the desktop of many more developers. Despite the lack of more advanced features it isn’t a tool I would quickly uninstall. If you’re an Eclipse user for example and you want to quickly open a couple of files to view and perform small edits this is where it excels. In the time that eclipse starts you can open edit and save and be doing something else. This application is reaching version 1.0 and is showing the some good signs that with some further development and added features would be a much more useful application.&lt;/p&gt;&lt;p&gt;Download gPHPedit source for Ubuntu &lt;a href="http://www.gphpedit.org/download/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;Các bạn có thể xem bài dịch tiếng Việt &lt;span style="text-decoration: underline;"&gt;http://binkun-linux.blogspot.com/2007/08/hng-dn-ci-gphpedit-lp-trnh-php-trong.html&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-3467290289397263124?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/3467290289397263124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=3467290289397263124' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3467290289397263124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3467290289397263124'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/08/install-gphpedit-in-ubuntu-good-php.html' title='Install gPHPEdit in Ubuntu, a good PHP editor review'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-5544051763426885887</id><published>2007-08-07T23:56:00.000+07:00</published><updated>2007-08-07T23:57:27.065+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Hướng dẫn cài gPHPEdit để lập trình PHP trong Ubuntu dễ dàng</title><content type='html'>&lt;p&gt;gPHPedit không như hầu hết các trình biên tập( tạm dịch editor như vậy) hoàn chỉnh mà bạn đã từng xài. Có một giao diện đơn giản và không fức tạp, một điều thật tuyệt để code. Nó thiết kế trên nền Scintilla editor, là một bước tiến so với SciTE và dùng Gnome 2. Nó mở file chính xác theo lần cuối mà đóng trước trong nháy mắt.&lt;br /&gt;Những chức năng chính của gPHPedit :&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Làm nổi bật các hàm trong PHP 4.3.&lt;/li&gt;&lt;li&gt;Hỗ trợ code( hỗ trợ các hàm, tham số chỉ trong PHP 4.3).&lt;/li&gt;&lt;li&gt;Kiểm tra cú pháp.&lt;/li&gt;&lt;li&gt;Hỗ trợ kiểu cửa sổ Tab( mở nhiều tài liệu cùng 1 cửa sổ, nhưng các tài liệu trên các phiếu khác nhau).&lt;/li&gt;&lt;li&gt;Hỗ trợ cho cả CSS và HTML nữa.&lt;/li&gt;&lt;/ul&gt;Sự hỗ trợ cho code PHP thì thật tuyệt và giống như gPHPedit, nó hiển thị rất nhanh chóng và có thể chỉnh sửa. Tiện ích kiểm tra cú pháp( syntax) đươc chạy thủ công fải được gọi bằng menu hay nhấn F9 để gọi, điều này có lẽ khá khó chịu nhưng nó sẽ không check bất cứ hàm hay tham số nào trong file.&lt;br /&gt;Tiện ích tìm kiếm từ là rất cơ bản trong các chương trình hỗ trợ lập trình, nhưng gPHPedit chỉ tìm trên một file thôi, điều này thật khó chịu cho ai làm việc với các project nhìu file hay các file wá lớn.&lt;br /&gt;Sau cùng, chương trình này làm việc rất nhanh chóng và dễ dàng. Nhưng nếu như không có các tiện ích ưu việt hơn nó sẽ trở nên khá đơn điệu, thiếu hỗ trợ thụt đầu dòng và tự động kiểm tra lỗi cú pháp sẽ gây khó khăn cho việc sử dụng lâu dài sau này. Việc thíu một số tính năng hấp dẫn có thể sẽ làm bạn nhanh chóng gỡ bỏ nó, nhưng khoan đó lại là ưu điểm của nó đó bạn. Khi bạn cần chỉnh sửa chi tiết nhỏ một file nó sẽ rất hữu ích, như NotePad trong Window OS hay gEdit trong Ubuntu này, nó thật vô vị bù lại "nhỏ mà có zõ".&lt;br /&gt;Các bạn có thể xem bài gốc tiếng Anh tại đây : &lt;a href="http://binkun-linux.blogspot.com/2007/08/install-gphpedit-in-ubuntu-good-php.html"&gt;http://binkun-linux.blogspot.com/2007/08/install-gphpedit-in-ubuntu-good-php.html&lt;/a&gt;&lt;br /&gt;Và download gPHPedit &lt;a href="http://www.gphpedit.org/download/"&gt;tại đây&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-5544051763426885887?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/5544051763426885887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=5544051763426885887' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/5544051763426885887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/5544051763426885887'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/08/hng-dn-ci-gphpedit-lp-trnh-php-trong.html' title='Hướng dẫn cài gPHPEdit để lập trình PHP trong Ubuntu dễ dàng'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-6932511036439054633</id><published>2007-07-31T20:02:00.000+07:00</published><updated>2007-07-31T20:03:05.498+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Cài file coi CHM</title><content type='html'>Các file ebook hay các file help thường được viết dạng file .chm( Compiled HTML Help). Hôm nay, mở file ebook ra, mình không coi được, search ra cách cài zô, Thật đơn jản, khỏ 1 dòng lệnh sau zô :&lt;br /&gt;&lt;blockquote style="color: rgb(51, 204, 255);"&gt;sudo apt-get install xchm&lt;/blockquote&gt;Nhưng máy mình thì làm zậy coi không được( không hỉu sao nữa), cái này là mình coi trên mạng có 1 site chỉ zậy. Sau đó, mình tìm ra cách này. Mình khỏ zô lệnh sau :&lt;br /&gt;&lt;blockquote style="color: rgb(51, 204, 255);"&gt;sudo apt-get install gnochm&lt;/blockquote&gt;Các bạn có thể thử cả 2 chiu coi cũng được. Zậy là coi được ròi. Chúc các bạn thành công !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-6932511036439054633?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/6932511036439054633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=6932511036439054633' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6932511036439054633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6932511036439054633'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/ci-file-coi-chm.html' title='Cài file coi CHM'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-7714121315439936133</id><published>2007-07-31T10:31:00.000+07:00</published><updated>2007-07-31T10:33:22.002+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP MySQL'/><title type='text'>Password Hashing in PHP</title><content type='html'>&lt;h2 style="font-family: arial;"&gt;by James McGlinn&lt;/h2&gt; &lt;p style="font-family: arial;"&gt;In this article I'm going to cover password hashing, a subject which is often poorly understood by newer developers. Recently I've been asked to look at several web applications which all had the same security issue - user profiles stored in a database with plain text passwords. Password hashing is a way of encrypting a password before it's stored so that if your database gets into the wrong hands, the damage is limited. Hashing is nothing new - it's been in use in Unix system password files since long before my time, and quite probably in other systems long before that. In this article I'll explain what a hash is, why you want to use them instead of storing real passwords in your applications, and give you some examples of how to implement password hashing in PHP and MySQL.&lt;/p&gt; &lt;h2 style="font-family: arial;"&gt;Foreword&lt;/h2&gt; &lt;p style="font-family: arial;"&gt;As you read on you'll see that I advocate the use of a hashing algorithm called Secure Hashing Algorithm 1 (or SHA-1). Since I wrote this article, a team of researchers - Xiaoyun Wang, Yiqun Lisa Yin, and Hongbo Yu - have shown SHA-1 to be weaker than was previously thought. This means that for certain purposes such as digital signatures, stronger algorithms like SHA-256 and SHA-512 are now being recommended. For generating password hashes, SHA-1 still provides a more than adequate level of security for most applications today. You should be aware of this issue however and begin to think about using stronger algorithms in your code as they become more readily available.&lt;/p&gt; &lt;p style="font-family: arial;"&gt;For more information please see Bruce Schneier's analysis of the issue at &lt;a href="http://www.schneier.com/blog/archives/2005/02/cryptanalysis_o.html"&gt;http://www.schneier.com/blog/archives/2005/02/cryptanalysis_o.html&lt;/a&gt;&lt;/p&gt; &lt;h2 style="font-family: arial;"&gt;What Is A Hash?&lt;/h2&gt; &lt;p style="font-family: arial;"&gt;A hash (also called a hash code, digest, or message digest) can be thought of as the digital fingerprint of a piece of data. You can easily generate a fixed length hash for any text string using a one-way mathematical process. It is next to impossible to (efficiently) recover the original text from a hash alone. It is also vastly unlikely that any different text string will give you an identical hash - a 'hash collision'. These properties make hashes ideally suited for storing your application's passwords. Why? Because although an attacker may compromise a part of your system and reveal your list of password hashes, they can't determine from the hashes alone what the real passwords are.&lt;/p&gt; &lt;h2 style="font-family: arial;"&gt;So How Do I Authenticate Users?&lt;/h2&gt; &lt;p style="font-family: arial;"&gt;We've established that it's incredibly difficult to recover the original password from a hash, so how will your application know if a user has entered the correct password or not? Quite simply - by generating a hash of the user-supplied password and comparing this 'fingerprint' with the hash stored in your user profile, you'll know whether or not the passwords match. Let's look at an example:&lt;/p&gt; &lt;h2 style="font-family: arial;"&gt;User Registration And Password Verification&lt;/h2&gt; &lt;p style="font-family: arial;"&gt;During the registration process our new user will provide their desired password (preferably with verification and through a secure session). Using code similar to the following, we store their username and password hash in our database:&lt;/p&gt; &lt;img style="font-family: arial;" src="http://phpsec.org/articles/images/2005/password-hashing-01.png" /&gt; &lt;p style="font-family: arial;"&gt;Figure 1. Our user enters their preferred access details&lt;/p&gt; &lt;pre style="font-family: arial;" class="code"&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;/* Store user details */&lt;br /&gt;&lt;br /&gt;$passwordHash = sha1($_POST['password']);&lt;br /&gt;&lt;br /&gt;$sql = 'INSERT INTO user (username,passwordHash) VALUES (?,?)';&lt;br /&gt;$result = $db-&gt;query($sql, array($_POST['username'], $passwordHash));&lt;br /&gt;&lt;br /&gt;?&gt;&lt;/pre&gt; &lt;p style="font-family: arial;"&gt;The next time our user logs in, we check their access credentials using similar code as follows:&lt;/p&gt; &lt;img style="font-family: arial;" src="http://phpsec.org/articles/images/2005/password-hashing-02.png" /&gt; &lt;p style="font-family: arial;"&gt;Figure 2. Logging back in&lt;/p&gt; &lt;pre style="font-family: arial;" class="code"&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;/* Check user details */&lt;br /&gt;&lt;br /&gt;$passwordHash = sha1($_POST['password']);&lt;br /&gt;&lt;br /&gt;$sql = 'SELECT username FROM user WHERE username = ? AND passwordHash = ?';&lt;br /&gt;$result = $db-&gt;query($sql, array($_POST['username'], $passwordHash));&lt;br /&gt;if ($result-&gt;numRows() &lt; 1)&lt;br /&gt;{&lt;br /&gt;   /* Access denied */&lt;br /&gt;   echo 'Sorry, your username or password was incorrect!';&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;   /* Log user in */&lt;br /&gt;   printf('Welcome back %s!', $_POST['username']);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;?&gt;&lt;/pre&gt; &lt;h2 style="font-family: arial;"&gt;Types Of Hashes&lt;/h2&gt; &lt;p style="font-family: arial;"&gt;There are a number of strong hashing algorithms in use, the most common of which are MD5 and SHA-1. Older systems - including many Linux variants - used Data Encryption Standard (DES) hashes. With only 56 bits this is no longer considered an acceptably strong hashing algorithm and should be avoided.&lt;/p&gt; &lt;h3 style="font-family: arial;"&gt;Examples&lt;/h3&gt; &lt;p style="font-family: arial;"&gt;In PHP you can generate hashes using the md5() and sha1 functions. md5() returns a 128-bit hash (32 hexadecimal characters), whereas sha1() returns a 160-bit hash (40 hexadecimal characters). For example:&lt;/p&gt; &lt;pre style="font-family: arial;" class="code"&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;$string = 'PHP &amp; Information Security';&lt;br /&gt;printf("Original string: %s\n", $string);&lt;br /&gt;printf("MD5 hash: %s\n", md5($string));&lt;br /&gt;printf("SHA-1 hash: %s\n", sha1($string));&lt;br /&gt;&lt;br /&gt;?&gt;&lt;/pre&gt; &lt;p style="font-family: arial;"&gt;This code will output the following:&lt;/p&gt; &lt;pre style="font-family: arial;" class="code"&gt;Original string: PHP &amp; Information Security&lt;br /&gt;MD5 hash: 88dd8f282721af2c704e238e7f338c41&lt;br /&gt;SHA-1 hash: b47210605096b9aa0129f88695e229ce309dd362&lt;/pre&gt; &lt;p style="font-family: arial;"&gt;In MySQL you can generate hashes internally using the password(), md5(), or sha1 functions. password() is the function used for MySQL's own user authentication system. It returns a 16-byte string for MySQL versions prior to 4.1, and a 41-byte string (based on a double SHA-1 hash) for versions 4.1 and up. md5() is available from MySQL version 3.23.2 and sha1() was added later in 4.0.2.&lt;/p&gt; &lt;pre style="font-family: arial;" class="code"&gt;mysql&gt; select PASSWORD( 'PHP &amp; Information Security' );&lt;br /&gt;+------------------------------------------+&lt;br /&gt;| PASSWORD( 'PHP &amp; Information Security' ) |&lt;br /&gt;+------------------------------------------+&lt;br /&gt;| 379693e271cd3bd6                         |&lt;br /&gt;+------------------------------------------+&lt;br /&gt;1 row in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; select MD5( 'PHP &amp;amp; Information Security' );&lt;br /&gt;+-------------------------------------+&lt;br /&gt;| MD5( 'PHP &amp; Information Security' ) |&lt;br /&gt;+-------------------------------------+&lt;br /&gt;| 88dd8f282721af2c704e238e7f338c41    |&lt;br /&gt;+-------------------------------------+&lt;br /&gt;1 row in set (0.01 sec)&lt;/pre&gt; &lt;p style="font-family: arial;"&gt;&lt;i&gt;Note: Using MySQL's password() function in your own applications isn't recommended - the algorithm used has changed over time and prior to 4.1 was particularly weak.&lt;/i&gt;&lt;/p&gt; &lt;p style="font-family: arial;"&gt;You may decide to use MySQL to calculate your hash rather than PHP. The example of storing our user's registration details from the previous section then becomes:&lt;/p&gt; &lt;pre style="font-family: arial;" class="code"&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;/* Store user details */&lt;br /&gt;&lt;br /&gt;$sql = 'INSERT INTO user (username, passwordHash) VALUES (?, SHA1(?))';&lt;br /&gt;$result = $db-&gt;query($sql, array($_POST['username'], $_POST['password']));&lt;br /&gt;&lt;br /&gt;?&gt;&lt;/pre&gt; &lt;h2 style="font-family: arial;"&gt;Weaknesses&lt;/h2&gt; &lt;p style="font-family: arial;"&gt;As a security measure, storing only hashes of passwords in your database will ensure that an attacker's job is made that much more difficult. Let's look at the steps they'll now take in an effort to compromise your system. Assuming that they've managed to access your user database and list of hashes, there's no way that they can then recover the original passwords to your system. Or is there?&lt;/p&gt; &lt;p style="font-family: arial;"&gt;The attacker will be able to look at your hashes and immediately know that any accounts with the same password hash must therefore also have the same password. Not such a problem if neither of the account passwords is known - or is it? A common technique employed to recover the original plain text from a hash is cracking, otherwise known as 'brute forcing'. Using this methodology an attacker will generate hashes for numerous potential passwords (either generated randomly or from a source of potential words, for example a dictionary attack). The hashes generated are compared with those in your user database and any matches will reveal the password for the user in question.&lt;/p&gt; &lt;p style="font-family: arial;"&gt;Modern computer hardware can generate MD5 and SHA-1 hashes very quickly - in some cases at rates of thousands per second. Hashes can be generated for every word in an entire dictionary (possibly including alpha-numeric variants) well in advance of an attack. Whilst strong passwords and longer pass phrases provide a reasonable level of protection against such attacks, you cannot always guarantee that your users will be well informed about such practices. It's also less than ideal that the same password used on multiple accounts (or multiple systems for that matter) will reveal itself with an identical hash.&lt;/p&gt; &lt;h2 style="font-family: arial;"&gt;Making It Better&lt;/h2&gt; &lt;p style="font-family: arial;"&gt;Both of these weaknesses in the hashing strategy can be overcome by making a small addition to our hashing algorithm. Before generating the hash we create a random string of characters of a predetermined length, and prepend this string to our plain text password. Provided the string (called a "salt") is of sufficient length - and of course sufficiently random - the resulting hash will almost certainly be different each time we execute the function. Of course we must also store the salt we've used in the database along with our hash but this is generally no more of an issue than extending the width of the field by a few characters.&lt;/p&gt; &lt;p style="font-family: arial;"&gt;When we validate a user's login credentials we follow the same process, only this time we use the salt from our database instead of generating a new random one. We add the user supplied password to it, run our hashing algorithm, then compare the result with the hash stored in that user's profile.&lt;/p&gt; &lt;pre style="font-family: arial;" class="code"&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;define('SALT_LENGTH', 9);&lt;br /&gt;&lt;br /&gt;function generateHash($plainText, $salt = null)&lt;br /&gt;{&lt;br /&gt;   if ($salt === null)&lt;br /&gt;   {&lt;br /&gt;       $salt = substr(md5(uniqid(rand(), true)), 0, SALT_LENGTH);&lt;br /&gt;   }&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;       $salt = substr($salt, 0, SALT_LENGTH);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   return $salt . sha1($salt . $plainText);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;?&gt;&lt;/pre&gt; &lt;p style="font-family: arial;"&gt;&lt;i&gt;Note: The function above is limited in that the maximum salt length is 32 characters. You may wish to write your own salt generator to overcome this limit and increase the entropy of the string.&lt;/i&gt;&lt;/p&gt; &lt;p style="font-family: arial;"&gt;Calling generateHash() with a single argument (the plain text password) will cause a random string to be generated and used for the salt. The resulting string consists of the salt followed by the SHA-1 hash - this is to be stored away in your database. When you're checking a user's login, the situation is slightly different in that you already know the salt you'd like to use. The string stored in your database can be passed to generateHash() as the second argument when generating the hash of a user-supplied password for comparison.&lt;/p&gt; &lt;p style="font-family: arial;"&gt;Using a salt overcomes the issue of multiple accounts with the same password revealing themselves with identical hashes in your database. Although two passwords may be the same the salts will almost certainly be different, so the hashes will look nothing alike.&lt;/p&gt; &lt;p style="font-family: arial;"&gt;Dictionary attacks with pre-generated lists of hashes will be useless for the same reason - the attacker will now have to recalculate their entire dictionary for every individual account they're attempting to crack.&lt;/p&gt; &lt;h2 style="font-family: arial;"&gt;Summary&lt;/h2&gt; &lt;p style="font-family: arial;"&gt;We've seen now what hashes are and why you should store them instead of the plain text passwords they represent in your database. The examples above are a starting point and will get you on the right track with using hashes in your PHP applications. A little bit of work now may well mean much less of a headache further down the track!&lt;/p&gt; &lt;h2 style="font-family: arial;"&gt;About The Author&lt;/h2&gt; &lt;p style="font-family: arial;"&gt;James McGlinn is a developer and project manager for Nerds Inc. where he provides application design, development and auditing services for a range of clients in New Zealand and abroad. PHP has been his language of choice since 1999. He is a Zend Certified Engineer and founded and facilitates the NZ PHP Users Group.&lt;/p&gt; &lt;p style="font-family: arial;"&gt;For more information he can be reached through Nerds Inc. at &lt;a href="http://nerdsinc.co.nz/"&gt;http://nerdsinc.co.nz/&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-7714121315439936133?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/7714121315439936133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=7714121315439936133' title='38 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7714121315439936133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7714121315439936133'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/password-hashing-in-php.html' title='Password Hashing in PHP'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>38</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-8140636622373631272</id><published>2007-07-30T15:56:00.000+07:00</published><updated>2007-07-30T16:00:13.159+07:00</updated><title type='text'>PHP ...PHP4 PHP5 PHP6.. PHP....</title><content type='html'>&lt;span style="font-family: arial;"&gt;PHP 5 có lớn song chưa thể nói là trưởng thành......&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Và sự kỳ vọng dồn sang PHP6....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Khi mà trên mạng có một "chiến dịch" vận động các host server chuyển&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;sang PHP5, khi mà có nhiều người ca tụng sự ưu việt của PHP5 so với&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;PHP4 (hiển nhiên), thì Matthew Mullenweg ( thường gọi là Matt), tay&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;chèo chính của ứng dụng web blog phổ biến Wordpress, có những suy nghĩ&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;rất đáng đem ra bàn cãi:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="font-family: arial;" onclick="return top.js.OpenExtLink(window,event,this)" href="http://photomatt.net/2007/07/13/on-php/" target="_blank"&gt;http://photomatt.net/2007/07&lt;wbr&gt;/13/on-php/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Matt khư khư với PHP4,  dè dặt với PHP5, không ngoan chờ đợi PHP6?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Wordpress đâu phải có chất lượng mã (code) tuyệt vời mà ngược lại.&lt;/span&gt;&lt;br /&gt;&lt;a style="font-family: arial;" onclick="return top.js.OpenExtLink(window,event,this)" href="http://mgeisler.net/2005/05/wordpress-code-quality/" target="_blank"&gt;http://mgeisler.net/2005/05&lt;wbr&gt;/wordpress-code-quality/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Nhưng chất lượng mã của Wordpress dở ẹc, việc Wordpress dùng PHP5 hay&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;không, những điều này không quan trọng, một khi Wordpress đang độc tôn&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;trong giới blog app, khi mà người dùng ưng ý, khi mà ăn dơ với nó là&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;bao nhiêu plugin viết bằng PHP4.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Thái độ của Matt có thể hiểu được.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Có những tay "sành" PHP lên tiếng diễu Matt, chê Matt là tay coder tồi&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;nhưng được cái là sành marketing nên thành công...(cái này giống Bill&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Gate). Công nghệ thì đầy khiếm khuyết nhưng sản phẩm thì chiếm lĩnh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;thị trường, có số người sử dụng đông đảo. Matt diễu lại chơi: Có giỏi&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;thì viết lại 1 blog app từ con số không, dùng PHP5 và khiến nó phổ&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;biến(popularity) như Wordpress.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;What Matt Mullenweg doesn't know about PHP5, and how it hurts him and&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;his users?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="font-family: arial;" onclick="return top.js.OpenExtLink(window,event,this)" href="http://funkatron.com/index.php/site/comments/what-matt-mullenweg-doesnt-know-about-php5-and-how-it-hurts-him-and-his-use/" target="_blank"&gt;http://funkatron.com/index.php&lt;wbr&gt;/site/comments/what-matt&lt;wbr&gt;-mullenweg-doesnt-know-about&lt;wbr&gt;-php5-and-how-it-hurts-him-and&lt;wbr&gt;-his-use/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu chuyện này khiến anh chị nghĩ gì về PHP, về nghề IT, về chuẩn mực,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;về tính chuyên nghiệp?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Dĩ nhiên Matt không phải là Rasmus hay Andy, Rasmus hay Andy cũng&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;không phải là Matt?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Và  Việt Nam KHÔNG CÓ Matt, Rasmus hay Andy. Đó là điều CHẮC CHẮN.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Quan điểm của Matt hay Mann hay ABC gì đó trong các tình huống kiểu&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;này là quan điểm của một anh bán thịt lợn trong mùa có dịch, khăng&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;khăng bảo vệ sự yên ổn của mình. Matt nghĩ gì trong đầu nhỉ (quên&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;những gì anh ta nói đi, chúng ta thử xỏ dép để đi vào đầu anh ta, nhớ&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;rửa chân :D ):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;+ PHP4 đã có lắm phiên bản. Hỗ trợ đã đủ chết nhưng giờ thì đã yên tâm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;+ PHP5 chưa có kinh nghiệm gì. Khách hàng lại tương về một đống lỗi,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;biết tính sao&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;+ Các tính năng của riêng PHP5 Matt chẳng thạo. Matt chỉ thạo những gì&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;thuộc về PHP4 và kế thừa lên PHP5. Nếu cứ dùng như vậy thì 4 hay 5 có&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;khác gì nhau. WP không dùng các tính năng của PHP5 nhưng đã được người&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;dùng hài lòng rồi. Vậy thì bước tiếp theo là giữ cho sự hài lòng đó&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;được ổn định và mở rộng số người đó ra chứ code tiếp làm gì, làm sao&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;đảm bảo được tính ổn định, làm sao đáp ứng được môi trường triển khai&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;rộng lớn và WP đâu phải là bản demo công nghệ.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Matt suy nghĩ như một cá nhân đang có được 1 chỗ đứng nhất định và cần&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;sự ổn định. Anh ta không quan tâm đến xã hội, anh ta chỉ quan tâm đến&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;chính mình và khách hàng của anh ta.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Nhưng nếu nhìn từ một tầm cao hơn thì không để PHP thì không thế được.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Tình thế của năm 2007 đã quá khác so với nhưng năm 2003, năm mà WP bắt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;đầu lên ngôi, năm mà người ta bắt đầu thấy tên tuổi của Matt và Ryan.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Năm 2007 là năm mà có một số các lập trình PHP cựu trào cố giấu đi kĩ&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;năng code PHP của mình để khoe ra kĩ năng Ruby on Rails. Tôi gọi đó là&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;thế hệ lập trình viên tự đánh mất chính mình. PHP ko phải là công nghệ&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;tồi, nhưng khi vào tay các lập trình không khá thì nó có thể trở nên&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;rất tồi và đáng ngạc nhiên là nó lại làm cho các lập trình đó tự ái&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;như thể là ngôn ngữ PHP có tội. Một lập trình viên có thể code nhiều&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;ngôn ngữ nhưng những lập trình viên tự thấy hổ thẹn vì đã từng code&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;ngôn ngữ đó thì quả là nực cười. Điều này ở VN chắc là ko có nhưng thế&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;giới thì có đấy. :D&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Năm 2007, người ta nhìn thấy &lt;/span&gt;&lt;a style="font-family: arial;" onclick="return top.js.OpenExtLink(window,event,this)" href="http://asp.net/" target="_blank"&gt;ASP.NET&lt;/a&gt;&lt;span style="font-family: arial;"&gt; phát triển què quặt, Java không&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;tương thích kịp với sự phát triển mới của web, Java framework thì như&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;thể Java developer viết cho Java developer chứ không phải là web&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;developer viết cho web developer. Python creator thì kêu Python vẫn&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;chưa dành cho web. Ruby và Rails thì gào: tao là số 1. Còn thế giới&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;PHP thì đã thay đổi chóng mặt. Người ta thì nhau nói về các mạng xã&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;hội với hàng trăm triệu hit/tháng hoặc hàng tỉ hit/tháng chạy trên nền&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;PHP. Người ta thì nhau chuẩn hóa PHP bằng các framework. Người ta quan&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;tâm đến threading, FastCGI, application server, comet, enterprise&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;service bus... trên nền PHP nhằm chữa lại hình ảnh của cộng đồng PHP&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;với đầy dãy các junior programmer vốn là chủ đề tủ của đám lập trình&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;viên Java.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Đám .NET thì ngược lại chẳng dám chê gì đám PHP vì kĩ năng của lập&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;trình .NET có hơn gì đám PHP chỉ được cái là có nhiều tool để sử dụng&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;hơn: kéo thả, built-in control.... Nhưng họ bắt đầu chơi bài: &lt;/span&gt;&lt;a style="font-family: arial;" onclick="return top.js.OpenExtLink(window,event,this)" href="http://asp.net/" target="_blank"&gt;ASP.NET&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;cũng rẻ lắm, năng suất cũng chẳng kém gì PHP :D Đúng là các đồ .NET&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;rất sẵn và rẻ trước khi họ yêu cầu chúng ta thanh toán bằng tiền mặt.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Mua một cái như Memcached hay Squid đắt phải biết đấy mà cũng chỉ chạy&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;trên Windows :D&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Đám Java vendor thì khác hơn. Oracle đẩy mạnh đóng góp cho cộng đồng&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;PHP mà thể hiện rõ nhất qua bản 10g và bản 11g mới ra mắt. IBM thừa&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;nhận PHP là ngôn ngữ của các mainframe. Sun thì tăng cường marketing&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;để thu hút người dùng PHP cài đặt Glassfish và Sun Web server thay cho&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Apache với các benchmark ấn tượng cho thấy việc triển khai PHP trên&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;nền tảng Sun web server và Glassfish có thể tăng hiệu suất đến 60%.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;BEA cũng tăng cường hỗ trợ để vận hành PHP trên nền tảng WebLogic.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;MySQL AB thì hết kiên nhẫn với đám PHP Engine Team nên đã tung ra&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Proxy hỗ trợ connection pooling.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Đầu năm 2007, Tim Bray, giám đốc các công nghệ web của Sun Microsystem&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;đã quyết định bay chuyên cơ B52 và ném bom xuống đầu các lập trình&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;viên Java bằng tuyên bố bằng PHP có tính scalibility cao hơn hẳn so&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;với Java và Ruby/Rails nhưng lại có tính maintainability kém hơn hẳn.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Điều này không gây ngạc nhiên với ai đã từng theo dõi sự thừa nhận của&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;một Java Architect chuyển sang làm dự án PHP. Ông ta đã nhận thấy rằng&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;chi phí và công sức để làm một dự án web PHP thấp hơn nhiều so với&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Java và khi triển khai vì tính scalable là cao hơn rõ rệt. Nhưng đó là&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;thế giới web, một thế giới có tính high concurrency cao, request ko có&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;độ sâu về computing, không dùng nhiều bộ nhớ, tính dùng chung thấp.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;IBM, Sun.. rõ ràng là đã nhận ra điều đó ở PHP cũng như các điểm yếu&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;của nó khi vào môi trường có độ tính toán lớn, nơi Java có thế mạnh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;cho nên họ muốn dùng PHP như là công nghệ front end và Java như là&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;công nghệ backend nơi mà Glassfish sinh ra để điều tiết.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Những dấu hiệu khác: OpenSSO phát triển PHP client song song với bản&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Java. WSO chưa bao giờ quên giới thiệu PHP client mới mỗi khi bản core&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;được cập nhật. Cho đến hiện giờ có ít nhất 2 framework giúp kết nối&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;PHP và Java trong cùng một ứng dụng&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Tất cả những điều trên chỉ để nó lên rằng xu hướng công nghiệp hóa&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;công nghệ PHP và vendor hóa cách tiếp cận ứng dụng PHP đang diễn ra&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;như một xu hướng tất yếu. Việc phát triển PHP như thể đó chỉ là ngôn&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;ngữ của các designer ko còn phù hợp. PHP4 không còn phù hợp.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Hiển nhiên là PHP4 rất tốt nhưng trong chuẩn công nghiệp của thế giới&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;phần mềm và trong con mắt của các vendor thì nó chưa hoàn hảo. Vì sao&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;nó chưa hoàn hảo? Vì nó thiếu nhất quán, nó thiếu adapt với các common&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;practice trong môi trường công nghiệp, nó vẫn khuyến khích code như&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;một designer chứ không phải là một team member.... Vậy nên phải có PHP&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;5. PHP 5.2 là rất ấn tượng. PHP6 còn ấn tượng hơn và đẩy đủ sức mạnh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;của một công nghệ công nghiệp. Nhưng chuyển từ PHP4 sang PHP 5.0 thì&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;dân tình chỉ cảm thấy khó ở. Từ PHP4 lên PHP 5.1-PHP 5.2 thì có chỗ&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;đau tức nhưng chuyển một mạch lên PHP6 thì nhiều ứng dụng chết thẳng&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;cẳng. Ko có sự chuyển biến từ từ thì coi như quay lưng lại với những&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;người đã làm nên thành công của PHP vì sự thành công ko phải chỉ do&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;tướng ta, lính tráng mà còn có du kích và hậu phương nữa.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Cái gì thành công của ngày hôm qua đều có thể là vật cản của ngày hôm&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;nay. PHP đang chịu áp lực của sự cạnh tranh lớn trước nhiều. PHP không&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;nhận được thiện cảm của giới coder công nghiệp mà PHP4 chính là lý&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;do.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Matt có thể bảo vệ được sự thành công của Wordpress nhưng không thể&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;bảo vệ sự thành công của PHP mà chính là những con người như Bergman,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Andrey, Illia, Pierce, Dmitry, Sara, Lerdorf, Dovgal, Malysev... đang&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;ôm lấy cái gốc của một cái cây lớn nơi mà hằng ngày Matt chuyền cành&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;nhảy nhót để hái quả. Đã đành rằng người ta biết đến PHP nhờ các ứng&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;dụng PHP tuyệt vời như WP, vBulletin, SimeMachines, Drupal, Open Ads,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Gallery 2... những cái mà thế giới Java, .NET thèm cũng đếch có, cố&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;làm cũng đếch làm ra gì :D nhưng mà khi bước vào thế giới vendor thì&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;cũng phải để người ta cảm thấy PHP phù hợp với lối sống của họ nữa&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;chứ. PHP4 là đã rất thành công. Nó làm được những thứ mà Java và .NET&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;không làm được. Nhưng để tiếp tục thành công, nó cần mở rộng thị&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;trường: lần này là giới công nghiệp. Giới occassional coder và&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;designer chẳng bao giờ rời bỏ PHP mà :D&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Thành công xét cho cùng là một cái gương di động nơi mà ở đó người ta&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;không nhìn thấy quá khứ, không nhìn thấy Matt, không nhìn thấy tôi hay&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;các bạn... mà chỉ thấy những người qua đường. Nếu bạn nhìn thấy tôi ở&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;đó nhưng không thấy tôi code PHP mà đang code C, Erlang hay Java thì&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;hãy cố tưởng tượng là vào thời gian rảnh tôi cũng đang đi bơm xe để&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;lấy tiền quyên góp cho sự thành công của các công nghệ nguồn mở như&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;PHP :D&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-family: arial;"&gt;Trích từ các ý kiến của nhóm người dùng PHP tại Việt Nam.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-8140636622373631272?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/8140636622373631272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=8140636622373631272' title='39 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/8140636622373631272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/8140636622373631272'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/php-php4-php5-php6-php.html' title='PHP ...PHP4 PHP5 PHP6.. PHP....'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>39</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-3906454236824595842</id><published>2007-07-28T12:23:00.000+07:00</published><updated>2007-07-28T12:24:39.138+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Hướng dẫn cài Nvu để thiết kế Web dễ dàng.</title><content type='html'>&lt;p&gt;Nvu là một môi trường tạo Web mới, dựa trên nền Mozilla và cơ chế Gecko của nó. Chủ yếu ban đầu là làm cho Linspire và các phiên bản khác của Linux. Tính hỗ trợ cao các hệ điều hành( OS) của nó cho nó trở nên khả thi với mọi OS khác. Hiện nay, Nvu đã chạy trên các OS : Window, Linux, Mac, FreeBSD.&lt;br /&gt;Nvu dựa trên Gecko, cơ chế trong Mozilla, nó là một cơ chế tiện ích chuẩn, rất tin cậy, và siêu nhanh, được bảo trì hằng ngày dựa trên sự mở rộng của cộng đồng phát triển. Nó hỗ trợ mạnh cho XML, CSS, JavaScript. Kiến trúc của nó dựa trên XUL làm cho nó được mở rộng không ngừng.&lt;br /&gt;Bây giờ bạn mở Terminal ra và khỏ vào các lệnh sau để các :&lt;br /&gt;&lt;span name="intelliTxt" id="intelliTXT"&gt; &lt;code&gt;&lt;/code&gt;&lt;blockquote&gt;sudo apt-get install nvu&lt;br /&gt;sudo rm -f /usr/share/applications/nvu.desktop&lt;br /&gt;sudo gedit /usr/share/applications/nvu.desktop&lt;br /&gt;&lt;/blockquote&gt;&lt;/span&gt;Khi bạn khỏ lệnh cuối zô thì sẽ hiện ra GEdit cho bạn sửa file, bạn thêm các dòng sau vào :&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;blockquote&gt; [Desktop Entry]&lt;br /&gt;Name=Nvu&lt;br /&gt;Comment=Web Development Editor&lt;br /&gt;Exec=nvu&lt;br /&gt;Icon=nvu.xpm&lt;br /&gt;Terminal=false&lt;br /&gt;Type=Application&lt;br /&gt;Categories=Application;Network;&lt;/blockquote&gt;  Nếu bạn muốn thấy Nvu liền thì hãy khỏ lệnh sau để refesh lại GNOME panel :&lt;br /&gt;&lt;span name="intelliTxt" id="intelliTXT"&gt;&lt;code&gt;&lt;/code&gt;&lt;blockquote&gt; killall gnome-panel&lt;/blockquote&gt;&lt;/span&gt;Sau đó bạn sẽ thấy nó ở MainMenu\Programming\Nvu.&lt;br /&gt;Chúc bạn thành công !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-3906454236824595842?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/3906454236824595842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=3906454236824595842' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3906454236824595842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3906454236824595842'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/hng-dn-ci-nvu-thit-k-web-d-dng.html' title='Hướng dẫn cài Nvu để thiết kế Web dễ dàng.'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-6637555187958335484</id><published>2007-07-25T15:50:00.000+07:00</published><updated>2007-07-25T15:54:18.140+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Wine là gì ? Cùng tìm hiểu về Wine trong Linux và Ubuntu</title><content type='html'>&lt;p&gt;&lt;span style="font-weight: bold;"&gt;    1 .Khó khăn từ Window và Linux&lt;/span&gt;&lt;br /&gt;Những pần mềm khác nhau được thiết kế cho những hệ điều hành( OS) khác nhau, và hầu như ko chạy trên những OS khác mà chúng đã được thiết kế. Dí dụ, các software xài cho Win ko chạy trên nền Linux được, bởi vì nó chứa những lệnh mà Linux ko hiểu hay ko có thư viện hỗ trợ cho tới khi nó được biên dịch trong môi trường Window. Những software của Linux cũng như zậy, Window OS ko hiểu hết những tất cả những lệnh của nó.&lt;br /&gt;Trường hợp này đã bộc lộ vấn đề cơ bản cho những ai muốn chạy chương trình trong cả 2 OS Linux và Window. Một giải pháp phổ biến cho vấn đề này là cùng cài cả 2 OS trong máy, được gọi như là "dual booting"( tam dịch là "khởi động kép"). Khi cần chạy 1 software của Window thì chuyển qua Win OS, nếu cần chạy 1 software của Linux thì bạn phải restart lại Linux OS. Lựa chọn này gây ra khó khăn lớn cho người dùng cuối bởi việc tái khởi động máy nhiều lần, những chương trình viết cho cả 2 OS ko thể chạy đồng thời. Hơn nữa những chương trình chạy trên Window thường rất mắc( cái này Vietnamese chắc ko thành vấn đề j !), yêu cầu phân vùng ổ cứng khác nhau, nên ko thể đọc hầu hết các kiểu định dang file hệ thống, làm cho việc share dữ liệu trở nên khó khăn jữa những OS.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    2. Wine là gì ?&lt;/span&gt;&lt;br /&gt;Wine làm cho những chương trình của Window có thể chạy song song với bất kì OS giống Unix và Linux nói riêng. Thực ra, Wine là một sự thực thi của thư viện Windows Application Programing Interface (API), hoạt động như 1 cầu nối juã7 Windos và Linux. Bạn hãy nghĩ Wine như 1 lớp tương thích, khi 1 software Window yêu cầu thực thi 1 hàm mà Linux ko hiểu một cách thông thường, Wine sẽ dịch lệnh của chương trình vào 1 trình hỗ trợ của nó bởi hệ thống. Cho ví dụ, nếu chương trình yêu cầu hệ thống tạo ra 1 pushbutton hay 1 trường text-edit, Wine sẽ chuyển lệnh đó thành những lệnh tương đương của Linux trong dạng 1 lệnh đến trình quản lí cửa sổ dùng giao thức chuẩn X11.&lt;br /&gt;Nếu bạn fải truy xuất mã nguồn của những chương trình Window, Wine có thể cũng được dùng để biên dịch ngược( recompile) chương trình vào 1 dạng mà Linux có thể hiểu một cách dễ dàng hơn. Wine vẫn cần bắt đầu chương trình trong dạng biên dich ngược của nó, tuy nhiên có vài ưu điểm để biên dịch chương trình Window một cách tự nhiên trong Linux.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    3.Những đặc tính của Wine :( bữa nào típ ngen)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Bài này tui được dịch từ winehq.org , các bạn có thể xem fiên bản English &lt;a href="http://binkun-linux.blogspot.com/2007/07/what-is-wine.html"&gt;tại đây&lt;/a&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-6637555187958335484?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/6637555187958335484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=6637555187958335484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6637555187958335484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6637555187958335484'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/wine-l-g-cng-tm-hu-v-wine-trong-linux-v.html' title='Wine là gì ? Cùng tìm hiểu về Wine trong Linux và Ubuntu'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-3241465464696922238</id><published>2007-07-25T15:49:00.000+07:00</published><updated>2007-07-25T15:50:02.334+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>What is Wine ?</title><content type='html'>&lt;p&gt;&lt;a name="AEN49"&gt;1.2.1. Windows and Linux&lt;/a&gt;&lt;/p&gt;&lt;div class="SECT2"&gt;&lt;p&gt; Different software programs are designed for different operating systems, and most won't work on systems that they weren't designed for. Windows programs, for example, won't run in Linux because they contain instructions that the system can't understand until they're translated by the Windows environment. Linux programs, likewise, won't run under the Windows operating system because Windows is unable to interpret all of their instructions. &lt;/p&gt;&lt;p&gt; This situation presents a fundamental problem for anyone who wants to run software for both Windows and Linux. A common solution to this problem is to install both operating systems on the same computer, known as "dual booting." When a Windows program is needed, the user boots the machine into Windows to run it; when a Linux program is then needed, the user then reboots the machine into Linux. This option presents great difficulty: not only must the user endure the frustration of frequent rebooting, but programs for both platforms can't be run simultaneously. Having Windows on a system also creates an added burden: the software is expensive, requires a separate disk partition, and is unable to read most filesystem formats, making the sharing of data between operating systems difficult. &lt;/p&gt;&lt;/div&gt;&lt;div class="SECT2"&gt;&lt;h2 class="SECT2"&gt;&lt;a name="AEN53"&gt;1.2.2. What is Wine, and how can it help me?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt; Wine makes it possible to run Windows programs alongside any Unix-like operating system, particularly Linux. At its heart, Wine is an implementation of the Windows Application Programing Interface (API) library, acting as a bridge between the Windows program and Linux. Think of Wine as a compatibility layer, when a Windows program tries to perform a function that Linux doesn't normally understand, Wine will translate that program's instruction into one supported by the system. For example, if a program asks the system to create a Windows pushbutton or text-edit field, Wine will convert that instruction into its Linux equivalent in the form of a command to the window manager using the standard X11 protocol. &lt;/p&gt;&lt;p&gt; If you have access to the Windows program's source code, Wine can also be used to recompile a program into a format that Linux can understand more easily. Wine is still needed to launch the program in its recompiled form, however there are many advantages to compiling a Windows program natively within Linux. For more information, see the Winelib User Guide. &lt;/p&gt;&lt;/div&gt;&lt;h2 class="SECT2"&gt;&lt;a name="WINE-FEATURES"&gt;1.2.3. Wine features&lt;/a&gt;&lt;/h2&gt;&lt;p&gt; Throughout the course of its development, Wine has continually grown in the features it carries and the programs it can run. A partial list of these features follows: &lt;/p&gt;&lt;p&gt;          &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt; Support for running Win32 (Win 95/98, NT/2000/XP), Win16 (Win 3.1) and DOS programs &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;                Optional use of external vendor DLL files (such as those                 included with Windows)               &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt; X11-based graphics display, allowing remote display to any X terminal, as well as a text mode console &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;                Desktop-in-a-box or mixable windows                &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;                DirectX support for games               &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;                Good support for various sound drivers including OSS and ALSA               &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;                Support for alternative input devices                &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt; Printing: PostScript interface driver (psdrv) to standard Unix PostScript print services &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;                Modem, serial device support               &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;                Winsock TCP/IP networking support               &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;                ASPI interface (SCSI) support for scanners, CD writers,                 and other devices               &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;                Advanced unicode and foreign language support               &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt; Full-featured Wine debugger and configurable trace logging messages for easier troubleshooting &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;Mình đã dịch bài này ra tiếng Việt &lt;a href="http://binkun-linux.blogspot.com/2007/07/wine-l-g-cng-tm-hu-v-wine-trong-linux-v.html"&gt;tại đây&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-3241465464696922238?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/3241465464696922238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=3241465464696922238' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3241465464696922238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3241465464696922238'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/what-is-wine.html' title='What is Wine ?'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-4163192697589367984</id><published>2007-07-25T15:48:00.000+07:00</published><updated>2007-07-25T15:49:22.427+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Convert .flv (Google Videos) to .mpg using ffmpeg</title><content type='html'>&lt;p&gt;FFmpeg is a complete solution to record, convert and stream audio and video. It includes libavcodec, the leading audio/video codec library. FFmpeg is developed under Linux, but it can compiled under most operating systems, including Windows. In ubuntu This package contains the ffplay multimedia player, the ffserver streaming server and the ffmpeg audio and video encoder. They support most existing file formats (AVI, MPEG, OGG, Matroska, ASF, …) and encoding formats (MPEG, DivX, MPEG4, AC3, DV, …). &lt;/p&gt;&lt;p&gt;&lt;strong&gt;ffmpeg Features&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;ffmpeg is a command line tool to convert one video file format to another. It also supports grabbing and encoding in real time from a TV card.&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;ffserver is an HTTP (RTSP is being developped) multimedia streaming server for live broadcasts. Time shifting of live broadcast is also supported.&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;ffplay is a simple media player based on SDL and on the FFmpeg libraries.&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;libavcodec is a library containing all the FFmpeg audio/video encoders and decoders. Most codecs were developped from scratch to ensure best performances and high code reusability.&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;libavformat is a library containing parsers and generators for all common audio/video formats.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Install ffmpeg Ubuntu&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;sudo apt-get install ffmpeg&lt;/p&gt; &lt;p&gt;&lt;strong&gt;convert .flv to .mpg using ffmpeg &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;First you need to download your .flv file to a folder and you need to Open a terminal window and go in to the .flv file folder and type the following command&lt;/p&gt; &lt;p&gt;ffmpeg -i jokes.flv -ab 56 -ar 22050 -b 500  -s 320×240 jokes.mpg&lt;/p&gt; &lt;p&gt;jokes.flv is the file you want to convert, so the name must be the same as the source file.You can name jokes.mpg whatever you want as long as it has the .mpg extension.&lt;/p&gt; &lt;p&gt;-b bitrate: set the video bitrate in kbit/s (default = 200 kb/s)&lt;/p&gt; &lt;p&gt;-ab bitrate: set the audio bitrate in kbit/s (default = 64)&lt;/p&gt; &lt;p&gt;-ar sample rate: set the audio samplerate in Hz (default = 44100 Hz)&lt;/p&gt; &lt;p&gt;-s size: set frame size. The format is WxH (default 160×128 )&lt;/p&gt;&lt;p&gt; .Mình đã dịch bài này sang tiếng Việt các bạn có thể xem &lt;a href="http://binkun-linux.blogspot.com/2007/07/dng-ffmpeg-chuyn-nh-dng-file-flv-file.html"&gt;tại đây&lt;/a&gt; .&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-4163192697589367984?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/4163192697589367984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=4163192697589367984' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/4163192697589367984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/4163192697589367984'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/convert-flv-google-videos-to-mpg-using.html' title='Convert .flv (Google Videos) to .mpg using ffmpeg'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-3460965824643440375</id><published>2007-07-23T11:17:00.001+07:00</published><updated>2007-07-23T21:36:36.731+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>FFmpeg</title><content type='html'>&lt;p&gt;FFmpeg là 1 giải pháp khá tốt để ghi âm, chuyển đổi kiểu file, hay nghe stream audio-video. FFmpeg bao gồm cả libavcode, đang là 1 thư viện mã hàng đầu về audio/video. FFmpeg được phát triển trên Linux, nhưng nó có thể được biên dịch ở tất cả các hệ điều hành, kể cả Win. Trong Ubuntu, gói này chứa các thành phần sau: ffplay multimedia player, ffserver streaming server, ffmpeg audio và video encoder. Chúng hỗ trợ hầu hết các kiểu định dạng file (AVI, MPEG, OGG, Matroska, ASF, …) và các kiểu định dạng mã (MPEG, DivX, MPEG4, AC3, DV, …).&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Những đặc tính của FFmpeg : &lt;/span&gt;&lt;br /&gt;Đây là công cụ dòng lệnh để chuyển đổi định dạng video sang các kiểu khác. Nó cũng hỗ trợ cả việc ghi lại và mã hoá theo thời gian thực từ card TV.&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;ffserver là HTTP (RTSP đang được phát triển) multimedia streaming server cho truyền thông trực tiếp. Sự thay đổi thời gian của truyền thông trực tiếp cũng được hỗ trợ.&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;ffplay là một trình nghe nhạc đơn giản dựa trên SDL và trên những thư viện FFmpeg.&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;libavcodec là một thư viện chứa tất cả những phương pháp mã hoá và giải mã FFmpeg audio/video.Hầu hết các mã được pát triển từ đầu để chắc chắn chạy tốt nhất và việc tái sử dụng mã cao.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;libavformat là một thư viện chứa những kiểu phân tích và khai sinh cho tất cả những định dạng audio/video phổ biến.&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;Cài ffmpeg Ubuntu :&lt;br /&gt;&lt;/strong&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;&lt;blockquote&gt;sudo apt-get install ffmpeg&lt;/blockquote&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;Chuyển .flv sang .mpg dùng ffmpeg&lt;br /&gt;&lt;/strong&gt;&lt;p&gt;Trước tiên, bạn cần down file .flv vào thư mục. Mở Teminal lên và chuyển vào thư mục chứa file .flv hồi nãy, rồi gõ lệnh này:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;ffmpeg -i tên_file_gốc.flv -ab 56 -ar 22050 -b 500  -s 320×240 tên_file_kết_quả.mpg&lt;/p&gt;  &lt;p&gt;-b bitrate: thiết lập độ nén trên kbit/s (mặc định = 200 kb/s)&lt;/p&gt; &lt;p&gt;-ab bitrate: thiết lập độ nén audio trên kbit/s (mặc định = 64)&lt;/p&gt; &lt;p&gt;-ar sample rate: thiết lập tỉ lệ audio mẫu trên Hz (mặc đinh = 44100 Hz)&lt;/p&gt; &lt;p&gt;-s size: thiết lập kích thước khung. Định dạng là WxH(Rộngx Cao) (mặc định 160×128 )&lt;br /&gt;&lt;/p&gt;Chúc bạn thành công !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-3460965824643440375?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/3460965824643440375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=3460965824643440375' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3460965824643440375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3460965824643440375'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/1-unix-gia-nm-1969-1970-kenneth.html' title='FFmpeg'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-3807752480138144099</id><published>2007-07-23T11:16:00.000+07:00</published><updated>2007-07-23T11:17:01.376+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Lịch sử Unix, Linux và phần mềm mã nguồn mở-miễn phí</title><content type='html'>&lt;h4&gt;1. Unix&lt;/h4&gt; &lt;p&gt;Giữa năm 1969 - 1970, Kenneth Thompson, Dennis Ritchie và những người khác của phòng thí nghiệm AT&amp;T Bell Labs bắt đầu phát triển một hệ điều hành nhỏ dựa trên PDP-7. Hệ điều hành này sớm mang tên Unix, một sự chơi chữ từ một dự án hệ điều hành có từ trước đó mang tên MULTICS. Vào khoảng 1972 - 1973, hệ thống được viết lại bằng ngôn ngữ C và thông qua quyết định này, Unix đã trở thành hệ điều hành được sử dụng rộng rãi nhất có thể chuyển đổi được và không cần phần cứng ban đầu cho nó. Các cải tiến khác cũng được thêm vào Unix trong một phần của sự thoả thuận giữa AT&amp;amp;T Bell Labs và cộng đồng các trường đại học và học viện. Vào năm 1979, phiên bản thứ 7 của Unix được phát hành, đó chính là hệ điều hành gốc cho tất cả các hệ thống Unix có hiện nay.&lt;/p&gt;&lt;p&gt;Sau thời điểm đó, lịch sử Unix bắt đầu trở nên hơi phức tạp. Cộng đồng các trường đại học và học viện, đứng đầu là Berkeley, phát triển một nhánh khác gọi là Berkeley Software Distribution (BSD), trong khi AT&amp;T tiếp tục phát triển Unix dưới tên gọi là “Hệ thống III” và sau đó là “Hệ thống V”. Vào những năm cuối của thập kỷ 1980 cho đến các năm đầu thập kỷ 1990, một “cuộc chiến tranh” giữa hai hệ thống chính này đã diễn ra hết sức căng thẳng. Sau nhiều năm, mỗi hệ thống đi theo những đặc điểm khác nhau. Trong thị trường thương mại, “Hệ thống V” đã giành thắng lợi (có hầu hết các giao tiếp theo một chuẩn thông dụng) và nhiều nhà cung cấp phần cứng đã chuyển sang “Hệ thống V” của AT&amp;amp;T. Tuy nhiên, “Hệ thống V” cuối cùng đã kết hợp các cải tiến BSD, và kết quả là hệ thống đã trở thành sự pha trộn của 2 nhánh Unix. Nhánh BSD không chết, thay vào đó, nó đã được sử dụng rộng rãi trong mục đích nghiên cứu, cho các phần cứng PC, và cho các server đơn mục đích (vd: nhiều website sử dụng một nguồn BSD).&lt;/p&gt;&lt;p&gt;Kết quả là có nhiều phiên bản Unix khác nhau, nhưng tất cả đều dựa trên phiên bản thứ bảy ban đầu. Hầu hết các phiên bản Unix đều thuộc quyền sở hữu và được bảo vệ bởi từng nhà cung cấp phần cứng tương ứng, ví dụ Sun Solaris là một phiên bản của “Hệ thống V”. Ba phiên bản của BSD của nhánh Unix cuối cùng đã trở thành mã nguồn mở: FreeBSD (tập trung vào sự cài đặt dễ dàng trên phần cứng của dòng máy PC), NetBSD (tập trung vào nhiều kiến trúc CPU khác nhau) và một bản khác của NetBSD, OpenBSD (tập trung vào bảo mật).&lt;/p&gt;&lt;h4&gt;2. Tổ chức phần mềm miễn phí (Free Software Foundation)&lt;/h4&gt; &lt;p&gt;Vào năm 1984, Tổ chức phần mềm miễn phí (FSF) của Richard Stallman bắt đầu dự án GNU, một dự án tạo ra một phiên bản miễn phí của hệ điều hành Unix. Miễn phí, theo Richard Stallman nghĩa là tự do sử dụng, đọc, chỉnh sửa và phân phối lại. FSF đã thành công trong việc xây dựng một lượng khổng lồ các thành phần hữu ích, bao gồm một trình biên dịch C (gcc), một trình hiệu chỉnh văn bản khá ấn tượng (emacs) và một loạt các công cụ cơ bản. Tuy nhiên, vào những năm 1990, FSF đã gặp khó khăn trong việc phát triển kernel hệ điều hành [FSF 1998] mà nếu không có kernel này thì giấc mơ hoàn thành một hệ điều hành miễn phí của họ sẽ không thể hoàn tất.&lt;/p&gt;&lt;h4&gt;3. Linux&lt;/h4&gt; &lt;p&gt;Vào năm 1991, Linus Tovalds bắt đầu phát triển một kernel hệ điều hành, lấy tên của anh ta “Linux” [Tovalds 1999]. Kernel này có thể kết hợp với các tài liệu của FSF và các thành phần khác (cụ thể là một vài thành phần của BSD và phần mềm MIT của X-Windows) để có thể giới thiệu một hệ điều hành vô cùng hữu ích và có thể tự do chỉnh sửa.&lt;/p&gt;&lt;p&gt;Trong cộng đồng Linux, nhiều tổ chức khác nhau đã kết hợp các thành phần khác có sẵn. Mỗi một sự kết hợp đó được gọi là một bản phân phối (distribution) và các tổ chức phát triển các bản phân phối đó gọi là các nhà phân phối (distributors). Các bản phân phối thông dụng gồm có Linux Red Hat, Mandrake, SuSE, Caldera, Corel và Debian. Có những sự khác nhau giữa các bản phân phối đó, nhưng tất cả các bản phân phối đó đều dựa trên cùng nền tảng: kernel của Linux và các thư viện của GNU. Cả hai thứ đã kết hợp lại tạo thành một giấy phép kiểu “copyleft”, thay đổi những nền tảng cơ bản này phải được làm sẵn cho tất cả, một sự bắt buộc thống nhất giữa các bản phân phối Linux mà điều này không hề có trên BSD và các hệ thống Unix kế thừa từ AT&amp;amp;T.&lt;/p&gt;&lt;h4&gt;4. Phần mềm miễn phí / Phần mềm mã nguồn mở&lt;/h4&gt;Sự quan tâm đến các phần mềm miễn phí được chia sẻ ngày càng tăng đã làm tăng sự cần thiết phải chỉnh sửa nó. Điều kiện được sử dụng rộng rãi là “Phần mềm mã nguồn mở” đã được định nghĩa trước đó. Phần mềm mã nguồn mở là những phần mềm được sử dụng mà mã nguồn được cung cấp nhưng không có sự giới hạn về bản quyền: người dùng có quyền sử dụng, xem, sửa đổi hay phân phối mã nguồn. Nó khác với những điều kiện của “Phần mềm miễn phí”. Phần mềm miễn phí thường gây rắc rối với những chương trình chỉ thực thi theo cách cho trước và không thay đổi được, cũng như mã nguồn không được xem, không được chỉnh sửa cũng như không được phân phối. Các bạn có thể đọc thêm về định nghĩa phần mềm miễn phí ở &lt;a href="http://www.opensource.org/osd.html" target="_blank"&gt;http://www.opensource.org/osd.html&lt;/a&gt;&lt;br /&gt;&lt;p class="pBody"&gt;Richard Stallmann, người đi tiên phong trong việc chống lại sự sở hữu phần mềm “làm của riêng” đã đưa khái niệm này ra trong dự án GNU hồi năm 1984. Theo Richard Stallmann một Free software phải đem đến cho người sử dụng các quyền tự do sau đây:&lt;/p&gt; &lt;p class="pBody"&gt;+ Quyền tự do 1: Tự do chạy chương trình vì bất kỳ lý do gì.&lt;/p&gt; &lt;p class="pBody"&gt;+ Quyền tự do 2: Tự do nghiên cứu chương trình làm việc như thế nào, được phép sửa đổi cho phù hợp với nhu cầu của người dùng cụ thể. Mã nguồn mở là điều kiện tiên quyết cho quyền tự do này&lt;/p&gt; &lt;p class="pBody"&gt;+ Quyền tự do 3: Tự do phân phối các bản sao để giúp đỡ những người khác có nhu cầu.&lt;/p&gt; &lt;p class="pBody"&gt;+ Quyền tự do 4: Tự do cải tiến chương trình và đưa sự cải tiến này ra cho cộng đồng cùng hưởng lợi. Đương nhiên, mã nguồn mở là điều kiện tiên quyết. Stallmann và những người ủng hộ đã dùng Free software để đối lập với proprietary software (phần mềm sở hữu riêng). Phần mềm sở hữu riêng cấm đoán người khác chỉnh sửa và phân phối lại, nó là tài sản và là bí mật riêng của cá nhân, công ty, tổ chức.&lt;/p&gt; &lt;p class="pBody"&gt;Tuy nhiên Free software không nhất thiết phải là Freeware, nghĩa là không nhất thiết phải miễn phí. Stallmann nhắc đi nhắc lại ”free” trong từ “free software” không phải là không tốn tiền mà là có tự do (“free as in free speech not as in free bear”), đặc biệt là quyền được thay đổi và đóng góp cho cộng đồng qua việc có thể nắm được mã nguồn của chương trình. &lt;/p&gt; &lt;p class="pBody"&gt;Vì vậy, tính chất mã nguồn mở của chúng (open source) là khác biệt rất quan trọng với phần mềm đóng (close source), cho dù phần mềm đóng có miễn phí hay không.&lt;/p&gt; &lt;p class="pBody"&gt;Tất nhiên, phần mềm mã nguồn mở luôn rẻ hơn phần mềm đóng vì việc chỉnh sửa sẽ ít tốn công sức hơn việc tạo mới từ đầu. Một khía cạnh khác của mã nguồn mở là tính an ninh trong sử dụng. &lt;/p&gt; &lt;p class="pBody"&gt;Phần mềm mã nguồn mở mà điển hình là Linux với các bản phân phối thương mại như Red Hat là một ví dụ chứng minh cho tư tưởng free software và tính khả thi của tư tưởng này.&lt;/p&gt; &lt;p class="pBody"&gt;Đáng buồn là ở nước ta, khi nghĩ đến …WARE thì đại đa số người dùng đồng nghĩa hóa nó với “xài chùa”. Phần mềm tự do, cụ thể là những phần mềm mã nguồn mở là lối thoát hầu như duy nhất cho một đất nước đang phát triển. Là đối trọng đáng kể cho những phần mềm thương mại của các đại gia phải biết điều (Microsoft đã phải hạ giá bán, phải công bố một số mã nguồn trước áp lực của free software).&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-3807752480138144099?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/3807752480138144099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=3807752480138144099' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3807752480138144099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3807752480138144099'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/lch-s-unix-linux-v-phn-mm-m-ngun-m-min.html' title='Lịch sử Unix, Linux và phần mềm mã nguồn mở-miễn phí'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-428205033723598407</id><published>2007-07-23T11:15:00.000+07:00</published><updated>2007-07-23T21:34:42.411+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Cài XAMPP(Linux, Apache, MySQL, PHP, Perl) cho Ubuntu</title><content type='html'>&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Bước 1: Download&lt;/span&gt; &lt;a class="link" href="http://www.apachefriends.org/download.php?xampp-linux-1.6.2.tar.gz"&gt;XAMPP Linux 1.6.2&lt;/a&gt;&lt;br /&gt;Lưu ý : nếu bạn download trong Window thì nên tắt chương trình McAfee đi, nếu nó đang chạy thì bạn sẽ gặp báo lỗi virus, chỉ có vấn đề đó.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Bước 2: Cài đặt&lt;br /&gt;&lt;/span&gt;Sau khi download xong bạn mở Terminal ra, gõ các lệnh sau:&lt;br /&gt;1. Bạn nên login vào với wuyền root với lệnh sau :&lt;br /&gt; &lt;span style="color: rgb(51, 204, 255);"&gt;su&lt;/span&gt;&lt;br /&gt;rồi nhập password. Để giải nén file vừa down về, bạn vào thư mục chứa file đó, rồi gõ lệnh sau để bung nó ra vào folder /opt&lt;br /&gt;  &lt;tt style="color: rgb(51, 204, 255);"&gt;tar xvfz xampp-linux-1.6.2.tar.gz -C /opt&lt;/tt&gt;&lt;br /&gt; Chú ý :&lt;br /&gt;* Nếu bạn đã cài các version cũ của XAMPP thì các lệnh trên sẽ ghi đè lên.&lt;br /&gt;F...ù ! Zậy là xong. XAMPP đã được cài vào folder /opt/lampp .&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Bước 3 : Khởi động lên.&lt;/span&gt;&lt;br /&gt;Nhập lệnh sau để khởi động :&lt;br /&gt;  &lt;tt style="color: rgb(51, 204, 255);"&gt;/opt/lampp/lampp start&lt;/tt&gt;&lt;br /&gt;Bạn sẽ nhìn thấy những dòng sau trên màn hình :&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;tt&gt; Starting XAMPP 1.6.2...&lt;br /&gt;LAMPP: Starting Apache...&lt;br /&gt;LAMPP: Starting MySQL...&lt;br /&gt;LAMPP started.&lt;/tt&gt;&lt;br /&gt;&lt;/blockquote&gt;MySQL và Apache đã chạy rồi.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Bước 4 : Kiểm tra&lt;/span&gt;&lt;br /&gt;Cài đặt thiệt là dễ phải ko các bạn. Nhưng làm sao mình biết là đã thành công và sẵn sàng làm việc rồi ? Hãy gõ vào web browser quen thuộc của bạn như sau :&lt;br /&gt;   &lt;tt&gt;http://localhost&lt;br /&gt;Bạn sẽ thấy màn hình như sau :&lt;br /&gt;&lt;/tt&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_AsD3tdEP1wA/RqNbtijgcTI/AAAAAAAAAA8/0pmbsdTJhQU/s1600-h/380.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 494px; height: 342px;" src="http://bp3.blogger.com/_AsD3tdEP1wA/RqNbtijgcTI/AAAAAAAAAA8/0pmbsdTJhQU/s400/380.jpg" alt="" id="BLOGGER_PHOTO_ID_5090012841786765618" border="0" /&gt;&lt;/a&gt;Vậy là hoàn thành rồi, bạn có thể tự tìm hiểu thêm và tui cũng zậy. Hẹn gặp lại sau !!!&lt;br /&gt;Ps: Thư mục gốc của web server sẽ là /opt/lampp/htdocs ;).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-428205033723598407?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/428205033723598407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=428205033723598407' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/428205033723598407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/428205033723598407'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/ci-xampplinux-apache-mysql-php-perl-cho.html' title='Cài XAMPP(Linux, Apache, MySQL, PHP, Perl) cho Ubuntu'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_AsD3tdEP1wA/RqNbtijgcTI/AAAAAAAAAA8/0pmbsdTJhQU/s72-c/380.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-1157005540704406373</id><published>2007-07-19T00:08:00.000+07:00</published><updated>2007-07-21T18:12:55.646+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Cùng làm đẹp cho giao diện Ubuntu, phần con trỏ chuột và SplashScreen</title><content type='html'>Trước đây, xài Win chúng ta có thể dễ dàng thay đổi các thiết lập cho giao diện nguời dùng ( GUI) như hình dạng mouse, các themes cho cửa sổ, hộp thoại( dialog)... Bên Ubuntu thì phải làm thế nào nhỉ. Hôm nay xin post một bài hướng dẫn lên đây chia sẻ cùng các bạn blog kĩ thuật nhỏ này ( bạn nào pro rồi đừng cười nhé !).&lt;br /&gt;&lt;br /&gt;1. Các kiểu dáng con trỏ chuột ( Mouse cursor theme) :&lt;br /&gt;Nếu bạn download các gói ( package) thì cách dễ dàng là nên save ở Desktop( /home/username/Desktop ) Cài package gcursor bằng Synaptic Package Manager hay vào Terminal gõ lệnh app-get.&lt;br /&gt;&lt;br /&gt;* Synaptic : MainMenu\System\Administration&lt;br /&gt;Check vào Apply ròi nó sẽ update cho bạn.&lt;br /&gt;&lt;br /&gt;    * Terminal : MainMenu\Accessories\Terminal&lt;br /&gt;gõ lệnh : &lt;span style="color:Red;"&gt;sudo aptitude install gcursor&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;Bây giờ, bạn mở &lt;/span&gt;&lt;/span&gt;MainMenu\System\System sẽ thấy mục Cursor Selection, chọn nó sẽ show ra dialog như hình sau :&lt;br /&gt;    &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_AsD3tdEP1wA/Rp2lQzFTkmI/AAAAAAAAAA0/Yz3JCyPhc8g/s1600-h/Screenshot-Xcursor+Selector.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="file:///media/sda8/tempSave/temLinux/OpenSource%20:%20Linux%20-%20Ubuntu_files/Screenshot-XcursorSelector.png" alt="" id="BLOGGER_PHOTO_ID_5088404862007480930" border="0" /&gt;&lt;/a&gt;Bạn hãy chọn các kiểu con trỏ mình thích, chỉnh size cho cursor, ròi Close là xong.&lt;br /&gt;&lt;br /&gt;À, nhưng bạn có muốn cài thêm các kỉu con trỏ đẹp ko !!! Dĩ nhiên rồi ;)i.&lt;br /&gt;Các bạn có thể down về &lt;a href="http://www.gnome-look.org/index.php?xsortmode=down&amp;page=0&amp;amp;xcontentmode=36&amp;PHPSESSID=4d3142bcb5cc4222db0821fc1e9be6fb"&gt;tại đây&lt;/a&gt;&lt;br /&gt;&lt;span style="color:Red;"&gt;     &lt;span style="color: rgb(0, 0, 0);"&gt;Khi down về bạn cần nhớ save ở đâu. Bạn giải nén (extract) nó ra, chép 2 folder default và 1 folder có tên của theme vào folder /home/username/.icons ( username là tên account của bạn trong Ubuntu). Vậy là xong đó, bạn hãy mở Cursor Selection lại lần nữa sẽ thấy có Theme mà bạn mới cài.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Bây giờ, mình chỉnh tiếp Splash Screen. Tui cũng ko biết định nghĩa Splash Screen là gì, nói theo tui hiểu là vầy, nó là ảnh đầu tiên hiện ra khi chúng ta khởi động vào Ubuntu và gõ xong password và username. Thực ra tui thấy có lẽ việc hiệu chỉnh này ko ảnh hưởng gì tới "dung nhan" Ubuntu của mình, tại vì nó chỉ show lên khi Startup thôi. Nhưng chúng ta có thể đưa hình yêu thích của mình show lên( khoe "chân dung" của mình chẳng hạn).&lt;br /&gt;Bạn có 2 cách để thêm cái này vào : Synaptic Package Manager hay Terminal cũng được( cách mở 2 anh này các bạn có thể coi &lt;a href="http://binkun-linux.blogspot.com/2007/07/cng-lm-p-cho-jao-din-ubuntu-fn-con-tr.html"&gt;ở đây&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;*Synaptic : bạn chọn &lt;span style="color: rgb(51, 204, 255);"&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;gnome-splashscreen-manager&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;ròi Apply thoi&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;*Terminal : khỏ zô &lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;sudo apt-get install gnome-splashscreen-manager&lt;/span&gt;&lt;br /&gt;Bây giờ bạn mở MainMenu\System\System sẽ thấy mục Splash Screen. Các bạn có thể chèn các hình tuỳ thích vào, hay lên mạng down các Splash Screen mà người ta design sẵn rất đẹp cho mình &lt;a href="http://www.gnome-look.org/index.php?xsortmode=down&amp;page=0&amp;amp;xcontentmode=160"&gt;tại đây&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-1157005540704406373?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/1157005540704406373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=1157005540704406373' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/1157005540704406373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/1157005540704406373'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/cng-lm-p-cho-jao-din-ubuntu-fn-con-tr.html' title='Cùng làm đẹp cho giao diện Ubuntu, phần con trỏ chuột và SplashScreen'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-5588120246499001998</id><published>2007-07-17T18:42:00.000+07:00</published><updated>2007-07-21T18:15:34.350+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Xoá file trong Trash, tăng dung lượng cho ổ cứng</title><content type='html'>&lt;span style="font-family:times new roman;"&gt; Hôm nay, tui đọc File Manager một chút, vô tình thấy Trash folder sao nhiều file và folder cũ quá. Thì ra khi chúng ta delete các file, folder, nó ko mất hẳn, mà chuyển vào Trash (giống Recycle Bin trong Windows). Nhưng trong Win, nếu mình muốn xoá ko cần khôi phục thì chỉ cần nhấn Shift-Del là ko lưu vào Recycle Bin rồi, nhưng trong Ubuntu thì tui cũng chưa biết có chiêu nào ko. Rất mong có bạn nào chỉ giáo dùm.&lt;br /&gt;&lt;br /&gt;    Mình tìm trên mạng thì thấy có lệnh này để xoá file, nhưng trong Terminal thôi( mệt thiệt ! ) , mở Terminal lên rồi gõ:&lt;blockquote&gt;  sudo rm -fr $HOME/.Trash/&lt;/blockquote&gt;Các bạn nên lâu lâu vào dọn rác 1 lần, ko thôi ko boot được đó( HDD full)&lt;br /&gt;    Chúc các bạn thành công !&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-5588120246499001998?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/5588120246499001998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=5588120246499001998' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/5588120246499001998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/5588120246499001998'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/xo-file-trong-trash-tng-dung-lng-cho.html' title='Xoá file trong Trash, tăng dung lượng cho ổ cứng'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-2191522026698225175</id><published>2007-07-16T22:48:00.000+07:00</published><updated>2007-07-16T23:05:29.404+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP MySQL'/><title type='text'>Tự học PHP (bài 2): CÚ PHÁP CĂN BẢN</title><content type='html'>&lt;span style="font-family: arial;"&gt;CÚ PHÁP CĂN BẢN&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Để có thể làm theo các ví dụ trên bạn tạo các file ví dụ và chép vào thư mục htdocs trong thư mục Xampp là thư mục cài đặt, bạn nhớ khởi động Apache và MySQL trước khi thực hành nha.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Trang PHP là 1 trang HTML có nhúng mã PHP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Để minh hoạ cho điều này, ta hãy xem qua một số ví dụ sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ví dụ 1: lưu file sau lên đĩa với tên vd1.php và chạy thử:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;body&amp;gt;&amp;lt;?php echo "Hello, world!"; ?&amp;gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Bạn sẽ nhận được 1 trang HTML mà khi view source bạn xẽ nhận được nội dung như sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;body&amp;gt;Hello, World!&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ví dụ 2: lưu file sau lên đĩa với tên vd2.php và chạy thử:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php echo "&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;body&amp;gt;Hello, world!&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;/html&amp;gt;"; ?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Bạn cũng nhận được 1 trang HTML có source là:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;body&amp;gt;Hello, World!&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Như vậy có thể nhận xét rằng 1 trang PHP cũng chính là 1 trang HTML có nhúng mã PHP ở bên trong và có phần mở rộng là .php. Phần mã PHP được đặt trong thẻ mở &amp;lt;?php và thẻ đóng ?&amp;gt;. Khi trình duyệt truy cập vào 1 trang PHP, server sẽ đọc nội dung file PHP lên, lọc ra các đoạn mã PHP, thực thi các đoạn mã đó, lấy kết quả xuất ra của các đoạn mã PHP thay thế vào chỗ ban đầu của chúng trong file PHP, cuối cùng server trả về kết quả cuối cùng là 1 trang nội dung HTML về cho trình duyệt.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ở ví dụ 1 bên trên, server thực thi đoạn mã &amp;lt;?php echo "Hello, world!"; ?&amp;gt;, đoạn mã này sẽ xuất ra dòng chữ Hello, world!, dòng chữ này sẽ được server thay thế ngược lại vào vị trí của đoạn mã PHP và trả về kết quả cuối cùng cho trình duyệt:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;body&amp;gt;Hello, World!&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Như vậy thì ta hoàn toàn có thể tạo ra 1 file vd3.php với nội dung như sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;body&amp;gt;Hello, World!&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Và file này vẫn chạy được ngon lành, không có vấn đề gì hết!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Lệnh echo dùng để xuất 1 chuỗi văn bản về trình duyệt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ở các ví dụ bên trên, ta đã dùng 1 lệnh của PHP là lệnh echo. Lệnh này dùng để xuất 1 chuỗi văn bản về cho trình duyệt.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ví dụ câu lệnh echo "Hello, world!"; trình duyệt sẽ nhận được chỗi văn bản Hello, world!.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh echo 1+2; sẽ trả về cho trình duyệt chỗi văn bản 3.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Và câu lệnh echo 1+2, "Hello, world!"; sẽ trả về trình duyệt chỗi 3Hello, world!.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Phân cách các lệnh bằng dấu chấm phảy (;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Tương tự như các ngôn ngữ lập trình C hoặc Pascal, 1 câu lệnh của PHP được kết thúc bằng dấu chấm phảy (;). Ví dụ:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo 1+2;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Hello, world!";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Chú thích trong chương trình&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Các chú thích không phải là mã chương trình, nhưng nó giúp ta ghi chú về 1 đoạn chương trình nào đó. Khi lập trình, bạn nên để các ghi chú vào trong chương trình để sau này khi đọc lại code, bạn sẽ nhanh chóng nắm bắt được nội dung và ý nghĩa của đoạn chương trình đã biết.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;PHP cho phép ta ghi 2 loại chú thích: chú thích trên 1 dòng (chú thích loại này chỉ có thể ghi trên 1 dòng mà thôi), và chú thích nhiều dòng (chú thích loại này có thể ghi dài bao nhiêu cũng được).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Chú thích 1 dòng được bắt đầu bằng // hoặc #, và những gì được ghi từ đó về sau là chú thích. Chú thích nhiều dòng được bắt đầu bằng /* và kết thúc bằng */, những gì ở giữa là chú thích. Ví dụ:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;//Đây là chú thích 1 dòng, đoạn chương trình sau sẽ in ra chuỗi 123&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo 123;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;#Đây cũng là chú thích 1 dòng, đoạn chương trình sau sẽ in ra chuỗi abc&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "abc";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;/*&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Đây là chú thích nhiều dòng&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Đoạn chương trình sau sẽ in ra chuỗi abc123&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "abc123";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;----------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;KIỂU DỮ LIỆU&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;PHP hỗ trợ 8 kiểu dữ liệu chính:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;4 kiểu dữ liệu vô hướng: boolean, integer, float (double), string.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;2 kiểu dữ liệu tổ hợp: array, object.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;2 kiểu dữ liệu đặt biệc: resource, NULL.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểu Boolean&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểu boolean mang 1 trong 2 giá trị TRUE (đúng) hoặc FALSE (sai). Ví dụ:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$a = TRUE;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$b = FALSE;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;//phép toán == kiểm tra xem 2 biểu thức có giá trị bằng nhau hay không&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$c = (1==2); //vì 1 khác 2 nên $c mang giá trị FALSE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$d = ("abc" == "def"); //$d mang giá trị TRUE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;"Ép" kiểu sang boolean: một số giá trị được chuyển đổi thành FALSE trong các biểu thức boolean nếu như giá trị đó là:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;số nguyên 0,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;số thực 0.0,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;chuỗi rỗng "", hoặc chuỗi "0",&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;mảng rỗng (không chứa phần tử nào) Array(),&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;đối tượng không chứa phần tử nào (chỉ đúng với PHP4),&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;giá trị NULL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Các giá trị còn lại sẽ được chuyển đổi thành TRUE.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểu Integer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểu integer mang các giá trị số nguyên ..., -2, -1, 0, 1, 2, ...Trên hầu hết các hệ thống, kiểu số nguyên có kích thước 32 bit, mang giá trị từ -2147483647 cho đến 2147483648. Ví dụ:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$a = 1234;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$b = -123;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$c = 0123; //giá trị 123 ở hệ cơ số 8, tương đương với 83 ở hệ cơ số 10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$d = 0x1F; //giá trị 1F ở hệ cơ số 16, tương đương với 31 ở hệ cơ số 10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểu Float (Double)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểu float (hoặc double) là kiểu số thực, có thể mang bất cứ giá trị số thực nào. Trên hầu hết các hệ thống, kiểu số thực có kích thước 64 bit. Ví dụ:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$a = 1.234;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$b = 1.2e3; //= 1.2*10^3 = 1200&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$c = 7E-10; //= 7*(10^-10) = 0.0000000007&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$d = -1.23;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểu String&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểu string lưu giữ 1 chuỗi ký tự, mỗi ký tự có kích thước 1 byte. Nội dung string được đặt giữa 2 dấu nháy, nháy đơn (') hoặc nháy kép ("). Ví dụ&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$a = 'Đây là 1 chuỗi được đặt giữa dấu nháy đơn';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$b = "Đây là 1 chuỗi được đặt giữa dấu nháy kép";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$c = 'Đây là 1 chuỗi được đặt giữa dấu nháy đơn với "vài dấu nháy kép ở giữa"';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$d = "Đây là 1 chuỗi được đặt giữa dấu nháy kép với 'vài dấu nháy đơn ở giữa'";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Nếu bạn muốn sử dụng dấu nháy đơn ở trong 1 chuỗi được bọc bởi dấu nháy đơn, hoặc sử dụng dấu nháy kép đặt giữa chuỗi được bọc bởi dấu nháy kép thì bạn để thêm ký tự \ (gọi là ký tự escape) ở phía trước. Ví dụ:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$a = 'Dấu \'nháy đơn\' ở giữa chuỗi'; //$a mang giá trị: Dấu 'nháy đơn' ở giữa chuỗi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$b = "Dấu \"nháy kép\" ở giữa chuỗi"; //$b mang giá trị: Dấu "nháy kép" ở giữa chuỗi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$c = "Dùng ký tự \\ ở giữa câu \\ thì sao?"; //$c mang giá trị: Dùng ký tự \ ở giữa câu \ thì sao?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Khi sử dụng dấu nháy đôi để bọc chuỗi, ngoài \', \" và \\, PHP có thể nhận dạng thêm một số chuỗi ký tự escape đặt biệc nữa:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;\n: ký tự xuống hàng LF (ký tự có mã 10 trong bảng mã ASCII)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;\r: ký tự về đầu dòng CR (ký tự có mã 13 trong bảng mã ASCII)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;\t: ký tự tab (ký tự có mã 9 trong bảng mã ASCII)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;\$: ký tự $&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;\ooo: (với o là 1 chữ số từ 0 đến 7) biểu thị 1 ký tự có mã ASCII ooo trong hệ cơ số 8.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ví dụ \101 sẽ là ký tự 'A' (101 trong hệ cơ số 8 tương đương 65 trong hệ cơ số 10, ký tự ASCII có mã 65 chính là ký tự 'A').&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;\xhh: (với h là 1 chữ số từ 0 đến 9 hoặc 1 chữ cái từ A tời F) biểu thị 1 ký tự có mã ASCII hh trong hệ cơ số 16.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ví dụ \0x41 sẽ là ký tự 'A' (41 trong hệ cơ số 16 chính là 65 trong hệ cơ số 10).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ngoài ra, nếu bạn để 1 biến vào giữa 1 chuỗi được bọc với dấu nháy kép, giá trị của biến sẽ được thay thế vào trong chuỗi. ví dụ:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$a = 1;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$b = 2;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$c = 3;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$d = "$a $b $c"; //$d sẽ mang giá trị là chuỗi "1 2 3"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểu Array&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Array là một mảng gòm nhiều phần tử. Array được tạo qua lệnh Array. Ví dụ:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$a = Array(1,2,3);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Lúc này $a sẽ là 1 mảng gồm 3 phần tử số nguyên là 1, 2 và 3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Các phần tử trong mảng $a được tạo ở trên sẽ được đánh số thứ tự từ 0, 1 cho đến 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Để truy cập tới từng phần tử của $a&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo $a[0]; //in ra giá trị 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo $a[2]; //in ra giá trị 3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$a[1] = 5; //giờ đây $a = Array(1,5,3)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Mảng còn có thể được tạo thành bởi các cặp (khoá, giá trị). Ví dụ:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$a = Array(&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;"khoá 1" =&amp;gt; "giá trị 1",&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;"khoá 2" =&amp;gt; "giá trị 2",&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;"khoá 3" =&amp;gt; "giá trị 3"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo $a["khoá 1"]; //in ra: giá trị 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$b = Array(&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;"a" =&amp;gt; "Nguyễn",&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;"b" =&amp;gt; "Bá",&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;"c" =&amp;gt; "Thành"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo $b["a"]; //in ra: Nguyễn&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$b["a"] = "Nguyen";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$b["b"] = "Ba";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$b["c"] = "Thanh";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;//giờ đây $b = Array("a" =&amp;gt; "Nguyen", "b" =&amp;gt; "Ba", "c" =&amp;gt; "Thanh")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểu Object&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểu object (đối tượng) lưu giữ 1 bản thể (instance) của 1 lớp (class). Ta sẽ tìm kiểu kỹ thêm về kiểu object trong phần Lập trình hướng đối tượng với PHP.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểu Resource&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểu resource (tài nguyên) được sử dụng bởi các hàm đặt biệc của PHP (ví dụ hàm mysql_connect sẽ trả về kiểu resource). Ta sẽ tìm hiểu kỹ hơn về kiểu resource trong các bài viết khác.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểu NULL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Đây là 1 giá trị đặt biệc, báo cho PHP biết rằng 1 biến nào đó chưa/không mang giá trị nào cả. Ví dụ:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$a = 1; //$a mang giá trị 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$a = NULL; //bây giờ $a không mang giá trị nào cả&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$a = 2; //giờ đây $a mang giá trị 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;//hàm unset sẽ làm cho 1 biến có giá trị là NULL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;unset($a); //giừo $a lại là NULL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;CÁC CÂU LỆNH ĐIỂU KHIỂN&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh if&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Cú pháp đơn giản nhất của câu lệnh if có dạng như sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;if ( biểu thức )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh if trên được diễn giải như sau: nếu biểu thức trả về giá trị TRUE (hoặc tương đương với TRUE sau khi chuyển đổi) thì câu lệnh sẽ được thực thi; ngược lại (khi biểu thức trả về giá trị FALSE) thì bỏ qua không thực thi câu lệnh nữa.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Cú pháp nâng cao của câu lệnh if có dạng như sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;if ( biểu thức )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh 1;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh 2;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh if trên được diễn giải như sau: nếu biểu thức trả về giá trị TRUE thì câu lệnh 1 sẽ được thi hành, ngược lại thì câu lệnh 2 sẽ được thi hành.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Các lệnh if có thể được lồng vào nhau để tạo ra câu lệnh if phức tạp hơn:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;if ( biểu thức 1 )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;if ( biểu thức 2 )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh 1;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh 2;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh 3;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Nếu biểu thức 1 trả về giá trị FALSE thì câu lệnh 3 sẽ được thực hiện, ngược lại xét tiếp biểu thức 2: nếu biểu thức 2 trả về giá trị TRUE thì thực hiện câu lệnh 1, ngược lại nếu biểu thức 2 trả về giá trị FALSE thì thực hiện câu lệnh 2.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;if ( biểu thức 1 )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh 1;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;else if ( biểu thức 2 )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh 2;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;else if ( biểu thức 3 )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh 3;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh 4;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Nếu biểu thức 1 trả về TRUE thì thực hiện câu lệnh 1 (các câu lệnh 2,3,4 không thực hiện), nếu biểu thức 1 trả về FALSE và biểu thức 2 trả về TRUE thì câu lệnh 2 được thực hiện, nếu biểu thức 1 trả về FALSEm biểu thức 2 trả về FALSE và biểu thức 3 trả về TRUE thì câu lệnh 3 được thực hiện. Nếu cả 3 biểu thức 1,2,3 đều trả về FALSE thì thực hiện câu lệnh 4.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ngoài ra PHP còn cung cấp từ khoá elseif, chính là ghép giữa từ khoá else và if.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh while&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh while dùng để tạo 1 vòng lặp, cú pháp của câu lệnh này như sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;while ( biểu thức )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Được diễn giải như sau: trong khi biểu thức còn trả về giá trị TRUE thì tiếp tục thực hiện câu lệnh, sau khi thực hiện câu lệnh thì kiểm tra lại biểu thức, nếu vẫn còn trả về giá trị TRUE thì lại tiếp tục thực hiện câu lệnh...cứ tiếp tục như vậy cho tới khi nào biểu thức trả về giá trị FALSE thì ngưng.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Một ví dụ in ra các số từ 1 tới 10 với câu lệnh while:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$i = 1;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;while ( $i &amp;lt;= 10 ) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo $i, "\n";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$i++;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} //end while&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ghi chú: Câu lệnh $i++ tương đương với $i = $i+1;, câu lệnh này sẽ tăng giá trị của $i lên 1 qua mỗi lần lặp.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh do-while&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh do-while cũng tương tự như câu lệnh white, chỉ khác một điểm là câu lệnh được thực hiện trước rồi biểu thức mới được kiểm tra sau, nếu biểu thức còn trả về giá trị TRUE thì tiếu tục thực hiện câu lệnh. Cú pháp của câu lệnh do-while như sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;do {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} while ( biểu thức );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Một ví dụ in ra các số từ 1 tới 10 với câu lệnh do-while:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$i = 1;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;do {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo $i, "\n";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$i++;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} while ( $i &amp;lt; 10 );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh for&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh for cũng dùng để tạo vòng lặp. Đây là một trong những câu lệnh phức tạp nhất của PHP, cú pháp của nó như sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;for ( biểu thức 1; biểu thức 2; biểu thức 3 )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Được diễn giải như sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Đầu tiên biểu thức 1 được thực hiện,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Tiếp theo biểu thức 2 được kiểm tra&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Nếu trả về TRUE thì câu lệnh được thực hiện và sau đó thực hiện biểu thức 3.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Nếu trả về FALSE thì kết thúc câu lệnh for.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Kiểm tra lại biểu thức 2 và lặp lại quá trình như trên.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Một ví dụ in ra các số từ 1 tới 10 với câu lệnh for:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;for ( $i = 0; $i &amp;lt; 10; $i++ ) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo $i, "\n";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} //end for&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh foreach&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh foreach chỉ làm việc với array. Câu lệnh foreach có 2 dạng cú pháp như sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;foreach ( $array as $value )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;foreach ( $array as $key =&amp;gt; $value )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;câu lệnh;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ta sẽ hiểu rõ hơn 2 dạng cú pháp này qua 2 ví dụ sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ví dụ 1:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$a = array('a' =&amp;gt; 1, 'b' =&amp;gt; '2', 'c' =&amp;gt; '3');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;foreach ( $a as $value ) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo $value, "\n";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} //end foreach&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Chương trình trên sẽ in ra 3 số 1, 2 và 3.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ví dụ 2:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$a = array('a' =&amp;gt; 1, 'b' =&amp;gt; '2', 'c' =&amp;gt; '3');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;foreach ( $a as $key =&amp;gt; $value ) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo $key, "=", $value, "\n";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} //end foreach&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Chương trình trên sẽ in ra 3 chuỗi a=1, b=2 và c=3.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh switch&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh switch hoạt động như là 1 loạt câu lệnh if ghép lại với nhau. Ta hãy xem câu lệnh if sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;if ( $a == "abc" )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Giá trị của a là abc";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} elseif ( $a == "def" )&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Giá trị của a là def";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} elseif ( $a == "123" ) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Giá trị của a là 123";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} else {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Giá trị khác";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} //end if&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;3 câu lệnh if ở trên có thể được viết lại bằng câu lệnh switch như sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;switch ( $a ) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;case "abc";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Giá trị của a là abc";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;break;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;case "def";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Giá trị của a là def";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;break;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;case "123";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Giá trị của a là 123";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;break;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;default:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Giá trị khác";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} //end switch&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh break&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh break sẽ dừng việc thực thi của các vòng lặp for, foreach, while, do-while và switch. Ở phần trước ta đã thấy câu lệnh break được sử dụng trong câu lệnh switch. Nếu không có break, câu lệnh switch ở phần trước sẽ thành:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;switch ( $a ) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;case "abc";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Giá trị của a là abc";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;case "def";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Giá trị của a là def";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;case "123";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Giá trị của a là 123";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;default:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Giá trị khác";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} //end switch&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Nếu giá trị của $a là "abc" thì cả 4 chuỗi "Giá trị của a là abc", "Giá trị của a là def", "Giá trị của a là 123" và "Giá trị khác" sẽ được in ra.; nếu $a mang giá trị "def" thì 3 chuỗi "Giá trị của a là def", "Giá trị của a là 123" và "Giá trị khác" sẽ được in ra.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ở đây ta muốn chỉ có 1 dòng duy nhất in ra tương ứng với giá trị của biến $a, nên ta thêm các câu lệnh break vào các phần case, để khi in ra chuỗi tương ứng với giá trị $a thì ta thoát ra khỏi câu lệnh switch.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Một ví dụ sử dụng câu lệnh break trong vòng lặp for:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;for ( $i=1; $i&amp;lt;=10; $i++ ) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo $i;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;if ( $i == 5 ) break;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Vòng lặp for ở trên thay vì in ra 10 số từ 1 đến 10, vòng lặp chỉ in ra 5 số từ 1 đến 5 mà thôi vì khi $i đạt giá trị 5, vòng lặp sẽ kết thúc do câu lệnh break.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Cách dùng câu lệnh break trong các vòng lặp foreach, while và do-while cũng tương tự.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh continue&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Câu lệnh continue áp dụng lên các vòng lặp, lệnh continue sẽ bỏ qua lần lặp hiện thời và tiếp tục thực hiện các lần lặp tiếp theo. Để hiểu rõ hơn ta hãy xem ví dụ sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;for ( $i=1; $i&amp;lt;=5; $i++ ) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;if ( $i == 2 ) continue;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo $i;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Khi $i đạt giá trị 2, câu lệnh echo $i; sẽ được bỏ qua không thì hành nữa do câu lệnh continue. Và như vậy, đoạn lệnh trên khi chạy sẽ in ra các giá trị 1,3,4,5 (không có giá trị 2).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Cách dùng của câu lệnh continue trong các vòng lặp foreach, while, do-while cũng tương tự.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;----------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;HÀM&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Hàm do người dùng định nghĩa&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Trong lập trình, có một số đoạn mã được dùng nhiều lần ở nhiều nơi khác nhau trong chương trình. Sẽ rất phiền và khó sửa lỗi nếu như ta phải viết lặp đi lặp lại 1 đoạn mã đó ở nhiều nơi. PHP cung cấp một giải pháp đó là hàm do người dùng định nghĩa. Ta có thể đưa đoạn mã đó vào trong 1 hàm, và ở chỗ nào cần dùng đoạn mã đó ta chỉ cần gọi hàm, khi cần sửa đổi, ta chỉ cần sửa đổi 1 chỗ duy nhất là nội dung của hàm chứ không cần phải sửa ở nhiều nơi trong chương trình.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Cú pháp để tạo 1 hàm do người dùng định nghĩa như sau:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;function tênHàm($tham_số1, $tham_số2, ..., $tham _sốn) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;//thân hàm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Testing";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;return $kết_quả_trả_về;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} //end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Khi cần sử dụng hàm ở chỗ nào, ta chỉ cần dùng cú pháp tênHàm(các tham số cần thiết);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ví dụ:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;function testing() {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Testing gunction";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo 1;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo 2;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo 3;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} //end testing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;testing();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;testing();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;testing();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Lưu ý: Tên hàm cũng như tên biến chỉ bao gồm các ký tự chữ cái (a..z, A..Z), chữ số (0..9) và ký tự gạch dưới (_), ngoài ra tên hàm không được bắt đầu bằng chữ số, nhưng được phép bắt đầu bằng ký tự gạch dưới (tên hàm khác với tên biến chỗ này). Tên hàm trong PHP phân biệt chữ hoa và chữ thường, tức là testing và Testing là 2 tên hàm khác nhau.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Tham số của hàm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Hàm có thể nhận vào các tham số, ví dụ:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;function testing($a) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Tham số là $a";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} //end testing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;testing(123);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;testing("abc");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ở ví dụ trên, lời gọi hàm testing(123); sẽ in ra dòng Tham số là 123 và lời gọi hàm testing("abc"); sẽ in ra dòng Tham số là abc.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Ta có thể gán giá trị mặc định cho tham số của hàm:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;function testing($a="mặc định") {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo "Tham số là $a";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} //end testing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;testing();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Khi tham số tương ứng của hàm không được truyền, tham số đó sẽ nhận giá trị mặc định. Đoạn chương trình ví dụ ở trên khi chạy sẽ in ra dòng Tham số là mặc định.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Giá trị trả về từ hàm&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Hàm còn thể trả về 1 giá trị cho nơi gọi:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;function binh_phuong($a) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;$ketqua = $a * $a;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;return $ketqua;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;} //end testing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo binh_phuong(2);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Đoạn chương trình trên khi chạy sẽ in ra số 4. Câu lệnh return biểu_thức; sẽ kết thúc hàm và trả về giá trị của biểu_thức cho nơi gọi.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-2191522026698225175?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/2191522026698225175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=2191522026698225175' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/2191522026698225175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/2191522026698225175'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/t-hc-php-bi-2-c-php-cn-bn.html' title='Tự học PHP (bài 2): CÚ PHÁP CĂN BẢN'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-7144644693446712096</id><published>2007-07-15T15:00:00.000+07:00</published><updated>2007-07-15T15:01:40.303+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Cùng cài Pidgin nâng cấp Gaim !!!</title><content type='html'>Gaim 2.0 Beta là trình internet messenger mặc định cho mình khi cài FeistyFawn xong. Nhưng Ubuntu đã có version mới của Gaim ròi đó, tên Pidgin. "Hậu bối" này nghe đồn là chạy ổn định hơn, và có nhìu plugin hỗ trợ lắm. Lasted version là Pidgin-2.0.2 ( tính tới ngày hôm nay nge !).&lt;br /&gt;&lt;p&gt;   &lt;a href="http://superb-west.dl.sourceforge.net/sourceforge/pidgin/pidgin-2.0.2.tar.bz2"&gt;Download source link&lt;/a&gt;&lt;br /&gt;       Các bạn có thể cài bằng cách khỏ các lệnh đơn jản sau :&lt;br /&gt;      &lt;/p&gt;&lt;blockquote&gt;wget http://download.ubuntu.pl/_Feisty_Fawn/pidgin/2.0.2/pidgin_2.0.2-1_i386.deb&lt;/blockquote&gt;&lt;br /&gt;       Típ theo là :&lt;br /&gt;&lt;blockquote&gt;        sudo dpkg -i pidgin_2.0.2-1_i386.deb&lt;/blockquote&gt; Và để "sí sọn" một chút, các bạn hãy cài thêm các plugin zô. Mở Pidgin lên, zô menu Tool/ Plugin. Sẽ có 1 list các plugin bạn cần. Các bạn hãy check vào các plugin mà mình cần.&lt;br /&gt;       Chúc các bạn thành công !!!&lt;br /&gt;À wên, nếu các bạn đang cài Gaim thì nên uninstall Gaim trước. Tui bị nó báo là ko thể overwrite lên /usr/local/gaim, nên fải zô Synaptic Package Manager để remove nó trước.&lt;br /&gt;      Và thêm 1 đìu nữa, khi cài Pidgin cần có libxml2 với version 2.6.0 trở lên. &lt;a href="http://www.icewalkers.com/Linux/Software/510250/libxml2.html"&gt;Download libxml2.6.27&lt;/a&gt;&lt;br /&gt;      Để cài libxml2 như sau :&lt;br /&gt;&lt;blockquote&gt;         wget http://www.icewalkers.com/Linux/Software/510250/libxml2.html&lt;br /&gt;     &lt;br /&gt;       tar -xvzf libxml2-2.6.27.tar.gz&lt;br /&gt;&lt;br /&gt;        cd libxml2-2.6.27&lt;br /&gt;&lt;br /&gt;        ./configure&lt;br /&gt;&lt;br /&gt;        make&lt;br /&gt;&lt;br /&gt;        sudo make install&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;       Vậy là xong các rắc rối mà tui đã gặp trong wá trình cài Pidgin ròi. Nếu các bạn có các kinh ngịm j thì chia sẻ nge.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-7144644693446712096?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/7144644693446712096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=7144644693446712096' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7144644693446712096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7144644693446712096'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/cng-ci-pidgin-nng-cp-gaim.html' title='Cùng cài Pidgin nâng cấp Gaim !!!'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-472774415408542010</id><published>2007-07-14T22:40:00.000+07:00</published><updated>2007-07-14T23:19:44.504+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP MySQL'/><title type='text'>Tự học PHP (Bài 1)</title><content type='html'>&lt;span style="font-family:arial;"&gt;    Hiện tại PHP là ngôn ngữ lập trình khá hot. Công ti tôi đăng tuyển nhân viên lập trình PHP (kinh nghiệm 1 năm) mà chả thấy tăm hơi ai hết ( có mình tui à ;) ), Còn phần Quản lý dự án ( Kinh nghiệm 2 năm ) lại càng không có.&lt;br /&gt;  PHP là một ngôn ngữ dễ học, đơn giản và đủ mạnh để lập trình tất cả các loại website. Từ trang web tin tức đến trang web thương mại điện tử .... Hôm nay tôi xin mạn phép soạn series bài về lập trình PHP. Hi vọng loạt bài nầy sẽ giúp cho các bạn có mong muốn trở thành một lập trình viên PHP trong tương lai có một số kiến thức cũng như kỹ năng lập trình PHP đủ xài.&lt;br /&gt;&lt;br /&gt;  &lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;Các bước chuẩn bị để có thể lập trình PHP.&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;  Tất nhiên là bạn phải biết một chút HTML và nếu bạn đã có học lập trình C rồi thì thật là tuyệt vời, câu lệnh PHP có cấu trúc y chang C, và nếu bạn được học lập trình hướng đối tượng rồi thì còn tuyệt vời hơn nửa.&lt;br /&gt;&lt;br /&gt;  Bây giờ chúng ta vào phần cài đặt PHP. Máy tính để lập trình tôi chọn là máy tính cài hệ điều hành XP ( đại chúng wé mà ), và tôi sử dụng Xampp là chương trình cài đặt hoàn chỉnh các thành phần để chạy PHP gồm: PHP, MySQL và Apache.&lt;br /&gt;&lt;br /&gt;Một số kiến thức cần biết:&lt;br /&gt;  Apache là một web server chương trình nầy thường chạy và giao tiếp với bên ngoài thông qua cổng 80, do đó nếu bạn đã cài đặt IIS ( là một web server của Microsoft ) thì bạn nên tắt dịch vụ nầy ( cũng chạy cổng 80 ) sau khi bạn chạy Apache, máy bạn trở thành một web server (nghe ghê hông ? ;) ) như vậy nếu địa chĩ ip của máy bạn là 192.168.1.6 chẳng hạn thì các máy cùng mạng Lan của bạn có thể truy cập dịch vụ web của máy tính của bạn thông qua địa chỉ http://192.168.1.6 nếu bạn muốn những người ngoài mạng Lan truy cập vào dịch vụ web của máy tính bạn thì bạn phải set up cho modem của bạn, vấn đề nầy tôi sẽ đề cập vào bài viết khác. Túm lại Apache là một web server, và bạn phải đặt code PHP của bạn đúng chổ để web server nầy biết và thực thi nó.&lt;br /&gt;  PHP là một ngôn ngữ lập trình web. Sau khi bạn đã cài Apache rồi và cài thêm PHP như vậy web server của bạn sẽ không chỉ phục vụ các trang web tĩnh (HTML) nửa, mà nó còn có thể phục vụ các trang web động (đuôi .PHP), có thể nhận các yêu cầu từ các trình duyệt, xử lý và xuất các kết quả trả về cho trình duyệt. Việc xử lý nầy chính là do PHP đảm nhận.&lt;br /&gt;  MySQL là một hệ quản trị cơ sở dữ liệu, nó có chức năng tương tự Access, MS SQL Server, hay Oracle vậy. Nó dùng để lưu giữ, quản trị, và truy vấn cơ sở dữ liệu.&lt;br /&gt;  Bộ 3 nầy là các thứ cần thiết để có thể run một website PHP.&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;Cài đặt PHP&lt;/span&gt;&lt;br /&gt;  Bước 1: lên trang web &lt;a href="http://xampp.org/"&gt;http://xampp.org&lt;/a&gt; download phiên bản cài đặt dành cho Windows XP về &lt;a href="http://www.apachefriends.org/download.php?xampp-win32-1.6.2-installer.exe"&gt;&lt;span style="text-decoration: underline;"&gt;Bản cài đặt Xampp dành cho &lt;/span&gt;windows&lt;/a&gt; sau đó bạn giải nén và cài đặt nó. Sau khi cài đặt xong thì máy tính của bạn đã có đủ 3 chương trình PHP, MySQL và Apache.&lt;br /&gt;  Bước 2: Test coi nó có chạy hông ? ;) mở trình duyệt và gõ: http://localhost nếu xuất hiện gì đó thì bạn đã cài thành công.&lt;br /&gt;   &lt;br /&gt;  Hì hôm nay vậy thôi nhé ! Các bạn nên tham khảo nhiều trên Internet các bài về lập trình PHP, ebook thì đầy dẫy (tiếng Anh hông hà ;)) ), hiện tại ở VN chỉ có trung tâm tin học Đại học Khoa Học Tự Nhiên có dạy lập trình PHP thui, các bạn nào thích thì qua đó học.&lt;br /&gt;Một số trang web hay&lt;br /&gt;&lt;a href="http://www.mysql.com/"&gt;mysql.com&lt;/a&gt;&lt;br /&gt;&lt;a href="http://apache.org"&gt;apache.org&lt;/a&gt;&lt;br /&gt;&lt;a href="http://php.net"&gt;php.net&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-472774415408542010?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/472774415408542010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=472774415408542010' title='33 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/472774415408542010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/472774415408542010'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/t-hc-php-bi-1.html' title='Tự học PHP (Bài 1)'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>33</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-3925501863000143225</id><published>2007-07-12T21:46:00.000+07:00</published><updated>2007-07-12T22:23:42.512+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Cài thêm fonts cho Ubuntu</title><content type='html'>Bạn có thể sử dụng các font dành cho Windows XP trong các trình soạn thảo như gedit, open office vv... trong Linux, để làm được điều nầy bạn phải cài font cho Linux.&lt;br /&gt;Sau đây là hướng dẫn cài font của windows cho Ubuntu.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Chép các fonts windows vào thư mục /usr/share/fonts/truetype&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;code&gt;&lt;span style="font-family: Georgia,serif;"&gt;&lt;/span&gt;/////////////////////////////////////////&lt;br /&gt;Vào terminal gõ lệnh&lt;br /&gt;sudo apt-get install msttcorefonts&lt;br /&gt;lệnh nầy sẽ cài các font cho web của bạn&lt;br /&gt;////////////////////////////////////////&lt;br /&gt;&lt;/code&gt;&lt;p&gt;Sau khi khởi động Linux lại, bạn có đủ fonts để xài, còn nếu ko muốn khởi  động lại, bạn vào Terminal gõ lệnh sau :&lt;/p&gt; &lt;p&gt;# sudo fc-cache   -fv&lt;/p&gt; &lt;p&gt;để update fonts vào hệ thống nhé , thân !&lt;/p&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Tham khảo từ &lt;/span&gt;&lt;a style="font-style: italic; font-weight: bold;" href="http://saylinux.wordpress.com/"&gt;Saylinux&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-3925501863000143225?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/3925501863000143225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=3925501863000143225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3925501863000143225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3925501863000143225'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/ci-thm-fonts-cho-ubuntu.html' title='Cài thêm fonts cho Ubuntu'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-6334254829318373723</id><published>2007-07-11T06:42:00.000+07:00</published><updated>2007-07-11T06:49:52.735+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>How to Install Elisa media center in Ubuntu</title><content type='html'>Fluendo’s Elisa is a free software media center application that can play your DVDs, video files, music, and pictures. Since it is designed for extensibility, Elisa has the potential to do much more. It does not handle television or video recording functions, but it is a slick and promising project. &lt;p&gt;&lt;strong&gt;Elisa media center Features&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Elisa supports a wide range for media formats through the use of the GStreamer multimedia framework, including but not limited to Ogg Vorbis, Ogg Theora, Matroska, MPEG 2, MPEG4, Quicktime and Windows Media. Commercially licensed plugins that work with GStreamer and Elisa are available from Fluendo.&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;Elisa supports playing both local music files and web radio stations. So if your media center is connected to your hi-fi system you can use it as a web radio tuner or you can use it as a jukebox for your own music files.&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;Elisa supports any remote control supported by the linux infrared control project, this includes many of the most popular infrared remote controls out there.&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;Elisa can view photos and images in all the most common formats used like jpeg and png. Elisa can also do simple manipulation of the photos like rotating photos that are taken in portrait mode.&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;Elisa supports playing back DVD’s&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;Elisa is cross platform allowing you to install it on both GNU/Linux and Unix systems, but also on Windows systems.&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;Elisa supports DLNA compliant upnp multimedia devices. This means photos, music and videos shared from such devices are available in Elisa. Elisa is also able to share its own files to upnp enabled devices.&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;Elisa can act as a DAAP client so as to browse and play music files shared on the network by iTunes, Banshee or Rhythmbox&lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt;Elisa is also able to browse and display pictures shared on Flickr&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Install Elisa media center in Ubuntu&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;For Ubuntu Edgy Users&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;You need to edit the /etc/apt/sources.list file&lt;/p&gt; &lt;p&gt;sudo vi /etc/apt/sources.list&lt;/p&gt; &lt;p&gt;add the following line save and exit the file&lt;/p&gt; &lt;p&gt;deb http://elisa.fluendo.com/packages edgy main&lt;/p&gt; &lt;p&gt;&lt;strong&gt;For Ubuntu Feisty Users&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;You need to edit the /etc/apt/sources.list file&lt;/p&gt; &lt;p&gt;sudo vi /etc/apt/sources.list&lt;/p&gt; &lt;p&gt;add the following line save and exit the file&lt;/p&gt; &lt;p&gt;deb http://elisa.fluendo.com/packages feisty main&lt;/p&gt; &lt;p&gt;Now you need to update the source list using the following comamnd&lt;/p&gt; &lt;p&gt;sudo apt-get update&lt;/p&gt; &lt;p&gt;install elisa using the following command&lt;/p&gt; &lt;p&gt;sudo apt-get install elisa&lt;/p&gt; &lt;p&gt;This will install all the packages required for elisa media center.&lt;/p&gt; &lt;p&gt;If you want to open go to Applications -&gt; Sound &amp; Video -&gt;Elisa Media Center&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_kaLaGUdZuyk/RpQZuira6rI/AAAAAAAAAEs/_3xGN0Ho4pM/s1600-h/1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_kaLaGUdZuyk/RpQZuira6rI/AAAAAAAAAEs/_3xGN0Ho4pM/s320/1.png" alt="" id="BLOGGER_PHOTO_ID_5085718166581734066" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Once it opens you should see the following screen&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_kaLaGUdZuyk/RpQZyyra6sI/AAAAAAAAAE0/VL0SvMeFJ6s/s1600-h/2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_kaLaGUdZuyk/RpQZyyra6sI/AAAAAAAAAE0/VL0SvMeFJ6s/s320/2.png" alt="" id="BLOGGER_PHOTO_ID_5085718239596178114" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;On launch, Elisa looks for the configuration file ~/.elisa/elisa.conf. If it does not find one (and it won’t the first time you run Elisa), it creates a skeleton elisa.conf file that you can then edit in any text editor.&lt;/p&gt; &lt;p&gt;The important options to customize are the locations in which Elisa will look for media. The default elisa.conf specifies ./sample_data/movies, ./sample_data/music, and ./sample_data/pictures — directories that do not even exist inside ~./elisa/.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Elisa Media Center plugins&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you want Elisa Media Center plugins check  &lt;a target="_blank" href="https://core.fluendo.com/elisa/trac/wiki/PluginHowTo"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;a href="http://www.ubuntugeek.com"&gt;&lt;span style="text-decoration: underline;"&gt;from http://www.ubuntugeek.com&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-6334254829318373723?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/6334254829318373723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=6334254829318373723' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6334254829318373723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6334254829318373723'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/how-to-install-elisa-media-center-in.html' title='How to Install Elisa media center in Ubuntu'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_kaLaGUdZuyk/RpQZuira6rI/AAAAAAAAAEs/_3xGN0Ho4pM/s72-c/1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-790960345720715767</id><published>2007-07-04T00:24:00.000+07:00</published><updated>2007-07-04T00:42:36.159+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>How to install Flash Player for Ubuntu - Cách cài đặt flash cho Ubuntu</title><content type='html'>&lt;span style="font-family:arial;"&gt;    Cách tốt nhất để cài Macromedia Flash Player plug-in cho Mozilla Firefox là mở trình duyệt Firefox và mở trang &lt;/span&gt;&lt;a style="font-family: arial;" href="http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_15507" class="external text" title="http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn 15507" rel="nofollow"&gt;Adobe.com: Version test for Adobe Flash Player&lt;/a&gt;&lt;span style="font-family:arial;"&gt;. Sau đó bạn sẽ thấy một thông báo là thiếu plug-in flash. Bạn sẽ click vào thông báo nầy và theo các bước mà firefox hướng dẫn để cài đặt flash. Thường thường bạn firefox sẽ cài plugin nầy một cách tự động khi bạn click "install now".&lt;br /&gt;&lt;/span&gt;Bạn cũng có thể cài đặt bằng cách sử dụng package manager: Vào terminal gõ lệnh&lt;br /&gt;&lt;pre&gt;&lt;span style="font-weight: bold;"&gt;sudo apt-get install flashplugin-nonfree&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Khởi động lại firefox&lt;br /&gt;&lt;br /&gt;Nếu âm thanh của flash bị lỗi bạn sửa như sau:&lt;br /&gt;Vào terminal gõ lệnh:&lt;br /&gt;&lt;pre&gt;sudo apt-get install alsa-oss&lt;br /&gt;gksudo gedit /etc/firefox/firefoxrc&lt;/pre&gt;Sửa &lt;span style="font-weight: bold;"&gt;FIREFOX_DSP=""&lt;/span&gt; thành &lt;span style="font-weight: bold;"&gt;FIREFOX_DSP="aoss"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Cách đơn giản và nhanh: Tải gói nầy về và install nó ;)&lt;br /&gt;&lt;a href="http://rivervalleytechsupport.com/files/libflashsupport_1.0%7E2219-1_i386.deb"&gt;http://rivervalleytechsupport.com/files/libflashsupport_1.0~2219-1_i386.deb&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thế là bạn tha hồ vào Youtube, tải các game flash về và play nó (bằng firefox nhé ;))&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-790960345720715767?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/790960345720715767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=790960345720715767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/790960345720715767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/790960345720715767'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/07/how-to-install-flash-player-for-ubuntu.html' title='How to install Flash Player for Ubuntu - Cách cài đặt flash cho Ubuntu'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-6841379979986760621</id><published>2007-06-30T14:34:00.000+07:00</published><updated>2007-07-14T22:39:46.112+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP MySQL'/><title type='text'>Lập trình PHP bằng công nghệ template (phần 2)</title><content type='html'>&lt;span style="font-family:arial;"&gt;Trong phần 2 nầy tôi xin trình bày cho các bạn kỹ thuật để xuất một table bằng tempate&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;Bạn chép file ex2.xtpl và file ex2.php vào thư mục test. Sau đó mở trình duyệt và mở file ex2.php&lt;br /&gt;Trang web sẽ xuất ra như sau:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;   &lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;   &lt;th&gt;row nr.&lt;/th&gt;   &lt;th&gt;id&lt;/th&gt;   &lt;th&gt;name&lt;/th&gt;   &lt;th&gt;age&lt;/th&gt;  &lt;/tr&gt;   &lt;tr&gt;   &lt;td&gt;1&lt;/td&gt;   &lt;td&gt;38&lt;/td&gt;   &lt;td&gt;cocomp&lt;/td&gt;   &lt;td&gt;33&lt;/td&gt;  &lt;/tr&gt;    &lt;tr&gt;   &lt;td&gt;2&lt;/td&gt;   &lt;td&gt;27&lt;/td&gt;   &lt;td&gt;linkhogthrob&lt;/td&gt;   &lt;td&gt;34&lt;/td&gt;  &lt;/tr&gt;    &lt;tr&gt;   &lt;td&gt;3&lt;/td&gt;   &lt;td&gt;56&lt;/td&gt;   &lt;td&gt;pingu&lt;/td&gt;   &lt;td&gt;23&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Hãy xem nội dung file ex2.xtpl&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&amp;lt;!-- BEGIN: main --&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "&lt;a target="_BLANK" href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&lt;/a&gt;"&amp;gt;&lt;br /&gt;&amp;lt;html xmlns="&lt;a target="_BLANK" href="http://www.w3.org/1999/xhtml"&gt;http://www.w3.org/1999/xhtml&lt;/a&gt;"&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Content-Language" content="en" /&amp;gt;&lt;br /&gt;&amp;lt;meta name="GENERATOR" content="Co-Comp Ltd" /&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;example 2&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;!-- $HeadURL: &lt;a target="_BLANK" href="https://xtpl.svn.sourceforge.net/svnroot/xtpl/trunk/ex2.xtpl"&gt;https://xtpl.svn.source...root/xtpl/trunk/ex2.xtpl&lt;/a&gt; $&lt;br /&gt;$Id: ex2.xtpl 16 2007-01-11 03:02:49Z cocomp $ --&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;You should see a table with multiple rows:&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- BEGIN: table --&amp;gt;&lt;br /&gt;&amp;lt;table border="1"&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;th&amp;gt;row nr.&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;th&amp;gt;id&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;th&amp;gt;name&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;th&amp;gt;age&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;!-- BEGIN: row --&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;{ROW_NR}&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;{DATA.ID}&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;{DATA.NAME}&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;{DATA.AGE}&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;!-- END: row --&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;!-- END: table --&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&amp;lt;!-- END: main --&amp;gt;&lt;br /&gt;&lt;/span&gt;Đầu tiên là block main (begin và end của nó bao trùm hết cả template, bạn hãy nhìn vào đầu và cuối file template nầy). Trong block main có block con, ở đây là block: table, và trong block table là block: row. Trong block row sẽ có các biến dùng để thể hiện các giá trị ra trang web.&lt;br /&gt;&lt;br /&gt;Bạn hãy xem nội dung file source: ex2.php&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Đây là nội dung file ex2.php&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;?php&lt;br /&gt;    include_once('./xtemplate.class.php');&lt;br /&gt;    $xtpl = new XTemplate('ex2.xtpl');&lt;br /&gt;    /**&lt;br /&gt;     * you can reference to array keys in the template file the following way:&lt;br /&gt;     * {DATA.ID} or {DATA.NAME}&lt;br /&gt;     * say we have an array from a mysql query with the following fields: ID, NAME, AGE&lt;br /&gt;     */&lt;br /&gt;    $rows = array();&lt;br /&gt;    // add some data&lt;br /&gt;    $rows[1]=array('ID'=&gt;'38',&lt;br /&gt;                    'NAME'=&gt;'cocomp',&lt;br /&gt;                     'AGE'=&gt;'33'&lt;br /&gt;                     );&lt;br /&gt;&lt;br /&gt;    // add some data&lt;br /&gt;    $rows[2]=array('ID'=&gt;'27',&lt;br /&gt;                    'NAME'=&gt;'linkhogthrob',&lt;br /&gt;                    'AGE'=&gt;'34'&lt;br /&gt;                    );&lt;br /&gt;    // add some data&lt;br /&gt;    $rows[3]=array('ID'=&gt;'56',&lt;br /&gt;                    'NAME'=&gt;'pingu',&lt;br /&gt;                    'AGE'=&gt;'23'&lt;br /&gt;                    );&lt;br /&gt;    $rowsize = count($rows);&lt;br /&gt;    for ($i = 1; $i &lt;= $rowsize; $i++) {&lt;br /&gt;        // assign array data&lt;br /&gt;        $xtpl-&gt;assign('DATA', $rows[$i]);&lt;br /&gt;        $xtpl-&gt;assign('ROW_NR', $i);&lt;br /&gt;        // parse a row&lt;br /&gt;        $xtpl-&gt;parse('main.table.row');&lt;br /&gt;        // another way to do it would be:&lt;br /&gt;        /*&lt;br /&gt;        $xtpl-&gt;insert_loop('main.table.row', array('DATA'=&gt;$rows[$i],&lt;br /&gt;                                                    'ROW_NR'=&gt;$i&lt;br /&gt;                                                    ));&lt;br /&gt;        */&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;    // parse the table&lt;br /&gt;    $xtpl-&gt;parse('main.table');&lt;br /&gt;&lt;br /&gt;    $xtpl-&gt;parse('main');&lt;br /&gt;    $xtpl-&gt;out('main');&lt;br /&gt;&lt;br /&gt;?&gt;&lt;br /&gt;Ta sẽ có một vòng lặp for để gán các trị cho các row, nhớ rằng mỗi khi assign - gán giá trị xong ta phải parse nó ngay, sau khi parse xong các block row ta sẽ parse block table và cuối cùng parse block  main.  &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-6841379979986760621?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/6841379979986760621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=6841379979986760621' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6841379979986760621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6841379979986760621'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/06/lp-trnh-php-bng-cng-ngh-template-phn-2.html' title='Lập trình PHP bằng công nghệ template (phần 2)'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-8066070859607682082</id><published>2007-06-29T11:27:00.001+07:00</published><updated>2007-06-29T11:27:59.976+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Cài đặt phần mềm cho Ubuntu khi máy không có kết nối Internet</title><content type='html'>&lt;span style="font-family: arial;"&gt;Nếu bạn có một kết nối Internet, Ubuntu quả là một thiên đường cho bạn. Mọi việc cài đặt nâng cấp phần mềm đều khác dễ dàng qua Synaptic. Tuy nhiên có một số bạn ở các diễn đàn khác lại có 1 câu hỏi là làm sao để có thể download đầy đủ những gì mình cần bao gồm cả những gói phụ thuộc. Sau đây là một câu trả lời.&lt;/span&gt; &lt;p style="font-family: arial;"&gt;Đầu tiên bạn cứ vào Synaptic đánh dấu Intall hoặc Update cho những thứ mình cần. Sau đó bạn vào menu File -&gt; Generate Package Download Script. Lúc đó bạn sẽ lưu lại 1 script. Chúng ta có thể xách script này qua các máy Linux khác có Internet để down tự động.&lt;/p&gt; &lt;p style="font-family: arial;"&gt;Nếu muốn sử dụng chương trình hỗ trợ download. Công việc rất dễ dàng bạn vào chương trình soạn thảo văn bản (gedit chẳng hạn)để xóa những wget -c. Xóa bằng thao tác Find And Replace chứ đừng xóa tay à nha.&lt;/p&gt; &lt;p style="font-family: arial;"&gt;Sau khi download hết tất cả cái đó về bạn chỉ cần chép những file deb đó về máy bạn. Nhưng một vấn đề nữa là làm sao cài đặt hết nó. Biết cái nào cài trước cái nào cài sau? Cái này thì hơi khó vì có nhiều cái phụ thuộc với nhau thành 1 vòng tròn. Nhưng nếu bạn gan thì làm theo cách của mình. Chép tất cả vào 1 thư mục deb chẳng hạn sau đó cd vào trong thư mục đó rồi gõ lệnh &lt;span style="color:#800000;"&gt;sudo dpkg -i *  &lt;span style="color:#000000;"&gt;lúc đó mọi thứ sẽ được cài đặt và bạn sẽ không cần quan tâm cài cái nào trước cái nào sau vì chúng được cài cùng 1 lúc&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: arial;"&gt;P/s: Quên nữa cái này cũng quan trọng. Nếu máy bạn mới cài đặt mà chưa lần nào kết nối Internet thì có lẽ database phần mềm của bạn trong Synaptic sẽ không được phong phú và cập nhật. Vì vậy cần đến 1 máy có kết nối Internet. Sau khi đã reload packate information bạn có thể chép tập tin pkgcache.bin và srcpkgcache.bin ở thư mục /var/cache/apt trong máy có kết nối internet đến máy không có kết nối internet để có list những phầm mềm mới nhất. Chú ý phải xài lệnh sudo để chép nha vì tập tin đó bị khóa.&lt;/p&gt;&lt;p style="font-family: arial;"&gt;&lt;a href="http://saylinux.wordpress.com"&gt;&lt;span style="font-weight: bold;"&gt;Lấy từ Saylinux&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-8066070859607682082?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/8066070859607682082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=8066070859607682082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/8066070859607682082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/8066070859607682082'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/06/ci-t-phn-mm-cho-ubuntu-khi-my-khng-c-kt.html' title='Cài đặt phần mềm cho Ubuntu khi máy không có kết nối Internet'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-8650936215351228219</id><published>2007-06-29T11:20:00.000+07:00</published><updated>2007-06-29T11:25:16.052+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>How to install RAR Archiver (rar)</title><content type='html'>&lt;span name="intelliTxt" id="intelliTXT"  style="font-family:arial;"&gt; &lt;p&gt;Open a terminal window and type in:&lt;br /&gt;&lt;code&gt;&lt;span style="font-weight: bold;"&gt;sudo apt-get install rar&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; sudo ln -fs /usr/bin/rar /usr/bin/unrar&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-8650936215351228219?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/8650936215351228219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=8650936215351228219' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/8650936215351228219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/8650936215351228219'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/06/how-to-install-rar-archiver-rar.html' title='How to install RAR Archiver (rar)'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-7460515096371871467</id><published>2007-06-24T16:23:00.000+07:00</published><updated>2007-06-24T16:26:17.927+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Ubuntu 7.10 Features Overview</title><content type='html'>Announced at the middle of April 2007, the next version of Ubuntu Linux distribution (7.10, codename Gutsy Gibbon) has already started to stir up a lot of interest among the Ubuntu fans around the world. The Ubuntu team announced today the features that Ubuntu 7.10 will bring in late October this year. Here’s a quick overview of the features you will find in Ubuntu 7.10:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Desktop&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Ubuntu 7.10 will ship with the latest version of the GNOME desktop (2.20), which will be released a few weeks before the final version of Gutsy Gibbon. On the other hand, Kubuntu will ship with the latest version of the KDE desktop (3.5.7). Moreover, Kubuntu users will have the possibility of installing KDE 4.0 RC2 packages.&lt;br /&gt;&lt;br /&gt;Ubuntu 7.10 will be the first distribution to include the newly merged Beryl and Compiz projects, which will be the default window manager on systems that will support it.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Hardware Support&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The Linux kernel 2.6.22 with the usual selection of updated and additional drivers will be part of the Ubuntu 7.10 release.&lt;br /&gt;&lt;br /&gt;Ubuntu 7.10 will include the most awaited release of Xorg, version 7.3, which brings bleeding-edge features such as:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; better graphics hardware support;&lt;/li&gt;&lt;li&gt; hotplug monitors and input devices;&lt;/li&gt;&lt;li&gt; easier configuration;&lt;/li&gt;&lt;li&gt; hotplugging-supported drivers (no xorg.conf).&lt;/li&gt;&lt;/ul&gt;You should also expect improvements to the Restricted Driver Manager, and the "winmodem" chips will be supported out of the box (where drivers are available).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Mobile&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Ubuntu 7.10 will be the first release available for hand-held devices and other&lt;br /&gt;mobile/embedded form factors, through the Mobile and Embedded edition.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Server&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Ubuntu 7.10 Server Edition aims to attract more and more server administrators and it will bring attractive features for small businesses and organizations. Novel's AppArmor security framework will also be available for those that want it.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Stability and Performance&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Last but not least, Ubuntu 7.10 is promised to be more stable and powerful than the previous releases were. The system should work much better when the filesystem is full, allowing the user to make room and continue his work without interruption.&lt;br /&gt;&lt;br /&gt;Moreover, Upstart 0.5 will be on board of Ubuntu 7.10 to provide flexible and reliable service supervision. Also, the boot process will "suffer" improvements and reduce start-up time.&lt;br /&gt;&lt;br /&gt;The release schedule for Gutsy Gibbon was also made public. The development process started as expected, on June 7th, with the first Alpha release, and it will end somewhere around October 18th with the final release:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; June 7th - Tribe CD 1 (first alpha release)&lt;/li&gt;&lt;li&gt; June 28st - Tribe CD 2 (second alpha release)&lt;/li&gt;&lt;li&gt; July 26th - Tribe CD 3 (third alpha release)&lt;/li&gt;&lt;li&gt; August 9th - Tribe CD 4 (fourth alpha release)&lt;/li&gt;&lt;li&gt; August 23rd - Tribe CD 5 (fifth alpha release)&lt;/li&gt;&lt;li&gt; September 6th - Tribe CD 6 (sixth alpha release)&lt;/li&gt;&lt;li&gt; September 27th - Beta Release&lt;/li&gt;&lt;li&gt; October 11th - Release Candidate&lt;/li&gt;&lt;li&gt; October 18th - Final Release&lt;/li&gt;&lt;/ul&gt; To know the downloading details : &lt;a style="font-size: 16px;" href="http://www.techtalkz.com/open-source-linux/6515-ubuntu-xubuntu-kubuntu-edubuntu-7-10-gutsy-gibbon-tribe-1-free.html"&gt;Ubuntu, Xubuntu, Kubuntu, Edubuntu 7.10 (Gutsy Gibbon) Tribe 1 - Free&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-7460515096371871467?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/7460515096371871467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=7460515096371871467' title='28 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7460515096371871467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7460515096371871467'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/06/ubuntu-710-features-overview.html' title='Ubuntu 7.10 Features Overview'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>28</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-6391104330546900371</id><published>2007-06-24T06:17:00.000+07:00</published><updated>2007-07-14T22:39:46.112+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP MySQL'/><title type='text'>Lập trình PHP bằng công nghệ template</title><content type='html'>&lt;span style="font-family:arial;"&gt;        PHP là một ngôn ngữ lập trình hướng template. Thật tế thì ta đã có thể lập trình tách biệt giao diện và phần xử lý của PHP rất tốt rồi, tuy nhiên các nhà lập trình PHP vẫn chưa dừng lại, họ muốn một sự tách biệt thật rõ ràng và thế là các lớp xử lý template và nhất là smarty đã ra đời để đáp ứng nhu cầu đó.&lt;br /&gt;Hôm nay tôi muốn giới thiệu đến các bạn cách sử dụng một lớp dùng để lập trình template trong PHP: xtemplate. Ngoài ra, tôi cũng demo và giải thích cho các bạn các ví dụ trong phần docs của gói nầy.&lt;br /&gt;Bạn vào trang &lt;a href="http://sourceforge.net/projects/xtpl/"&gt;http://sourceforge.net/projects/xtpl/&lt;/a&gt; download gói xtemplate về.&lt;br /&gt;Đầu tiên bạn tạo một thư mục web là test. Sau đó bạn giải nén gói xtemplate và chép file xtemplate.class.php vào thư mục test.&lt;br /&gt;Bây giờ bắt đầu ví dụ thui ;) ok ?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ví dụ 1:&lt;/span&gt;&lt;br /&gt;Bạn chép file ex1.xtpl và file ex2.php vào thư mục test. Sau đó mở trình duyệt và mở file ex1.php&lt;br /&gt;Trang web sẽ xuất ra như sau:&lt;br /&gt;&lt;/span&gt;&lt;p style="color: rgb(255, 0, 0);"&gt;This is a simple replace test. the text in bold should contain "TEST": &lt;b&gt;TEST&lt;/b&gt;&lt;br /&gt;now a dynamic block test:&lt;br /&gt;this is block 1.&lt;br /&gt;&lt;/p&gt;   &lt;table style="color: rgb(255, 0, 0);" color="blue" border="1"&gt;   &lt;tbody&gt;&lt;tr&gt;    &lt;td&gt;id&lt;/td&gt;    &lt;td&gt;38&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td&gt;name&lt;/td&gt;    &lt;td&gt;cocomp&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td&gt;age&lt;/td&gt;    &lt;td&gt;33&lt;/td&gt;   &lt;/tr&gt;  &lt;/tbody&gt;&lt;/table&gt;   &lt;p style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;global variables can be parsed directly into the html without assigns:&lt;br /&gt;$_SERVER['HTTP_HOST']=localhost&lt;br /&gt;$_SERVER['PHP_SELF']=/test/ex1.php&lt;br /&gt;$_SERVER['HTTP_USER_AGENT']=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20061201 Firefox/2.0.0.4 (Ubuntu-feisty)&lt;br /&gt;etc..&lt;br /&gt;(note that these variables are scanned in the constructor when creating the XTemplate object! so if you need some variables which you have set after creating the template object, you need to call &lt;b&gt;$xtpl-&gt;scan_globals()&lt;/b&gt; before parsing the actual block!&lt;/p&gt;Bạn hãy xem nội dung file template : ex1.xtpl&lt;br /&gt;&amp;lt;!-- BEGIN: main --&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "&lt;a target="_BLANK" href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&lt;/a&gt;"&amp;gt;&lt;br /&gt;&amp;lt;html xmlns="&lt;a target="_BLANK" href="http://www.w3.org/1999/xhtml"&gt;http://www.w3.org/1999/xhtml&lt;/a&gt;"&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;example 1&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Content-Language" content="en" /&amp;gt;&lt;br /&gt;&amp;lt;meta name="GENERATOR" content="Co-Comp Ltd" /&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;!-- $HeadURL: &lt;a target="_BLANK" href="https://xtpl.svn.sourceforge.net/svnroot/xtpl/trunk/ex1.xtpl"&gt;https://xtpl.svn.source...root/xtpl/trunk/ex1.xtpl&lt;/a&gt; $&lt;br /&gt;$Id: ex1.xtpl 16 2007-01-11 03:02:49Z cocomp $ --&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;This is a simple replace test. the text in bold should contain "TEST": &amp;lt;b&amp;gt;{VARIABLE}&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;now a dynamic block test:&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;!-- BEGIN: block1 --&amp;gt;&lt;br /&gt;this is block 1.&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;!-- END: block1 --&amp;gt;&lt;br /&gt;&amp;lt;!-- BEGIN: block2 --&amp;gt;&lt;br /&gt;this is block 2.&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;!-- END: block2 --&amp;gt;&lt;br /&gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;!-- BEGIN: block3#You can comment a block like this --&amp;gt;&lt;br /&gt;&amp;lt;table border="1"&amp;gt;&lt;br /&gt; &amp;lt;tr&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;id&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;{DATA.ID}&amp;lt;/td&amp;gt;&lt;br /&gt; &amp;lt;/tr&amp;gt;&lt;br /&gt; &amp;lt;tr&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;name&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;{DATA.NAME#You can comment tags like this}&amp;lt;/td&amp;gt;&lt;br /&gt; &amp;lt;/tr&amp;gt;&lt;br /&gt; &amp;lt;tr&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;age&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;{DATA.AGE}&amp;lt;/td&amp;gt;&lt;br /&gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;!-- END: block3#Or comment it here too --&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;global variables can be parsed directly into the html without assigns:&amp;lt;br /&amp;gt;&lt;br /&gt;$_SERVER['HTTP_HOST']={PHP._SERVER.HTTP_HOST}&amp;lt;br /&amp;gt;&lt;br /&gt;$_SERVER['PHP_SELF']={PHP._SERVER.PHP_SELF}&amp;lt;br /&amp;gt;&lt;br /&gt;$_SERVER['HTTP_USER_AGENT']={PHP._SERVER.HTTP_USER_AGENT}&amp;lt;br /&amp;gt;&lt;br /&gt;etc..&amp;lt;br /&amp;gt;&lt;br /&gt;(&amp;lt;span &amp;gt;note&amp;lt;/span&amp;gt; that these variables are scanned in the constructor when creating the XTemplate object!&lt;br /&gt;so if you need some variables which you have set after creating the template object, you need to call &amp;lt;b&amp;gt;$xtpl-&amp;gt;scan_globals()&amp;lt;/b&amp;gt;&lt;br /&gt;before parsing the actual block!&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&amp;lt;!-- END: main --&amp;gt;&lt;br /&gt;Đầu tiên là block main (begin và end của nó bao trùm hết cả template, bạn hãy nhìn vào đầu và cuối file template nầy), nhân viên thiết kế giao diện phải làm theo đúng định dạng nầy. Để comment cho nhân viên lập trình biết block đó để làm gì và sẽ gán biến gì vào đó nhân viên thiết kế có thể comment bằng cách thêm dấu # và nội dung comment ngay sau đó.&lt;br /&gt;Trong block main sẽ có thể có các block con, ở đây là block1, block2 và block3. Ngoài ra nó còn có các biến sẽ hiển thị và phần gán giá trị cho các biến nầy sẽ được file ex1.php lo ;)&lt;br /&gt;Bạn hãy xem nội dung file source: ex1.php&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;//đầu tiên là phải include lớp xử lý template vào.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;include_once('./xtemplate.class.php');&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;//tạo một đối tượng template&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;$xtpl = new XTemplate('ex1.xtpl');&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;// ta muốn gán biến VARIABLE trong block mail là TEST. Như các bạn đã thấy trên phần kết&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;//quả kết xuất trên trình duyệt&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;$xtpl-&gt;assign('VARIABLE', 'TEST');&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;// Bây giờ parse block1. block1 đơn giản chỉ là một chuỗi html: this is the block1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;$xtpl-&gt;parse('main.block1');&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;// bạn bỏ dấu // ở dòng tiếp theo để parse block2 kết quả y chang khi parse block1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;//$xtpl-&gt;parse('main.block2');&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    /**&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     * Bạn có thể xuất một mảng trong template bằng cách sau:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     * {DATA.ID} hay {DATA.NAME} hay {DATA.AGE}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     * Chúng ta có thể truy cập cơ sở dữ liệu để có các giá trị nầy: ID, NAME, AGE&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;     */&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;$row = array('ID'=&gt;'38',&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;                'NAME'=&gt;'cocomp',&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;                 'AGE'=&gt;'33'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;             );&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;//gán giá trị cho biến DATA sẽ được thể hiện trong block3&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;$xtpl-&gt;assign('DATA',$row);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;// parse block3&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;$xtpl-&gt;parse('main.block3');&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;//cuối cùng parse block main&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;$xtpl-&gt;parse('main');&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;$xtpl-&gt;out('main');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Chú ý rằng ta sẽ parse các block theo thứ tự từ trong ra ngoài, nếu ta parse block ngoài mà chưa parse block trong thì sẽ không thể hiện block trong được.&lt;br /&gt;&lt;br /&gt;Thế là xong ví dụ 1.&lt;br /&gt;Hi vọng bạn có thể hiểu và áp dụng cho trang web của mình. Phần sau mình sẽ ví dụ cho phần hiển thị một bảng (table). Về phần áp dụng rất đơn giản&lt;span style="font-family:arial;"&gt;. Trong trang web của bạn, có một phần , giả dụ là form login nhé ! ở phần hiển thị form login nầy bạn đơn giản chèn đoạn code xử lý template mong muốn vào, thế là xong. Tất nhiên file template (file giao diện) đã được bạn thiết kế.&lt;br /&gt;source code ví dụ : comming soon&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-6391104330546900371?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/6391104330546900371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=6391104330546900371' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6391104330546900371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6391104330546900371'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/06/lp-trnh-php-bng-cng-ngh-template.html' title='Lập trình PHP bằng công nghệ template'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-1706757924233551244</id><published>2007-06-18T10:42:00.000+07:00</published><updated>2007-06-18T15:55:31.009+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Từ điển trong Linux (Ubuntu 7.04)</title><content type='html'>Mình có viết một hướng dẫn cài Stardict trong Ubuntu 7.04 bằng tiếng Anh và bạn mình đã nhận xét là làm theo hơi khó. Nay mình xin viết lại bằng tiếng Việt, với một chút sửa đổi, mong rằng sẽ giúp ích cho các bạn mới lần đầu sử dụng Linux (Ubuntu 7.04)&lt;br /&gt;  Bước 1: mở terminal lên (Application -&gt; Accessories -&gt; Terminal)&lt;br /&gt;  Bước 2: download gói cài đặt từ điển Stardict. trong terminal bạn gõ:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;wget http://nchc.dl.sourceforge.net/sourceforge/stardict/stardict-2.4.8.tar.bz2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;dòng lệnh nầy sẽ download mã nguồn từ server về do đó bạn phải kết nối internet để có thể chạy dòng lệnh trên.&lt;br /&gt;  Bước 3: giải nén và bắt đầu cài đặt. Trong terminal bạn gõ:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;tar -xjvf stardict-2.4.8.tar.bz2&lt;/span&gt;&lt;br /&gt;chuyển vào thư mục mã nguồn&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cd stardict-2.4.8&lt;/span&gt;&lt;br /&gt;   Chạy các lệnh cài đặt&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;./configure&lt;/span&gt;&lt;br /&gt;   Sau lệnh nầy các bạn thường sẽ gặp lỗi (do thiếu thư viện). Riêng tôi, bị báo là: "error: No package 'libgnomeui-2.0' found" tôi đã giải quyết vấn đề nầy như sau: tôi vào google và gõ: No package 'libgnomeui-2.0' found &lt;span style="font-weight: bold;"&gt;Ubuntu&lt;/span&gt;, vì tui đang dùng Ubuntu mà ;) lần theo các link mà google cung cấp tôi tìm ra giải pháp: &lt;strong&gt;sudo apt-get install&lt;/strong&gt; &lt;strong&gt;libgnomeui-dev&lt;/strong&gt; thế là tôi chạy lệnh nầy xong rồi chạy lại lệnh ./configure và không nhận được báo lỗi nào nửa.&lt;br /&gt;   Chú ý rằng bạn phải chạy lệnh ./configure và không nhận được bất cứ lỗi nào nữa thì mới tiếp tục được.&lt;br /&gt;chạy tiếp lệnh:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;make&lt;/span&gt;&lt;br /&gt;rùi lệnh:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;sudo make install&lt;/span&gt;&lt;br /&gt;[gõ password nếu được yêu cầu.]&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;mkdir /home/(username của bạn)/.stardict &lt;/span&gt;&lt;br /&gt;ví dụ tôi có account linux là nha -&gt; mkdir /home/nha/.stardict&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;mkdir /home/(username của bạn)/.stardict/dic&lt;/span&gt;&lt;br /&gt;trong trường hợp của tôi là mkdir /home/nha/.stardict/dic&lt;br /&gt;chuyển vào thư mục chứa tiệp tin từ điển, ta sẽ download và giải nén các tập tin từ điển vào thư mục nầy.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cd /home/(username của bạn)/.stardict/dic&lt;/span&gt;&lt;br /&gt;trong trường hợp của tôi là cd /home/nha/.stardict/dic&lt;br /&gt;   Tôi sẽ download và sử dụng 2 cuốn Anh-Việt và Việt-Anh&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-weight: bold;"&gt;wget http://jaist.dl.sourceforge.net/sourceforge/stardict/stardict-dictd_anh-viet-2.4.2.tar.bz2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;wget http://nchc.dl.sourceforge.net/sourceforge/stardict/stardict-dictd_viet-anh-2.4.2.tar.bz2&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;    Để biết đường dẫn của các file từ điển bạn vào trang &lt;a href="http://stardict.sourceforge.net/Dictionaries_misc.php"&gt;&lt;span style="font-size:85%;"&gt;http://stardict.sourceforge.net/Dictionaries_misc.php&lt;/span&gt;&lt;/a&gt; và copy các đường dẫn các file từ điển trong đó.&lt;br /&gt;   Giải nén và sử dụng chương trình từ điển stardict.&lt;br /&gt;tar -xjvf stardict-dictd_anh-viet-2.4.2.tar.bz2&lt;br /&gt;tar -xjvf stardict-dictd_viet-anh-2.4.2.tar.bz2&lt;br /&gt;&lt;br /&gt;Xong rùi đó các bạn, bây giờ mở Applications -&gt;Accessories -&gt; Stardict.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-1706757924233551244?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/1706757924233551244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=1706757924233551244' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/1706757924233551244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/1706757924233551244'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/06/t-in-trong-linux-ubuntu-704.html' title='Từ điển trong Linux (Ubuntu 7.04)'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-5568157025258745833</id><published>2007-06-16T08:21:00.000+07:00</published><updated>2007-06-16T08:28:20.014+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Để Firefox đẹp hơn trong Ubuntu</title><content type='html'>Hì ! cái nầy cop từ &lt;a style="font-weight: bold;" href="http://saylinux.wordpress.com/"&gt;saylinux&lt;/a&gt; có gì mong tác giả lượng thứ ! Tất cả chỉ vì việc quảng bá và nâng cao khả năng sử dụng linux của người Việt mình thui :)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;"&lt;/span&gt;Mở cửa sổ dòng lệnh Terminal bằng cách vào menu &lt;code&gt;Applications &gt; Accessories &gt; Terminal&lt;/code&gt;. Bạn gõ và thực hiện tuần tự các lệnh sau: &lt;p style="font-weight: bold;"&gt;&lt;code&gt;wget http://users.tkk.fi/~otsaloma/art/firefox-form-widgets.tar.gz&lt;/code&gt;&lt;/p&gt; &lt;p style="font-weight: bold;"&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;&lt;code&gt;tar -xvf firefox-form-widgets.tar.gz&lt;/code&gt;&lt;/p&gt; &lt;p style="font-weight: bold;"&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;&lt;code&gt;sudo cp /usr/lib/mozilla-firefox/res/forms.css /usr/lib/mozilla-firefox/res/forms.css.bak&lt;/code&gt;&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;&lt;code&gt;cat firefox-form-widgets/res/forms-extra.css | sudo tee --append /usr/lib/mozilla-firefox/res/forms.css &gt; /dev/null&lt;/code&gt;&lt;/p&gt; &lt;p style="font-weight: bold;"&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;&lt;code&gt;sudo cp -r firefox-form-widgets/res/form-widgets /usr/lib/mozilla-firefox/res&lt;/code&gt;&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;&lt;p style="font-weight: bold;"&gt;&lt;code&gt;rm -rf firefox-form-widgets*&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Quá trình này thực chất là thay những thiết lập mặc định của Firefox bằng một vài thứ hay hơn. Phương pháp mình học được từ &lt;a href="http://ubuntuforums.org/" title="Forum của cộng đồng người dùng Ubuntu" target="_blank"&gt;Forum của cộng đồng Ubuntu&lt;/a&gt; đấy.&lt;span style="font-weight: bold;"&gt;"&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;copy hông sai một chữ ;))&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-5568157025258745833?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/5568157025258745833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=5568157025258745833' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/5568157025258745833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/5568157025258745833'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/06/firefox-p-hn-trong-ubuntu.html' title='Để Firefox đẹp hơn trong Ubuntu'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-3353458367046139361</id><published>2007-06-14T16:00:00.000+07:00</published><updated>2007-06-14T16:27:19.784+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Intall wxDownload Fast for fast download on Ubuntu</title><content type='html'>Trong Windows chúng ta có chương trình Internet Download Manager rất hay có thể chia nhỏ gói cần download ra để tăng tốc việc download. Thế trong Linux thì seo nhỉ ? có ngay wxdfast ;) bạn có thể xem toàn bộ các thông tin về nó tại địa chỉ sau &lt;a href="http://dfast.sourceforge.net/download.html"&gt;http://dfast.sourceforge.net/download.html&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Sau đây là kinh nghiệm cài đặt wxdfast của tớ trong Ubuntu 7.04&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Bước 1: cài các thư viện, trong terminal gõ:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;sudo apt-get install build-essential libwxgtk2.6-0 libmad0 libsndfile1 libwxgtk2.6-dev gettext&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Bước 2: download gói .deb và cài, trong terminal gõ:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;wget http://nchc.dl.sourceforge.net/sourceforge/dfast/wxdfast_0.6.0-1_ubuntu_i386.deb&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;sudo dpkg -i wxdfast_0.6.0-1_ubuntu_i386.deb&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Xong rùi đoá các bạn.&lt;br /&gt;&lt;br /&gt;Mún chạy nó bạn chỉ cần gõ: wxdfast trong terminal là xong, đây là phần mềm download tương tự Internet Download Manager trong Windows.&lt;br /&gt;&lt;br /&gt;Chúc các bạn cài thành công, có gì lỗi thì comment tại đây nhe !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-3353458367046139361?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/3353458367046139361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=3353458367046139361' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3353458367046139361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3353458367046139361'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/06/intall-wxdownload-fast-for-fast.html' title='Intall wxDownload Fast for fast download on Ubuntu'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-4805421819014337561</id><published>2007-06-11T16:06:00.000+07:00</published><updated>2007-06-11T16:13:50.963+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Cài đặt IE trong Ubuntu</title><content type='html'>&lt;span style="font-size:85%;"&gt;Có những lúc bạn cần phải chạy IE để test các trang web bạn làm cho khách hàng.....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Cài &lt;strong&gt;wine và cabextract&lt;/strong&gt;&lt;br /&gt;sudo apt-get install wine cabextract&lt;br /&gt;&lt;br /&gt;2. Trong terminal gõ:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-2.0.5.tar.gz&lt;/span&gt;&lt;br /&gt;Download xong bạn giải nén:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;tar xzvf ies4linux-2.0.5.tar.gz&lt;/span&gt;&lt;br /&gt;Vào thư mục vừa giải nén&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;cd ies4linux-2.0.5&lt;/span&gt;&lt;br /&gt;Cài.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;./ies4linux&lt;/span&gt;&lt;br /&gt;Sau khi cài xong chạy thử nhe ;)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;/home/username/bin/ie6&lt;/span&gt;&lt;br /&gt;Vì tôi có username trong máy là &lt;span style="font-weight: bold;"&gt;nhakhtn&lt;/span&gt; nên đường dẫn là : &lt;span style="font-weight: bold;"&gt;/home/nhakhtn/bin/ie6&lt;/span&gt;&lt;br /&gt;Chúc bạn cài thành công hihi...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-4805421819014337561?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/4805421819014337561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=4805421819014337561' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/4805421819014337561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/4805421819014337561'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/06/ci-t-ie-trong-ubuntu.html' title='Cài đặt IE trong Ubuntu'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-8500493566124583838</id><published>2007-05-30T09:18:00.000+07:00</published><updated>2007-07-14T22:39:46.113+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP MySQL'/><title type='text'>Demo mã số học sinh tự sinh theo định dạng.</title><content type='html'>Vào console của mysql.&lt;br /&gt;1. tạo database:&lt;br /&gt;mysql&gt;create database test;&lt;br /&gt;2. chuyển  qua database test:&lt;br /&gt;mysql&gt;use test;&lt;br /&gt;3. tạo table hocsinh:&lt;br /&gt;mysql&gt;&lt;span class="syntax"&gt;&lt;span class="syntax_alpha syntax_alpha_reservedWord"&gt;CREATE&lt;/span&gt;  &lt;span class="syntax_alpha syntax_alpha_reservedWord"&gt;TABLE&lt;/span&gt; &lt;span class="syntax_alpha syntax_alpha_identifier"&gt;hocsinh&lt;/span&gt;&lt;span class="syntax_white syntax_white_newline"&gt;&lt;/span&gt;&lt;span class="syntax_punct syntax_punct_bracket_open_round"&gt;(&lt;/span&gt;&lt;div class="syntax_indent1"&gt;&lt;span class="syntax_white syntax_white_newline"&gt;&lt;/span&gt;&lt;span class="syntax_alpha syntax_alpha_identifier"&gt;id&lt;/span&gt; &lt;span class="syntax_alpha syntax_alpha_columnType"&gt;smallint&lt;/span&gt; &lt;span class="syntax_alpha syntax_alpha_reservedWord"&gt;PRIMARY&lt;/span&gt;  &lt;span class="syntax_alpha syntax_alpha_reservedWord"&gt;KEY&lt;/span&gt;  &lt;span class="syntax_alpha syntax_alpha_reservedWord"&gt;AUTO_INCREMENT&lt;/span&gt; &lt;span class="syntax_punct syntax_punct_listsep"&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class="syntax_white syntax_white_newline"&gt;&lt;/span&gt;&lt;span class="syntax_alpha syntax_alpha_identifier"&gt;maso&lt;/span&gt; &lt;span class="syntax_alpha syntax_alpha_identifier"&gt;nvarchar&lt;/span&gt;&lt;span class="syntax_punct syntax_punct_bracket_open_round"&gt;(&lt;/span&gt; &lt;span class="syntax_digit syntax_digit_integer"&gt;11&lt;/span&gt;  &lt;span class="syntax_punct syntax_punct_bracket_close_round"&gt;)&lt;/span&gt;  &lt;span class="syntax_alpha syntax_alpha_reservedWord"&gt;NOT&lt;/span&gt;  &lt;span class="syntax_alpha syntax_alpha_reservedWord"&gt;NULL&lt;/span&gt; &lt;span class="syntax_alpha syntax_alpha_columnAttrib"&gt;default&lt;/span&gt;  &lt;span class="syntax_quote syntax_quote_single"&gt;'maso'&lt;/span&gt;&lt;span class="syntax_punct syntax_punct_listsep"&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class="syntax_white syntax_white_newline"&gt;&lt;/span&gt;&lt;span class="syntax_alpha syntax_alpha_identifier"&gt;hoten&lt;/span&gt; &lt;span class="syntax_alpha syntax_alpha_identifier"&gt;nvarchar&lt;/span&gt;&lt;span class="syntax_punct syntax_punct_bracket_open_round"&gt;(&lt;/span&gt; &lt;span class="syntax_digit syntax_digit_integer"&gt;50&lt;/span&gt;  &lt;span class="syntax_punct syntax_punct_bracket_close_round"&gt;)&lt;/span&gt;  &lt;span class="syntax_alpha syntax_alpha_reservedWord"&gt;NOT&lt;/span&gt;  &lt;span class="syntax_alpha syntax_alpha_reservedWord"&gt;NULL&lt;/span&gt; &lt;span class="syntax_alpha syntax_alpha_columnAttrib"&gt;default&lt;/span&gt;  &lt;span class="syntax_quote syntax_quote_single"&gt;'ho ten hoc sinh'&lt;/span&gt;&lt;span class="syntax_punct syntax_punct_listsep"&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class="syntax_white syntax_white_newline"&gt;&lt;/span&gt;&lt;span class="syntax_alpha syntax_alpha_identifier"&gt;namsinh&lt;/span&gt; &lt;span class="syntax_alpha syntax_alpha_columnType"&gt;smallint&lt;/span&gt; &lt;span class="syntax_alpha syntax_alpha_reservedWord"&gt;NOT&lt;/span&gt;  &lt;span class="syntax_alpha syntax_alpha_reservedWord"&gt;NULL&lt;/span&gt; &lt;span class="syntax_alpha syntax_alpha_columnAttrib"&gt;default&lt;/span&gt;  &lt;span class="syntax_quote syntax_quote_single"&gt;'1984'&lt;/span&gt;&lt;span class="syntax_punct syntax_punct_listsep"&gt;,&lt;/span&gt;&lt;br /&gt;&lt;span class="syntax_white syntax_white_newline"&gt;&lt;/span&gt;&lt;span class="syntax_alpha syntax_alpha_identifier"&gt;lop&lt;/span&gt; &lt;span class="syntax_alpha syntax_alpha_identifier"&gt;nvarchar&lt;/span&gt;&lt;span class="syntax_punct syntax_punct_bracket_open_round"&gt;(&lt;/span&gt; &lt;span class="syntax_digit syntax_digit_integer"&gt;8&lt;/span&gt;  &lt;span class="syntax_punct syntax_punct_bracket_close_round"&gt;)&lt;/span&gt;  &lt;span class="syntax_alpha syntax_alpha_reservedWord"&gt;NOT&lt;/span&gt;  &lt;span class="syntax_alpha syntax_alpha_reservedWord"&gt;NULL&lt;/span&gt; &lt;span class="syntax_alpha syntax_alpha_columnAttrib"&gt;default&lt;/span&gt;  &lt;span class="syntax_quote syntax_quote_single"&gt;'02ct2b'&lt;/span&gt;&lt;span class="syntax_white syntax_white_newline"&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="syntax_punct syntax_punct_bracket_close_round"&gt;)&lt;/span&gt;&lt;span class="syntax_punct syntax_punct_queryend"&gt;;&lt;br /&gt;4. tạo trigger:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;code&gt;&lt;/code&gt;mysql&gt;DELIMITER &lt;span style="font-weight: bold;"&gt;|&lt;/span&gt;&lt;br /&gt;mysql&gt;CREATE TRIGGER tg1 BEFORE INSERT ON hocsinh&lt;br /&gt;FOR EACH ROW BEGIN&lt;br /&gt;SET NEW.maso = CONCAT( NEW.lop, ( SELECT AUTO_INCREMENT FROM information_schema.TABLES&lt;br /&gt;WHERE table_schema = 'test' AND TABLE_NAME = 'hocsinh')) ;&lt;br /&gt;END ;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;|&lt;/span&gt;&lt;br /&gt;mysql&gt;DELIMITER ;&lt;br /&gt;&lt;br /&gt;Vậy là xong. Khi insert một dòng mới vào bảng hocsinh bạn sẽ thấy mã số sẽ ra theo định dạng mong muốn.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Một số lưu ý:&lt;/span&gt;&lt;br /&gt;AUTO_INCREMENT chỉ được áp dụng cho column thuộc khoá.&lt;br /&gt;Khi dùng NEW trong trigger BEFORE thì cột có thuộc tính AUTO_INCREMENT sẽ có giá trị NULL (vì thực tế là chưa insert mà cho nên NEW.id = NULL)&lt;br /&gt;Lệnh DELIMITER ; hay DELIMITER  &lt;span style="font-weight: bold;"&gt;| &lt;/span&gt;dùng để định nghĩa lại kí tự kết thúc câu lệnh trong console của mysql.&lt;br /&gt;-------------------------------------------------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Các qui định với trigger trong MySQL&lt;/span&gt;&lt;br /&gt;Một row OLD chỉ cho phép đọc, không cho phép sửa. Bạn có thể xem giá trị của nó, nhưng không có quyền sửa nó.&lt;br /&gt;Trong BEFORE trigger, bạn có thể sửa giá trị của NEW ví dụ SET NEW.col_name = value. có nghĩa là bạn có quyền sửa lại giá trị của row sắp thêm vào table.&lt;br /&gt;Trong BEFORE trigger, một column của NEW với thuộc tính AUTO_INCREMENT sẽ là 0, nó chưa có giá trị, chỉ khi nào row được thực sự thêm vào table thì nó mới được có giá trị.&lt;br /&gt;Một trigger không được gọi một cách tường minh, chỉ khi nào một hành động có thể active nó xãy ra thì nó mới xãy ra.&lt;br /&gt;Một trigger không được chứa &lt;code class="literal"&gt;START           TRANSACTION&lt;/code&gt;, &lt;code class="literal"&gt;COMMIT&lt;/code&gt;, hay           &lt;code class="literal"&gt;ROLLBACK&lt;/code&gt;.   &lt;br /&gt;Nếu một BEFORE trigger bị lỗi (fail) thì hành động gây ra trigger ví dụ insert hay update sẽ không được hoàn tất.&lt;br /&gt;Một AFTER trigger chỉ được gọi khi BEFORE trigger được gọi thành công&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-8500493566124583838?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/8500493566124583838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=8500493566124583838' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/8500493566124583838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/8500493566124583838'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/05/demo-m-s-hc-sinh-t-sinh-theo-nh-dng.html' title='Demo mã số học sinh tự sinh theo định dạng.'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-7970403842003421409</id><published>2007-05-28T13:37:00.000+07:00</published><updated>2007-07-14T22:39:46.113+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP MySQL'/><title type='text'>Trigger trong MySQL</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style="font-family:arial;"&gt;Từ phiên bản 5.0 trở lên MySQL có hỗ trợ Trigger. Sau đây là bản dịch từ tài liệu Online của mysql.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Syntax: &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;    CREATE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;        [DEFINER = { user | CURRENT_USER }]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;        TRIGGER trigger_name trigger_time trigger_event&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;        ON tbl_name FOR EACH ROW trigger_stmt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Để có thể tạo trigger thì user phải có quyền tạo trigger (tất nhiên rùi :)) )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;Trigger chỉ có thể liên quan tới một bảng &lt;span style="font-weight: bold;"&gt;tbl_name&lt;/span&gt; mà thôi không chấp nhận view hay bảng tạm (temporary table)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;Khi tạo trigger thì một &lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;font-size:130%;"  &gt;DEFINER&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-family:arial;"&gt; sẽ được chỉ ra _ sẽ nói ở phần sau của hướng dẫn nầy.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;trigger_time&lt;/span&gt; là thời điểm mà trigger sẽ chạy. Có thể là BEFORE hay AFTER để chỉ ra trigger sẽ chạy trước hay sau sự kiện gây ra trigger.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;trigger_event&lt;/span&gt; cho biết loại của hành động gây ra trigger, nó có thể thuộc các dạng sau:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="itemizedlist"&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;code class="literal"&gt;INSERT&lt;/code&gt;: Trigger được kích hoạt khi một dòng mới được insert vào bảng ví dụ khi ta thực thi câu lệnh INSERT, LOAD DATA, hay REPLACE&lt;/span&gt;         &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;           &lt;span style="font-size:130%;"&gt;&lt;code class="literal"&gt;UPDATE&lt;/code&gt;: Trigger được kích hoạt khi một dòng được thay đổi ở đây thường là sau khi thực thi câu lệnh UPDATE&lt;/span&gt;         &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;           &lt;span style="font-size:130%;"&gt;&lt;code class="literal"&gt;DELETE&lt;/code&gt;: Trigger sẽ được kích hoạt khi một dòng bị xoá từ một bảng, ví dụ thông qua câu lệnh DELETE và REPLACE, Tuy vậy lệnh &lt;code class="literal"&gt;DROP TABLE&lt;/code&gt; và           &lt;code class="literal"&gt;TRUNCATE&lt;/code&gt; trên bảng sẽ không thể kích hoạt trigger được &lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:130%;"&gt;Một điều quan trọng cần phải hiểu là để kích hoạt trigger thì chỉ cần sự kiện kích hoạt xãy ra. Ta không nên chỉ nhìn vào phần nghĩa đen của câu lệnh, ví dụ để kích hoạt trigger theo insert thì lệnh LOAD DATA cũng có thể kích hoạt trigger được.&lt;br /&gt;&lt;br /&gt;Không được có hai trigger cho một bảng của cùng một hành động. ví dụ không được có hai trigger &lt;code class="literal"&gt;BEFORE UPDATE &lt;/code&gt;cho một bảng tuy nhiên có thể có một trigger &lt;code class="literal"&gt;BEFORE UPDATE &lt;/code&gt;và một trigger &lt;code class="literal"&gt;BEFORE INSERT &lt;span style="font-family:arial;"&gt;cho một bảng&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;em class="replaceable"&gt;&lt;code&gt;&lt;/code&gt;&lt;/em&gt;&lt;br /&gt;Trigger_stmt là một câu lệnh hay tập lệnh thực thi khi trigger chạy. Nếu bạn muốn chạy nhiều câu lệnh thì bạn phải đặt chúng trong cặp từ BEGIN và END.&lt;br /&gt;&lt;br /&gt;Hiện tại thì MySQL chưa hỗ trợ trigger mặc định cho khoá ngoại vấn đề nầy có lẽ sẽ được giải quyết nhanh ;) ráng chờ hén.&lt;br /&gt;&lt;br /&gt;Ví dụ:&lt;br /&gt;&lt;/span&gt;&lt;pre class="programlisting"&gt;&lt;span style="font-size:130%;"&gt;CREATE TABLE test1(a1 INT);&lt;br /&gt;CREATE TABLE test2(a2 INT);&lt;br /&gt;CREATE TABLE test3(a3 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);&lt;br /&gt;CREATE TABLE test4(&lt;br /&gt;a4 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,&lt;br /&gt;b4 INT DEFAULT 0&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;DELIMITER |&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;Lệnh DELIMITER là lệnh dùng để định lại kí tự kết thúc câu lệnh.&lt;br /&gt;Trong câu lệnh trên ta định nghĩa lại kí tự kết thúc câu lệnh là&lt;br /&gt;dấu thăng "|" bởi vì trong câu lệnh tạo trigger tiếp sau ta sẽ cần dùng&lt;br /&gt;kí tự ";"&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;CREATE TRIGGER testref BEFORE INSERT ON test1&lt;br /&gt;FOR EACH ROW BEGIN&lt;br /&gt;INSERT INTO test2 SET a2 = NEW.a1;&lt;br /&gt;DELETE FROM test3 WHERE a3 = NEW.a1;&lt;br /&gt;UPDATE test4 SET b4 = b4 + 1 WHERE a4 = NEW.a1;&lt;br /&gt;END;&lt;br /&gt;|&lt;br /&gt;&lt;br /&gt;/* kết thúc câu lệnh đánh dấu "|" */&lt;br /&gt;&lt;br /&gt;DELIMITER ;&lt;br /&gt;&lt;br /&gt;/* định nghĩa lại kí hiệu kết thúc câu lệnh là ";" */&lt;br /&gt;&lt;br /&gt;INSERT INTO test3 (a3) VALUES&lt;br /&gt;(NULL), (NULL), (NULL), (NULL), (NULL),&lt;br /&gt;(NULL), (NULL), (NULL), (NULL), (NULL);&lt;br /&gt;&lt;br /&gt;INSERT INTO test4 (a4) VALUES&lt;br /&gt;(0), (0), (0), (0), (0), (0), (0), (0), (0), (0);&lt;br /&gt;&lt;br /&gt;&lt;strong class="userinput"&gt;&lt;code&gt;mysql&gt; INSERT INTO test1 VALUES &lt;/code&gt;&lt;/strong&gt;&lt;strong class="userinput"&gt;&lt;code&gt;(1), (3), (1), (7), (1), (8), (4), (4);&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt;Query OK, 8 rows affected (0.01 sec)&lt;br /&gt;Records: 8  Duplicates: 0  Warnings: 0&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Kết quả:&lt;/span&gt;&lt;br /&gt;mysql&gt; &lt;strong class="userinput"&gt;&lt;code&gt;SELECT * FROM test1;&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt;+------+&lt;br /&gt;| a1   |&lt;br /&gt;+------+&lt;br /&gt;|    1 |&lt;br /&gt;|    3 |&lt;br /&gt;|    1 |&lt;br /&gt;|    7 |&lt;br /&gt;|    1 |&lt;br /&gt;|    8 |&lt;br /&gt;|    4 |&lt;br /&gt;|    4 |&lt;br /&gt;+------+&lt;br /&gt;8 rows in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; &lt;strong class="userinput"&gt;&lt;code&gt;SELECT * FROM test2;&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt;+------+&lt;br /&gt;| a2   |&lt;br /&gt;+------+&lt;br /&gt;|    1 |&lt;br /&gt;|    3 |&lt;br /&gt;|    1 |&lt;br /&gt;|    7 |&lt;br /&gt;|    1 |&lt;br /&gt;|    8 |&lt;br /&gt;|    4 |&lt;br /&gt;|    4 |&lt;br /&gt;+------+&lt;br /&gt;8 rows in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; &lt;strong class="userinput"&gt;&lt;code&gt;SELECT * FROM test3;&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt;+----+&lt;br /&gt;| a3 |&lt;br /&gt;+----+&lt;br /&gt;|  2 |&lt;br /&gt;|  5 |&lt;br /&gt;|  6 |&lt;br /&gt;|  9 |&lt;br /&gt;| 10 |&lt;br /&gt;+----+&lt;br /&gt;5 rows in set (0.00 sec)&lt;br /&gt;&lt;br /&gt;mysql&gt; &lt;strong class="userinput"&gt;&lt;code&gt;SELECT * FROM test4;&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt;+----+------+&lt;br /&gt;| a4 | b4   |&lt;br /&gt;+----+------+&lt;br /&gt;|  1 |    3 |&lt;br /&gt;|  2 |    0 |&lt;br /&gt;|  3 |    1 |&lt;br /&gt;|  4 |    2 |&lt;br /&gt;|  5 |    0 |&lt;br /&gt;|  6 |    0 |&lt;br /&gt;|  7 |    1 |&lt;br /&gt;|  8 |    1 |&lt;br /&gt;|  9 |    0 |&lt;br /&gt;| 10 |    0 |&lt;br /&gt;+----+------+&lt;br /&gt;10 rows in set (0.00 sec)&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-size:130%;"&gt;Bạn truy cập các thành phần của một dòng thông qua từ khoá NEW và OLD, NEW đại diện cho dòng vừa thêm vào (hay sắp thêm vào) và OLD đại diện cho dòng vừa bị xoá (hay sẽ bị xoá). &lt;code class="literal"&gt;NEW.&lt;em class="replaceable"&gt;&lt;code&gt;col_name, OLD&lt;/code&gt;&lt;/em&gt;&lt;/code&gt;&lt;code class="literal"&gt;.&lt;em class="replaceable"&gt;&lt;code&gt;col_name&lt;/code&gt;&lt;/em&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Bây giờ ta nói về DEFINER : chỉ ra user define trigger. ví dụ ta có thể ghi như sau: DEFINER = CURRENT_USER, hay DEFINER = nha@localhost ....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-7970403842003421409?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/7970403842003421409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=7970403842003421409' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7970403842003421409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7970403842003421409'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/05/trigger-trong-mysql.html' title='Trigger trong MySQL'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-2949888937018508251</id><published>2007-05-26T10:06:00.000+07:00</published><updated>2007-07-14T22:39:46.113+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP MySQL'/><title type='text'>Làm sao để post một mảng lên server ;)</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Demo post một mãng trong PHP.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;post.html&lt;br /&gt;&amp;lt;form action = "post.php" method="post" &amp;gt;&lt;br /&gt;Value 1&amp;lt;input type="text" name="yourvalue[0]"/&amp;gt;&lt;br /&gt;&lt;br /&gt;Value 2&amp;lt;input type="text" name="yourvalue[1]"/&amp;gt;&lt;br /&gt;&lt;br /&gt;Value 3&amp;lt;input type="text" name="yourvalue[2]"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input type="submit" name="submit"/&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;post.php&lt;br /&gt;&amp;lt?php&lt;br /&gt;if (isset($_POST['submit']))&lt;br /&gt;{&lt;br /&gt;echo $_POST['yourvalue'][0];&lt;br /&gt;echo "&amp;lt;br /&amp;gt;";&lt;br /&gt;echo $_POST['yourvalue'][1];&lt;br /&gt;echo "&amp;lt;br /&amp;gt;";&lt;br /&gt;echo $_POST['yourvalue'][2];&lt;br /&gt;echo "&amp;lt;br /&amp;gt;";&lt;br /&gt;}&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;Quá dễ phải hông các bạn :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-2949888937018508251?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/2949888937018508251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=2949888937018508251' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/2949888937018508251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/2949888937018508251'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/05/lm-sao-post-mt-mng-ln-server.html' title='Làm sao để post một mảng lên server ;)'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-1411525079694151836</id><published>2007-05-26T08:30:00.000+07:00</published><updated>2007-07-14T22:39:46.113+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP MySQL'/><title type='text'>Install Apache and PHP 5</title><content type='html'>&lt;h3 style="font-family: arial; font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt; Apache HTTP Server&lt;/span&gt;&lt;/h3&gt;&lt;span style="font-family: arial;font-size:100%;" &gt;from terminal type:&lt;br /&gt;sudo apt-get install apache2&lt;br /&gt;start Apache server:&lt;br /&gt;sudo /etc/init.d/apache2 start&lt;br /&gt;from web browser type into adress bar: localhost &lt;enter&gt;&lt;br /&gt;&lt;/enter&gt;&lt;/span&gt;&lt;h3 style="font-family: arial; font-weight: normal;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3 style="font-family: arial; font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;How to install PHP 5&lt;/span&gt;&lt;/h3&gt;&lt;pre style="font-family: arial;font-family:arial;" &gt;&lt;span style="font-size:100%;"&gt;sudo apt-get install php5&lt;br /&gt;sudo apt-get install libapache2-mod-php5&lt;br /&gt;sudo /etc/init.d/apache2 restart&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;To test if PHP 5 installed correctly&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;sudo gedit /var/www/testphp.php&lt;br /&gt;insert following line :&lt;br /&gt;&lt;br /&gt;save and exit.&lt;br /&gt;from web browser type to adress bar: localhost/testphp.php &lt;enter&gt;&lt;br /&gt;If that didn't work, try these commands:&lt;br /&gt;sudo a2enmod php5&lt;br /&gt;sudo /etc/init.d/apache2 force-reload&lt;br /&gt;(Optional) Install recommended PHP5 modules:&lt;br /&gt;sudo apt-get install php5-xsl php5-gd php-pear&lt;br /&gt;Restart Apache&lt;br /&gt;sudo /etc/init.d/apache2 restart&lt;br /&gt;&lt;br /&gt;The root directory of your web server is /var/www/ so you must&lt;br /&gt;place your projects in this folder.&lt;br /&gt;&lt;br /&gt;&lt;/enter&gt;&lt;/span&gt;&lt;h4 style="font-family: arial;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h4&gt;&lt;h4 style="font-family: arial;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: arial; font-weight: bold;font-size:100%;" &gt;How to install MYSQL for Apache HTTP Server&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h4&gt;&lt;pre style="font-family: arial;font-family:arial;" &gt;&lt;span style="font-size:100%;"&gt;sudo apt-get install mysql-server&lt;br /&gt;gksudo gedit /etc/mysql/my.cnf&lt;br /&gt;Find the line &lt;i&gt;bind-address = 127.0.0.1&lt;/i&gt; and comment it out&lt;br /&gt;...&lt;br /&gt;#bind-address           = 127.0.0.1&lt;br /&gt;...&lt;br /&gt;sudo /etc/init.d/mysql restart&lt;br /&gt;&lt;br /&gt;sudo apt-get install libapache2-mod-auth-mysql&lt;br /&gt;sudo apt-get install php5-mysql&lt;br /&gt;sudo aptitude install phpmyadmin&lt;br /&gt;gksudo gedit /etc/php&lt;version&gt;/apache2/php.ini&lt;br /&gt;You'll need to uncomment the ";extension=mysql.so" line so that&lt;br /&gt;it looks like this&lt;br /&gt;...&lt;br /&gt;extension=mysql.so&lt;br /&gt;...&lt;br /&gt;from web browser type: &lt;a href="http://localhost/phpmyadmin" class="external free" title="http://localhost/phpmyadmin" rel="nofollow"&gt;http://localhost/phpmyadmin&lt;/a&gt;&lt;newpassword&gt;&lt;br /&gt;&lt;/newpassword&gt;&lt;/version&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style="font-family: arial;font-size:100%;" &gt; &lt;/span&gt;&lt;pre  style="font-family:arial;"&gt;&lt;span style="font-size:100%;"&gt;&lt;enter&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: arial;"&gt;sources from http://ubuntuguide.org/wiki/Ubuntu&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/enter&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-1411525079694151836?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/1411525079694151836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=1411525079694151836' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/1411525079694151836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/1411525079694151836'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/05/install-apache-and-php-5.html' title='Install Apache and PHP 5'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-5983456121667827965</id><published>2007-05-24T14:12:00.000+07:00</published><updated>2007-05-24T15:02:31.840+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Backup and Restore Ubuntu System using Sbackup</title><content type='html'>Data can be lost in different ways some of them are because of hardware failures,you accidentally delete or overwrite a file. Some data loss occurs as a result of natural disasters and other circumstances beyond your control.&lt;span class="fullpost"&gt;&lt;p&gt;Now we will see a easy backup and restore tool called "sbackup"&lt;/p&gt;&lt;p&gt;SBackup is a simple backup solution intended for desktop use. It can backup any subset of files and directories. Exclusions can be defined by regular expressions. A maximum individual file size limit can be defined. Backups may be saved to any local and remote directories that are supported by gnome-vfs. There is a Gnome GUI interface for configuration and restore. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Current Stable Version : - 0.10.3&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Project Home page :- &lt;a href="http://sbackup.sourceforge.net/HomePage" target="_blank"&gt;http://sbackup.sourceforge.net/HomePage&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Sbackup Features List&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Backup any subset of files and directories &lt;/li&gt;&lt;li&gt;Exclude files and directories by regex expressions &lt;/li&gt;&lt;li&gt;Exclude files by type (extension) &lt;/li&gt;&lt;li&gt;Exclude files by maximum file size &lt;/li&gt;&lt;li&gt;Backup to local filesystem &lt;/li&gt;&lt;li&gt;Backup to any Gnome-VFS supported remote filesystem (including sftp and ftp) &lt;/li&gt;&lt;li&gt;Full and incremental backups &lt;/li&gt;&lt;li&gt;Scheduling backups via cron &lt;/li&gt;&lt;li&gt;Gnome GUI for configuration &lt;/li&gt;&lt;li&gt;Gnome GUI for restore &lt;/li&gt;&lt;li&gt;Command-line restore tool that also provides a Python API for restoring a file or directory &lt;/li&gt;&lt;li&gt;Backing up package list in Debian derived distributions &lt;/li&gt;&lt;li&gt;On restore, existing files are not overwritten, but are renamed to a safe name&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Installing sbackup in ubuntu&lt;/strong&gt;&lt;/p&gt;sudo apt-get install sbackup&lt;br /&gt;&lt;/span&gt;&lt;span class="fullpost"&gt;&lt;strong&gt;&lt;br /&gt;Backup Your Data Using Sbackup&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;Once you completed the installation you can access sbackup using System---&gt;Administration---&gt;Simple Backup Config you can see this in the following screen&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_kaLaGUdZuyk/RlU8Zll41II/AAAAAAAAACs/tVHAmHsLzSY/s1600-h/1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_kaLaGUdZuyk/RlU8Zll41II/AAAAAAAAACs/tVHAmHsLzSY/s320/1.png" alt="" id="BLOGGER_PHOTO_ID_5068023365960782978" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;Next screen is asking for root password enter password and click ok&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_kaLaGUdZuyk/RlU8Z1l41JI/AAAAAAAAAC0/IF4H5lcupsw/s1600-h/2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_kaLaGUdZuyk/RlU8Z1l41JI/AAAAAAAAAC0/IF4H5lcupsw/s320/2.png" alt="" id="BLOGGER_PHOTO_ID_5068023370255750290" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;Once it opens the sbackup application you can see the following screen where you can configure your backup settings first tab is general options in this example i am choosing "Use custom backup settings"&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_kaLaGUdZuyk/RlU8aFl41KI/AAAAAAAAAC8/rbtKXchJ9rM/s1600-h/3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_kaLaGUdZuyk/RlU8aFl41KI/AAAAAAAAAC8/rbtKXchJ9rM/s320/3.png" alt="" id="BLOGGER_PHOTO_ID_5068023374550717602" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;&lt;p&gt;Sbackup can be operated in 3 different modes&lt;/p&gt;&lt;strong&gt;Recommended Backup&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;If you are new Ubuntu user or aren't sure what you should backup.This will perform a daily backup of your /home,system data held in /etc,/usr/local and /var.This will deliberately exclude any files over 100MB.By default this backup will be stored /var/backup&lt;/p&gt;&lt;strong&gt;Custom Backup&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;This is same as the recommended backup and in this you can change the settings include,exclude files,you can change the schedule time.&lt;/p&gt;&lt;strong&gt;Manual Backup&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;If you want to backup some files from time to time this option is for you and you can click backup now button to manually perform a backup according to the settings on the other backup properties dialog box tabs.&lt;/p&gt;Next you click on "Include" tab here you can include any file or directory you want to backup&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_kaLaGUdZuyk/RlU8aVl41LI/AAAAAAAAADE/DmA-XLGEZyI/s1600-h/4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_kaLaGUdZuyk/RlU8aVl41LI/AAAAAAAAADE/DmA-XLGEZyI/s320/4.png" alt="" id="BLOGGER_PHOTO_ID_5068023378845684914" border="0" /&gt;&lt;/a&gt;&lt;span class="fullpost"&gt;If you click on "Add file" button you should see the following screen where you can select your files&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_kaLaGUdZuyk/RlU8all41MI/AAAAAAAAADM/iMvJ5h801ag/s1600-h/5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_kaLaGUdZuyk/RlU8all41MI/AAAAAAAAADM/iMvJ5h801ag/s320/5.png" alt="" id="BLOGGER_PHOTO_ID_5068023383140652226" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;If you click on "Add Directory" button you should see the following screen where you can select your Directory for backup&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_kaLaGUdZuyk/RlU-DFl41NI/AAAAAAAAADU/VBUa3rC-DVQ/s1600-h/6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_kaLaGUdZuyk/RlU-DFl41NI/AAAAAAAAADU/VBUa3rC-DVQ/s320/6.png" alt="" id="BLOGGER_PHOTO_ID_5068025178436981970" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;Next option is "Exclude" here you can exclude files and folders you don't want to backup.Here you can exclude Paths,File Types,Regular Expressions,Max file,folder size&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_kaLaGUdZuyk/RlU-DVl41OI/AAAAAAAAADc/oUN6eYZ_GoU/s1600-h/7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_kaLaGUdZuyk/RlU-DVl41OI/AAAAAAAAADc/oUN6eYZ_GoU/s320/7.png" alt="" id="BLOGGER_PHOTO_ID_5068025182731949282" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;Next option is "Destination" here i am leaving the default location i.e /var/backup if you want to chnage the backup store location you can select the "Use Custom local Backup directory" and enter the location&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_kaLaGUdZuyk/RlU-DVl41PI/AAAAAAAAADk/xIMt3m8Xucc/s1600-h/8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_kaLaGUdZuyk/RlU-DVl41PI/AAAAAAAAADk/xIMt3m8Xucc/s320/8.png" alt="" id="BLOGGER_PHOTO_ID_5068025182731949298" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;Now you can select "Time" option here you can schedule when do you want to run your backup.&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_kaLaGUdZuyk/RlU-Dll41QI/AAAAAAAAADs/Izq52RsGNEI/s1600-h/9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_kaLaGUdZuyk/RlU-Dll41QI/AAAAAAAAADs/Izq52RsGNEI/s320/9.png" alt="" id="BLOGGER_PHOTO_ID_5068025187026916610" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;Available options for backups you can see in the following screen you can select hourly,daily,weekly,monthly,custom options&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_kaLaGUdZuyk/RlU-Dll41RI/AAAAAAAAAD0/fqsQbNh15b4/s1600-h/10.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_kaLaGUdZuyk/RlU-Dll41RI/AAAAAAAAAD0/fqsQbNh15b4/s320/10.png" alt="" id="BLOGGER_PHOTO_ID_5068025187026916626" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;Next option is "Purging" here you can select old and incomplete backups and you set the no.of days you want to purge after completing all the settings you need to click on "Save" button to save your settings.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_kaLaGUdZuyk/RlU_UFl41SI/AAAAAAAAAD8/tjgw94Y_uTE/s1600-h/11.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_kaLaGUdZuyk/RlU_UFl41SI/AAAAAAAAAD8/tjgw94Y_uTE/s320/11.png" alt="" id="BLOGGER_PHOTO_ID_5068026570006385954" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;Now if you want to take backup just click on "Backup Now" or leave the schedule backup in this example i just clicked on "Backup Now" this is started a background process with process id you can see this in the following screen&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_kaLaGUdZuyk/RlU_UVl41TI/AAAAAAAAAEE/AM_ZGKbLAas/s1600-h/12.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_kaLaGUdZuyk/RlU_UVl41TI/AAAAAAAAAEE/AM_ZGKbLAas/s320/12.png" alt="" id="BLOGGER_PHOTO_ID_5068026574301353266" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;&lt;p&gt;&lt;strong&gt;Restore Your Data Using Sbackup&lt;/strong&gt;&lt;/p&gt;If you want to restore backups or any files,folders go to System---&gt;Administration---&gt;Simple Backup Restore you can see this in the following screen&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_kaLaGUdZuyk/RlU_Ull41UI/AAAAAAAAAEM/z-XqmUNxxCY/s1600-h/13.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_kaLaGUdZuyk/RlU_Ull41UI/AAAAAAAAAEM/z-XqmUNxxCY/s320/13.png" alt="" id="BLOGGER_PHOTO_ID_5068026578596320578" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;Once it opens you should see the following screen here you can select the restore source folder and available backups from drop-down menu here you can choose files and folders you want to restore and click on "Restore" button&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_kaLaGUdZuyk/RlVDLFl41VI/AAAAAAAAAEU/PVlmenmFxQI/s1600-h/14.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_kaLaGUdZuyk/RlVDLFl41VI/AAAAAAAAAEU/PVlmenmFxQI/s320/14.png" alt="" id="BLOGGER_PHOTO_ID_5068030813434074450" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;In this example i have choosen to restore one .iso file and once you select your file and click on "Restore" it will ask for your confirmation click on yes this will restore the file in orginal location if you want to restore in different location you need to select "Restore As" option&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_kaLaGUdZuyk/RlVDLll41WI/AAAAAAAAAEc/Zotsj4JOyzY/s1600-h/15.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_kaLaGUdZuyk/RlVDLll41WI/AAAAAAAAAEc/Zotsj4JOyzY/s320/15.png" alt="" id="BLOGGER_PHOTO_ID_5068030822024009058" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;&lt;strong&gt;Note:-&lt;/strong&gt; By default Restored Files and Directories are owned by root this is because of sbackup will runs with root.You need to chnage these files or folder permissions using chmod or just right click and select properties of the file or folder.&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Backup Destination on Remote machine&lt;/strong&gt;&lt;/p&gt;One more beauty about sbackup is you can store your backup on a remotemachine for this it will give the option of using SSH or FTP for this go to System---&gt; Administration---&gt; Simple Backup Config once it opens the application you need to click on destination tab here you can select "Use a remote Directory" option type ssh:// or ftp:// followed by the username:password, then @, then the remote host to connect to and the remote directory.&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_kaLaGUdZuyk/RlVDL1l41XI/AAAAAAAAAEk/ax1dqZAtOw4/s1600-h/16.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_kaLaGUdZuyk/RlVDL1l41XI/AAAAAAAAAEk/ax1dqZAtOw4/s320/16.png" alt="" id="BLOGGER_PHOTO_ID_5068030826318976370" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="fullpost"&gt;&lt;strong&gt;Final Tip:-&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;Sbackup doesn't create a new backup file each time it runs and it creates an incremental backup.Which means that it updates the last backup with files that you changed or been created any files that haven't been updated since the last backup are unchanged&lt;/p&gt;&lt;strong&gt;Sbackup Configuration from command line&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;If you want to configure sbackup you need to Edit /etc/sbackup.conf file&lt;/p&gt;Restore Backup from command line&lt;br /&gt;&lt;p&gt;Run "sudo srestore.py /var/backup/2006-11-18_03 /home/myuser /home/myuser/old". You can omit the last parameter to restore to the same directory.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Sbackup is really very useful for new users particularly to allows users to choose either a simple backup scheme that performs incremental backups daily and full backups weekly, or to modify the default scheme with their own settings. Users list directories to backup in the Include tab, and select items to exclude in the Exclude tab. Exclusions can be based on directory,file type (sbackup excludes multimedia files by default), file size,or regular expression.This .&lt;/p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-5983456121667827965?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/5983456121667827965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=5983456121667827965' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/5983456121667827965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/5983456121667827965'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/05/backup-and-restore-ubuntu-system-using.html' title='Backup and Restore Ubuntu System using Sbackup'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_kaLaGUdZuyk/RlU8Zll41II/AAAAAAAAACs/tVHAmHsLzSY/s72-c/1.png' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-1330757928138108045</id><published>2007-05-24T10:13:00.000+07:00</published><updated>2007-12-18T11:15:32.847+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP MySQL'/><title type='text'>Gởi mail trong PHP</title><content type='html'>Trong PHP ta có thể gởi mail theo hai cách, cách 1 dùng hàm có sẵn của PHP, cách nầy đơn giản dễ hiểu, cách 2 là gỡi mail dùng smtp để gởi. Các 1 thường bị một số server ngăn không cho dùng (vì sợ bị web admin dùng cho việc phát tán thư rác) cách 2 phức tạp hơn.&lt;br /&gt;Cách 1: bạn tham khảo ở đây : &lt;a href="http://www.diendantinhoc.net/tute/webdev/php/php_by_examples/basic/tute_send_email.php"&gt;http://www.diendantinhoc.net/tute/webdev/php/php_by_examples/basic/tute_send_email.php&lt;/a&gt;&lt;br /&gt;Trong tutorial nầy tôi chỉ hướng dẫn cách 2 dùng smtp.&lt;br /&gt;Send mail với SMTP:&lt;br /&gt;Trước tiên bạn download file class.phpmailer.php từ trang web &lt;a href="http://phpmailer.sourceforge.net/"&gt;http://phpmailer.sourceforge.net/&lt;/a&gt; gói dành cho linux &lt;a href="http://sourceforge.net/project/downloading.php?groupname=phpmailer&amp;amp;filename=phpmailer-1.73.tar.gz&amp;amp;use_mirror=jaist"&gt;http://sourceforge.net/project/downloading.php?groupname=phpmailer&amp;amp;filename=phpmailer-1.73.tar.gz&amp;amp;use_mirror=jaist&lt;/a&gt;&lt;br /&gt;unzip tất nhiên :)&lt;br /&gt;Giả sử bạn đã có một tài khoản mail smtp thường có sẵn hoặt bạn tạo mới khi bạn mua host linux, hoặt là bạn được công ti cấp một email account cũng được.&lt;br /&gt;ví dụ của tôi là&lt;br /&gt;Host     = mail.ongkhoi.com // SMTP servers&lt;br /&gt;username = nha@ongkhoi.com&lt;br /&gt;password = quangcao&lt;br /&gt;&lt;br /&gt;và sau đây là code:&lt;br /&gt;require("class.phpmailer.php");&lt;br /&gt;require("class.smtp.php");&lt;br /&gt; $mail = new PHPMailer();&lt;br /&gt; $mail-&gt;IsSMTP();                      // send via SMTP&lt;br /&gt; $mail-&gt;Host     = "mail.ongkhoi.com"; // SMTP servers&lt;br /&gt; $mail-&gt;SMTPAuth = true;     // turn on SMTP authentication&lt;br /&gt; $mail-&gt;Username = "nha@ongkhoi.com";  // SMTP username&lt;br /&gt; $mail-&gt;Password = "quangcao"; // SMTP password&lt;br /&gt; $mail-&gt;From     = "nhakhtn@gmail.com";&lt;br /&gt; $mail-&gt;FromName = "Mailer";&lt;br /&gt; $mail-&gt;AddAddress($email,"Thanh vien"); //$email là địa chỉ email mà bạn muốn gởi&lt;br /&gt; $mail-&gt;AddReplyTo("nha@ongkhoi.com","Information");&lt;br /&gt; $mail-&gt;WordWrap = 50;                              // set word wrap&lt;br /&gt; $mail-&gt;IsHTML(true);                               // send as HTML&lt;br /&gt;$subject = 'Kích hoạt tài khoản tại quangcao1.com ! / Kich hoat tai khoan tai quangcao1.com';&lt;br /&gt; $message = "hihi test thui nhe";&lt;br /&gt; $mail-&gt;Subject  =  $subject;&lt;br /&gt; $mail-&gt;Body     =  $message;&lt;br /&gt; $mail-&gt;AltBody  =  "";&lt;br /&gt; if(!$mail-&gt;Send())&lt;br /&gt; {&lt;br /&gt;    echo "Message was not sent &lt;p&gt;";&lt;br /&gt;    echo "Mailer Error: " . $mail-&gt;ErrorInfo;&lt;br /&gt;    exit;&lt;br /&gt; }&lt;br /&gt;Hết :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-1330757928138108045?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/1330757928138108045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=1330757928138108045' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/1330757928138108045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/1330757928138108045'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/05/send-mail-vi-php.html' title='Gởi mail trong PHP'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-3037856855431594028</id><published>2007-05-23T21:55:00.000+07:00</published><updated>2007-05-23T22:13:26.935+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Install media on Ubuntu.</title><content type='html'>&lt;h4  style="font-family:arial;"&gt;&lt;span style="font-weight: normal;"&gt;Fist of all you must install the codes&lt;/span&gt;&lt;br /&gt;&lt;/h4&gt;&lt;h4 style="font-family: arial;"&gt; How to install Multimedia Codecs&lt;/h4&gt;&lt;span style="font-family:arial;"&gt;sudo aptitude install ubuntu-restricted-extras libxine-extracodecs gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-pitfdll&lt;/span&gt;&lt;br /&gt;&lt;pre style="font-family: arial;"&gt;sudo aptitude install w32codecs&lt;br /&gt;&lt;br /&gt;And after that you can install the tools for play media.&lt;br /&gt;&lt;br /&gt;1. How to install DVD playback capability&lt;br /&gt;sudo aptitude install libdvdread3&lt;br /&gt;sudo /usr/share/doc/libdvdread3/install-css.sh&lt;br /&gt;sudo aptitude install totem-xine&lt;br /&gt;sudo aptitude install libdvdcss2&lt;br /&gt;&lt;br /&gt;2. How to install MIDI sound server (Timidity++)&lt;br /&gt;sudo aptitude install timidity&lt;br /&gt;sudo gedit /etc/default/timidity&lt;br /&gt;Uncomment the following line (remove the "#" sign)&lt;br /&gt;#TIM_ALSASEQ=true&lt;br /&gt;sudo gedit /etc/modules&lt;br /&gt;Add the following modules to the end of the file&lt;br /&gt;snd-seq-device&lt;br /&gt;snd-seq-midi&lt;br /&gt;snd-seq-oss&lt;br /&gt;snd-seq-midi-event&lt;br /&gt;&lt;br /&gt;3. How to install Multimedia Player (xine-ui)&lt;br /&gt;sudo aptitude install xine-ui libxine-extracodecs&lt;br /&gt;&lt;br /&gt;4. How to install Multimedia Player (MPlayer)&lt;br /&gt;sudo aptitude install mplayer libxine-extracodecs&lt;br /&gt;sudo aptitude install kmplayer&lt;br /&gt;sudo aptitude install mozilla-mplayer&lt;br /&gt;&lt;br /&gt;5. How to install Multimedia Player (VLC)&lt;br /&gt;sudo aptitude install vlc vlc-plugin-*&lt;br /&gt;sudo aptitude install avahi-daemon&lt;br /&gt;sudo aptitude install avahi-utils&lt;br /&gt;sudo aptitude install mozilla-plugin-vlc&lt;br /&gt;&lt;br /&gt;6. How to install Multimedia Player (XMMS) : this is the good choice&lt;br /&gt;sudo aptitude install xmms xmms-skins xmms-wma&lt;br /&gt;&lt;br /&gt;7. How to install Multimedia Player (amaroK) : this is another good choice&lt;br /&gt;sudo aptitude install amarok&lt;br /&gt;&lt;br /&gt;After you install complete u can: &lt;span style="font-weight: bold;"&gt;Applications -&gt; Sound &amp; Video -&gt; the program u like&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: arial;"&gt;References from http://ubuntuguide.org/wiki/Ubuntu:Feisty#Multimedia_Players_.26_Browser_Plug-ins&lt;br /&gt;&lt;/pre&gt;&lt;pre style="font-family: arial;"&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-3037856855431594028?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/3037856855431594028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=3037856855431594028' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3037856855431594028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/3037856855431594028'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/05/install-media-on-ubuntu.html' title='Install media on Ubuntu.'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-6283226681170517053</id><published>2007-05-23T20:44:00.000+07:00</published><updated>2007-05-24T13:52:47.529+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Cài "xem phim nghe nhạc" trong Ubuntu 7.04</title><content type='html'>&lt;span style="font-family:arial;"&gt;Tôi là một người mới dùng Ubuntu và tôi cũng đã cài thành công các phần mềm nghe nhạc, xem phim trên môi trường nầy, tôi có thể vào các trang tuổi trẻ online, nhạc số để nghe nhạc bình thường.&lt;/span&gt; &lt;span style="font-family:arial;"&gt;Sau đây là kinh nghiệm của tui :)&lt;br /&gt;&lt;/span&gt;&lt;h4  style="font-family:arial;"&gt;&lt;span style="font-weight: normal;"&gt;Trước tiên cài codes đã chứ&lt;/span&gt;&lt;br /&gt;&lt;/h4&gt;&lt;span style="font-family:arial;"&gt;sudo aptitude install ubuntu-restricted-extras libxine-extracodecs gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-pitfdll&lt;/span&gt;&lt;br /&gt;&lt;pre style="font-family: arial;"&gt;sudo aptitude install w32codecs&lt;br /&gt;&lt;br /&gt;Sau đó tha hồ cài các media mà mình thích.&lt;br /&gt;&lt;br /&gt;1. Cài DVD playback.&lt;br /&gt;sudo aptitude install libdvdread3&lt;br /&gt;sudo /usr/share/doc/libdvdread3/install-css.sh&lt;br /&gt;sudo aptitude install totem-xine&lt;br /&gt;sudo aptitude install libdvdcss2&lt;br /&gt;&lt;br /&gt;2. Cài MIDI&lt;br /&gt;sudo aptitude install timidity&lt;br /&gt;sudo gedit /etc/default/timidity&lt;br /&gt;Xoá dấu # đi nhé&lt;br /&gt;#TIM_ALSASEQ=true&lt;br /&gt;sudo gedit /etc/modules&lt;br /&gt;Thêm các dòng sau vào&lt;br /&gt;snd-seq-device&lt;br /&gt;snd-seq-midi&lt;br /&gt;snd-seq-oss&lt;br /&gt;snd-seq-midi-event&lt;br /&gt;&lt;br /&gt;3. Cài Multimedia Player (xine-ui)&lt;br /&gt;sudo aptitude install xine-ui libxine-extracodecs&lt;br /&gt;&lt;br /&gt;4. Cài Multimedia Player (MPlayer)&lt;br /&gt;sudo aptitude install mplayer libxine-extracodecs&lt;br /&gt;sudo aptitude install kmplayer&lt;br /&gt;sudo aptitude install mozilla-mplayer&lt;br /&gt;&lt;br /&gt;5. Cài Multimedia Player (VLC)&lt;br /&gt;sudo aptitude install vlc vlc-plugin-*&lt;br /&gt;sudo aptitude install avahi-daemon&lt;br /&gt;sudo aptitude install avahi-utils&lt;br /&gt;sudo aptitude install mozilla-plugin-vlc&lt;br /&gt;&lt;br /&gt;6. Cài Multimedia Player (XMMS) : cái nầy nghe nhạc tốt&lt;br /&gt;sudo aptitude install xmms xmms-skins xmms-wma&lt;br /&gt;&lt;br /&gt;7. Cài Multimedia Player (amaroK) : Cái nầy cũng ok&lt;br /&gt;sudo aptitude install amarok&lt;br /&gt;&lt;br /&gt;Sau khi cài xong hết rùi thì vào: &lt;span style="font-weight: bold;"&gt;Applications -&gt; Sound &amp; Video&lt;br /&gt;-&gt; Cái mình cài rùi á&lt;/span&gt;&lt;/pre&gt;&lt;pre style="font-family: arial;"&gt;Tham khảo từ from http://ubuntuguide.org/wiki/Ubuntu:Feisty#M&lt;br /&gt;&lt;br /&gt;À quên ! các bạn phải kết nối internet để có thể làm theo hướng dẫn nhé.&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-6283226681170517053?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/6283226681170517053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=6283226681170517053' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6283226681170517053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6283226681170517053'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/05/ci-xem-phim-nghe-nhc-trong-ubuntu-704.html' title='Cài &quot;xem phim nghe nhạc&quot; trong Ubuntu 7.04'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-2645882103567146961</id><published>2007-05-23T15:01:00.000+07:00</published><updated>2007-05-23T19:01:05.527+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Cài đặt &amp; sử dụng unikey - Ubuntu 7.04</title><content type='html'>&lt;span style="font-family: arial;"&gt;Cách cài đặt và sử dụng unikey trong Ubuntu 7.04&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0); font-family: arial;"&gt;bước 1&lt;/span&gt;&lt;span style="font-family: arial;"&gt;: download mã nguồn từ trang &lt;/span&gt;&lt;a style="font-family: arial;" href="http://www.unikey.org/"&gt;unikey.org&lt;/a&gt;&lt;span style="font-family: arial;"&gt; về &lt;/span&gt;&lt;a style="font-family: arial;" href="http://nchc.dl.sourceforge.net/sourceforge/unikey/x-unikey-1.0.4.tar.bz2"&gt;http://nchc.dl.sourceforge.net/sourceforge/unikey/x-unikey-1.0.4.tar.bz2&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-family: arial;"&gt;bước 2&lt;/span&gt;&lt;span style="font-family: arial;"&gt;: giải nén. và mở terminal lên, chuyễn vào thư mục x-unikey-1.0.4 vừa giải nén.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-family: arial;"&gt;bước 3&lt;/span&gt;&lt;span style="font-family: arial;"&gt;: cài đặt. trong terminal gõ :&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;   ./configure&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;   make&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;   sudo make install.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;(trong quá trình cài đặt có thể xuất hiện một số lỗi, thường ở bước ./configure các bạn có thắc mắc gì thì comment nhé)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-family: arial;"&gt;bước 4&lt;/span&gt;&lt;span style="font-family: arial;"&gt;: kiểm tra các biến môi trường. trong terminal gõ:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo $LANG nếu nó hiện ra en_US.UTF-8 hoặt vi_VN.UTF-8 thì ok 1.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;echo $XMODIFIERS nếu nó hiện ra @im=unikey là ok 2.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;phải đủ hai điều kiện nầy thì unikey chạy mới ok.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;nếu không đủ hai điều kiện trên bạn mở file ~/.bashrc thêm vào hai dòng sau:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;export XMODIFIERS="@im=unikey"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;export LANG=en_US.UTF-8&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;(chú ý rằng file .bashrc là file ẫn (phải show hidden file mới thấy) nằm trong thư mục cá nhân ví dụ của tôi là /home/nhakhtn/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;khởi động lại máy.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;bước 5: chạy unikey. trong terminal gõ:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;unikey&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;một icon nhỏ viền xanh sẽ xuất hiện dưới góc phải màn hình desktop.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;các bạn click chuột trái để tắt và mở unikey.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;click chuột phải để thay đổi bản mã (&lt;/span&gt;&lt;span style="color: rgb(204, 0, 0); font-family: arial;"&gt;chú ý rằng bạn phải chọn UTF8&lt;/span&gt;&lt;span style="font-family: arial;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;phím Ctrl + click chuột phải để thay đổi kiểu gõ (thường ta chọn vi hoặt telex)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Bạn cũng có thể gõ tiếng việt bằng xvnkb tham khảo link nầy nhe &lt;/span&gt;&lt;a style="font-family: arial;" href="http://nhakhtn.blogspot.com/2007/05/install-xvnkb-to-vietnam-typing.html"&gt;http://nhakhtn.blogspot.com/2007/05/install-xvnkb-to-vietnam-typing.html&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Chúc các bạn gõ tiếng việt bằng unikey ngon lành !&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;thân mến !&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Tham khảo từ &lt;/span&gt;&lt;a style="font-family: arial;" href="http://www.unikey.org/manual/x-unikey-manual.html"&gt;http://www.unikey.org/manual/x-unikey-manual.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-2645882103567146961?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/2645882103567146961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=2645882103567146961' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/2645882103567146961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/2645882103567146961'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/05/ci-t-s-dng-unikey-ubuntu-704.html' title='Cài đặt &amp; sử dụng unikey - Ubuntu 7.04'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-6101555841275278338</id><published>2007-05-21T11:22:00.000+07:00</published><updated>2007-05-24T13:38:54.399+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Basic Commands on Linux</title><content type='html'>ls (Listing)&lt;br /&gt;This command will show you the contents of a directory.&lt;br /&gt;    ls --&gt; will show you the contents of the current directory.&lt;br /&gt;    ls /dir/name --&gt; will show you the contents of a specified directory.&lt;br /&gt;    ls -l --&gt; will show you a long listing containing ownership, permissions, time last modified, and size.&lt;br /&gt;    ls -a --&gt; will show you all of the files in the directory, including . (dot , the current directory)&lt;br /&gt;    ls -al --&gt; What do you think?&lt;br /&gt;    Note that . stands for the current directory and .. refers to the parent directory&lt;br /&gt;&lt;br /&gt;                     cd (Change Directory)&lt;br /&gt;This command will change your current working directory.&lt;br /&gt;cd --&gt; If you just type in cd, then you will be sent to your home directory. For example, /home/mlevan/&lt;br /&gt;cd /dir/name --&gt; This command will send you directly into the desired directory.&lt;br /&gt;   cd /var/log/ --&gt; This will send us to the /var/log directory.&lt;br /&gt;What about these commands :&lt;br /&gt;   cd .&lt;br /&gt;   cd ..&lt;br /&gt;&lt;br /&gt;                       cp (CoPy)&lt;br /&gt;     cp filename1 filename2 this command will copy the first file into the second file&lt;br /&gt;     cp      Amy.txt          Garret.txt&lt;br /&gt;Note that if Garret.txt is already a file, then it will be overwritten !! Be careful with this command.&lt;br /&gt;      cp      -i    Amy.txt         Garret.txt&lt;br /&gt;If Garret.txt exists, then this command will inquire if you want to overwrite the file.&lt;br /&gt;If Garret.txt does not exist, then you will not be asked.&lt;br /&gt;Note that you can also add directory names to this:&lt;br /&gt;cp      /home/mlevan/Amy.txt                 /home/guest/Garret.txt&lt;br /&gt;You can also copy files to a directory :&lt;br /&gt;      cp file1                file2         fileN         directory_name&lt;br /&gt;      cp Amy.txt Garret.txt                         temp/&lt;br /&gt;Note that ~ can also represent your home directory. For example, say I want to copy a file from /home/guest1/booty to the temp directory in my account:&lt;br /&gt;      cp /home/guest1/booty/blah.txt                       ~/temp/&lt;br /&gt;&lt;br /&gt;                                  rm (ReMove)&lt;br /&gt;The rm command will remove a file.&lt;br /&gt;rm    filename&lt;br /&gt;If you type in rm -i filename , then you will be asked if you really want to remove the file.&lt;br /&gt;It is virtually impossible to regain a file after it has been removed in this fashion.&lt;br /&gt;&lt;br /&gt;                               mv (MoVe)&lt;br /&gt;This is the "rename" command used in DOS.&lt;br /&gt;This command moves one filename into another filename.&lt;br /&gt;mv      filename1           filename2&lt;br /&gt;The above command automatically writes over filename2 with whatever was in filename1&lt;br /&gt;mv -i       filename1           filename2&lt;br /&gt;The above command will inquire if you really want to move the file.&lt;br /&gt;You can also move directories with this command,&lt;br /&gt;mv dir_name1       dir_name2&lt;br /&gt;&lt;br /&gt;                                       touch&lt;br /&gt;This command will create a file.&lt;br /&gt;touch filename&lt;br /&gt;If the file already exists, then touch will update the timestamp of the file.&lt;br /&gt;&lt;br /&gt;                          mkdir (MaKe DIRectory)&lt;br /&gt;This command will create a directory in your current working directory:&lt;br /&gt;mkdir dir_name&lt;br /&gt;You can create a directory anywhere using the full pathname... if you have permission:&lt;br /&gt;mkdir /var/log/class&lt;br /&gt;&lt;br /&gt;                          rmdir (ReMove DIRectory)&lt;br /&gt;This command will remove an empty directory.&lt;br /&gt;rmdir temp&lt;br /&gt;If the directory is not empty, then pass the parameters r (recursive) and f (force) to the rm command.&lt;br /&gt;The f parameter will force the removal, never inquiring if you want to remove any subsequent files or directories.&lt;br /&gt;The r parameter will remove travel down any directories within the directory and remove all the files.&lt;br /&gt;rm -rf dir_name&lt;br /&gt;                                      cat&lt;br /&gt;This command will print out a text file.&lt;br /&gt;cat filename&lt;br /&gt;What happens if we pass two files to this command?&lt;br /&gt;cat filename1 filename2&lt;br /&gt;What happens if we don't pass any files to this command?&lt;br /&gt;cat&lt;br /&gt;&lt;br /&gt;Control-D or Control-C ?&lt;br /&gt;Control-C terminates a program.&lt;br /&gt;Control-D stops the current input. (Admittedly, this can also end a program)&lt;br /&gt;&lt;br /&gt;The end.&lt;br /&gt;(source: bootThe Joy of Penguins - thanks a lots)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-6101555841275278338?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/6101555841275278338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=6101555841275278338' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6101555841275278338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/6101555841275278338'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/05/basic-commands-on-linux.html' title='Basic Commands on Linux'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-7452726193861700889</id><published>2007-05-19T11:14:00.000+07:00</published><updated>2007-06-20T22:58:02.188+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Install Stardict to use dictionary.</title><content type='html'>&lt;a href="http://nhakhtn.blogspot.com/2007/06/t-in-trong-linux-ubuntu-704.html"&gt;Link hướng dẫn bằng tiếng Việt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is the best dictionary I have seen.&lt;br /&gt;&lt;br /&gt;Install:&lt;br /&gt;&lt;br /&gt;Step 1: go to the website &lt;a href="http://stardict.sourceforge.net/"&gt;&lt;span style="text-decoration: underline;"&gt;StarDdict&lt;/span&gt;&lt;/a&gt; and download main program &lt;span&gt;&lt;a href="http://prdownloads.sourceforge.net/stardict/stardict-2.4.8.tar.bz2?download"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;stardict-2.4.8.tar.bz2&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; and install it.&lt;br /&gt;unzip type:&lt;br /&gt;tar -xjvf stardict-2.4.8.tar.bz2&lt;br /&gt;cd stardict-2.4.8&lt;br /&gt;./configure&lt;br /&gt;make&lt;br /&gt;(sudo) make install // sudo when you use Ubuntu.&lt;br /&gt;when run these commands (./configure .. ) you often receive the error and this is my experience: error: No package 'libgnomeui-2.0' found&lt;br /&gt;and this is my solution : I go to google.com and type No package 'libgnomeui-2.0' found Ubuntu (because I use Ubuntu) the result set was displayed and I went to those link. I see "&lt;strong&gt;sudo apt-get install&lt;/strong&gt; &lt;strong&gt;libgnomeui-dev&lt;/strong&gt;" so I typed it to the command line. typed ./configure, make, sudo make install again and I was success !&lt;br /&gt;&lt;br /&gt;step 2 - run stardict : from command line type: stardict and receive the message : no dictionary file found ;) so we must find and download dictionary file ;)&lt;br /&gt;&lt;br /&gt;step 3 - download and put dictionary file to the right place.&lt;br /&gt;go to &lt;a href="http://www.vnlinux.org/stardict/"&gt;http://www.vnlinux.org/stardict/&lt;/a&gt; and download the dictionary file you like ;)&lt;br /&gt;unzip them into &lt;strong&gt;“~/.stardict/dic”&lt;/strong&gt; in this computer is /home/nhakhtn/.stardict/dic and this is the hidden folder&lt;br /&gt;if you don't have the folder with this named you can make it.&lt;br /&gt;mkdir /home/nhakhtn/.stardict&lt;br /&gt;mkdir /home/nhakhtn/.stardict/dic&lt;br /&gt;and then mv anhviet1.0.zip /home/nhakhtn/stardict/dic&lt;br /&gt;unzip tar -......   ......&lt;br /&gt;start stardict and use it ;) this is the good dictionary ;)&lt;br /&gt;Thanks all. (references from longld.blogspot.com, vnlinux.org/sitemoi, vozforums.com ....)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://stardict.sourceforge.net/"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-7452726193861700889?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/7452726193861700889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=7452726193861700889' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7452726193861700889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/7452726193861700889'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/05/install-stardict-to-use-dictionary.html' title='Install Stardict to use dictionary.'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-4236526478672148052</id><published>2007-05-17T23:04:00.000+07:00</published><updated>2007-06-16T07:20:13.761+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux Viet'/><title type='text'>Cài đặt và sử dụng xvnkb để gõ tiếng Việt.</title><content type='html'>Đây là hướng dẫn cho bản Ubuntu 7.04 các phiên bản linux khác mình hông bít có ok hông&lt;br /&gt;1. Cài đặt các thư viện liên quan.&lt;br /&gt;&lt;br /&gt;Mở terminal gõ:&lt;br /&gt;sudo apt-get install build-essential&lt;br /&gt;sudo apt-get install xorg-dev&lt;br /&gt;       sudo apt-get install  gcc  xlibs-dev libxft-dev&lt;br /&gt;complete step 1.&lt;br /&gt;&lt;br /&gt;2. Download source và cài đặt. trong terminal gõ:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;wget http://xvnkb.sourceforge.net/xvnkb-0.2.9a.tar.bz2&lt;/span&gt;&lt;br /&gt;giải nén:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;tar -xjvf xvnkb-0.2.9a.tar.bz2&lt;/span&gt;&lt;br /&gt;vào thư mục mã nguồn:&lt;br /&gt;cd xvnkb-0.2.9a/&lt;br /&gt;./autogen.sh&lt;br /&gt;./configure&lt;br /&gt;mở file config.h&lt;br /&gt;gedit config.h&lt;br /&gt;và sửa lại cho giống như sau:&lt;br /&gt;#define __VK_CONFIG_H&lt;br /&gt;#define VK_CHECK_SPELLING&lt;br /&gt;#define VK_USE_EXTSTROKE&lt;br /&gt;#define VK_NEED_UCHAR&lt;br /&gt;(hông bít sau Ubuntu lại thêm kí tự -e chi hông bít, bạn nhớ bỏ nó đi và save lại nhé !)&lt;br /&gt;Gõ:&lt;br /&gt;make&lt;br /&gt;sudo make install&lt;br /&gt;OK. xong rùi đó các bạn.&lt;br /&gt;&lt;br /&gt;3.Sử dụng: từ terminal gõ&lt;br /&gt;xvnkb&lt;br /&gt;một icon nhỏ sẽ xuất hiện bên phải góc dưới màn hình desktop click chuột phải và chọn các lựa chọn của mình.&lt;br /&gt;&lt;br /&gt;4.Để xvnkb tự động chạy khi khởi động máy tính bạn vào terminal gõ&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;gnome-session-properties&lt;/span&gt;&lt;br /&gt;sau đó bạn chọn new, phần name bạn muốn gõ gì cũng được (sao cho gợi nhớ ví dụ "chương trình gõ tiếng việt xvnkb") phần command bạn gõ xvnkb sau đó OK và Close thế là xong.&lt;br /&gt;&lt;br /&gt;xvnkb gõ tiếng việt rất tuyệt. Bạn cũng có thể dùng unikey để gõ tiếng Việt trong linux, tham khảo thêm link nầy nhe &lt;a href="http://nhakhtn.blogspot.com/2007/05/ci-t-s-dng-unikey-ubuntu-704.html"&gt;http://nhakhtn.blogspot.com/2007/05/ci-t-s-dng-unikey-ubuntu-704.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Nguồn: saylinux.wordpress.com.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4522516677868669101-4236526478672148052?l=nhakhtn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nhakhtn.blogspot.com/feeds/4236526478672148052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4522516677868669101&amp;postID=4236526478672148052' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/4236526478672148052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4522516677868669101/posts/default/4236526478672148052'/><link rel='alternate' type='text/html' href='http://nhakhtn.blogspot.com/2007/05/install-xvnkb-to-vietnam-typing.html' title='Cài đặt và sử dụng xvnkb để gõ tiếng Việt.'/><author><name>Đức Nhã</name><uri>http://www.blogger.com/profile/04235843351508771467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4522516677868669101.post-662602592601638336</id><published>2007-05-16T19:33:00.000+07:00</published><updated>2007-05-23T21:16:41.126+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Guide to install Ubuntu 7.04</title><content type='html'>This is the complete guide ;)&lt;br /&gt;Step 1: start computer and enter CMOS of your computer, set first boot is CD-ROM. insert Ubuntu install disk to you CD-ROM and exit CMOS setup.&lt;br /&gt;the computer will start with ubuntu live cd so u can use the Ubuntu operating system without install it ;).&lt;br /&gt;Step 2: when you are using Ubuntu live. you will see the icon "Install Ubuntu for your computer" click to it and start to install Ubuntu.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_kaLaGUdZuyk/RksEv1l400I/AAAAAAAAAAM/F5y1zHdNT00/s1600-h/ubuntu_install18a.png"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_kaLaGUdZuyk/RksEv1l400I/AAAAAAAAAAM/F5y1zHdNT00/s320/ubuntu_install18a.png" alt="" id="BLOGGER_PHOTO_ID_5065147425794609986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Select your language and click &lt;strong&gt;Forward&lt;/strong&gt; to continue&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_kaLaGUdZuyk/RksFK1l401I/AAAAAAAAAAU/BqJitfXHs_U/s1600-h/ubuntu_install20a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: left; cursor: pointer;" src="http://bp0.blogger.com/_kaLaGUdZuyk/RksFK1l401I/AAAAAAAAAAU/BqJitfXHs_U/s320/ubuntu_install20a.png" alt="" id="BLOGGER_PHOTO_ID_5065147889651077970" border="0" /&gt;&lt;/a&gt; Select your location/Time Zone and make sure that the time is set correctly. Click &lt;strong&gt;Forward&lt;/strong&gt; when all the settings are correct.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_kaLaGUdZuyk/RksFnll402I/AAAAAAAAAAc/4AA5WkRITNs/s1600-h/ubuntu_install21a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_kaLaGUdZuyk/RksFnll402I/AAAAAAAAAAc/4AA5WkRITNs/s320/ubuntu_install21a.png" alt="" id="BLOGGER_PHOTO_ID_5065148383572317026" border="0" /&gt;&lt;/a&gt; Select &lt;strong&gt;American English&lt;/strong&gt; (a future tutorial will help you customize your Apple keyboard in Ubuntu) and then click &lt;strong&gt;Forward&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_kaLaGUdZuyk/RksGRll403I/AAAAAAAAAAk/7-byNH-YVyo/s1600-h/ubuntu_install22a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_kaLaGUdZuyk/RksGRll403I/AAAAAAAAAAk/7-byNH-YVyo/s320/ubuntu_install22a.png" alt="" id="BLOGGER_PHOTO_ID_5065149105126822770" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;ol&gt;&lt;li value="5"&gt; Enter the required information in each field. Remember that &lt;strong&gt;both&lt;/strong&gt; the user name and password are case sensitive - so “username” and “Username” are &lt;strong&gt;not&lt;/strong&gt; the same. Click &lt;strong&gt;Forward&lt;/strong&gt; to continue. &lt;/li&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_kaLaGUdZuyk/Rkvxgll404I/AAAAAAAAAAs/23U-TcHSnVo/s1600-h/ubuntu_install23a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_kaLaGUdZuyk/Rkvxgll404I/AAAAAAAAAAs/23U-TcHSnVo/s320/ubuntu_install23a.png" alt="" id="BLOGGER_PHOTO_ID_5065407748057387906" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;li&gt;Select &lt;strong&gt;Erase entire disk: IDE1 master (hda) - size Virtual HDD (0)&lt;/strong&gt; and then click &lt;strong&gt;Forward&lt;/strong&gt;. Again, don’t worry, this is &lt;strong&gt;not&lt;/strong&gt; deleting anything on your hard drive. It’s using up the space you assigned to Ubuntu when you set up Parallels. &lt;/li&gt;&lt;p&gt;&lt;a href="http://www.simplehelp.net/images/ubuntu_install/ubuntu_install24.png" title="click to enlarge"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_kaLaGUdZuyk/Rkvx6Vl405I/AAAAAAAAAA0/8GOxDl6J2ms/s1600-h/ubuntu_install24a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_kaLaGUdZuyk/Rkvx6Vl405I/AAAAAAAAAA0/8GOxDl6J2ms/s320/ubuntu_install24a.png" alt="" id="BLOGGER_PHOTO_ID_5065408190439019410" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;li&gt; Review everything on the last screen. If you need to make changes, use the &lt;strong&gt;Back&lt;/strong&gt; button. When you’re ready to install, click &lt;strong&gt;Install&lt;/strong&gt;. &lt;/li&gt;&lt;p&gt;&lt;a href="http://www.simplehelp.net/images/ubuntu_install/ubuntu_install25.png" title="click to enlarge"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_kaLaGUdZuyk/RkvyEll406I/AAAAAAAAAA8/rvpKlG-nbWI/s1600-h/ubuntu_install25a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_kaLaGUdZuyk/RkvyEll406I/AAAAAAAAAA8/rvpKlG-nbWI/s320/ubuntu_install25a.png" alt="" id="BLOGGER_PHOTO_ID_5065408366532678562" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.simplehelp.net/images/ubuntu_install/ubuntu_install25.png" title="click to enlarge"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;&lt;li&gt; Grab a cup of coffee. This doesn’t take too long, but it’s not fascinating enough to watch that attentively. &lt;/li&gt;&lt;p&gt;&lt;a href="http://www.simplehelp.net/images/ubuntu_install/ubuntu_install29.png" title="click to enlarge"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_kaLaGUdZuyk/RkvzWFl407I/AAAAAAAAABE/_8oGW0A6STM/s1600-h/ubuntu_install29a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_kaLaGUdZuyk/RkvzWFl407I/AAAAAAAAABE/_8oGW0A6STM/s320/ubuntu_install29a.png" alt="" id="BLOGGER_PHOTO_ID_5065409766692017074" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;li&gt;When the installation has completed, you’ll be prompted to either restart or continue using the live CD. Because we need to completely power off Ubuntu (rather than restart), select &lt;strong&gt;Continue using the live CD&lt;/strong&gt;. &lt;/li&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_kaLaGUdZuyk/RkvzWFl408I/AAAAAAAAABM/uUw0zM4wr9E/s1600-h/ubuntu_install30a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_kaLaGUdZuyk/RkvzWFl408I/AAAAAAAAABM/uUw0zM4wr9E/s320/ubuntu_install30a.png" alt="" id="BLOGGER_PHOTO_ID_5065409766692017090" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;li&gt; Now shut down Ubuntu&lt;/li&gt;&lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_kaLaGUdZuyk/RkvzWVl409I/AAAAAAAAABU/UU3N14pPWa4/s1600-h/ubuntu_install31a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_kaLaGUdZuyk/RkvzWVl409I/AAAAAAAAABU/UU3N14pPWa4/s320/ubuntu_install31a.png" alt="" id="BLOGGER_PHOTO_ID_5065409770986984402" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/ol&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_kaLaGUdZuyk/RkvzWVl40-I/AAAAAAAAABc/O_kbESjBNV0/s1600-h/ubuntu_install32a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_kaLaGUdZuyk/RkvzWVl40-I/AAAAAAAAABc/O_kbESjBNV0/s320/ubuntu_install32a.png" alt="" id="BLOGGER_PHOTO_ID_5065409770986984418" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_kaLaGUdZuyk/RkvzWll40_I/AAAAAAAAABk/Sm3gpVOjDzo/s1600-h/ubuntu_install34a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_kaLaGUdZuyk/RkvzWll40_I/AAAAAAAAABk/Sm3gpVOjDzo/s320/ubuntu_install34a.png" alt="" id="BLOGGER_PHOTO_ID_5065409775281951730" border="0" /&gt;&lt;/a&gt;&lt;ol&gt;&lt;li&gt;If Ubuntu doesn’t completely “turn off”, use the &lt;strong&gt;Power Off&lt;/strong&gt; button in Parallels. &lt;/li&gt;&lt;p&gt;&lt;img src="http://www.simplehelp.net/images/ubuntu_install/ubuntu_install51.png" alt="Ubuntu in Parallels for OS X" border="0" /&gt;&lt;/p&gt;&lt;li&gt; Click &lt;strong&gt;Yes&lt;/strong&gt; if prompted &lt;/li&gt;&lt;p&gt;&lt;a href="http://www.simplehelp.net/images/ubuntu_install/ubuntu_install35.png" title="click to enlarge"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_kaLaGUdZuyk/Rkv0-1l41AI/AAAAAAAAABs/aeRni4vs9OQ/s1600-h/ubuntu_install35a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_kaLaGUdZuyk/Rkv0-1l41AI/AAAAAAAAABs/aeRni4vs9OQ/s320/ubuntu_install35a.png" alt="" id="BLOGGER_PHOTO_ID_5065411566283314178" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;li&gt;Now that Ubuntu is installed, you’ll want to change the CD/DVD-ROM setting to no longer point to the .iso file. In Parallels, select &lt;strong&gt;CD/DVD-ROM 1&lt;/strong&gt;. Choose &lt;strong&gt;Use CD/DVD-ROM&lt;/strong&gt; from the &lt;strong&gt;Emulation&lt;/strong&gt; window and click &lt;strong&gt;OK&lt;/strong&gt;. The next time you start Ubuntu, you’ll have full use of your CD or DVD-ROM.  &lt;/li&gt;&lt;p&gt;&lt;a href="http://www.simplehelp.net/images/ubuntu_install/ubuntu_install37.png" title="click to enlarge"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_kaLaGUdZuyk/Rkv0-1l41BI/AAAAAAAAAB0/TyH_yBec9Bc/s1600-h/ubuntu_install37a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_kaLaGUdZuyk/Rkv0-1l41BI/AAAAAAAAAB0/TyH_yBec9Bc/s320/ubuntu_install37a.png" alt="" id="BLOGGER_PHOTO_ID_5065411566283314194" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/ol&gt;&lt;p&gt;&lt;a name="inet"&gt;&lt;strong&gt;Internet Troubleshooting&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Ubuntu is very good at automatically detecting your Internet connection from OS X, whether it’s via Airport (wireless) or Ethernet (wired). If by chance you’re not online, check the following settings.&lt;/p&gt; &lt;ol&gt;&lt;li&gt; Click &lt;strong&gt;System&lt;/strong&gt; and scroll down to &lt;strong&gt;Administration&lt;/strong&gt;. From the Administration down-down menu, select &lt;strong&gt;Networking&lt;/strong&gt;.  &lt;/li&gt;&lt;p&gt;&lt;a href="http://www.simplehelp.net/images/ubuntu_install/ubuntu_install45.png" title="click to enlarge"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_kaLaGUdZuyk/Rkv4FVl41FI/AAAAAAAAACU/GLtaoiJxxOo/s1600-h/ubuntu_install45a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_kaLaGUdZuyk/Rkv4FVl41FI/AAAAAAAAACU/GLtaoiJxxOo/s320/ubuntu_install45a.png" alt="" id="BLOGGER_PHOTO_ID_5065414976487347282" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;li&gt;Enter your password&lt;/li&gt;&lt;p&gt;&lt;a href="http://www.simplehelp.net/images/ubuntu_install/ubuntu_install52.png" title="click to enlarge"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_kaLaGUdZuyk/Rkv4Fll41HI/AAAAAAAAACk/LbodWS1_90E/s1600-h/ubuntu_install52a.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_kaLaGUdZuyk/Rkv4Fll41HI/AAAAAAAAACk/LbodWS1_90E/s320/ubuntu_install52a.png" alt="" id="BLOGGER_PHOTO_ID_5065414980782314610" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.simplehelp.net/images/ubuntu_install/ubuntu_install52.png" title="click to enlarge"&gt;&lt;br /&gt;&lt;br /
