You are on page 1of 7

PHPnuke Tutorial Pagina 1 di 13 PHPnuke Tutorial Pagina 2 di 13

PHPnuke 5.3.1 Installation Tutorial Unix 2. Configuring


My Test Drive Site is located here
3. Uploading
Last Updated : 10/01/02
4. The Database (MySQL)

5. Finishing Touches

6. MORE!

7. FAQ

8. Recommended Sites

Please Read : Credits

This is a Tutorial/FAQ for setting up PHPnuke. It is focused specifically on Contact Details


installation of PHPnuke (5.3.1 and others) and is based on the original PHPnuke
Tutorial for F2S you can find it by clicking on Guides above. If you cannot see the
menu because you found this site through a search engine, click here to go to the
main menu and then try again.. How this Guide works :

Legalities / Disclaimer : I have tried to make it easier for you to understand by bolding any key words or
items which you need to look for, italicing anything which should also be noticed but
Click on LICENSE up above and you will be taken to the license agreement. is not essential and also have made screenshots which are really just tables set to
look like the real thing.
If there is no bar at the top; please email me immediately as this site is illegally
hosting my guide and I am receiving no money for it. If you see it on my site then I Yellow Tables represent actual coding or programming
get money because there is a popup add - anyway, the money is used to pay for Green Tables represent information or configuration details (but not in the form of a
domain fees and hosting fees. screenshot)
White Boxes contain information which is relevant but not required in the
These guides are free for you to use and the most updated one and the now official installation of PHPnuke; also contain information about certain programs and special
host is located on Nuke-Hosting. The URL for this site is installations.
www.nuketutorials.com. For the latest guide, be sure to go to this page.
Also note - my TEST DRIVE SITE for this is located at http://ge.nukeelite.com/ .

IMPORTANT UPDATE
Updates
Go HERE for details - all PHPnuke 5.3.1 users should check
Click HERE to download the patch (zip) without going all the way down. 10th January Added a lot of small things, free hosts, some info on the topics
2002 problem, added a download for PHPNuke 5.3.1 in ZIP and so on...
Fixed a few small errors, added a link to the Update section right at
3rd January the top, added a bit of content to the config.php section as many
2002 people simply changed it before upload and that about sums
everything up ^_^
1st January
CONTENTS Happy New Year! Also added some updates for the guide.
2002
31st December
Starting new guide (this one)
How this Guide works 2001

Updates

PLEASE SIGN!!

1. Downloading PLEASE SIGN!!

mhtml:file://C:\Temp\Syscomsrl\software\PHPnuke%20Tutorial.mht 22/12/2002 mhtml:file://C:\Temp\Syscomsrl\software\PHPnuke%20Tutorial.mht 22/12/2002


PHPnuke Tutorial Pagina 3 di 13 PHPnuke Tutorial Pagina 4 di 13

Please - If you found this guide helpful or not helpful, or have any comments or Runs on : Unix-based
suggestions, please sign my guest book as it would mean a lot to me (I've never Supports : CGI, MySQL, PHP, SSI, SENDMAIL
had a guest book with more than 10 entries) - also note it might be a bit slow but Other : No Adds, comes with phpMyAdmin pre-installed, mail forwarding supported, FTP access,
please sign it.. domain hosting, no web access
URL : subdomain.port5.co.uk or subdomain.portland.co.uk
Space/Bandwidth : 15mb, 100mb bandwidth limit per month
Also note, do not put your problems into the guestbook, keep the comments
short :) If you have any problems with Nuke (or anything else on my site), email Note : You have to signup for MySQL support seperately
me at seremify@phpnuked.com . On a positive note, I have now got more than 70
signings (ooooh). SUBMITTED BY Tan Khim Hoe

Guest Book Free Hosts which may work with PHPNuke;


Sign Guestbook View Guestbook
z Freedom to Surf (F2S) - http://www.f2s.com/

1. Downloading Runs on : Apache


