1

(52 replies, posted in PunBB 1.3 additions)

Anatoly wrote:

Another theme: Blue.

No more additional themes planned.

They will be done just after the markup update is finished.

I'm loving the blue one.  What I hate about Oxygen is the starkness of it, especially its white background because looking at it hurts my eyes.

When Blue is finished I'm going to install it for certain and eventually make a red version of it.

2

(28 replies, posted in PunBB 1.2 troubleshooting)

Garciat wrote:

Use pun_antispam from http://punbb.informer.com/extensions/

The fact it says "v1.2" doesn't mean it's for PunBB 1.2. After all, it's on the "PunBB 1.3 official extensions" list, isn't it?

Great. I'll install them all smile

Umm...how do I install them?

3

(28 replies, posted in PunBB 1.2 troubleshooting)

Garciat wrote:

Congratulations!

Yeah, now I have to make it look pretty and get the mail service working.  I'm too sick to do it today.

On another note, will a captcha plugin from 1.2 work with 1.3?

4

(28 replies, posted in PunBB 1.2 troubleshooting)

I (WE) DID IT!

http://linuxforclinics.sourceforge.net/forum/

Steps to getting PunBB 1.3 to work on SF.net without altering a single file:

1) Figure out how to connect to your webspace (read up on SF.net's documentation on the matter) and create a folder in your 'htdocs' and 'persistent' directories for where you want to install punbb.  I chose 'forum' for both.
2) Connect to the phpmyadmin interface and create a blank database.  You will need to read up on the procedure using SF.net's documentation on the matter.  REMEMBER THE NAME OF THE DATABASE YOU CREATE AND THE PREFIX ALL YOUR DATABASES WILL HAVE
3) Upload punbb's files to your SF.net webspace as directed here:

'cache' directory and files = persistent/forum/cache
'img/avatars' directory and files = persistent/forum/img/avatars
all other files and folders = htdocs/forum

NOTE1 :  .htaccess files won't upload automatically if your filepath in the put command uses a wildcard (ex - put cache/*) .  Remember to upload them specifically with a direct path (ex - put cache/.htaccess)

NOTE 2: I created a number of blank files and uploaded them to the 'persistent/forum/cache' directory.  I didn't bother checking if they would be made automatically by punbb once permissions are changed (they should but I didn't test it).  The blank files you will upload to the 'persistent/cache' directory will be named:

cache_bans.php
cache_censors.php
cache_config.php
cache_ext_version_notifications.php
cache_forum.php
cache_hooks.php
cache_quickjump.php
cache_ranks.php
cache_updates.php

4) Create these symlinks (alter the code to match your project):

symlink /home/groups/m/my/myproject/persistent/forum/cache /home/groups/m/my/myproject/htdocs/forum/cache
symlink /home/groups/m/my/myproject/persistent/forum/img/avatars /home/groups/m/my/myproject/htdocs/forum/img/avatars

NOTE: The actual 'cache' and 'img/avatars/ directory SHOULD NOT exist in the 'htdocs' section.  If you accidentally uploaded them to 'htdocs/forum' then delete them before making the symlinks and double check if they are in the 'persistent/forum' area as this tutorial demonstrates.

5) Change the permissions of the 'cache' and 'img/avatars' folders and their contents to 0777

chmod 0777 foldername/filename

NOTE: You may have to chmod the symlinks as well as the 'persistent/forum' and 'persistent/forum/img' directories.  I'm too lazy to check if this is what made the forum finally work.

6) Go to http://yourproject.sourceforge.net/foru … nstall.php and begin the installation process.  Input the correct values in the correct blanks and upload the config.php file to your root directory when asked.  PunBB 1.3 should install flawlessly (and it is about time too).

I hope I took correct notes.  Can someone who has a minute check my procedure for errors if they have a few minutes?

5

(28 replies, posted in PunBB 1.2 troubleshooting)

clunky wrote:

hi

Latest phpBB works on Sourceforge.net
http://wiki.freegamedev.net/index.php/Sourceforge_phpBB

Then i have get successfull worked the cache and other things.
Mean can use same install method for PunBB too?

i will install PunBB forum on my  sourceforge.net Project , i will look if it will work.

I took a look at the steps and don't understand a few things:

