While using PHP, you can run MYSQL SELECT.
The following will show you to retrieve data from mysql_fetch_array()
include ‘config.php’;
include ‘opendb.php’;
$query = “SELECT name, subject, message FROM contact”;
$result = mysql_query($query);
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo “Name :{$row['name']}
” .
“Subject : {$row['subject']}
” .
“Message : {$row['message']}
“;
}
include ‘closedb.php’;
?>
The following will show you how to retrieve data from mysql_fetch_assoc()
include ‘config.php’;
include ‘opendb.php’;
$query = “SELECT name, subject, message FROM contact”;
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result))
{
echo “Name :{$row['name']}
” .
“Subject : {$row['subject']}
” .
“Message : {$row['message']}
“;
}
include ‘closedb.php’;
?>
CREATE TABLE tbl_auth_user (
user_id VARCHAR(10) NOT NULL,
user_password CHAR(32) NOT NULL,
PRIMARY KEY (user_id)
);
INSERT INTO tbl_auth_user (user_id, user_password) VALUES (‘theadmin’, PASSWORD(‘chumbawamba’));
INSERT INTO tbl_auth_user (user_id, user_password) VALUES (‘webmaster’, PASSWORD(‘webmistress’));
> Login in cPanel
> Click on Fantastico
> Now you see a list, from there click on phpBB2
> Click on New installation
> Select installation location
> Enter a name to install after the domain is selected
> Select username and password
> Thereafter, enter the necesary details according to selection
> Click on finish installation
> Enter the email where you want the information to be sent
Thats all!!!
The following are the steps to install Mysql in Windows -
The Zip file -
mysql-shareware-3_22_34-win.zip
Also check for latest versions on the internet
a) A temporary directory should be created
b) Unzip the file to the directory
c) After the unzip process, search for “setup.exe”
d) Make sure you close all programs
e) Search for Setup File in the temporary directory
f) Select “OK” in order to proceed
g) Follow the instructions of the installation process
h) Restart Windows
i) In MS-DOS, switch to c:\mysql\bin
j) At the prompt -
mysqld-shareware –standalone or mysqld
k) MySQL Session begins
l) Type “mysql” at the prompt
m) In order to test, type “show databases;”
n) In order to quit type “quit”
o) Thereafter, to shutdown completely, type -
mysqladmin -u root shutdown
Two important flags for Installation and Upgrations of RPM -
-i –> Installation
-u –> Upgration
These packages are always placed in a directory on the system. -i flag is used in a situation of Installation of Kernel. Please make a note, prior to installtion, we need to check already installed packages
{rpm -q package name}.
After the approptiate package selected to install, we use
{rpm -ivh package name}.
In this situation, the following are possible -
a) On a single HD, Unpartitioned space
b) Second unpartitioned HD
For instance, the following is the situation of your system -
> Windows exists on the system
> Aiming for a Dual-boot
> The system HD does not have a second partiton / Unpartitioned HD which has Windows Installation
> If the Windows Version is 9x/ME, GRUB is required and will not use any other boot manager
The following is the procedure -
> To check the format of HD,
My Computer>Right-Click on C Drive>Properties>Check Type of File System
> Run Debian Installation > turn to Partitioning Disk Screen > Manually Edit partition table > Enter
> On the partition screen, scroll down to Free Space which is normally unpartitioned > Enter > This will create a Linux Partition
> Then select Automatic Partiton > Enter
> Select Default All Files as partition scheme > Enter
> On the next screen, it will show #1 partition which is the Windows partition
> #2 partition for the Debian Installation
> #5 refers to Swap partition
> Finish partition and save changes
> This will create the Base package
> It will then prompt and ask “Install the GRUB boot loader to the master boot record” > Yes
> Remove CD and Reboot
> Grub will then start loading Debian as default
What is Cacti?
It is a solution based on network graphs and was mainly aim of development of the strength of RRD TOOL Data Storage and its function. It polls fasts, and also has a advanced graph templates, it can acquire multiple data at the same time and many other user management features. Its a interface that is very easy to use and helps in the LAN installations upgrade upto various Complex networks with different devices.
The following is the installation Cacti from the source code -
a) Preparation of Server -
> Apache Web Server Installation along with PHP support in Ubuntu Server.
> sudo apt-get install apache2 apache2-common apache2-mpm-prefork apache2-utils
sudo apt-get install libapache2-mod-php4 php4-cli php4-common php4-cgi
> In the case of installation of PHP5 support, make a use of the following Command -
sudo apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi
This will install Apache2 webserver
b) MySQL Installation with PHP support -
sudo apt-get install mysql-server mysql-client libmysqlclient12-dev
sudo apt-get install php4-mysql
c) In this case you could also install php5 support, by using the following -
sudo apt-get install php5-mysql
d) To check with other dependancies Installation, please make follow the commands mentioned below -
sudo apt-get install make gcc g++
sudo apt-get install cgilib freetype2 libttf-dev libttf2 libpngwriter0-dev libpng3-dev libfreetype6-dev libart-2.0-dev snmp
e) Installation RRD Tool from Source -
There is a requirement of the download of the latest RRD tool -
sudo cd /usr/local/src/
sudo wget http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.2.15.tar.gz
sudo tar xfvz rrdtool-1.2.15.tar.gz
sudo cd rrdtool-1.2.15
sudo ./configure
sudo make
sudo make install
RRD Tool installation Complete
f) Installation of Cacti form Source -
Download the Latest Version from http://www.cacti.net/download_cacti.php to Apache Web Server document root.
However the default is /var/www/, the download can be completed if the root path is changed.
sudo cd /var/www/
sudo wget http://www.cacti.net/downloads/cacti-0.8.6i.tar.gz
g) Extraction of Tarball distribution -
sudo tar xzvf cacti-0.8.6i.tar.gz
h) Move to Cacti Directory -
sudo mv cacti-0.8.6i cacti
i) In order to check for the correct permission granted in Cacti files -
sudo chown -R www-data:www-data rra/ log/
j) In order to import Cacti default database -
sudo mysql cacti < cacti.sql
k) Creation of MySQL Username and Password for Cacti
sudo mysql --user=root mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ’password entered here’;
mysql> flush privileges;
mysql> exit
A virtualBox is a Open-Source professional virtualizer for x86 hardware. The next question arises how to install Virtualbox in Ubuntu Edgy.
Steps -
>First of all, download the latest .deb package
sudo apt-get install libxalan110 libxerces27
wget http://www.virtualbox.org/download/1.3.2/VirtualBox_1.3.2_Ubuntu_Edgy_x86.deb
> After the download, the following file can be seen -
VirtualBox_1.3.2_Ubuntu_Edgy_x86.deb file
> The installation of the above file can be done by the following Command -
sudo dpkg -i VirtualBox_1.3.2_Ubuntu_Edgy_x86.deb
> If you see the following errors -
Selecting previously deselected package virtualbox.
(Reading database … 174459 files and directories currently installed.)
Unpacking virtualbox (from VirtualBox_1.3.2_Ubuntu_Edgy_x86.deb) …
dpkg: dependency problems prevent configuration of virtualbox:
virtualbox depends on libxalan110; however:
Package libxalan110 is not installed.
virtualbox depends on libxerces27; however:
Package libxerces27 is not installed.
dpkg: error processing virtualbox (–install):
dependency problems – leaving unconfigured
Errors were encountered while processing:
virtualbox
The above error can be disregarded by entering the following Command -
sudo apt-get -f install
The Installation is Complete.
> TO start VirtualBox Graphical User Interface -
VirtualBox
It was developed by Werner Almesberger initially and thereafter developed by the latest developer John Coffman.LILO is a boot manager that can boot every Operating System that is installed on the system, it is basically run from a hard disk but can also run from a flopy disk. It can also act as an boot loader / secondary loader.
LILO configurations in /etc/lilo.conf and can be edited by any text editor, on many systems there is a configuration program liloconfig,this will prompt for basic configuration parameters which are written to /etc/lilo.conf.
It is one of the mostly used Linux Distribution sponsored by Canonical Ltd. based in South Africa. Ubuntu mainly aims for pc’s used at home. It basically focuses on usage, frequent releases, easy installation and avoid any kind of restrictions.
It is one of the Linux Distributions that is created by Mandriva in the year 1998.It has introduced many tools to make the system config more easier to access.
It is a part of Linux Distributions and was founded in the year 1992 and is run by Novell.It released package softwares that included SLS and Slackware. It also allowed developers and users to the product and thereafter develop it adn their coding was basically open. They also included YaST Online Update server access as complimentary along with the package.
It is a Linux Distribution which is based upon RPM and is sponsored by Red Hat. It is focused to be general-purpose OS and is taken from the original Red Hat Linux Distribution.
It is one of the popular Linux Distribution project which is based on a Free OS and is worked upon by GNU project and is basically supported by donations. It is known for its resemblance to Unix OS and many other free softwares and is also known for its package management systems. Debian also allows easy upgrades in betwwen various releases.
It is a OS which is based upon Debian Linux Distribution and is developed by Klaus Knopper and is used as Live CD.The two main editions of Knoppix include -
1) Traditional Compact Disk (700 MB)
2) DVD “MAXI” Edition (4.7 GB)
MepisIt is a set of Live CD Linux Distributions that are installed on a HD. It is based upon Debian and is created by Warren Woodford.
It is one of the Linux Distribution which is design to be portable / easily maintained / flexible and well optimized for the users. All the tools are built from a source code.
It is one of the Linux Distributions which also resembles Unix-Like OS. This was created by Patrick Volkerding. It basically aimed for stability processes.
It is a combination of Linux Distributions and Xandros Co-op founded in the year 2001, it is known for aim for creating Desktop and definitely focusing on the business. It is based on Corel Linux which is nothing but on the Debian L.D.