home | documentation | forum | features | changeLog | demo | team | download
..Current Page >> documentation > README
PHP News or Weblog



Please note that this documentation reflects the developers' latest changes!
It is suggested that you rely on the documentation supplied with your PNOB installation.



Table of Contents
I. Requirements
II. Installation
III. Incorporating PNOB into your site
IV. Upgrading PNOB
V. Help! It doesn't work!

I. Requirements

PHP News or Weblog (hereafter called 'PNOB') requires a webserver running the
following software:

PHP 4 or greater.  PNOB is tested in the following environments:

	Main test environment:	FreeBSD 4.9-STABLE + PHP 4.3.6 + MySQL 4.0.15a.
	Secondary test environment:	RedHat Linux 2.4.20-30.9bigmem +
					PHP 4.1.2 + MySQL 3.23.58.
	Tertiary test environment:	Windows 2000 + PHP 4.3.6 +
					MySQL 4.0.18.

PNOB works in all of these environments, so if you should probably have at
least PHP 4.1.2.  If you are having trouble with MySQL that does not involve
login problems, you may want to upgrade to MySQL 4.0.X, as this is used in the
main test environment.  If you are having problems regarding logging in to
MySQL, you may want to visit www.mysql.com for documentation.

If you would like to use the spellcheck features of PNOB, you must configure
your PHP installation with pspell support.  Example:
	./configure --with-mysql --with-pspell
After you've finished recompiling PHP, install it and restart your webserver
and the spellcheck buttons should appear on the Submit and Modify pages.

pspell, which is built in to apsell, can be downloaded from

II. Installation

To install PNOB:

Decompress PNOB to a directory that is readable by your webserver.
Do this by the following command:

If you downloaded the .tar.bz2 file:
	tar yvxf pnob-<version>.tar.bz2
Otherwise, you should have the .tar.gz file:
	tar zvxf pnob-<version>.tar.gz 

This will create a "pnob/" directory containing all of PNOB's files.
Inside the newly created "pnob/" directory, there should be another directory
called "defaults/".  Copy all files from this directory to your "pnob/"

Now, you must modify some file permissions.

Issue the following commands (UNIX/Linux compatible):
	chmod 666 config.php
	chmod 666 specific.php

Windows users: You are on your for changing permissions.  If someone wants to
send me an email with instructons on how to do this in Windows, please do:

Before proceding, ensure that you DO have MySQL installed (www.mysql.com)
and that you have it running, with a working username and database.  You
will be asked this information as part of the next step.

Now, via your web-browser, visit http://yoursite.com/pnob/setup.php (or
whatever URL you gave it).  This page should be fairly self-explanatory.

Now you should open "output.php" in your favorite text editor and change the
path of "$pathtoconfig" -- this is around line 15 of the document.  Set it
equal to the path of your PNOB installation on your local hard drive.

If setup completed successfully, you should be able to login with the username
and password that you provided during setup.  Visit
http://yoursite.com/pnob/index.php to test your login.  If you get an error
about "credientials lost," make sure cookies are enabled in your web browser
and check the "Remember me" box at login.

For most installations, PNOB will probably have some weird behavior if you do
not configure PNOB by visiting the Settings page after you login.  I don't want
emails from people who haven't read this file and/or haven't configured the

Questions or problems?  Try finding your answer on http://pnob.sourceforge.net
If you can't find it there, visit our forums on
http://www.sourceforge.net/projects/pnob/ and ask.  As a last resort, you can
find the email addresses of the developers on the main site (the first link in
this paragraph), however a reply is not guaranteed, as developers obviously
have their own schedules -- we don't promise to try, but we promise to try to
try ;).

III. Incorporating PNOB into your site

Since PNOB's output is not meant to stand alone (although it can), it is
suggested that you embed certain files in your own webpage.

If you use your own CSS file for your site, add this line to the end of your
CSS file: <?php include
"/full/path/to/your/pnob/installation/outputstyles.css.php"; ?>.  Be sure to
modify that bit of code to actually represent the local path to your PNOB
installation.  Always use forward slashes, even on a Windows server.

Example: On a Windows server, you might put:
	<?php include "C:/wwwroot/pnob/outputstyles.css.php"; ?>

Alternatively, on a Linux/Unix server, you might put:
	<?php include "/home/johndoe/htdocs/pnob/outputstyles.css.php"; ?>

Now, open "outputstyles.css.php" and make the same change to the line near the
top that reads: "require 'specific.php';" .

Since PNOB's CSS data includes PHP code, you may have to rename your CSS file
to yourfile.css.php if your webserver does not support the execution of PHP
code in files that lack the .php suffix.

Otherwise, if you do not already use your own CSS file, just add this line into
your <head> section of the page that you wish to embed PNOB into:

	<link rel="stylesheet" type="text/css" href="outputstyles.css.php">

Make sure you replace the 'href="outputstyles.css.php"' part with the actual
path as seen by your WEBSERVER.  Example:  If your website's homepage shows as
"http://www.somesite.com" and PNOB's installation showed as
"http://www.somesite.com/pnob/", you would use:
	<link rel="stylesheet" type="text/css" href="pnob/outputstyles.css.php">

Now, find where you want the output included in your site's HTML.  Add the

	<?php include '/full/path/to/pnob/output.php'; ?>

If you would like headlines, find the appropriate place and add:

	<?php include '/full/path/to/pnob/headlines.php'; ?>

That should do it!  Check out your page.  Note: Using a custom format is
suggested -- they always look so much better when you custom-tailor them to
your own site!  Happy posting.

IV. Upgrading PNOB

PLEASE NOTE: If you are upgrading from a version of PNOB that is 0.1-RC3 or
below, your settings will not be compatible with this version!  Backup your
specific.php before you install this version, especially if you use the custom
format feature.  You will need to copy/paste the custom format from the old
specific.php into the appropriate field on the Settings page.  Other than this
you should be able to recreate your old settings easily.

SECOND NOTE: If you are upgrading from a version below 0.2-RC1, you will need
to visit http://yoursite.com/pnob/createcommenttable.php to make your PNOB
installation compliant (you'll get lots of goofy MySQL errors if you don't).
You should delete this file after you've run it.

Upgrading PNOB is usually fairly simple.  Just make sure you have backed up
these two files: specific.php and config.php.  You probably won't need these,
but better safe than sorry.  You may also want to backup your
outputstyles.css.php if you made any changes to that file manually.

Untar or unzip PNOB as shown in the Installation instructions (to the directory
above where you have PNOB installed now; the tar or zip file should already
contain the "pnob/" directory).  If for some reason I forgot to remove my
personal specific.php and/or config.php, just overwrite these with the ones you
backed up earlier.

Open output.php and edit "$pathtoconfig" to equal the location of your PNOB

Lastly, if you use a custom CSS file, you should probably copy the contents of
outputstyles.css.php into your CSS file over the old PNOB CSS data.  This isn't
really required unless you want to take advantage of new styles and possible
style corrections, but if you're happy with your current styles or you don't
use a custom CSS file, don't worry about it.  That's it!

V. Help! It doesn't work!

Calm down...Did you really read this whole document?  If not, do that now.  Did
you run the Settings page after you got PNOB setup?  If you've done these two,
and you still have trouble, come visit the IRC channel #pnob on
irc.freenode.net and/or email me at weaseal@users.sourceforge.net.  You may
also visit http://sourceforge.net/tracker/?group_id=100185 for support requests
that can be viewed publically.


SourceForge.net Logo