Insert a module in an article in Joomla 1.5x and create a menu link to it

Did you know that you can insert any module in an article in Joomla 1.5x? It is relatively simple; here are the steps of how to do this.

1) Enable the Content - Load Module plugin.
2) Create an article for the module. Name the article the same name as the module. For example, if you want to insert a Mortgage Calculator module in an article, then your respective article for this module would be named "Mortgage Calculator."
3) Type {loadposition userxx} in the body of the article, where userxx is your custom user position. Make sure that your user position is unique and has not been used by your template.  For example in my template, user99 has not been used. So in my article, I will use {loadposition user99}.
4) Open your module under Module Manager, enter the same userxx in the Position box. In my case, I entered user99.
5) Create a menu link to your new article/module.

That's all there is to it! Continue reading if you don't know how to create a menu link to your new article/module.

6) Select the menu where you want your article/module to appear.
7) Click on "New," then select "Article," then select "Single Article Layout."
8) Under the Parameters (Basic,) select the article that you have inserted the module in.  In my case, I selected the "Mortgage Calculator" article.
8) Save the new menu link.

That's it! Now you know how to insert a module in an article and create a menu link to it!

Installing Joomla! CMS on XAMPP Server

Well, I started writing this "how-to" then I found this reference page, which was far better than what I could come up with. Here is the link to the Installing Joomla! CMS on XAMPP server for you and me!

Installing Sun's Java on Ubuntu 10.04

Sun's Java has mysteriously disappeared when I reinstalled Ubuntu 10.04 a few days ago. I found this article instructs how to install Sun's Java. It's a great article so I put it here as a reference -- but make sure that you follow this first before installing Java, "As a side note, remember to remove OpenJDK if you do not need it, or be prepared to encounter hard to diagnose problems sometime."  Installing Java will take up about 166MB of your memory; thus if you have memory to spare, go for it!

Tips for Linux Newbies

These handy little tips will save you lots of headache and time. :-) There will be more tips added to this article; so stay tuned. 

1) Pay attention to the name of the file/folder with special characters such as uppercase, lowercase, underscore, and dash. In Unix, file/folder is identified EXACTLY as it is named. For example, Fri_day.php is totally different than Fri-day.php.

2) In Linux, you and “root” are two different entities. This is unique to Linux, so if you were a former Windows user like me, thinking that you have all administrative rights... well, wrong.  In order to perform administrative tasks, you must login as “root” or switch user, “su” at the terminal.  This is designed to protect the system files from being corrupted by hackers or newbies like you and me. So, take a deep breath and get accustomed to this.  You'll see the benefits later as you move toward a more sophisticated Unix user.

3) At the terminal, pay attention to the prompt as you open the window. It starts with something like: username@computername:~$.   The “$” indicates that you are “you,” (quite obvious, huh?)  So when you use a command like “sudo,” you are going to have administrative privileges like “root” temporarily.  But when you use a command like “sudo su,” you are going to switch from being “you” to “root.” You will be prompted for root password to gain root privileges.  Note, the prompt will change from “$” to “#.”  So whenever you see a command line that starts with #, you know that command requires you to be “root” in order to execute that command. Otherwise, you will have to use “sudo” over and over again.

4) Pay attention to file/folder permission; this  is a big deal in Linux. You may already own the folder – but not necessarily its sub-folders.  By default, except for the /home folder, which is yours; the rest, owned by root.  So if you know that you are going to need access to certain files/folders, make sure not only you but others have the read, write, and execute privileges. This can be done at the terminal by using the command, $ sudo chown -R username folder/file name. Of course if you are logged in as root, the command would simply be, # chown -R username folder/file name.  Always double check by right clicking on the folder/file, for permission privileges (Properties, Permissions, Owner/Group/Others to view.)  These permissions can be revoked later once the operations are done.

Installing XAMPP server in Ubuntu 10.04


XAMPP  is an open source cross browser web server. The package comes with an Apache Httpd Server, a server interpreter for scripts written in PhP and Perl, MySql database, phpMyAdmin, and OpenSSL.

The XAMPP server v.1.7.3 for Linux is packaged with Apache 2.2.14, MySQL 5.1.41, PHP 5.3.1 & PEAR + SQLite 2.8.17/3.6.16 + multibyte (mbstring) support, Perl 5.10.1, ProFTPD 1.3.2c, phpMyAdmin 3.2.4, OpenSSL 0.9.8l, GD 2.0.1, Freetype2 2.1.7, libjpeg 6b, libpng 1.2.12, gdbm 1.8.0, zlib 1.2.3, expat 1.2, Sablotron 1.0, libxml 2.7.6, Ming 0.4.2, Webalizer 2.21-02, pdf class 009e, ncurses 5.3, mod_perl 2.0.4, FreeTDS 0.63, gettext 0.17, IMAP C-Client 2007e, OpenLDAP (client) 2.3.11, mcrypt 2.5.7, mhash 0.8.18, eAccelerator 0.9.5.3, cURL 7.19.6, libxslt 1.1.26, libapreq 2.12, FPDF 1.6, XAMPP Control Panel 0.8, bzip 1.0.5, PBXT 1.0.09-rc, PBMS 0.5.08-alpha, and ICU4C Library 4.2.1 .

