Tools of Escape


Running a highly technical website system is not always easy. Issues come up, accidents happen, and sometimes you might be looking for a thrown life preserver to pull your site out of the deep water. When that happens, try these tools and steps to get you back on your feet.

PostNuke Swiss Army Knife

The single most important tool every PostNuke site administrator should have ready in their back pocket is the PostNuke Swiss Army Knife. Commonly called PSAK for short, the tool is actually just a single PHP file you place in your site's root directory. From there, you simply browse the file to access its features (see Figure 20.1). PSAK's features are shown in the following list:

  • New DB Username/Password Encoding This feature resets the username and password PostNuke uses to access its database. This is the information maintained in config.php covered during the PostNuke install. This is most useful when your database changes, perhaps due to a host move, for example, and you need to update PostNuke to reflect the new server settings.

  • Enable/Disable 'Intranet' Config Option This feature toggles the Run on Intranet option in the PostNuke Website Configuration page. If you cannot access your site with a fully qualified domain (for example, www.yoursite.com), and you turn off the toggle, you will be locked out of your site. This fixes the problem.

  • Theme Reset Broken themes are a common problem with PostNuke. It's best to not run a bad theme on a live site, but even with the Xanthia test system, there are times when you might have no choice. Should a broken theme end up breaking your site too, you can use this feature to reset the theme. There's also an option to reset all users' themes at the same time.

  • Permissions Reset Badly configured user permissions are another chief cause of site lockout. This feature of PSAK can clear all user permissions as well as reset the group permissions back to their default values.

  • Show PHPInfo PHPInfo is not so much a fix as an information tool. The link places the phpinfo() function an easy click away. The function displays essential information about your server and how it's configured.

Figure 20.1. Rescuing your site with the PostNuke Swiss Army Knife.


Note

Leaving psak.php in your web server's root directory is very dangerous. A malicious visitor can damage your site through the open access. Always remove the file from your website after use.


The PostNuke Swiss Army Knife is currently available as version 1.01 in the Add-ons section of downloads.postnuke.com. You can also get that version from this book's online materials. PSAK 2.0 is currently in development, but there has been no official statement regarding the availability of the upcoming version.

Broken Module/Theme Recovery

It's very easy for a broken theme or module to disable portions or even your entire site. In the latter case, a defective module can, for example, break the Module Administration page. Errors on the page prevent the table from being rendered, and you don't have the option to remove the offending module.

This is another circumstance in which the interpreted nature of PHP helps make things easy. All you need to do is rename the main directory of the offending module or theme.

For modules, the hiding of the bad code fixes the table and you can manually remove the module completely using the form. Removing a bad regular PostNuke theme forces the use of the generic default theme ExtraLite.

With the introduction of Xanthia themes, you can no longer fix a broken interface by a rename. The database-driven elements are accessible even when the files are not. One solution that might work is to rename the offending theme and then rename one of the working Xanthia themes to the broken theme's name. This merges some elements of each, but the theme will likely work well enough to allow you to reset the theme.

Should these easier options fail, remember you can always edit the MySQL database directly and change any settings you want. PSAK accomplishes the same effect for many problems, and its interface is generally easier and faster to use.

PostNuke Install Archive

Always save a copy of the original install files you used to create your PostNuke website. If a hack goes bad, the last resort, short of an entire new install, is file replacement. You can extract originals of the files you changed and simply copy them over your edited versions. PostNuke uses the originals instead, and you can try the hack again.



    PostNuke Content Management
    PostNuke Content Management
    ISBN: 0672326868
    EAN: 2147483647
    Year: 2003
    Pages: 207
    Authors: Kevin Hatch

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net