Tuesday, May 29, 2007

Bagaimana Cara Menggunakan FireFtp

Tunggu Atikel saya berikutnya mengenai Cara Membuat Website Pribadi Memnggunakan CMS PHP-Fusion. Mungkin hari ini sudah bisa di publishkan. Thank for your attention.

Sebelum memulai memodifikasi CMS Php-Fusion tentunya Anda harus menginstalnya terlebih dahulu.
Berikut adalah langkah langkah menginstal CMS Php-Fusion :
Pertama, Siapkan file utama dari CMS Php-Fusion.
Bila Anda belum mempunyainya bisa di download disini secara gratis.
Setelah itu extract file yang berbentuk zip tersebut.
Hasil peng-extract-an tersebut akan menghasilkan file-file seperti gambar dibawah ini.
Karena ini adalah proses instalasi yang pertama kali maka Anda bisa menghapus semua file dan folder kecuali folder php-files.
Buka folder php-files maka kamu akan menemukan file seperti di bawah ini.
Karena ini adalah proses instalasi yang pertama kali maka Anda bisa menghapus semua file dan folder kecuali folder php-files.
Buka folder php-files maka kamu akan menemukan file seperti di bawah ini.
Kemudian rename file blank_config.php di folder php-file menjadi config.php.
Sebelum melanjutkan ke langkah berikutnya lebih baik Anda hapus semua folder beserta isinya yang berada di folder locale kecuali folder English.
Dimaksudkan untuk mengurangi space di hosting Anda.
Upload semua isi dari folder php-file ke web-server Anda. Cara peng-Upload-an bisa dilihat dibawah ini.

Meng-Upload File CMS Php-Fusion Menggunakan FireFTP :

Pertama buka WebBrowser Mozilla Firefox Anda.
Bila belum menginstal Mozilla Firefox Klik gambar dibawah ini. Anda dapat mendownloadnya secara gratis.
Pastikan Anda membuka blog ini menggunakan Mozilla Firefox, bila belum saya sarankan untuk menghentikan membaca tutorial ini
karena itu juga demi kebaikan Anda sendiri.
Setelah itu klik Disini untuk menginstal FireFTP proses ini sangat cepat karena filenya sangat kecil.
Selesai meng-instal FireFTP maka Mozilla FireFox minta untuk direstart.
Setelah ter-restart maka pilih menu Tools, klik FireFTP. Anda akan dihadapkan pada window seperti dibawah ini.
Klik Create Account, Isi kolom dengan data yang Anda punyai kemarin.
Untuk Name Account dapat anda isi sembarangan, contoh pengisiannya seperti gambar di bawah ini.
Klik Browse, pilih folder tempat penyimpanan file CMS Php-Fusion Anda
Setelah selesai mengisinya klik Connect. Pastikan FireFTP sudah siap dengan melihat statusnya di bagian bawah dengan kondisi seperti dibawah ini.

Artikel Diatas belum sempurna karena kesibukan saya bekerja. Mohon Maaf Atas Ketidaknyamanannya.

Best Regard

Trotoare106

Monday, May 28, 2007

A Walkthrough for Beginners by Prisca Schmarsow

A Walkthrough for Beginners by Prisca Schmarsow
Firefox being the brilliant browser it is - more and more excellent and useful extensions are being developed ; ) One of these is FireFTP by Mime Cuvalo. This extension allows you to upload your files directly in Firefox via FTP. I’m not sure how well it performs with very large files but I tried it out for several uploads and find it very easy to use, stable and very responsive. I’d like to take you through its installation and setup in Firefox and a typical upload.
Make sure you are in Firefox.
Installation and connection setup

1. to install FireFTP - go to either of the pages shown below. By clicking on the Download / Install button the addon will be installed as extension in Firefox.
* fireftp.mozdev.org/ — Mime Cuvalo.
* addons.mozilla.org/firefox — mozilla/firefox
2. after installation - restart Firefox.
Once back open - you will see the extension added to your top menu > Tools > FireFTP.
When you choose FireFTP from your menu - it will launch itself into a new tab showing two columns: a left side column showing your default local directory and a right side column, currently empty, for the server directory. Each column is again divided into two halves allowing you to easily access folder content. Inbetween the two main columns you will see two arrow buttons which allow you to download from the remote directory and upload files and folders to the server.
3. to set the preferences got to the top menu > Tools > Add-ons.
The settings applied as default should be fine - but make sure that you have the general settings set as shown below. By setting the FileView to refresh automatically you will be able to see any successful up/downloads immediately appear within your folders.
Uploading via FTP

