Ravens PHP Scripts FAQ (Frequently Asked Questions)





Question Question
·  Why does my activation email have the wrong URL?
·  Why does my user status always show Offline?
·  How do I reset my Admin password?
·  Why do I see message_die()?
·  Why do i get "Warning: Invalid argument supplied for foreach()" when using Nuke 6.5 or newer?
·  Why doesn't my FAQ work?
·  How do I remove the Cannot Add/Modify Header Information error message?
·  How do i get rid of the Multiple Notices And Warning Messages on my Web server?
·  I get an error similar to Warning: setlocale() [function.setlocale]
·  When i access my site's forums i either am prompted to download a file or the page displays gibberish
·  I get an error similar to Call-time pass-by-reference has been deprecated in the Webmail module
·  I change the default theme or stories in home in preferences but i see no changes.
·  I get an error similar to supplied argument is not a valid MySQL result resource in sql_layer.php on line 286
·  Why do my PM emails have the wrong URL?
·  Why am I receiving multiple warnings about Language files
·  My security code shows a big red X or just the text label
·  How do I adjust the server time for News articles?
·  Fatal error: Call to undefined function: nav() in /home/USERNAME/public_html/html/modules/Your_Account/index.php on line ...
·  Why does the Guest avatar show up as a red X?
·  How can I resync the user posts count?
·  The email address you entered is invalid!
·  How do I convert a stand alone PHPBB to nukePHPBB?
·  Why doesn't the Post time appear in my News stories?
·  Database backup not working
·  How to relocate the default banner
·  How to change "Stories Number in Home" number to less then 5?
·  How to create my favicon.ico
·  How to hide left blocks when viewing...
·  Fatal error: Call to undefined function: stripos_clone()
·  Email Address shows in Member List and Forums
·  The html tags you attempted to use are not allowed
·  I tried installing a new theme and now all I get is a blank page!
·  Warning: SAFE MODE Restriction in effect. The script whose uid is xxxxx is not allowed to access .....
·  After installing NukeSentinel - PHP Warning: ob_start(): output handler 'ob_gzhandler' cannot be used after 'URL-Rewriter' in /home/mysite/public_html/mainfile.php on line ...
·  Redirection limit for this URL exceeded ...
·  I moved config.php and now my Forums and other add-ons won't work.
·  I entered mysql4 as $dbtype in config.php but Nuke won't connect to the db.
·  What do I enter in config.php file's settings?
·  What is the proper way to upgrade my Nuke version?
·  I'm new to PHP-Nuke, how do I install it?
·  After installing the latest patches my Right Blocks are gone!
·  Fatal error: Call to undefined function: themeheader() in /home/USERNAME/public_html/header.php on line ??
·  When I try to post an article I get thrown back to the home page.
·  You have attempted to access this site with an invalid IP.
·  Invalid Session Error when posting in phpbb2 forums

Do you have a question which isn't answered here? Click Here to add it.

Answer Answer
Print this Answer
?  Why does my activation email have the wrong URL?

The URL for activation email is set in the Preferences section of the Administration panel. Often times your activation email will show something like http://www.yoursite.com when it really should show http://www.yoursite.com/html. To correct it, edit the setting Site URL in your preferences.

[ Back to Top ]

Answer Answer
Print this Answer
?  Why does my user status always show Offline?