Supports : PHP, MySQL, Sendmail
First you will need to download PHPnuke 5.3.1 from one of the many PHPnuke Other : No Adds, comes with phpMyAdmin pre-installed, has online mail
websites. The best place to go is the Official Site at http://www.phpnuke.org/ or at viewing/sending, FTP, domain hosting
a mirror site such as http://www.nukesupport.com/ . If you need a zipped version URL : subdomain.f2s.com
(as opposed to tar) you can get it here at NukeTutorials by clicking on Downloads Space/Bandwidth : 20mb, no bandwidth limit
above. If you can't see the downloads button, reload the site at RUMOURS : F2S might be closing in Feb 2002
www.nuketutorials.com/main.htm. You will also need a reasonably new FTP
Program such as SmartFTP. As well as that, you will need a program which can The author of this guide also wrote a guide for installing PHPnuke on F2S
unzip the TAR format such as Winzip. If you cannot find these files on their z Ionichost - http://www.ionichost.com/ / http://www.coolfreepages.com/
websites, you can check a site like http://www.download.com/ to find them.
Runs on : Unknown
Note : I strongly refer to SmartFTP throughout this Tutorial as I prefer it because Supports : PHP, MySQL, SENDMAIL IS NO LONGER SUPPORTED (due to
of its easiness to use compared to WSFTP_LE. abuse)
Other : Large full-page add which stays open the whole time, FTP, domain
Also note, you need to either have a host which supports PHP, MySQL and Sendmail hosting, unlimited bandwidth, tech. support
or your own server. You can use Windows NT and Windows 2000 servers as well but Space : 50mb
I'm not experienced with them so you may have to figure it out for yourself. If
anyone out there feels like helping me with the Windows part of this guide then Recommended Payed Hosts which will work with PHPnuke;
please feel free to.
z Nuke-Hosting - http://nuke-hosting.com/
This guide uses phpMyAdmin - for details of using it, installing it and downloading Excellent Tech Support, owner runs NukeSupport and comes pre-setup with
it; check my phpMyAdmin tutorial by clicking Guides. PHPnuke.
It is highly recommended for its ease-of-use but no instructions for installation will
be included.

Recommended Free Hosts which will work with PHPnuke; 2. Configuring

z Arowa.com - http://www.arowa.com/ Firstly, you will need to use WinZip or equivalent to unzip the package into a new
directory, for example C:\PHPnuke is a good start.
Runs on : Unix-based
Supports : CGI, MySQL, PHP, SSI, SENDMAIL The main file you need to configure is config.php as that drives the site. You will
Other : No Adds, comes with phpMyAdmin pre-installed, mail forwarding to multiple accounts,
need a program such as Notepad to edit this. Any text editor should work - more
"Best Affiliate Program" (sponsorship), FTP access, domain hosting, no web access
URL : subdomain.arowa.com can be found at http://www.download.com/ . Just make sure to set it to have 'no
Space/Bandwidth : 15mb, 100mb bandwidth limit per month formatting' and no special options.

Note : You have to signup for MySQL support separately The area which you have to configure manually using the text editor is the first area
Note : Arowa uses the Portland server for MySQL and some websites may be stored on the - $dbhost, $dbuname, $dbpass, $dbname, $system, and $prefix.
remote Portland server.

SUBMITTED BY SAROK DATA $dbhost - The host address of the computer/server which has the database stored
on it. Commonly set to localhost but some servers have had problems with
z Portland.co.uk connecting and the solution is to provide the address or IP address with a port (eg.
db.thesite.com:3306). These details are available from the server administrators

mhtml:file://C:\Temp\Syscomsrl\software\PHPnuke%20Tutorial.mht 22/12/2002 mhtml:file://C:\Temp\Syscomsrl\software\PHPnuke%20Tutorial.mht 22/12/2002


PHPnuke Tutorial Pagina 5 di 13 PHPnuke Tutorial Pagina 6 di 13