To upload to your webserver you will need to have the following details:

* FTP host - usually in the form of “ftp.yourdomainname.com” or “yourdomainname.com”
* username/login
* password

These details will be given to you by your webhost. It is good practice to keep all such information backed up somewhere other than your computer. Print out a copy and make sure store it somewhere safe - keep it secret - keep it safe ; ) Even though you can always request this information again from your webhost - you often will need to log in or give some details in order to use technical support or to verify your account.
To configure FireFTP for server connection and upload the files - please follow the steps below:

1. local directory
to set the left side column of FireFTP to show the files to be uploaded - navigate your computer and locate your current site. You will see that by clicking on a folder in the very left hand side column - its adjacent column will show the selected folder’s content. Once you can see your site’s content - you are ready to connect to your server.
2. FTP account
FireFTP allows you to create FTP accounts which are then stored within the account drop down menu. Click onto ‘Manage Accounts’, select ‘New’ and type in your details. You will only need to type in the ‘Host’ details which will automatically be used as ‘Account Name’ - and your username and password. Click ‘OK’ to confirm and save your account settings.
3. connect to server
once you have confirmed the correct log in details - you are ready to connect to your server. With your details stored in the drop down menu - make sure your FTP account is displayed and click the connect button. Beneath the program’s credits at the bottom of your window you will see the current activity being displayed. This will tell you how your login is proceeding and will inform you of any errors which might occur.
The folders found in the root directory can vary from server to server - and you don’t need to worry about most of these while you are new to webdesign and simply want to upload your website. It is important only to put your website’s files into the correct directory and to make sure your index page is placed directly into the site folder.
Your website’s directory is usually called “httpdocs” - “public_html” - or you might even find a folder shortcut called “www”. If you are not sure - simply email your webhost and ask :)
Once connected - you will see the right side column displaying your server’s directories as shown here:
4. uploading your files
To upload your files - make sure that your site folder is open in both directories: your local and your remote server should mirror each other. Once you know you are looking at the correct files - ensure that all required files are selected in your local site folder and that the relevant folder is displaying its content on the server side.
Select all files to be uploaded by shift clicking - and upload using either the ‘upload’ button or by dragging the selected files across.
Both methods work equally well. If you are new to this and feel a little hesitant - use the ‘upload’ button as you cannot make any mistakes. While dragging across and if you let go of your mouse at the wrong time - you might end up uploading your files into the wrong directory. You would then have to either move them on the server - or delete them to upload from scratch.
The screenshots below show the upload of an entire folder.
5. viewing process and stopping up/downloads
You can see the process of your up/download in several places within your window. this should give you an indication of how long certain file sizes will take to up/download. It is always faster to download than to upload - so don’t be surprised if some heavier file take more time. If your internet connection is slow it would be best to upload your files in smaller chunks.
If you are experiencing difficulties - you can stop your up/downloads at any time via the ‘abort’ button. You can then disconnect from the server and even restart FireFTP or Firefox to start fresh.

Thursday, May 24, 2007

Membuat Website Menggunakan CMS Php-Fusion ( bagian 2 )

Mensetting Control Panel di www.awardspace.com

This was the method to change language.

  1. Setelah Anda mempunyai Username dan passwordnya maka bisa masuk ke Control Panel Anda di awardspace.com.
  2. Isikan Username dan Password ke kolom yang sudah di sediakan (di kiri atas halaman awardspace.com). Kemudian klik Login.

    Sebelum Anda memulai mensetting Domain, saya anjurkan untuk menyiapkan buku catatan untuk menulis data - data yang akan kita buat nantinya dan juga merubah password Account Anda di awardspace.com ini terlebih dahulu dengan masuk ke Account Manager kemudian pilih Account Password. Isikan password lama pada kolom paling atas kemudian password baru dikolom tengah dan paling bawah. Klik Change Password. (catat data password baru Anda)

  3. Setelah Anda masuk ke Control Panel, pertama klik Website Manager (dibagian atas).
  4. Kemudian karena ini gratisan maka harus memilih Subdomain Manager untuk menentukan alamat atau url dari website Anda nantinya. Isikan pada kolom yang disediakan dengan kata yang ingin Anda gunakan. Misalnya diisi dengan nama saya “ekoprasetyo” maka alamat atau url dari website Anda nantinya adalah http://ekoprasetyo.awardspace.com. Setelah itu klik Add Subdomain. Bila terdapat keterangan error, kebanyakan karena alamat tersebut sudah digunakan oleh orang lain. Maka Anda harus mengisi dengan kata lain. Setelah selesai membuat Subdomain, selanjutnya ke menu FTP Manager. (sebelum itu catat data nama Subdomain anda)
  5. Lengkapi kolom isian di halaman FTP Manager (Username, Password, Confirm Password, FTP Path = nama Subdomain Anda). Klik Create FTP Account. (catat juga data Username dan Password untuk FTP anda).
  6. Membuat Database, cara hampir sama dengan membuat FTP Account yaitu mengisikan Username dan password pada kolom yang disediakan. Username dan Password ini tidak harus sama dengan Username dan Password pada FTP. Kemudian klik Create Database. (jangan lupa untuk mencatat username , password serta DatabaseName agar Anda tidak lupa dilain hari).