cd $projecthome/htdocs/forum
# if it does not exist yet
mkdir /tmp/persistent/projectname
# organisation is a good habit ;)
mkdir /tmp/persistent/projectname/forum
# move the directories
mv cache /tmp/persistent/projectname
mv files /tmp/persistent/projectname
mv store /tmp/persistent/projectname
mv images/avatars/upload /tmp/persistent/projectname
# create appropriate symlinks
ln -sf /tmp/persistent/projectname/cache
ln -sf /tmp/persistent/projectname/files
ln -sf /tmp/persistent/projectname/store
ln -sf /tmp/persistent/projectname/upload images/avatars/upload
# set appropriate permissions
chmod 777 /tmp/persistent/projectname/forum/*
  • I don't see the /tmp folder in my project or user webspace
    I DO have a 'persistent' folder but don't know how to use it 
    And I'm very certain webspace applications can't write to the webspace even if you upload blank cache files and change their permissions to 755 mad

If there were a way to symlink to a writable directory I'd be in business but no luck yet.  Can someone explain these instructions to me?  I may be missing something but I can't see how they are adaptable to punbb (or even how they work for phpbb).

6

(28 replies, posted in PunBB 1.2 troubleshooting)

Anatoly wrote:
theforkofjustice wrote:

Now I'm beginning to miss those bothersome error messages sad

By any chance are the skins for 1.2 compatible for 1.3?

No chance.

Be sure: error messages will come back to you wink

I removed it to be safe. I can put it back later with edited css files and no 'import' folder so it will look like the way Oxygen is set up.  I'll test it when all is well.

Hows the no-cache extension coming?

7

(28 replies, posted in PunBB 1.2 troubleshooting)

Garciat wrote:
theforkofjustice wrote:
Garciat wrote:

Didn't you delete the database?

Yes.  I said so when I typed "deleted the old database"

I think you didn't get my point. I was trying to say that you may have forgotten to create the new database.

Then you should have said 'create' instead of 'delete' wink

Okay, I created the database (thought punbb did that itself) and punbb added the tables.  The database is fine now, I uploaded the config.php file and uploaded the blank php files to /cache.   All 'should' be working but I get a blank screen instead.  Now I'm beginning to miss those bothersome error messages sad

By any chance are the skins for 1.2 compatible for 1.3?

8

(28 replies, posted in PunBB 1.2 troubleshooting)

Garciat wrote:

Didn't you delete the database?

Yes.  I said so when I typed "deleted the old database"

9

(28 replies, posted in PunBB 1.2 troubleshooting)

Anatoly wrote:

Oh-oh, it is harder with cache_quickjump_*.php.

I will try to write an extension tomorrow. This will be a useful experience as I want to make PunBB 2.0 enabled to work without cache.

That would be great.

Another problem though.  I deleted the old database and the config.php file to do a reinstall but I get this error:

An error was encountered

Unable to connect to MySQL server. MySQL reported: Access denied for user 'noneofyourbusiness'@'123.456.78.90' (using password: YES)

The error occurred on line 45 in /home/groups/l/li/linuxforclinics/htdocs/forum/include/dblayer/mysql.php

What could be causing it and how do I fix it?  I am putting the username and password in correctly (copy/pasting it in) so that isn't it.

10

(28 replies, posted in PunBB 1.2 troubleshooting)

*sigh* New Error

An error was encountered

There is no valid language pack '' installed. Please reinstall a language of that name.

Not certain what I did to get this message.

Also, when editing the cache_quickjump section of /include/cache.php I only replaced

$fh = @fopen(FORUM_CACHE_DIR.'cache_quickjump_'.$group_id.'.php', 'wb');
        if (!$fh)
            error('Unable to write quickjump cache file to cache directory. Please make sure PHP has write access to the directory \'cache\'.', __FILE__, __LINE__);

        $output = '<?php'."\n\n".'if (!defined(\'FORUM\')) exit;'."\n".'define(\'FORUM_QJ_LOADED\', 1);'."\n".'$forum_id = isset($forum_id) ? $forum_id : 0;'."\n\n".'?>';
        $output .= '<form id="qjump" method="get" accept-charset="utf-8" action="'.$base_url.'/viewforum.php">'."\n\t".'<div class="frm-fld frm-select">'."\n\t\t".'<label for="qjump-select"><span><?php echo $lang_common[\'Jump to\'] ?>'.'</span></label><br />'."\n\t\t".'<span class="frm-input"><select id="qjump-select" name="id">'."\n";

with

$GLOBALS['forum_config'] = $output;

Was I correct in doing so or do I have to replace all of this:

foreach ($groups as $group_id)
    {
        // Output quickjump as PHP code
        $fh = @fopen(FORUM_CACHE_DIR.'cache_quickjump_'.$group_id.'.php', 'wb');
        if (!$fh)
            error('Unable to write quickjump cache file to cache directory. Please make sure PHP has write access to the directory \'cache\'.', __FILE__, __LINE__);

        $output = '<?php'."\n\n".'if (!defined(\'FORUM\')) exit;'."\n".'define(\'FORUM_QJ_LOADED\', 1);'."\n".'$forum_id = isset($forum_id) ? $forum_id : 0;'."\n\n".'?>';
        $output .= '<form id="qjump" method="get" accept-charset="utf-8" action="'.$base_url.'/viewforum.php">'."\n\t".'<div class="frm-fld frm-select">'."\n\t\t".'<label for="qjump-select"><span><?php echo $lang_common[\'Jump to\'] ?>'.'</span></label><br />'."\n\t\t".'<span class="frm-input"><select id="qjump-select" name="id">'."\n";

        // Get the list of categories and forums from the DB
        $query = array(
            'SELECT'    => 'c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.redirect_url',
            'FROM'        => 'categories AS c',
            'JOINS'        => array(
                array(
                    'INNER JOIN'    => 'forums AS f',
                    'ON'            => 'c.id=f.cat_id'
                ),
                array(
                    'LEFT JOIN'        => 'forum_perms AS fp',
                    'ON'            => '(fp.forum_id=f.id AND fp.group_id='.$group_id.')'
                )
            ),
            'WHERE'        => 'fp.read_forum IS NULL OR fp.read_forum=1',
            'ORDER BY'    => 'c.disp_position, c.id, f.disp_position'
        );

        ($hook = get_hook('ch_fn_generate_quickjump_cache_qr_get_cats_and_forums')) ? eval($hook) : null;
        $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);

        $cur_category = 0;
        $forum_count = 0;
        $sef_friendly_names = array();
        while ($cur_forum = $forum_db->fetch_assoc($result))
        {
            ($hook = get_hook('ch_fn_generate_quickjump_cache_forum_loop_start')) ? eval($hook) : null;

            if ($cur_forum['cid'] != $cur_category)    // A new category since last iteration?
            {
                if ($cur_category)
                    $output .= "\t\t\t".'</optgroup>'."\n";

                $output .= "\t\t\t".'<optgroup label="'.forum_htmlencode($cur_forum['cat_name']).'">'."\n";
                $cur_category = $cur_forum['cid'];
            }

            $sef_friendly_names[$cur_forum['fid']] = sef_friendly($cur_forum['forum_name']);
            $redirect_tag = ($cur_forum['redirect_url'] != '') ? ' &gt;&gt;&gt;' : '';
            $output .= "\t\t\t\t".'<option value="'.$cur_forum['fid'].'"<?php echo ($forum_id == '.$cur_forum['fid'].') ? \' selected="selected"\' : \'\' ?>>'.forum_htmlencode($cur_forum['forum_name']).$redirect_tag.'</option>'."\n";
            $forum_count++;
        }

        $output .= "\t\t\t".'</optgroup>'."\n\t\t".'</select>'."\n\t\t".'<input type="submit" value="<?php echo $lang_common[\'Go\'] ?>" onclick="return Forum.doQuickjumpRedirect(forum_quickjump_url, sef_friendly_url_array);" /></span>'."\n\t".'</div>'."\n".'</form>'."\n";
        $output .= '<script type="text/javascript">'."\n\t\t".'var forum_quickjump_url = "'.forum_link($forum_url['forum']).'";'."\n\t\t".'var sef_friendly_url_array = new Array('.$forum_db->num_rows($result).');';

        foreach ($sef_friendly_names as $forum_id => $forum_name)
            $output .= "\n\t".'sef_friendly_url_array['.$forum_id.'] = "'.forum_htmlencode($forum_name).'";';

        $output .= "\n".'</script>'."\n";

        if ($forum_count < 2)
            $output = '<?php'."\n\n".'if (!defined(\'FORUM\')) exit;'."\n".'define(\'FORUM_QJ_LOADED\', 1);';

        fwrite($fh, $output);

        fclose($fh);
    }

11

(28 replies, posted in PunBB 1.2 troubleshooting)

So, to summarize:  I open the file /include/cache.php and replace every instance of

$fh = @fopen...

fclose($fh);

with just

$GLOBALS['forum_config'] = $output;

or do I just replace the function's values like so:

$fh = @fopen($GLOBALS['forum_config'] = $output;);

and upload empty versions of these files into /cache:

cache_bans.php
cache_censors.php
cache_config.php
cache_ext_version_notifications.php
cache_forum.php
cache_hooks.php
cache_quickjump.php
cache_ranks.php
cache_updates.php

Is that all?

12

(28 replies, posted in PunBB 1.2 troubleshooting)

Okay, I'll give that a shot.  I tried installing punbb 1.3 on my own system (Ubuntu) and GOT THE SAME ERROR!  Seems it needs permissions on the cache folder to be at 0777.

A solution to this problem would be for the software to send you the files it was going to write to the cache directory (perhaps all in one tar.gz file) much like the original cache.php that it sends you to upload to the forum's root directory.  That way you can upload them to the cache directory yourself (though I'm not certain how the cache works I think this would be a nice alternative).

13

(28 replies, posted in PunBB 1.2 troubleshooting)

Anatoly wrote:

Actually, PunBB should work fine without cache: this will just increase the server load, but forum will keep working. (I hope so :-))

I installed 1.3 (might as well go with the newest version)

It worked well until it sent me the config.php file.  I uploaded it to the forum's root directory as instructed and went to the forum's URL to see if it was up and running but it gave me an error.

An error was encountered

Unable to write configuration cache file to cache directory. Please make sure PHP has write access to the directory 'cache'.

The error occurred on line 45 in /home/groups/l/li/linuxforclinics/htdocs/forum/include/cache.php

Line 45 states:

error('Unable to write configuration cache file to cache directory. Please make sure PHP has write access to the directory \'cache\'.', __FILE__, __LINE__);

So it is obviously trying to write to the cache directory but can't due to the write restrictions.

I keep hearing about bypassing the cache but how is it done? It's exactly what I need.

14

(28 replies, posted in PunBB 1.2 troubleshooting)

I'm going to install punbb on SourceForge.net but due to it's no-write-access-from-the-webserver policy the cache file is rendered useless and installation becomes a bit harder.

Can I have some help on getting it up and running easily?

BTW I know about http://www.punbb-hosting.com/ and may try it but for now I'm using SF.net (the no-write thing for its webspace DOES add a nice level of security which we need).

15

(180 replies, posted in PunBB 1.2 troubleshooting)

Smartys wrote:

Aha!

My forum is located on SourceForge but that shouldn't be an issue.

That is the issue! big_smile
http://punbb.org/forums/viewtopic.php?id=13016

The cache directory is possible to set via config.php in PunBB 1.3, but that isn't much help to you. If you want to use PunBB, you'll have to keep doing what you're doing or modify PunBB to use the writable directory.

Durr....thanks -_-

Oh well, that solves that.   I guess I'll be editing the cache and config.php files manually until everything matches what's in the database and works the way I want it.

Guess I'll have to wait for 1.3 to go live.

I also noticed that if I create a forum you get the cache error, but the change is made and can be seen if you go back and refresh the page.  I'm so happy that the database isn't in the webspace smile

16

(180 replies, posted in PunBB 1.2 troubleshooting)

Now cache folder is undeletable even if the permissions are set to 777.

Something funny going on here.

A fresh install is misbehaving too.  Didn't touch the permissions but I had to upload my old cache php files and edit the cache_config.php manually.

It SORTA works but I hate being unable to edit the values automatically with punbb.  I'm manually editing the config files and database tables.

EDIT

I managed to get rid of that buggy cache folder by logging in via ssh.

However, I'm still editing things manually.  At least It works that way.

17

(180 replies, posted in PunBB 1.2 troubleshooting)

Rickard wrote:

That's impossible. It must be a caching issue or something.

I agree.  For some reason the cache_config.php file (and /cache directory and possibly everything in it) is unwritable by punbb even if I set permissions to 777!   It won't write to /cache no matter what and the above fixes do nothing.  The needed php cache is not created and not even manually editing the database's BaseURL value works.

What's truly odd is that if I use my old cache_config.php file which was used when my forum was on a different domain (and therefore has a different BaseURL) the forum WORKS!  The only downside is that I can't edit any details, not even the forum name.

Manually editing the cache_config.php file has no effect and even seems to break the forum.

My forum is located on SourceForge but that shouldn't be an issue.