and/or your ISP. change the whole lot online in the Administration section. One other major thing is
$dbuname and $dbpass - They are the username and password to access the that you should not change the language yet. Change it once you've got it online as
database. If using a hosted database, chances are they assign a username and some people have also had errors relating to that.
password to this for you. The username is usually your login name for accessing the
site and FTP. Optional : If you can't get the Admin page to load - this is the thing to change. It
$dbname - The name of the database and on some servers (such as F2S), is the causes errors on the F2S servers -
same as your username. Check with your server administrators if in doubt.
$system - The type of system the database is stored on. A Unix machine is '0' and You will need to change is the $foot1, $foot2, $foot3 and $foot4. It is possible to
a Windows-based or other is '1'. F2S uses a Unix machine so it is left at 0. If errors add more but before you install PHPnuke, you should remove it all together. This is
occur later, due to inability to use 'crypt' command and others, one of the first steps because by default, PHPnuke comes with some bad formatting or in simple English
to resolve the problem is to change this to a '1' as then it will only use basic terms, bad grammar which the computers at F2S can't understand. This section is
functions. right below the section you just edited. If you are experiencing problems displaying
$prefix - The prefix, or beginning of the table data in the database. If you plan on the footer at the bottom of every page and are getting errors, you should consider
using the easy way to setup your database (by selecting 'Nuke.sql' to configure your removing the whole section as seen below.
database later), leave this as 'nuke'. If you plan on doing it the hard way (not
recommended as it stuffs a lot of things up), then you can change this. Also, if you $sitename = "gE Social Club";
are using multiple installations using the one database (also not recommended) then $nukeurl = "http://ge.nukeelite.com";
you may need to install the database a few times in the one database and that is $site_logo = "logo.gif";
most likely when you will need to change the prefix for each site. Chances are you $slogan = "Here today, gone tomorrow";
don't need to know this. $startdate = "June 2001";
$user_prefix - Same as above except now if you want to share all your users $adminmail = "seremify@phpnuked.com";
across more than one PHPNuke installation you can by changing the user_prefix. $anonpost = 0;
Requires all users to be in the one database though. Also allows you to keep each $Default_Theme = "NukeNews";
PHPNuke news site different whilst keeping IMs and personal settings (themes) the $commentlimit = 4096;
same for each site. $anonymous = "Anonymous";
$dbtype - What brand/system of database you are using. The default is MySQL and $minpass = 4;
that is what most servers use (F2S for example). $pollcomm = 1;
$articlecomm = 1;
Standard config.php file;
That is the extract from my config.php file; you only need to make sure you
$dbhost = "localhost"; remove the sections starting with $foot so copy something similar to mine. As for
$dbuname = "seremify"; the rest of the details, you can change them but it is easier to change it from
$dbpass = "megablast"; Administration once the site is uploaded. Make sure you set the $nukeurl to your
$dbname = "phpnuke"; site's root directory. If you find that your site does not work later, make sure that
$system = 0; you have the correct address here (it might be a good idea to change it now). Of all
$prefix = "nuke";
things, make sure you leave the $Default_Theme = NukeNews alone otherwise
$user_prefix = "nuke";
$dbtype = "MySQL"; when you go to your site later, you will find that there will be many errors. Also
note that on my test-drive site I might not be using NukeNews but 3d-fantasy.. I
keep changing my mind. Do not change it here - change it once the site is working
If you have any problems connecting to the database (you will get an error like from within admin.php's Preferences.
"Can't connect to MySQL database") then you should try changing the $dbhost =
"localhost" to $dbhost = "yourhost.com:port" (with 'yourhost' being the Server
That about wraps up editing the config.php file; that wasn't so hard was it? Now
address or IP and the port being the open database port).
comes the fun parts (or the boring parts I should say).

In case you didn't already know, my account name is 'seremify'. The other thing to
notice is that 'megablast' isn't my password (duh!). So, change the 'seremify's to
your account name and the password to yours and then put that into your
config.php file. Also make sure you remove the default one. Also change where 3. Uploading
I've put phpnuke to your database name. Leave the rest as its most likely correct -
unless you are using a different type of database. I cannot support you there as I NOTE
do not know much about other brands/systems but just enter in whatever database
you are using and we'll see how that goes. The difference will be that when you You can skip the uploading section if you are using a local server in which case you
have to import the nuke.sql file, I won't know what program to use for your can just copy the files straight from the TAR file. Do not ask me for details on this.
database type so just 'experiment'. You must also remember you still need to CHMOD the files.

The section below relates to modifying the config.php file even further. I now no
One of the most essential (and also the other place where many problems arise) is
longer recommend people edit this section (except if they get errors because of
$foot) as people often mis-parse things and cause a huge amount of errors. Leave the uploading. The most major thing to note is that PHP files MUST be uploaded
in ASCII. Many FTP programs, and even the best ones (I like SmartFTP myself)
the SiteName alone and you do not need to change the $nukeurl section. You can