Selesai!! Data yang anda perlukan untuk membuat website menggunakan CMS Php-Fusion sudah lengkap. Sekarang kita lihat dulu hasil perangkuman data-data tadi.

AWARDSPACE.COM
>Username = gerbangnun
>Password = 123456

SUBDOMAIN
>Url = http://ekoprasetyo.awardspace.com
> FTP Manager
>Username = gerbangnun_eko
>Password = 123456
>Path = ekoprasetyo.awardspace.com

Database(DB) Manager
>DB Username = gerbangnun_16
>DB Name = gerbangnun_16
>DB Host = fdb1.awardspace.com

Simpan baik-baik catatan tersebut jangan sampai diketahui orang lain.

Membuat Website Menggunakan CMS Php-Fusion ( bagian 1 )


HARI PERTAMA


Di hari pertama ini Anda harus mempunyai tempat penyimpanan (hosting) file-file web Anda. Banyak sekali website yang menyediakan hosting, baik yang berbayar ataupun yang gratis. Karena ini untuk belajar, maka saya akan membahas mengenai pendaftaran di hosting gratis. Saya merekomendasikan awardspace.com karena fasilitas disini sangat lengkap dan juga pengkonfigurasiannya mudah. Selain itu syarat pendaftarannya sangat ringan serta gratis. Prosesnya antara lain :

Wednesday, May 23, 2007

Conditional Custom Page Content

Is the User Registered?

Simply use the iMEMBER definition in a PHP block.

if (iMEMBER) {
echo 'Registered';
} else {
echo 'Unregistered';
}
?>


Checking Group Membership by Id
Use the checkgroup(id) function.

if (checkgroup(2)) {
echo 'Member of group 2';
} else {
echo 'Not a member of group 2';
}


Checking Group Membership by Name
You need to workout the group's id first then use the checkgroup(id) function again.

$allgroups = getusergroups();
$myGroup = 0;
foreach ($allgroups as $g) {
if ($g[1]=='My Group') {
$myGroup=$g[0];
break;
}
}
if ($myGroup) { // group id was found
$myGroup=checkgroup($myGroup);
}
if (checkgroup($myGroup)) {
echo 'Member of "My Group"';
} else {
echo 'Not a member of "My Group"';
}


Note: this code assumes non-membership if the group's id wasn't found.

HOW TO: Modification theme... v 6.x

HOW TO: theme... v 6.x
Welcome!
I found some time today so i decided to write an article about making themes for php-fusion v 6.0.x
Firstly I would like to note, that you need to know at least HTML (good for You to know CSS too) for making themes.
Let's get to work...
Download exemplary theme (which is made specially for this article), which equals HTML 4.01 demands.

DOWNLOAD

After downloading this file (only 9KB weight) you'll see, that this theme doesn't contain too much images - I have made it expediently,
first - to make easier presentation how it works, second - to show You which files theme MUST contain. And now... back to work!

Open style.css file (239 lines :: 3663 signs) in optional text editor. If You see what You haven't seen before and You don't know how it works, read the explanation below

body {
(...)
}


- defines general appearence of whole theme (default charset, size, margin etc.)


a {
(...)
}
a:hover {
(...)
}
a.side {
(...)
}
a:hover.side {
(...)
}
a.white {
(...)
}
a:hover.white {
(...)
}


- color of links depend on this part


hr {
(...)
}
hr.side-hr {
(...)
}


- sets lines color evoked by < and > tags


.button {
(...)
}


- changes button color, background, charset etc.


.textbox {
(...)
}


- modifies textbox appearance


