Rabu, 25 Januari 2012

How to set up PHP-Fusion on your PC using WampServ

Articles Hierarchy
Articles Home » PHP-Fusion Related » How to set up PHP-Fusion on your PC using WampServer

How to set up PHP-Fusion on your PC using WampServer
A beginners guide to setting up PHP-Fusion on your PC using WampServer

WampServer is an open source project, free to use (GPL licence).
www.wampserver.com/en/

This is for those beginners you want to set up a PHP-Fusion site on their PC for coding and testing purposes and because it's offline, there are none of the security worries you would have on a live site. It's a great way of checking out new infusions, mods and themes or even if you want to start designing your own. This tutorial was written using Windows XP, as far I know there are no differences for Vista.

*See Notes at bottom

First of all go to www.wampserver.com/en/download and download the latest release of WampServer via Sourceforge. [20Mb's approx]

Shut down any other programs or live windows before installing. Click on the download to install and follow the steps,

I strongly recommend you accept the default settings unless you really know what you're doing and click next.
You will need to accept the Licence Agreement to continue, [it's up to you whether you actually read it or not], Click next.
Setup will ask to install it into c:\\wamp on your PC, click next.
Setup will ask to create and install into a folder called "WampServer", click next.
You will be asked if you want WampServer to automatically load at start up, if you do your computer start up may be a little slower than usual, I recommend you do not tick the box as WampServer can be started and closed like any other software whenever you need it. Click next.

Wait while it installs.

It will ask for an email address, you're not going to be using it with the program but enter one anyway.
The next setting will be "localhost", leave as is.
It will ask for your default browser...

Internet Explorer can be found here: C:\Program Files\Internet Explorer\iexplore.exe
Firefox can be found here: C:\Program Files\Mozilla Firefox\firefox.exe

Click Open and you're done.

You'll find Wampserver in your Start/Program files, double click it and let it load up. You'll see an icon in your system tray changing from red to yellow to white as it fully loads.

If you want to change the menu language, right click the icon and choose yours from the Language menu.

When loaded click on it and a menu will pop up. Click on Localhost and a browser window will open up showing...

Server Configuration: [Just the versions of the various software]
Tools [phpMyAdmin is the one you'll use most]
Your Projects [This will be empty for now]
Your Aliases [same as tools]

All your projects [webs] go in the www folder [C:\wamp\www], it's a good idea to make a shortcut to this folder on your desktop. Unless you know what you're doing, do not alter anything in the C:\wamp folder.

If everything is ok, now you can install PHP-Fusion.

Download the latest release of PHP-Fusion at www.php-fusion.co.uk/downloads

Extract the files from the download and stick it in your docs folder to keep as a back up base copy so you'll have it when things go wrong. Copy the PHP-Files folder and paste it into the www folder [C:\wamp\www]. Rename the folder as "My-Fusion-Test-Web" or whatever your want.

Start up WampServer and after it loads click on the Localhost, you should now see "My-Fusion-Test-Web" under Your Projects.
But, first you have to create a database for your site to work. On the main localhost page [http://localhost/] under tools open phpMyAdmin.
In the "Create new database" field type in a name for your database, ie "testweb" [no blank spaces]. Click Create and you should see an empty db called testweb in the left pane.

Go back to the Localhost page and click on your project, [if nothing happens, type in http://localhost/My-Fusion-Test-Web/setup.php into the browser address]

Fill in the fields [Don't worry if it says write permissions failed, this is an offline site]

Database Hostname: localhost
Database Username: root [unless you entered a different one during setup]
Database Password: youruserpassword [if you didn't set one up, leave blank]
Database Name: testweb
Table Prefix: fusion_ [leave as is]

If you need more help installing PHP-Fusion, download the PHP-Fusion Official Handbook from php-fusion.co.uk.

Enter your Super Admin details, [As this is an offline site, use an easily remembered password, you will probably want different user types on your site for testing, so the easiest way is to make the password the username twice, ie;

Super username: Super
Super Password: supersuper

Admin username: Admin
Admin password: adminadmin

Member, well, you get the idea.

Click next and you should the following message;

Setup is complete, PHP-Fusion is now ready for use.
Click here to go to your PHP-Fusion powered site.
Note: you should delete setup.php from your server
and chmod your config.php back to 644 for security purposes.

Thank you for trying PHP-Fusion.


Again, don't worry about the chmod warnings for now. Click the "Click here to..." link and there you are, your PHP-Fusion test site in all it's glory.

You'll see a warning: "Warning: setup.php detected, please delete it immediately". Go back to site folder and delete or rename setup.php.

Type in your login details and you're good to go. You can now add dummy forums, articles, photogalleries, etc for testing.

In Admin Panel - System Admin - Main Settings, set your "Site url" as "http://localhost/yourtestsitename/"


* NOTES:

1. This tutorial is by no means definitive, there are probably things I've missed out or even a mistake or two [as if such a thing were possible??], it's written by a noob for noob's as I had to figure all this stuff out myself. One of the reasons I use PHP-Fusion is because it's one the few cms's I could get to work on localhost. If there are any glaring errors, pls let me know.

2. As your test site is offline there are several things that won't work, but most will to allow you to practise without the security implications of an online [live] site. Also, some 3rd party themes and infusions won't work, but the majority will.

3. An easy way to change write permissions on a PC is to right click the required file or folder, select Properties and untick "Read only". It's not perfect, but it works.

4. php.exe is located in: C:\wamp\bin\php\phpx.x.x\php.exe
php.ini is located in: C:\wamp\bin\php\phpx.x.x\php.ini
Where x is your current version of php

5. register_globals are off by default, if you need to change it, open php.ini [NOT recommended]

6. If you are upgrading an existing version of WampServer or will be likely to do so in the future, you should be aware of this; You cannot "overwrite" a newer version of the software over the previous version, you have to uninstall the older version first. The main thing this will do is to delete ALL your projects. So, you'll need to back them up to another folder somewhere outside the wamp folder.
So far, so good, what it also means is that you'll lose ALL your databases, so you'll need to back them up too. This will mean recreating each database after the upgrade. So, make sure you keep a record of all your projects db details so after upgrade you can reconnect your projects back to their respective databases.
So it's recommended only to upgrade if you feel it's necessary and not just because there's a slightly newer version. WampServer routinely uses the latest versions of PHP, Apache, MySql & phpMyAdmin which is something most hosts don't do, so there's no urgency to upgrading unless you're experiencing a bug or other fault.

7. WampServer comes with it's own help file and there's also a support forum on their site.

8. There are other server packages available, but I've only got experience with this one. So, someone else will have to write the tutorials for them :)

[Top]

http://www.php-fusion.co.uk/articles.php?article_id=31#top
Posted by Philip on June 18 2008 09:35:16

Tidak ada komentar:

Posting Komentar