mhtml:file://C:\Temp\Syscomsrl\software\PHPnuke%20Tutorial.mht 22/12/2002 mhtml:file://C:\Temp\Syscomsrl\software\PHPnuke%20Tutorial.mht 22/12/2002


PHPnuke Tutorial Pagina 7 di 13 PHPnuke Tutorial Pagina 8 di 13

have an automatic feature, and some even allow you to configure this. Make sure very bottom outside the box).
you configure it to upload .php files in ASCII.
SHORTCUT FOR UNIX USERS - you must have root access to the server to use
SmartFTP this- click here to read more
To set SmartFTP to upload PHP files in ASCII, follow these steps;
Please note: This tutorial was written for PHP-Nuke version 5.3.1! As of
1. Open SmartFTP (Start -> Programs -> SmartFTP -> SmartFTP) version 5.5 You do not need to chmod all files and folder. You DO need to
2. Click Tools -> Settings... to open up the configuration of SmartFTP chmod config.php to 666. That is the only file which needs to have
3. In the top left of the popup box (or in other versions, it may be slightly permissions set. The rest of the PHP-Nuke installation remains the same so
different) there is a tab called Extensions - click it. you can follow most of this tutorial.
4. There are two parts of this dialog box; the Ascii Filter and the Exclusion
Filter. Binary is used for images only. To set PHP files for ASCII, click the text There are shortcuts like using the Shift and Ctrl keys to select multiple files. It will
box above the ASCII list and below the words Ascii Filter. Enter in save a lot of time but remember, if you want it to work, you have to do it properly.
(exactly) .*\.php$ and click on Add. No shortcuts besides the multiple file select. I suggest you do this in a logical order;
5. Click on OK and then its done. Now when you upload in PHP it will upload in Start from the base, then every folder you open, CHMOD the files first then the
ASCII mode. directory. Most problems relating to PHPnuke not working are because the
CHMODing was not done correctly. And as a note, CHMOD stands for Change
Modes.