.main-bg {
(...)
}
.side-border-left {
(...)
}
.side-border-right {
(...)
}


- here we can change the span (in pixels) from top, bottom, left and right


.tbl-border {
(...)
}
.tbl {
(...)
}
.tbl1 {
(...)
}
.tbl2 {
(...)
}


- define color of particular tables like discussion board


.quote {
(...)
}


- modifies quote appearance


.poll {
(...)
}


- a part that is responsible for members poll (frames, etc)


.comment-name {
(...)
}


- changes color of nick of person commenting


.shoutboxname {
(...)
}
.shoutbox {
(...)
}
.shoutboxdate {
(...)
}


- sets color of nick, charset and date in shoutbox


.small {
(...)
}
.small2 {
(...)
}


- appearance of small and small2


.gallery {
(...)
}
.gallery img {
(...)
}
.gallery:hover img {
(...)
}
img.activegallery {
(...)
}


- define frame color, spans in gallery


Thats all about style.css. Further in style.css You can find several similar to above-mentioned miracles, which I separated with something like this:

/*****************************************************\
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
\*****************************************************/

It darts to eyes, so we can see what is "different".
Subject about styles I consider closed for now.

Installation CMS PHP-Fusion

1. Introduction
PHP-Fusion is a light-weight open-source content management system (CMS) written in PHP. It utilises a mySQL database to store your site content and includes a simple, comprehensive adminstration system. PHP-Fusion includes the most common features you would expect to see in many other CMS packages.
PHP-Fusion is released under the terms and conditions of version 2 of the GNU General Public License. For further information please visit www.gnu.org or refer to the gpl.txt file included in the distribution package. You may alter the code in any way you wish and redistribute it either as is or containing your own modifications. We would appreciate it if you retained the "Powered by PHP-Fusion" footer copyright notice. We feel this is fair when you consider the many hundreds of hours of work that continues to go into the development of this project. However, if you do remove the footer copyright notice please consider making a donation via Paypal.

2. Installation
Before installing PHP-Fusion you need to create a mysql database. You can do this via your web-hosting control panel or phpMyAdmin. Make sure you have your mysql access details at hand including the hostname, username, password and database name as you will need to specify these during setup.
1. Before you upload the files, rename the file blank_config.php (located in the folder entitled php-files) to config.php.

2. Upload the contents of the php-files folder to your web-server.

3. Unless you are running PHP-Fusion on a local server, in most cases you will need to CHMOD the following files & folders to 777:

administration/db_backups/
images/
images/imagelist.js
images/articles/
images/avatars/
images/news/
images/news_cats/
images/photoalbum/
images/photoalbum/submissions/
forum/attachments/
config.php
4. Goto your website, setup.php should start automatically, if it does not appear you should run setup.php manually by entering your full site url followed by /setup.php. Example: http://www.yourdomain.com/setup.php.

5. Complete the setup process by following all on-screen prompts.

6. Immediately after completing the installation of PHP-Fusion you must CHMOD config.php back to 644 AND delete setup.php from your web-server.

3. Upgrade from v6.00.1xx, v6.00.2xx or v6.00.3xx
Before you upgrade we strongly recommend that you backup your files and your database as PHP-Fusion 6.01 is a major update compared to its predecessors. You need to follow these instructions precisely.
1. First you must upload the correct upgrade script from the folder named 'upgrade v6.00.xxx' to the administration folder of your site.

2. Login to your site as the Super Administrator. Under the System Admin tab of the Admin Panel, click on Upgrade then click the button marked Upgrade. MAKE SURE the page reloads stating 'Database upgrade complete', failure to do so may cause problems later on.

3. VERY IMPORTANT: Since this release contains a number of structural changes, some elements of your site will not work properly until you have updated all of your files. YOU MUST upload ALL of the files from the php-files folder. Failing to upload all of the files will cause one or more of the following problems: no admin access, lower-center and right side panels mixed up, new gallery not working and more.

4. The photo gallery in v6.01 has been completely rewritten. We have created an infusion called 'Photo Converter' which will import your albums and photos into the new database tables. You should ONLY use the Photo Converter Infusion AFTER completing the above steps. It is designed to run under specific conditions which are created by the upgrade script and therefore will not work prior to upgrading. Be sure to verify the new Photo Settings under System admin before running the Photo Converter.

5. After completing the above steps, you need to chmod the folder images/photoalbums/submissions to 777. You may also want to add a link under System Admin -> Site Links entitled 'Submit Photo' with the url set to 'submit.php?stype=p'.

