You are missing our premiere tool bar navigation system! Register and use it for FREE!

•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
· Home
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 139 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
How to install patches and correct errors

26.4. How to install patches and correct errors

From time to time it occurs that some functions of a certain PHP-Nuke version contain bugs, or that some others are in need of an update. Here we will briefly discuss the most common problems that arise in such situations.

Tip Use the Forums!

If you are in search of a solution to a common problem, your first move should be to consult a Forum, like those of the authors: PHP-Nuke Forum of spaghettibrain (Claudio), or PHP-Nuke Forum of karakas-online (Chris). Of course, you should always use the search function of the Forums first, before asking a question that has been possibly asked (and answered) many times already.

Here is an example of the installation of a patch:

Generally a patch consists of one or more files that will overwrite the buggy existing ones. The "installation" of the patch is thus nothing more than the simple overwriting of those files: foobar.php (12Kb) will overwrite the existing file foobar.php (13Kb) (notice that the name is the same, but the size differs). It is a good practice not to overwrite the old file, thus deleting it completely, but to move it to something like foobar.old or foobar.orig, so that you can easily restore it, should the new version present unexpected problems.

Example of a manual correction in the code:

Suppose our file consists of a number of lines:

$qdb = "WHERE topic='$new_topic'";
$sql_a = "SELECT topictext FROM ".$prefix."_topics WHERE topicid='$new_topic'";
$result_a = $db->sql_query($sql_a)
$row_a = $db->sql_fetchrow($result_a);
$numrows_a = $db->sql_numrows($result_a);
$topic_title = $row_a[topictext];

and we are told that we must replace the fourth one with

$result_a = $db->sql_query($sql_a);

then, after we do this and save the file, our new file will look like:

$qdb = "WHERE topic='$new_topic'";
$sql_a = "SELECT topictext FROM ".$prefix."_topics WHERE topicid='$new_topic'";
$result_a = $db->sql_query($sql_a);
$row_a = $db->sql_fetchrow($result_a);
$numrows_a = $db->sql_numrows($result_a);
$topic_title = $row_a[topictext];

(Can you see the difference? )

Most decent text editors (see Chapter 11) will display the line number for your orientation during such operations.

Help us make a better PHP-Nuke HOWTO!

Want to contribute to this HOWTO? Have a suggestion or a solution to a problem that was not treated here? Post your comments on my PHP-Nuke Forum!

Chris Karakas, Maintainer PHP-Nuke HOWTO

Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.192 Seconds - 1088 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded ( ::