I'm sure there is a program out there already which can do this for you but I am yet
Instructions for Uploading PHPnuke using SmartFTP to find it :(

Note : If you are not using SmartFTP, the WSFTP_LE tutorial will also work but by Theme Installation
using general intuition you can probably figure it out on your own as the default
settings for a 'New Server' are pretty straightforward and do not require
Themes are installed the same way as other files are uploaded.
customization. SmartFTP however is recommended as it is a lot faster to view F2S
and uses Cache, and also has the ability to check CHMOD status (very useful).
Simply upload the theme files into the \themes directory and CHMOD appropriately
(666 for files, 777 for directories).
After setting up the config.php file, now is the time to upload everything.
To view them, you can either set it for yourself by clicking on Your Account and
then Select Theme or by setting it as the default for your site under Preferences
Insert all your details into the relevant areas and then click on Connect (the icon to in Administration.
the very farthest left on the toolbar resembling a Computer on top of a World)

After it has connected you can now upload EVERYTHING from your PHPnuke
directory's HTML folder (eg. C:\PHPnuke\Html) into here. This may take a while so
get up, have a coffee, order a pizza, and then come back. Also note, you will see You've nearly finished installing (installing is very different from setting up)
files which are already uploaded there as well as (in some cases) your HTACCESS PHPnuke. Now just wait a day for the Database to be enabled.
file.

Once uploaded, you will need to CHMOD everything. This is a very slow process
and if you use SmartFTP, you will appreciate the fact that if you get disconnected, 4. The Database (MySQL)
you can find out exactly where you left off by randomly checking the CHMOD
settings and the very helpful log tool. You should install phpMyAdmin - check my guide for details by clicking on Guide
above. It contains how to install, basic uses, download URL and stuff like that..
CHMOD Instructions
Using your web browser, go to where-ever it was that you installed the
** Please note: This tutorial was written for PHP-Nuke version 5.3.1! As of
phpMyAdmin to;
version 5.5 You do not need to chmod all files and folder. You DO need to
chmod config.php to 666. That is the only file which needs to have
permissions set. The rest of the PHP-Nuke installation remains the same so Enter in the details which are required - usually the same as what you put into
you can follow most of this tutorial. config.php (i'm not sure if 'localhost' will work) and then click on Login and the
next screen will appear (with your details instead of mine obviously).
If you see a folder, right click it, click Properties/CHMOD and then set the number
Home
to 777 (or just click all three tick boxes in each group - don't touch the ones at the
very bottom outside the box).
phpnuke (0)
Welcome to phpMyAdmin 2.2.2
If you see a file, right click it, click Properties/CHMOD and then set the number to MySQL 3.23.37 running on localhost as seremify@localhost
666 (or just click the top two tick boxes in each group - don't touch the ones at the

mhtml:file://C:\Temp\Syscomsrl\software\PHPnuke%20Tutorial.mht 22/12/2002 mhtml:file://C:\Temp\Syscomsrl\software\PHPnuke%20Tutorial.mht 22/12/2002


PHPnuke Tutorial Pagina 9 di 13 PHPnuke Tutorial Pagina 10 di 13

Home
MySQL phpMyAdmin phpnuke (48)
Welcome to phpMyAdmin
Log out (*) Language: English (en) Go 2.2.2
phpMyAdmin documentation
Official phpMyAdmin Homepage MySQL 3.23.37 running on localhost as seremify@loc
Sourceforge phpMyAdmin Download Page
[ChangeLog] [CVS] [Lists]
MySQL phpMyAdmin
Log Language: English (en)
out (*) phpMyAdmin documentation
Official phpMyAdmin Homepage
Sourceforge phpMyAdmin Downloa
Click on the database name you are installing PHPnuke to on the left frame and Page
then this will appear on the right. [ChangeLog] [CVS] [Lists]
Database seremify

z Print view

z Run SQL query/queries on database phpnuke [Documentation] : Close phpMyAdmin and now your set.

For LINUX users


If you are experiencing problems connecting to the database from either
phpMyAdmin or the actual PHPnuke portal, try downloading the latest PHP-MySQL
RPM from ftp://ftp.redhat.com//pub/redhat/redhat-7.1-
en/os/i386/Redhat/RPMS/php-mysql-4.0.4pl1-9.i386.rpm . If that link no longer
works which I am unsure of, you can download it off the NukeTutorials server from
Show this query here again Downloads (click on the menu bar up the top).
Or Location of the textfile :
Sfoglia...
Go 5. Finishing Touches

z Query by Example Simply go to yoursite.com/admin.php in your browser and login using the
following information :
z Create new table on database seremify :
Name :
Username : God
Fields : Go Password : Password

First thing to do is click on Edit Admins and then click on Modify Info for the 'God
Account'. Change the password and then now you can muck about. Now go into
Your screen may be slightly different but the elements will remain the same. Now, Preferences and explore. You can't delete the God account but you can rename it
what you should do is see where it says Or Location of the textfile :, there should - its higher than Super User.
be a Browse button there and you should click it. Now, you have to find the file
nuke.sql and it should be located in the SQL directory (eg. To change the default theme just go into the Preferences as well as to change
C:\PHPnuke\SQL\Nuke.sql) and NOT the html directory where all the other files other small things (site name and so on). Then go to ADD STORY to 'add a story'.
were located. Click on GO and then everything should be setup.

You will notice the left frame has changed and so has the right. They now have IMPORT FIX + a not so important fix
loads of data (the easiest way to check if its properly installed is it will now say
phpnuke (49) if setup properly). phpnuke is of course my database name so you Some people have had problems with their PHPNuke 5.3.1 installations not showing
need to assume your name is there. the topic images in some areas due to a missing line; see below. Simply replace your
settings.php file with this one. It is located in html/admin/modules/settings.php

mhtml:file://C:\Temp\Syscomsrl\software\PHPnuke%20Tutorial.mht 22/12/2002 mhtml:file://C:\Temp\Syscomsrl\software\PHPnuke%20Tutorial.mht 22/12/2002


PHPnuke Tutorial Pagina 11 di 13 PHPnuke Tutorial Pagina 12 di 13

Another IMPORTANT FIX is the registering problem which some users have had.
Download the newest user.php file and replace the one you are using (it is located in 4: From the term console type the following command for files:
html/user.php). See below for download.. find . -type f -exec chmod 666 {} \;

5: Continue with the setup."


The other problem is that File Manager was only available to Super Admin even if
other users were allowed to use it. To fix the problem you need to update your
filemanager.php file. Download this file (see below) and replace your old
Having topic problems? Images not displaying? Things like that? Well, go into
filemanager file from html/admin/modules/filemanager.php .
your config.php file and scroll to the variable $tipath and change it so that the
setting goes from images/topics to images/topics/ and that should fix all the problems.
DOWNLOAD PATCH FOR 5.3.1 (arranged and zipped by gE)
Oops - I forgot, you can't download PHP files as there are security measures :)

More Problems? If the topic images are not displaying right, click here to go to what 8. Recommended Sites :
Francisco Burzi suggested.
http://www.phpnuke.org/ - The official site which also has information on
development of user made addons.

6. MORE! http://www.nukesupport.com/ - An excellent forum (I visit there often) to get help


with many things relating to PHPnuke. This site tends to have more 'newbies' and
You can now insert a footer using Preferences so that is one thing you might want 'installation' interest.
to do.
You might also want to install some more themes; check here. http://www.nukeforums.com/ - Another excellent forum to get help with many
PHPnuke-related things. This site tends to have more 'programming' interest.
Miscellaneous Notes :
http://www.thebix.com/ - An excellent site which is frequently updated with news
Cookies do not automatically update themselves with PHPnuke 5.2 (and possibly from all-over relating to PHPNuke.
previous versions too) when you update your Admin Password so to clear them,
you need to manually delete them. http://www.nukeresources.com/ - A site which has news on development of
PHPnuke Resources.
If you get any errors with your installation, the browser will always tell you where
the problem is located - it is best to have a look yourself to decide what the
problem is and you should try to translate the error. If you can't, then you should
go to a support site (like NukeSupport) and ask for assistance there. Credits

To anyone who is hosting this guide especially Nuke-Hosting for hosting these
guides for me for free.
7. FAQ
A LOT of help was given to me by the users of NukeSupport Message Boards -
Is there a faster way to CHMOD? http://www.nukesupport.com/

Yes there is - a solution provided by ML Allen, Jr. - westlin@myrealbox.com Another thanks goes to of course Francisco Burzi, the guy who created PHPnuke.
Only use this if you have root access to the Unix (based) machine. As well as to his team of people who help him. Then of course to Mandrakesoft for
sponsoring them.
"I was reading through your PHPNuke Installation Tutorial and thought I might
offer this suggestion. Instead of suggesting they do hours of chmoding give .. and Me :)
these 2 commands and it will do them all for you in a snap.
Email any issues, problems, illegal hosting or anything about this guide, F2S or
NOTE!: You MUST be in the root of the PHP-Nuke directory! You can cause
yourself a huge headache otherwise! This is your warning! Also this only PHPnuke to seremify@phpnuked.com
works on a *nix system (Sorry for the Windows people).
Other People who contributed:
1: Open a term console on your linux server. Ivan Strigo thebix.com - Bad URL (I forgot a dash)
Yury Cancino - Messy Frontpage programming...
2: cd /var/www/html (or your corresponding directory you keep your portal
site. (Personally I use /var/www2/html/portal) Tan Khim Hoe http://1985.port5.com/ - Found portland.co.uk as a free server for
my guide.
3: From the term console type the following command for directories:
find . -type d -exec chmod 777 {} \; Sarok Data - Found arowa.com as a free server for my guide. Please leave me some
details Sarok! Do you want your email/website here?

mhtml:file://C:\Temp\Syscomsrl\software\PHPnuke%20Tutorial.mht 22/12/2002 mhtml:file://C:\Temp\Syscomsrl\software\PHPnuke%20Tutorial.mht 22/12/2002


PHPnuke Tutorial Pagina 13 di 13

Contact Details :

Jeff C seremify@phpnuked.comICQ : 7929694 seremify.nukeelite.com

Guest Book
Sign Guestbook View Guestbook

Page hits since January 2002 -

mhtml:file://C:\Temp\Syscomsrl\software\PHPnuke%20Tutorial.mht 22/12/2002

You might also like