If at all you are any doubt please feel free to ask one of our support sites for help, there are plenty of knowledgeable users in our community who can help or advise you regarding the upgrade process.

4. Security tips
Here are some useful tips to help keep your site secure:
Ensure config.php is not writable (should be CHMODed to 644).
Never leave setup.php on your server once PHP-Fusion is installed.
Always ensure your FTP and MySQL passwords are different.
Never allow forum attachments such as php, html, exe, or any type of text file.

5. Support sites
If you have any questions or problems regarding PHP-Fusion, please visit the main development site at www.php-fusion.co.uk and post a message on our forums. Alternatively you can visit our IRC chat support channel at irc.outerweb.org/phpfusion.

PHP-Fusion can be expanded by adding Infusions, these are plugins which are extremely easy to install. You can find a variety of useful Infusions on our mod site at www.phpfusion-mods.com.

If you are not satisfied with PHP-Fusion's bundled themes you may want to visit our official theme site at www.phpfusion-themes.com where you will find a variety of high quality themes.

PHP-Fusion also has a number of official foreign language support sites based in Arabia, Belgium, Bulgaria, Bosnia, Croatia, Denmark, France, Germany, Hungary, Iran, Italy, Lithuania, Netherlands, Poland, Russia, Sweden, Taiwan, and Turkey
6. Acknowledgements
Thanks to the following for their additional work:

Shedrock - Additional Themes and administration icons
Janmol - Market research & additional design concepts
KEFF - For silly ideas that aren't actually silly!
Rayxen - Additional code & mods
Sheldon - Tech support & additional hosting

3rd Party Scripts:
TinyMCE v2.0.6.1 - A HTML WYSIWYG editor by Moxiecode.
PHPMailer - A sendmail class with SMTP support by Brent R. Matzelle.
HTTPDownload - A download handler class by Nguyen Quoc Bao.

Tuesday, May 22, 2007

Langkah langkah Instalasi CMS Php-Fusion V.6.01.9

This was the Installation method.

Sebelum memulai memodifikasi CMS Php-Fusion tentunya Anda harus menginstalnya terlebih dahulu. Berikut adalah langkah langkah menginstal CMS Php-Fusion :

Pertama, Siapkan file utama dari CMS Php-Fusion. Bila Anda belum mempunyainya bisa di download disini dengan syarat Anda harus menjadi member di Website tersebut. Setelah itu extract file yang berbentuk zip tersebut. Hasil peng-extract-an tersebut akan menghasilkan file-file seperti gambar dibawah ini.

Gambar File Php-Fusion setelah di extract

Karena ini adalah proses instalasi yang pertama kali maka Anda bisa menghapus semua file dan folder kecuali folder php-files. Buka folder php-files maka kamu akan menemukan file seperti di bawah ini.

Isi Folder php-files

Kemudian rename file blank_config.php di folder php-file menjadi config.php. Sebelum melanjutkan ke langkah berikutnya lebih baik Anda hapus semua folder beserta isinya yang berada di folder locale kecuali folder English. Dimaksudkan untuk mengurangi space di hosting Anda.

Kedua, Upload semua isi dari folder php-file ke web-server Anda. Cara peng-Upload-an bisa dilihat disini.

Ketiga, Setelah semua file ter-upload Anda harus merubah CHMOD semua file dan folder di bawah ini :

  • administration/db_backups/
  • images/
  • images/imagelist.js
  • images/articles/
  • images/avatars/
  • images/news/
  • images/news_cats/
  • images/photoalbum/
  • images/photoalbum/submissions/
  • forum/attachments/
  • config.php

Selesai proses peng-upload-an, kamu bisa membuka website kamu untuk menyelesaikan proses instalasi.

Keempat, Isi kolom sesuai dengan data yang telah Anda kumpulkan. seperti gambar di bawah ini. Klik Next.

Gambar Setup1

Kelima, Kali ini merupakan pengisian data SuperAdminstrator. Yaitu Account yang digunakan untuk masuk ke Admin Panel website kamu. Isi kolom sesuai yang Anda kehendaki. Klik Next.

Keenam, Setelah selesai, akan ada keterangan bahwa Instalasi Php-Fusion telah selesai dan siap digunakan. Kamu juga diharuskan untuk menghapus file setup.php di web-server kamu. Baru setelah itu masuk ke website kamu dan melakukan Login dengan Username dan Password yang telah kamu buat.

Gambar Setup2