The following steps will help you to install, test, start and stop the XAMPP server in your local machine.  Finally, I also include a command to remove the XAMPP server (just in case should you change your mind.)

Step (1) Login to root, the go to /opt directory.
~$ sudo su
Password: enter root password
# cd /opt/

Step (2) Get the source code.
Go to http://www.apachefriends.org/en/xampp-linux.html. Scroll down and locate the latest XAMPP version for Linux. Highlight the link, right click, then select "Copy link location" from the pop up menu. At the terminal, ~/ opt# wget (paste the link that you just copied here.) At the terminal, the command line should look like this:
/opt# wget http://www.apachefriends.org/download.php?xampp-linux-1.7.3a.tar.gz

Step (3) Extract the source code. This will create a lampp directory, where your XAMPP server will live.
# tar -xvzf xampp-linux-1.7.3a.tar.gz

Step (4) Start your newly installed XAMPP server.
# /opt/lampp/lampp start
Starting XAMPP for Linux 1.7.3a...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.

Step (5) Test  your newly installed XAMPP server. On your favorite web browser, type, http://localhost/xampp.  You should see the XAMPP Welcome page if installation was successful.

Default Security Settings
The XAMPP default installation does not establish security for the followings:
1. The MySQL administrator (root) has no password.
2. The MySQL daemon is accessible via network.
3. ProFTPD uses the password "lampp" for user "nobody."
4. PhpMyAdmin is accessible via network.
5. Examples are accessible via network.
6. MySQL and Apache running under the same user (nobody.)

Step (6) Establish Your Security Settings.  At the terminal,
# /opt/lampp/lampp security
XAMPP: Quick security check...
XAMPP: Your XAMPP pages are NOT secured by a password.
XAMPP: Do you want to set a password? [yes.]  Hit [enter] to set password, the
system will prompt you through a series of aforementioned items to establish your security preferences.

Step (7) Stop your XAMPP server.
# /opt/lampp/lampp stop
Stopping XAMPP for Linux 1.7.3a...
XAMPP: Stopping Apache with SSL...
XAMPP: Stopping MySQL...
XAMPP: Stopping ProFTPD...
XAMPP stopped. 

Removal of XAMPP (should you change your mind.)  At the terminal,
~$ sudo su
# rm -rf /opt/lampp

Other Noteworthy
1) Common parameters
2) Secure Sockets Layer (SSL)
     a) You can start Apache with SSL by using the following command (as root):
     # /opt/lampp/lampp startssl
     b) You can access your Apache server by using, https://localhost, on your favorite browser.

3) Keeping everything under one roof.  The installation of XAMPP creates a LAMPP directory in your computer. By default, the files/folders are installed as follows:





Sources

Clear System Cache

I have a tinny tiny laptop with only 960 MB of RAM. After installing PhpSysinfo I noted that my system was running at 98% of total available memory! As it turned out 356 MB were sitting in the system cache.   With a little digging, I found out how to clear the system cache safely (for me) so do it at your own risk. You've been warned!

First, run the sync command to ensure all cache is clear. You can do this by executing as root or simply use sudo command, (I did it as root.) 

# sync

Then,  run the following command:

# echo 3 > /proc/sys/vm/drop_caches

That's it.  After refreshing my little PhpSysinfo, I noted system cache dropped to 172 MB from 356 MB; and I am running at 58% of RAM.  What a beauty!

Sources
http://ubuntuforums.org/showthread.php?t=589975
http://aplawrence.com/Linux/buffer_cache.html 

Could not reliably determine the server's fully qualified domain name...

If you see this message after restarting your Apache server, "apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
 ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName."

Don't panic. All you have to do is to edit the httpd.php file and add your server name to it.

~$ sudo gedit /etc/apache2/httpd.conf

(Note "gedit" is the text editor I am using; so if you are using other text editor, simply replace "gedit" with the name of your favorite text editor.)

By default, when the httpd.conf opens, it will be blank. Simply add "ServerName Localhost."  Save and close the file. The next step is to restart your server.

~$ sudo /etc/init.d/apache2 restart

Voila, the error message disappeared.

Finally, test your server to ensure everything is okay.

~$ apache2ctl configtest
Syntax OK