PowWeb User Help Documentation
:: Order a PowWeb Hosting Package Here :: 
Created for the Users by the Users

Navigation
Home
Gel de unghii de vanzare
Tutorials
Information
Search
Suggestions
Links
MySQL Tutorials

phpNuke 5.5

Jump to Common Errors/FAQs

Requirements: You must have MySQL and phpMyAdmin installed on your account. You can check the installation tutorial for phpMyAdmin here.

Downloading

You can download phpNuke from http://www.phpnuke.org/.
Download the required file and unzip/extract locally (on your machine).

Configuring

config.php - here are the following lines that you will have to edit:

Line 32: $dbhost = "localhost"; <--- Make sure this line stays as localhost (refers your server)
Line 33: $dbuname = "SQL User Name"; <--- Your database user name
Line 34: $dbpass = "Password"; <--- The password to your user name from the database
Line 35: $dbname = "Database Name"; <--- Your database name
Line 36: $prefix = "nuke"; <--- Keep as nuke
Line 37: $user_prefix = "nuke"; <--- Keep as nuke
Line 38: $dbtype = "mysql"; <--- Originally "MySQL", MUST CHANGE to "mysql", it is case sensitive and can cause errors

sql_layer.php

Here you are going to have to use the search option,
(Edit, then search for some), search for "MySQL" and change everything that is "MySQL" to "mysql", yes, this is case sensitive and must be fixed. Note -- There are some other variations of it, make sure to JUST change "MySQL" to "mysql", when you are done, save it, and close it.

Uploading

Upload everything to the desired folder on the server via any FTP program.

Note: All .php, .inc, .sql, .cfg, and .htm files should be uploaded in ASCII mode.  All graphics should be uploaded in Binary mode.

Changing Permission

Set all PHP files to CHMOD 755.  All subfolder of the images folder should be set to CHMOD 777.  This includes avatars, avatars/gallery, and smilies.

Setup

Run the setup, by visiting http://www.yoursite.tld/html/index.php. Create a Superuser from here.

* .tld is the extension for your domain (i.e. .com, .net, .org, etc.)

Useful Tips

http://www.yoursite.tld/html/admin.php?op=Configure
Change general options (Title, theme, annoying text at the bottom, etc)

http://www.yoursite.tld/html/admin.php (All from the admin page)
Click on the blocks link, de-activate the blocks you do not want (such as, the Amazon one) Click on the modules link, de-activate and activate the links within your blocks that you want Click on add story, post's new's on your website Click on surveys, add/edit/delete the survey on your website

Themes: Adding, Changing, Deleting

If you want to change a theme that is already installed in Nuke (comes with around 10), go to "http://www.yoursite.tld/admin.php?op=Configure" and go to "Default theme for your site:" and just select a new one, and go to save changes.

If you want to add a new theme for your site, you will have to download a theme off of a
website, then upload the whole folder to /html/themes/ in your FTP. Then once it's done
uploading, go back to "http://www.yoursite.tld/html/admin.php?op=Configure" and go back
to the "Select theme:" and select the theme you just uploaded.

Adding pages on your menu

Go to your FTP, go to your html/modules folder. Once there, create a folder, for what you want the link in the menu to be called. 2 Examples: "Test", but if you want spaces, you will
have to do this, "Test_Test". Now, go to your html/text editor on your computer, put this code in it:

?php // Add a "<" before ?php

if (!isset($mainfile)) { include("mainfile.php"); }
$index = 0;

include("header.php");

OpenTable2();
// Use the html filename of your chosing below.
include("yourpage.html");

CloseTable2();

include("footer.php");

?>

At Line: 10, where it says "yourpage.html" change that with the html file you will include, I recommend just using the same name as your folder, i.e, if the folder you created was named, About, on line 10, put about.html, easiest that way.

Now for the html file, all you have to do, is create a basic HTML file offline, UPLOAD IT TO YOUR ROOT NUKE DIRECTORY ON YOUR FTP, for example, /html, put the html file in there, you do not have to make it look like your Nuke site or anything, as the includes in that php code, added the blocks and whatnot, so you could do a simple code like this:

< html >
< head >
< /head >
< body >
< table border=1 width=100% height=500 >
< td>Test< /td >
< /table >
< /body >
< /html >

Save that as yourpage.html, put it in your root Nuke directory, and there you go, you have
to do one more thing though, go to: "http://www.yoursite.tld/html/admin.php", click on the
Modules link, find whatever you named it in the list, and click "Activate" on the right,
and it'll be on the menu.

Making Nuke site yoursite.com

Create this file, upload it to your root directory for your website saved as "index.php".

?php // Add a "<" before ?php
header('location: http://www.yoursite.tld/html/index.php');
?>

Common Errors/FAQ:

Q) Why does it say:

Code:
"Warning: Access denied for user: 'root@localhost' (Using password: NO) in /www/?/usernmae/htdocs/nuke/includes/sql_layer.php on line 29
Warning: MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: NO) in /www/?/usernmae/htdocs/nuke/includes/sql_layer.php on line 29
Warning: MySQL: A link to the server could not be established in /www/?/usernmae/htdocs/nuke/includes/sql_layer.php on line 29"

A) The file config.php does not contain your correct database info. If you do not know your database info then contact support@powweb.com otherwise edit the info so it is correct.


Q) Why do I see:

Code:
"Warning: Supplied argument is not a valid MySQL result resource in /www/?/usernmae/htdocs/nuke/includes/sql_layer.php on line 231" all over the page?

A) Your database tables haven't been set up properly. Using either phpMyAdmin or a local client, connect to your database and make sure it isn't empty, OR delete all the tables and dump the nuke.sql file again.

Q) I get a 500 Internal Server Error. Why?
A) Check these things:

The file was uploaded in ASCII. If you aren't sure, then upload it again.

The files permissions are 755.

Very Important! - There's a possible small bug in PHP Nuke 5.31 that may prohibit your users from being able to log in. It's a very simple fix! Here's what you have to correct:

In line 442 of user.php:
Code:

Change it from:

$pass=crypt($pass,substr($dbpass,0,2));

to:

$pass=crypt($pass,substr($dbpass,0,12));

otherwise people wont be able to login with their username and password.

Installation Contributed by el2ik


Top

Page was generated in 0.002965 seconds !

Designed by NMS Design