Selamat Website Anda telah selesai dibuat dan bisa diakses oleh semua orang di seluruh dunia.

PHP Tutorials: PHP Programming, PHP Installation and Configuration

Tutorials and articles on PHP - how to write your own PHP scripts, how to install and configure PHP on your own computer for testing your scripts, debugging PHP scripts, security issues when writing your PHP scripts, etc.

How to Install and Configure PHP4 to Run with Apache on Windows


There's been tremendous interest in the PHP articles on thesitewizard.com, and one question that I seem to be getting more often these days is whether the procedure for installing PHP4 is similar to that which I outlined in my article on how to install and configure PHP 3. This article is a quick guide to getting PHP 4 running on your Windows machine (be it Windows 95, 98, ME, NT or 2000). The later versions of PHP4 allow you to install it either as an Apache module or as a CGI binary.

If you need to install PHP 3 instead, my earlier article can be found at http://www.thesitewizard.com/archive/installphp.shtml.

Why Install PHP?

The usual reason why you would want to install PHP on your own computer is that it makes testing and debugging your PHP scripts very much easier. Instead of having to log onto your ISP just to upload and test a script, you can do it offline and fix any bugs before the script becomes "live".

Installing PHP on Windows

Here is the step by step procedure:

1. Download the PHP binaries

PHP is free and comes complete with the source code. If you are not interested in hacking the PHP source code, you can simply download the Windows binaries. Both the binaries and the source code can be found at the PHP website.

At the time I wrote this, the relevant PHP binary to download comes in a zip file. The Windows installer version does not include the binaries to run PHP as an Apache module.

2. Installing PHP

Installation is actually trivial.

a. Create a directory for PHP on your computer. For the purposes of this article, I will assume that you created "c:\php".

b. You don't need all the files provided in the archive, so unzip the PHP archive into a temporary location. For example, if you're using Windows 95/98/ME, one possible temporary place to extract the files is "c:\Windows\Temp". All the PHP files will be extracted into a folder of its own, with a name based on the version of PHP you downloaded. For example, if you downloaded php-4.2.3-Win32.zip and extracted it into "c:\Windows\Temp", there'll be a folder called "c:\Windows\Temp\php-4.2.3-Win32\" where the files can be found.