This usually only happens when you are using IIS as your web server. Assuming that to be the case, you need to edit Your_Account/index.php and change all instances of
Header("Location: modules.php
with
Header("Refresh: 0;url=modules.php

Other causes have been not allowing cookies and Zone Alarm.

[ Back to Top ]

Answer Answer
Print this Answer
?  How do I reset my Admin password?

Using phpMyAdmin go to the nuke_authors table and make your pass dc647eb65e6711e155375218212b3964 that will make it Password, then just login and change it.

Also, see Admin Password Reset Utility.

[ Back to Top ]

Answer Answer
Print this Answer
?  Why do I see message_die()?

This means that nuke is unable to connect to the MySQL server and/or database. Normally it means the MySQL parameters are incorrect in the nuke config.php file.

[ Back to Top ]

Answer Answer
Print this Answer
?  Why do i get "Warning: Invalid argument supplied for foreach()" when using Nuke 6.5 or newer?

Due to the new abstraction layer and several structure changes in PHP-Nuke 6.5 and higher php 4.1.0 or better is required. Check with your webhost provider regarding the version being used on the server.

[ Back to Top ]

Answer Answer
Print this Answer
?  Why doesn't my FAQ work?

At one point or another the table names in the FAQ files were changed to lowercase, the fastest way to fix this is to rename the tables through phpMyAdmin:
Rename nuke_faqanswer to nuke_faqAnswer
and nuke_faqcategories to nuke_faqCategories.

[ Back to Top ]

Answer Answer
Print this Answer
?  How do I remove the Cannot Add/Modify Header Information error message?

If you have access to your server php.ini, set:
output_buffering = On or output_buffering = 4096 (or another number > 0)

If not, check with your host and you may find that they allow you to use a customized personal php.ini file instead. They may allow you to place this directive in your own "personal" php.ini file that the system will accept as host overrides. This usually means that you are running PHP as a CGI implementation.

If you do not have access to php.ini, copy the following into a file:
PHP_FLAG output_buffering On
save it as .htaccess and upload to the same place mainfile.php is located. If this returns a Server 500 Error, then you are not allowed to use that directive in.htaccess, so remove it. This usually means that you are running PHP as a CGI implementation.

Lastly. you can try adding the following line to mainfile.php right after the file credits:
ini_set("output_buffering",1);

If none of the above work, then if you have recently edited any file that gets "included" in a main script, another cause is a blank line either before or after the php tags in your config.php, one of your language files, your theme files, or some other included file. Try removing the closing PHP tag </php> of the "included" file.

[ Back to Top ]

Answer Answer
Print this Answer
?  How do i get rid of the Multiple Notices And Warning Messages on my Web server?

Assuming you have access to php.ini edit it and set:
error_reporting = E_ALL & ~E_NOTICE

If you do not have php.ini access, then (assuming you are running Apache) add this line to your .htaccess file
PHP_VALUE error_reporting 2039

[ Back to Top ]

Answer Answer
Print this Answer
?  I get an error similar to Warning: setlocale() [function.setlocale]

Remove the quotes from around "LC_TIME" in those files/lines mentioned in your errors. This means "LC_TIME" should be changed to LC_TIME.

[ Back to Top ]

Answer Answer
Print this Answer
?  When i access my site's forums i either am prompted to download a file or the page displays gibberish

Turn off gzip_compress in your forums, chances are you won't be able to do it via the forums so you will have to do it via phpMyAdmin, to do so run the following query through phpMyAdmin's sql query window:

update nuke_bbconfig set config_value=0 where config_name='gzip_compress';

[ Back to Top ]

Answer Answer
Print this Answer
?  I get an error similar to Call-time pass-by-reference has been deprecated in the Webmail module

If you have access to php.ini set:
allow_call_time_pass_reference = On

else copy the following into a file:
PHP_FLAG allow_call_time_pass_reference On
save it as .htaccess and upload to the same place mainfile.php is located.

Or add the following line to mainfile.php right after the file credits:
ini_set("allow_call_time_pass_reference","1");


[ Back to Top ]

Answer Answer
Print this Answer
?  I change the default theme or stories in home in preferences but i see no changes.

If you are logged in as a user you must change those settings through the Your_Account module, changing them through preferences will not override a user's settings, only unregistered users will be affected by them.

[ Back to Top ]

Answer Answer
Print this Answer
?  I get an error similar to supplied argument is not a valid MySQL result resource in sql_layer.php on line 286

Open sql_layer.php and after line 286 add:
echo mysql_error();
the error will still be there but it should now have more information which will help pinpoint the problem.

[ Back to Top ]

Answer Answer
Print this Answer
?  Why do my PM emails have the wrong URL?

The URL for PM email is set in the Configuration section of the Forum Administration panel. Often times your PM email will show something like www.yoursite.com when it really should show www.yoursite.com/html. To correct it, edit the setting Domain Name in your Configuration.

[ Back to Top ]

Answer Answer
Print this Answer
?  Why am I receiving multiple warnings about Language files

You are receiving messages like

Warning: main(language/lang-.php): failed to open stream: No such file or direct
and
Warning: main(): Failed opening 'language/lang-.php' for inclusion (include_path='.:/usr/local/lib/php')

because nuke is not able to read the configuration table in your database. Something is not right in your config.php MySQL parameters. Often times you need to leave $user_prefix=""; Other times it's the database name or the userid/password combination.

[ Back to Top ]

Answer Answer
Print this Answer
?  My security code shows a big red X or just the text label

First of all, make sure that you do NOT have the Your Account Module set for Registered Users Only, as it is then impossible to ever register!

Make sure you have the GD package installed. Save this script to a file and call it phpinfo.php
and then run it. That will show whether you have GD installed.

Assuming you have the GD package installed, the most often cause is a blank space/line either before or after the php tags in your config.php, one of your language files, theme file, or some other include file. This is usually the result of using Notepad or Wordpad. You need to use a better programmer's editor like Textpad.

[ Back to Top ]

Answer Answer
Print this Answer
?  How do I adjust the server time for News articles?

In mainfile.php, find the function formatTimestamp(). Assuming it resembles this code

function formatTimestamp($time) {
global $datetime, $locale;
setlocale (LC_TIME, $locale);
ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
$datetime = strftime(""._DATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
$datetime = ucfirst($datetime);
return($datetime);
}

Modify it to this. Note the -15? That is the number of hours to offset the timestamp.

function formatTimestamp($time) {
global $datetime, $locale;
setlocale (LC_TIME, $locale);
ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
$datetime = strftime(""._DATESTRING."", mktime(($datetime[4]-15),$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
$datetime = ucfirst($datetime);
return($datetime);
}

[ Back to Top ]

Answer Answer
Print this Answer
?  Fatal error: Call to undefined function: nav() in /home/USERNAME/public_html/html/modules/Your_Account/index.php on line ...

Normally this can be cleared up by deleting your cookies and refreshing/clearing your cache.

[ Back to Top ]

Answer Answer
Print this Answer
?  Why does the Guest avatar show up as a red X?

You need to edit /modules/Forums/viewtopic.php, and find this following lines:

//
// Start initial var setup
//

Add this code right before it.

if (!isset($images['default_avatar']) || $images['default_avatar'] == "")
{
$images['default_avatar'] = "modules/Forums/images/avatars/blank.gif";
}

if (!isset($images['guest_avatar']) || $images['guest_avatar'] == "")
{
$images['guest_avatar'] = "modules/Forums/images/avatars/blank.gif";
}

[ Back to Top ]

Answer Answer
Print this Answer
?  How can I resync the user posts count?

Using phpMyAdmin, enter this as 1 query in the SQL window:

CREATE temporary table tmppostcount as (select poster_id, count(poster_id) count from nuke_bbposts group by poster_id);

UPDATE nuke_users u, tmppostcount t SET u.user_posts=t.count
WHERE u.user_id = t.poster_id;


Be sure to backup your USERS table before doing this!

[ Back to Top ]

Answer Answer
Print this Answer
?  The email address you entered is invalid!

While this could be a legitimate error, we have found that in some releases of Nuke you get this erroneous message when the nuke_users_temp table is missing! Verify that you have this table.

[ Back to Top ]

Answer Answer
Print this Answer
?  How do I convert a stand alone PHPBB to nukePHPBB?


[ Back to Top ]

Answer Answer
Print this Answer
?  Why doesn't the Post time appear in my News stories?

If this is on a windows machine, see this post

[ Back to Top ]

Answer Answer
Print this Answer
?  Database backup not working

The majority of the time this happens when the database has become to large for the default phpnuke backup script to successful complete the task before the script times out. Use a third party backup utility such as the one in phpmyadmin.

[ Back to Top ]

Answer Answer
Print this Answer
?  How to relocate the default banner

The banner default location is controlled in your theme. For detailed instructions on how to move the banner read the following Chapter 14.3.6. How to change placement of the banner in the PHP-Nuke header.

[ Back to Top ]

Answer Answer
Print this Answer
?  How to change "Stories Number in Home" number to less then 5?


[ Back to Top ]

Answer Answer
Print this Answer
?  How to create my favicon.ico

Read the 15.1. How to implement a favorites icon Visit www.chami.com:FavIcon from Pics and use their free online conversion tool.

[ Back to Top ]

Answer Answer
Print this Answer
?  How to hide left blocks when viewing...

Please visit our discussion titled: Hide Left Blocks.

[ Back to Top ]

Answer Answer
Print this Answer
?  Fatal error: Call to undefined function: stripos_clone()

Your mainfile.php is missing this function:
function stripos_clone($haystack, $needle, $offset=0) {
return strpos(strtoupper($haystack), strtoupper($needle), $offset);
}
Just add it before the closing ?> at the end of the file.

[ Back to Top ]

Answer Answer
Print this Answer
?  Email Address shows in Member List and Forums

Enable mail through boards in the phpbb admin configuration.

[ Back to Top ]

Answer Answer
Print this Answer
?  The html tags you attempted to use are not allowed

Nuke, in an effort to combat the misuse of certain tags (like script), has code in mainfile.php that scans certain parts of nuke for certain tags. If you are trying to enter Content, or an HTML block, you will be blocked. However, as an admin, you can work around this by modifying your mainfile.php script with just 2 lines of code. Backup mainfile.php!

Find code similar to this

foreach ($_GET as $secvalue) {
if ((eregi("<[^>]*script*"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*object*"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*iframe*"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*applet*"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*meta*"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*style*"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*form*"?[^>]*>", $secvalue)) ||
(eregi("([^>]*"?[^)]*)", $secvalue)) ||
(eregi(""", $secvalue))) {
die ("<b>The html tags you attempted to use are not allowed</b><br><br>[ <a href="javascript:history.go(-1)"><b>Go Back</b></a> ]");
}
}

foreach ($_POST as $secvalue) {
if ((eregi("<[^>]script*"?[^>]*>", $secvalue)) || (eregi("<[^>]style*"?[^>]*>", $secvalue))) {
die ("<b>The html tags you attempted to use are not allowed</b><br><br>[ <a href="javascript:history.go(-1)"><b>Go Back</b></a> ]");
}
}

and modify it to

if (!is_admin($admin)) {
foreach ($_GET as $secvalue) {
if ((eregi("<[^>]*script*"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*object*"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*iframe*"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*applet*"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*meta*"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*style*"?[^>]*>", $secvalue)) ||
(eregi("<[^>]*form*"?[^>]*>", $secvalue)) ||
(eregi("([^>]*"?[^)]*)", $secvalue)) ||
(eregi(""", $secvalue))) {
die ("<b>The html tags you attempted to use are not allowed</b><br><br>[ <a href="javascript:history.go(-1)"><b>Go Back</b></a> ]");
}
}

foreach ($_POST as $secvalue) {
if ((eregi("<[^>]script*"?[^>]*>", $secvalue)) || (eregi("<[^>]style*"?[^>]*>", $secvalue))) {
die ("<b>The html tags you attempted to use are not allowed</b><br><br>[ <a href="javascript:history.go(-1)"><b>Go Back</b></a> ]");
}
}
}

[ Back to Top ]

Answer Answer
Print this Answer
?  I tried installing a new theme and now all I get is a blank page!

First of all, you should always test your new theme on either your local PC or on a test site. Next, NEVER change your Site level theme with the new theme. In other words, don't test your new them by changing the Default_Theme in Admin->Preferences. Instead, change it in your personal profile/user info page (Your Account). That way, if it doesn't work, you can just rename the theme folder and then your personal theme will default back to the working Site theme.

At this point, if you haven't already turned $display_errors=true; in config.php, do it now. Then, check your server error log and see if any errors are written to the log if nothing displays on the screen. If you still have no clue, then you need to reset your Default_Theme field in your nuke_config table. You can either use phpMyAdmin or use Theme Fix Utility

[ Back to Top ]

Answer Answer
Print this Answer
?  Warning: SAFE MODE Restriction in effect. The script whose uid is xxxxx is not allowed to access .....

There can be various causes and cures for this. Try this first

Assuming you can ssh/telnet into your server, run a "chown userid:groupid on all files/folders in your public_html folder, where userid and groupid are your username and/or userid. For instance, if your hosting account is username 'raven', then ssh/telnet to your public_html folder and run this command:

chown -R raven:raven *
If that doesn't help, then your ISP has set the paths up incorrectly in php.ini and they will need to fix the problem.

[ Back to Top ]

Answer Answer
Print this Answer
?  After installing NukeSentinel - PHP Warning: ob_start(): output handler 'ob_gzhandler' cannot be used after 'URL-Rewriter' in /home/mysite/public_html/mainfile.php on line ...

This normally indicates that you need to move the NukeSentinel code in mainfile.php down a few lines. In your mainfile.php you should see code similar to
$phpver = phpversion();
if ($phpver < '4.1.0') {
	$_GET = $HTTP_GET_VARS;
	$_POST = $HTTP_POST_VARS;
	$_SERVER = $HTTP_SERVER_VARS;
}
if ($phpver >= '4.0.4pl1' && strstr($_SERVER["HTTP_USER_AGENT"],'compatible')) {
	if (extension_loaded('zlib')) {
		ob_end_clean();
		ob_start('ob_gzhandler');
	}
} else if ($phpver > '4.0') {
	if (strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) {
		if (extension_loaded('zlib')) {
			$do_gzip_compress = TRUE;
			ob_start(array('ob_gzhandler',5));
			ob_implicit_flush(0);
			header('Content-Encoding: gzip');
		}
	}
}

$phpver = explode(".", $phpver);
$phpver = "$phpver[0]$phpver[1]";
if ($phpver >= 41) {
	$PHP_SELF = $_SERVER['PHP_SELF'];
}
Instead of adding the NukeSentinel code before that code, add it after. It should now look like
$phpver = phpversion();
if ($phpver < '4.1.0') {
	$_GET = $HTTP_GET_VARS;
	$_POST = $HTTP_POST_VARS;
	$_SERVER = $HTTP_SERVER_VARS;
}
if ($phpver >= '4.0.4pl1' && strstr($_SERVER["HTTP_USER_AGENT"],'compatible')) {
	if (extension_loaded('zlib')) {
		ob_end_clean();
		ob_start('ob_gzhandler');
	}
} else if ($phpver > '4.0') {
	if (strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) {
		if (extension_loaded('zlib')) {
			$do_gzip_compress = TRUE;
			ob_start(array('ob_gzhandler',5));
			ob_implicit_flush(0);
			header('Content-Encoding: gzip');
		}
	}
}

$phpver = explode(".", $phpver);
$phpver = "$phpver[0]$phpver[1]";
if ($phpver >= 41) {
	$PHP_SELF = $_SERVER['PHP_SELF'];
}

if (defined('FORUM_ADMIN')) {
  @include_once("../../../includes/nukesentinel.php");
} elseif (defined('INSIDE_MOD')) {
  @include_once("../../includes/nukesentinel.php");
} else {
  @include_once("includes/nukesentinel.php");
}

IMPORTANT: Make sure that you have removed all of this code if you are using NukeSentinel
//Union Tap
//Copyright Zhen-Xjell 2004 http://nukecops.com
//Beta 3 Code to prevent UNION SQL Injections
unset($matches);
unset($loc);
if (preg_match("/([OdWo5NIbpuU4V2iJT0n]{5}) /", rawurldecode($loc=$_SERVER["QUERY_STRING"]), $matches)) {
	die();
}

$queryString = strtolower($_SERVER['QUERY_STRING']);
if (stripos_clone($queryString,'%20union%20') OR stripos_clone($queryString,'/*') OR stripos_clone($queryString,'*/union/*') OR stripos_clone($queryString,'c2nyaxb0')) {
header("Location: index.php");
die();
}

Otherwise it will block exploits from reaching NukeSentinel.

[ Back to Top ]

Answer Answer
Print this Answer
?  Redirection limit for this URL exceeded ...

Make sure that you are not blocking cookies. Next, check your blocks. If you are using code like
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
or
if ( !defined('NUKE_FILE') ) {
Header("Location: ../index.php");
die();
}
and you haven't properly defined BLOCK_FILE and NUKE_FILE, then that is probably the problem. These should both be defined in mainfile.php. Now if you are using a block that does not call mainfile.php, then either call mainfile.php or adjust your code.

[ Back to Top ]

Answer Answer
Print this Answer
?  I moved config.php and now my Forums and other add-ons won't work.

Place it back where it was meant to be, there is no need to move it anywhere even if Nuke's outdated install instructions suggest it, config.php no longer needs to be chmod to 666 and it includes code to block anyone from viewing it from the browser so you are safe leaving it in its original location.

[ Back to Top ]

Answer Answer
Print this Answer
?  I entered mysql4 as $dbtype in config.php but Nuke won't connect to the db.

Change $dbtype to MySQL (case sensitive), even if using mysql 4.x Nuke will not work with the mysql4 setting.

[ Back to Top ]

Answer Answer
Print this Answer
?  What do I enter in config.php file's settings?

The following are the settings you should configure:


$dbhost = "localhost"; -> MySQL's host, usually is localhost.

$dbuname = "root"; -> Your database username.

$dbpass = ""; -> Your database password.

$dbname = "nuke"; -> Your database's name.

$prefix = "nuke"; -> This will differentiate your database tables if using more than one Nuke with one database, if only using one leave as is.

$user_prefix = "nuke"; -> Same as $prefix with the main difference being that if you want to run several Nuke sites from the same database and have them all share the same users you should make this the same on all site's config.php

$dbtype = "MySQL"; -> Database type, usually can be left as is.

$sitekey = "SdFk*fa28367-dm56w69.3a2fDS+e9"; -> Security code used to make the security image's code, you should change at least a few characters on it to make it unique, do not use double quotes on it, the only double quotes allowed are the ones surrounding it.

$gfx_chk = 7; -> Exclusive to Nuke 7.x, allows you to disable the security image or configure where it will be used.
Available settings are:

0: No check

1: Administrators login only

2: Users login only

3: New users registration only

4: Both, users login and new users registration only

5: Administrators and users login only

6: Administrators and new users registration only

7: Everywhere on all login options (Admins and Users)

$subscription_url = ""; -> Nuke 7.1 only - Allows you to have a page or service you can redirect your subscribing members to i.e. paypal.

Note: The first 4 settings are unique, if you don't know their value contact your webhost.

[ Back to Top ]

Answer Answer
Print this Answer
?  What is the proper way to upgrade my Nuke version?

Your first step should always be to make a full backup of your current files and the database tables, this way you can roll back in case anything goes wrong and you can also preserve any modified files and images you may have on your current version.

Once everything has been saved you will need to upload the files from the new version of Nuke that you wish to upgrade to making sure the new files replace the current ones but before uploading the files open the new version's config.php in a text editor and edit the settings using your old config.php as an example.

Now that the files have been uploaded it is time to upgrade the database so that any new features and all changes are applied to it, for this example's sake we will assume you want to upgrade from Nuke 6.7 to Nuke 7.0. Upload the following files included in the upgrades folder to the same place where mainfile.php is located

upgrade67-68.php

upgrade68-69.php

upgrade69-70.php

Now point your web browser to those files in numerical order from oldest to newest version i.e. http://www.yournukesite.com/upgrade67-68.php

Once all upgrade files have been run delete them from the server.

[ Back to Top ]

Answer Answer
Print this Answer
?  I'm new to PHP-Nuke, how do I install it?

Download the latest
version from http://phpnuke.org
, unzip or untar it to a local folder on your computer.

To unzip or untar means to open the compressed file so that you can access all
of the included files, when you download any program it will often come compressed
into one file, it will either be a exe, zip or tar.gz, exe's run by double clicking
them, zips and tars require a program to uncompress them, the most commonly
used programs to handle this task are Winzip and Winrar, install one of them
or install both, once you have any or both installed you can simply right click
the tar file and select extract to some/folder/name/here, the tar or
zip will extract to the selected location.



Now that we have uncompressed the files we can prepare them before finally uploading
them to the server, there is only one file that needs to be edited and that
is config.php, the zip or tar you just uncompressed will create a folder on
your hard disk, it will most likely be named PHP-Nuke-7.3 (if you were using
Nuke 7.3), inside of that folder you will find 3 folder: html (where all of
Nuke's files are stored), sql (which includes the file needed to create Nuke's
database tables) and upgrades (which includes scripts used for upgrading Nuke
from a previous version), config.php will be located inside of the html folder.

Common error note: Search the net for a suitable text editor like Context,
editpad or similar, Do Not Use Frontpage, Dreamweaver, Notepad, Wordpad or
similar programs to edit php files
WYSIWYG (what you see is what you get)
programs like Frontpage and text editors like Notepad often add html tags or
blank spaces to php files which cause them to malfunction, problems caused by
these programs are tricky to troubleshoot so please avoid using them.



We will now edit config.php, the settings in it will allow Nuke to connect to
the database so that it can retrieve and/or store data into the tables, if you
haven't bought web space from a hosting company get it now, check with them
if they support php, mysql and if they have GD libraries installed (these are
required for the security image in Nuke's login and registration pages), when
you get web hosting they should email you all the details of your new account,
among these you will find the username and password for the mysql database and
the name of the database, these are required for the settings in config.php
so if you did not get them from your hosting provider contact them and ask for
these.

Open PHP-Nuke-xx/html/config.php on a text editor, go to line 32 and
edit the following so that it matches your MySQL database login info:


$dbhost = "localhost"; (most likely this can be left as is)

$dbuname = "database_login_username"; (the username given to you by the hosting
provider for mysql)


$dbpass = "database_login_pass"; (the password given to you by the hosting
provider)


$dbname = "database_name"; (the name of the database given to you by the
hosting provider)


$prefix = "nuke"; (if this is your only Nuke site leave as is)

$user_prefix = "nuke"; (if this is your only Nuke site leave as is)

$dbtype = "MySQL"; (most likely this can be left as is)

You can leave the rest as is for now. Upload all files contained inside of the
html folder into the server via ftp. Suggested FTP programs are WS_FTP,
Filezilla and Smart FTP, if you have experience with ftp use any program you
feel comfortable with, if this is your first time using ftp use WS_FTP, HERE
is a simple illustrated tutorial on FTP usage and chmod.

Load the database tables found in sql/nuke.sql, the normal way is to
use
phpMyAdmin
, or you can use
nukesql.php
to load them without using phpMyAdmin.

Now depending on the version of PHP-Nuke you are using you will need to access
the admin section:

For pre-5.5 versions, point your browser to http://your.web.site.com/admin.php,
the window that appears will request for a login name and pass, use God
as name and Password as password, you will now be able to edit your admin
preferences, the first of which should be to click on Edit Admins, change
the name and pass of the God account so no one else will be able to access it.
Then you might want to click on Preferences to customize settings for
your website..

For 5.5 and newer versions point your browser to http://your.web.site.com/index.php
in that page you will find a introductory message which will have a link to
create admin account, click on it and in the new window enter your desired
username and password, Select a username and password you can remember with
ease but make them hard for others to guess, your password should be around
8 or 10 characters long, you will be asked if you want to create a normal user
with the same nick and pass, select yes. Once this has been done you can login
as an admin by pointing your browser to http://your.web.site.com/ and
as a normal user by pointing your browser to http://your.web.site.com/account.html,
at this point you will be able to edit your preferences.


[ Back to Top ]

Answer Answer
Print this Answer
?  After installing the latest patches my Right Blocks are gone!

This is usually the result of your theme not using the latest security feature(s)in the latest patches.



In your theme.php find:

if ($index == 1) {



and change to:

if (defined('INDEX_FILE')) {

Also make sure that your modules have define('INDEX_FILE', true); if you want the right blocks to appear.

[ Back to Top ]

Answer Answer
Print this Answer
?  Fatal error: Call to undefined function: themeheader() in /home/USERNAME/public_html/header.php on line ??

This message means that nuke is calling for a theme that can't be found. There can be several possibilities. This is a good order to check for.

  • Does your theme folder contain the theme files that you need? In other words, if DeepBlue is your theme, then you should have themes/DeepBlue/theme.php as well as other files.

  • If the above is not the issue, then, using phpMyAdmin, make sure that you have a table in your database called nuke_config. Yours may be something other than nuke_ depending on your $prefix setting.

  • If the above 2 things are not the problem, then you are probably not connecting with the database at all. Meaning, either the database does not exist or your database settings in your nuke config.php file are incorrect. Verify the settings for $dbhost, $dbname, $dbuname, and $dbpass are correct with the database setup.


[ Back to Top ]

Answer Answer
Print this Answer
?  When I try to post an article I get thrown back to the home page.

There are a couple of reasons why this may occur. Stories have a maximum length of 65,535 characters, both in the Text and Additional text boxes. If you are exceeding the length then nuke just spits it out w/o any message or warning. If you are going to be publishing articles larger than that you will need to modify the VARTYPE setting for the fields in the database. Presently they are of type TEXT. You would need to change them to tpye LONGTEXT using a tool like phpMyAdmin.

If length is not the issue, then if you have NukeSentinel™ installed, there's a good chance that NS is being overly aggressive and scanning the content and finding a "trigger" word or phrase and ending your dialog. Since you are probably entering this as an admin, you are protected from being banned, so you just end up back on the home page. To work around this, let's assume that the word that is causing the problem is union. Just replace any of the letters in the word with its ascii representation, as in &#117;nion

[ Back to Top ]

Answer Answer
Print this Answer
?  You have attempted to access this site with an invalid IP.


[ Back to Top ]

Answer Answer
Print this Answer
?  Invalid Session Error when posting in phpbb2 forums

From the phpBB2 developers:

phpBB2 uses sessions to keep track of users as they browse the board. These sessions use a combination of a unique session id and the users IP to identify each user. We make use of the IP as an extra safe-guard to help prevent sessions being hijacked (by discovering the unique session id).

Unfortunately this only works when the users IP is constant as they browse the board. For most users this will be the case. However certain providers route their users via a cluster of proxys. In some cases, particularly AOL this results in different IPs being forwarded as the user moves between pages. We take account of this by not checking the entire IP but only the first "three quads". Again in most cases this will be fine. However again AOL uses IPs which can vary so much that checking only the first two quads results in a fairly static IP being available for session validation.

If you are experiencing problems related to this you can make a small change to the code. Please note that reducing the IP validation length does potentially increase the risk of sessions being hijacked (this is something for you to consider, phpBB Group takes no responsibility should anything happen!). The change requires you to open the file sessions.php in the includes/directory of the distribution. Search for $ip_check_s and this line:

$ip_check_s = substr($userdata['session_ip'], 0, 6);

change this to:

$ip_check_s = substr($userdata['session_ip'], 0, 4);

You need to make exactly the same change to the number 6 in the next line. Save the file (and upload it if required). This should reduce or eliminate the problem noted.

[ Back to Top ]



 
FAQ ©

Site Info

Last SeenLast Seen
  • misterstereus
  • kguske
Server TrafficServer Traffic
  • Total: 498,728,213
  • Today: 103,735
Server InfoServer Info
  • Feb 11, 2025
  • 09:27 am CST