Copy the following files into "c:\php": php.exe, php4ts.dll and php4apache.dll. You can find php4apache.dll in the "sapi" subdirectory (eg, "c:\Windows\Temp\php-4.2.3-Win32\sapi\" in our above example). php4apache.dll is for use with Apache 1.3.X. You will need to use php4apache2.dll if you're installing it for Apache 2.X. Note however that I have not tested the procedure on Apache 2.X, so you're on your own there. Furthermore, php.exe is not strictly needed if you don't ever want to run PHP as a CGI binary or from the command line. I keep it around for those situations where I want to run a PHP script from an MS-DOS prompt without having to fire up the Apache web server.

If you plan to load PHP extensions, you will need to copy the files in the "extensions" directory to "c:\php" (or a sub-folder in "c:\php") as well. Note, though, that MySQL support is now integrated into php and no longer needs an extension dll. Follow the instructions below to make sure that your installation of PHP works before you start dabbling with the installation of extensions.

3. Configuring PHP

Copy "php.ini-dist" from the extracted files into your Windows directory, typically "C:\Windows" on Windows 95/98/ME, and rename it to "php.ini".

Use an ASCII text editor (such as Notepad, which can be found in the Accessories folder of your Start menu) to open "php.ini". You may need to make the following changes to the file, depending on your requirements:

  1. Your SMTP Server If you want the mail() function to actually send out email when you test your own PHP scripts, search for the section of the file beginning with the line "[mail function]" (without the quotes). You should come across a section that looks something like the following:
    [mail function]
    ; For Win32 only.
    SMTP = localhost

    ; For Win32 only.
    sendmail_from = me@localhost.com

    Change it to point to your SMTP server and email account. For example, if your SMTP server is "mail.yourisp.com" and your email address is "youremail@somewhere-or-other.com", change the code to:
    [mail function]
    SMTP = mail.yourisp.com
    sendmail_from = youremail@somewhere-or-other.com

    Note that after you do this, when your script tries to use the mail() function, you will need to be connected to your ISP for the function to succeed. If you do not modify the above lines and attempt to use mail() in your script, the function will return a fail code, and display (or log) the error (depending on how you configure php.ini to handle errors).
  2. Global Variables If you need to run scripts written for versions of PHP earlier than 4.1, search for "register_globals" in php.ini, and change it to the following:
    register_globals = On

    If you leave it at its default of "Off" in PHP 4.2.X and above, you will need to access your form data variables and cookies using (for example) $_REQUEST["variable_name"] instead of directly as $variable_name. This may break scripts written for earlier versions (pre-4.1) of PHP.

There are numerous other things that you can change in php.ini to make PHP work as you prefer. If your intention is for your local setup to mimic your web host's installation of PHP, you should of course find out how your host sets up their PHP and modify your php.ini accordingly. You can easily find out how your host has set up their php.ini by using the phpinfo() function (see later in this article).

4. Configure Your Apache Web Server

If you want PHP to work with your Apache server, you will need to modify your Apache configuration file to load it. Naturally, you will need to have already installed Apache on your machine and configured it. You can find instructions for installing and configuring Apache at http://www.thesitewizard.com/archive/apache.shtml.

Note that you do not need to have the Apache web server installed in order to test your scripts. You can simply run the interpreter (php.exe) on your scripts (just put your script as a command line argument to php.exe). I find it more convenient, however, to have the server installed, since the browser and server combination will take care of any setting of environment variables and the like which you would otherwise have to do manually. It's up to you, of course. The rest of this guide will assume you installed Apache and wish to configure it to use PHP.

There are two ways to configure Apache to use PHP4: one is to configure it to load the PHP interpreter as an Apache module. The other is to configure it to run the PHP interpreter as a CGI binary. This article will give instructions for both, but you should only implement one of them, either the module method or the CGI binary method. Unless you have a particular reason for running PHP as a CGI binary, you will probably want to load PHP as a module in Apache, since it runs more efficiently that way.

a. Running PHP as an Apache module

To configure Apache to load PHP as a module to parse your PHP scripts, use an ASCII text editor to open the Apache configuration file, "httpd.conf", typically found in "c:\Program Files\Apache Group\Apache\conf\".

Search for the section of the file that has a series of commented out "LoadModule" statements. (Statements prefixed by the hash "#" sign are regarded as having been commented out.) Add the following line after all the LoadModule statements:

LoadModule php4_module "c:/php/php4apache.dll"

If you are using Apache 2.X, remember to use "c:/php/php4apache2.dll" instead of "c:/php/php4apache.dll".

Next, for Apache 1.3.X users, search for the block of "AddModule" statements. Add the following line after the last "AddModule" statement:

AddModule mod_php4.c

Don't worry that you can't find a "mod_php4.c" file anywhere on your system. That directive does not cause Apache to search for the file on your system. For the curious, it specifies the order in which the various modules are enabled by the Apache server.

If you're using Apache 2.X, you do not have to insert the AddModule directive. It's no longer needed in that version. Apache 2.X has its own internal method of determining the correct order of loading the modules.

Finally, search for "AddType" in the file, and add the following line after the last "AddType" statement:

AddType application/x-httpd-php .php

If you need to support other file types, like ".php3" and ".phtml", simply add them to the list, like this:

AddType application/x-httpd-php .php3
AddType application/x-httpd-php .phtml

b. Running PHP as a CGI binary

If you've configured PHP to run as an Apache module, skip forward to the next section. This section is for people who want to (or need to) configure PHP to run as a CGI binary.

Search for the portion of your Apache configuration file which has the ScriptAlias section. Add the line below after the ScriptAlias for "cgi-bin". Note that if you installed PHP elsewhere, such as "c:\Program Files\php\", you should substitute the appropriate path in place of "c:/php/" (for example, "c:/Program Files/php/").

ScriptAlias /php/ "c:/php/"

Apache needs to be configured for the PHP MIME type. Search for the "AddType" comment block explaining its use, and add the following line after it:

AddType application/x-httpd-php .php

As in the case of running PHP as an Apache module, you can add whatever extensions you want Apache to recognise as PHP scripts, such as:

AddType application/x-httpd-php .php3
AddType application/x-httpd-php .phtml

Next, you will need to tell the server to execute the PHP executable each time it encounters a PHP script. Add the following somewhere in the file, such as after the comment block explaining "Action":

Action application/x-httpd-php "/php/php.exe"

Note: the "/php/" portion will be recognised as a ScriptAlias, a sort of macro which will be expanded to "c:/php/" (or "c:/Program Files/php/" if you installed PHP there) by Apache. In other words, don't put "c:/php/php.exe" or "c:/Program Files/php/php.exe" in that directive, put "/php/php.exe".

c. Configuring the Default Index Page

This section applies to all users, whether you are loading PHP as a module or running it as a CGI binary.

If you want to make your PHP script execute as the default page for a directory, you have to add another line to the "httpd.conf". Simply search for the line in the file that begins with a "DirectoryIndex" and add "index.php" to the list of files on that line. For example, if the line used to be:

DirectoryIndex index.html

change it to

DirectoryIndex index.php index.html

The next time you access "localhost" or "localhost/directory/" without a filename, Apache will deliver "index.php" if available, or "index.html" if "index.php" is not available.

5. Testing Your PHP Installation

Create a PHP file with the following line:

Save the file as "phpinfo.php" (or any other name that you fancy, but with the ".php" extension) into your Apache htdocs directory.

Next, restart your Apache server so that it can read the new configuration directives you placed into httpd.conf.

Open your browser, and access the file you just created by typing "localhost/phpinfo.php" into your browser's location bar.

You should see an entire pageful of information about your PHP setup. Congratulations - you have successfully installed PHP and configured Apache to work with it. You can also use this same file, phpinfo.php, to find out more about how your web host has set up his php.ini so that you can duplicate it on your local machine.

If for some reason it does not work, you can check to see whether your PHP setup or your Apache setup is causing the problem by simply running php on the file with a command line like "c:\php\php phpinfo.php" (without the quotes).

If invoking PHP from the command line causes a large HTML file with all the PHP configuration information to be displayed, then your PHP set up is fine. The problem probably lies with your Apache configuration. Follow closely my instructions on how to install and configure Apache in http://www.thesitewizard.com/archive/apache.shtml as well as check the instructions on configuring it for PHP given above.

Learning PHP

The complete PHP reference manual can be obtained from the php website. You can refer to it online or download the entire set of HTML files for reference offline. As its name implies, it is a reference manual only. For tutorials, check out the PHP tutorials at thesitewizard.com.

Have fun!

What is CMS?

A content management system (CMS) is a computer software system for organizing and facilitating collaborative creation of documents and other content. A content management system is frequently a web application used for managing websites and web content, though in many cases, content management systems require special client software for editing and constructing articles. The market for content management systems remains fragmented, with many open-source and proprietary solutions available.

Other CMS aside from Joomla:

Typo3 - Open source content management system.
Xaraya - Open source content management system.
Plone - Open source content management system based on Zope and Python.
PostNuke - Open source content management system.
Vignette - Enterprise content management system.
Zope - Open source application server for building content management systems.
Textpattern - Open source content management system by Dean Allen.
PHPwcms - Open source content management system based on PHP and MySQL.
PHP-Nuke - Popular open source content management system based on PHP.
Xoops - Open source content management system based on PHP and MySQL..
Bricolage - Open source content management system.
CMSimple - Open source content management system.
DotNetNuke - Open source content management system based on ASP.NET.
WordPress - Open source content management system based on PHP and MySQL.
Drupal - Open source content management system.
eZ Publish - Open source content management system by eZ Systems.
Mambo - Open source content management system by Miro International.
Metadot - Open source portal server.
phpWebSite - Open source content management system based on PHP by the Web Technology Group at Appalachian State University.
RedDot - Enterprise content management system.
SPIP - Open source content management system based on PHP and MySQL by the minirezo.
Alfresco - Open source, J2EE-based content management system.
Site Executive - Content management system by Systems Alliance.
Vertical Site - Content management system based on J2EE by Enonic.
Back-End - Open source content management system for small/medium websites based on PHP and MySQL.
CMS400.NET - Content management system based on .NET by Ektron.
e107 - Open source content management system based on PHP and MySQL.
Freestyler - Content management system by Datalink.
NQContent - Content management system based on Coldfusion by NetQuest.
Kwiki - Open source wiki-type content management system based on Perl.
CityDesk - Content management tool by Fog Creek
Caravel - Open source content management system based on PHP.
QP7 - Content Management System by Quantum Art.
Tikiwiki - Open source content management system.
WebGUI - Open source content management system by Plain Black.
Website Baker - Open source content management system based on PHP.
SMBCMS - Small business content management system.
Miraserver - Content Management System based on PHP and MySQL by PC Media..
Artiphp Velocity - Open source content management system. Also called ArtiVelocity or Artiloo.
AssetNow - Content management system by Orbital.
Clever Copy - Free content management system based on PHP and MySQL.
Colony - Content management system to create accessible websites by Red Ant Development.

$100 in FREE Links Text Link Ads