define('PUN_ROOT', '../');
define('PUN_QUIET_VISIT', 1);
define('PUN_ALLOW_INDEX', 1);
require_once PUN_ROOT.'include/common.php';

your line define('PUN_ROOT','../'); has two dots for '../'

This is different for all my newly installed files. My original files only had one dot for './'
Did you change this when you setup PunBB ?

btw...what is the purpose for PUN_QUIET_VISIT and PUN_ALLOW_INDEX ?

Thanks

I'm pretty sure, but not 100%. The only way I can be sure is to un-do what I have working and reinstall, and really don't want to do this again. I will look to find a spare test box to duplicate the process and report back later.

Smartys wrote:

And if you install PunBB without making the edits suggested in that thread? What errors do you get?

These two lines were caused from accidentally removing the line of code,
require 'PUN_ROOT'.'/include/common.php'; hmm

Notice: Undefined variable: pun_user in E:\web_forum\index.php on line 31
Notice: Undefined variable: pun_user in E:\web_forum\index.php on line 36

These two lines of code result from using ,
define('PUN_ROOT','./');

Warning: main(../lang/index.php): failed to open stream: No such file or directory in E:\web_forum\index.php on line 36
Fatal error: main(): Failed opening required '../lang/index.php' (include_path='.;c:\php\includes') in E:\web_forum\index.php on line 36

In the php.ini file when used on a windows system, you have to use the following. Note the forward slashes under the Windows comment. This is in every php.ini file I have ever setup.

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"  
;include_path = ".:/php/includes"
;
;
; Windows: "\path1;\path2"
include_path = ".;c:\php\includes"

Regards,

Don

I really wish my propellar spun fast enough...then I could tell you.  Unfortunately I am a lowly network admin that bang'd away at this using trial an error. All I can say is now it works. I even asked for help from an intern who is a php programmer. Both of us scratched our heads.

hmmmm..

Thanks

Apache at this point is a wish list and a work in progress. For now I am implementing PunBB as a documentation central point for changes being made at a co-lo rack.

We will be moving to apache/*nix sometime in the future.

Thanks again.

I believe I have fixed my install. Basically any page that has

define('PUN_ROOT', './');

needs to be changed to

define('PUN_ROOT', "e:\\web_forum\\");

So far these pages include;

install.php,
index.php
viewform.php
viewtopic.php
profile.php
login.php

While I am no coder AND I do appreciate all the work that has gone into this software, It seems to me that consideration might given in future releases for a global variable with respect to this define statement.

As a side note, I also had to change line 336 in install.php from

 require PUN_ROOT.'include/dblayer/mysql.php';

to

 require PUN_ROOT.'include\dblayer\mysql.php';

Thanks for the help smile

Smartys wrote:

I really hope you didn't remove the require of include/common.php in the code hmm

The only files I tried to tweak were install.php and index.php, specifically // define('PUN_ROOT', './');
I haven't touched anything in common.php

Smartys wrote:

Also, what's up with the odd dirname edits? PunBB doesn't need those, ./ works just fine in Windows hmm

dirname edits from http://punbb.org/forums/viewtopic.php?id=8435
I tried // define('PUN_ROOT', './'); , but still getting errors.

I am working locally on a LAN server. Basically, unzipped the package and copied into e:\web_forum.

I have just installed the latest version of punbb on the following server config
windows 2003 R2, IIS6.0, PHP4.4, MySQL 4.0.4
- created a website in IISADMIN with a distinct IP, 192.168.18.65
- The files were loaded to the physical location e:\web_forum
- In iis the website description name (forum) points to e:\web_forum.
- uploaded the required files
- created a mysql db
- ran http://192.168.18.65/install.php
- presumeably finished the intial setup
- created the config.php file

Now when I try to access the website I get the following error:

Notice: Undefined variable: pun_user in E:\web_forum\index.php on line 31
Notice: Undefined variable: pun_user in E:\web_forum\index.php on line 36
Warning: main(../lang/index.php): failed to open stream: No such file or directory in E:\web_forum\index.php on line 36
Fatal error: main(): Failed opening required '../lang/index.php' (include_path='.;c:\php\includes') in E:\web_forum\index.php on line 36

the install.php is as follows

// The PunBB version this script installs
$punbb_version = '1.2.12';

// define('PUN_ROOT', './');
// for windows .. define('PUN_ROOT', dirname(__FILE__).'./');
define('PUN_ROOT', dirname("forum"));

The index.php is as follows

// define('PUN_ROOT', './');
// for windows .. define('PUN_ROOT', dirname(__FILE__).'./');
define('PUN_ROOT', dirname("forum").'./');
// forum is the description for the web site identification in IIS
// the local path for the wesite files is "E:\web_forum"

if ($pun_user['g_read_board'] == '0')
    message($lang_common['No view']);

// Load the index.php language file
require PUN_ROOT.'lang'.$pun_user['language'].'/index.php';

$page_title = pun_htmlspecialchars($pun_config['o_board_title']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';

The config.php is as follows

<?php

$db_type = 'mysql';
$db_host = 'localhost';
$db_name = 'forum';
$db_username = 'root';
$db_password = '*******';
$db_prefix = 'pmg_';
$p_connect = false;

$cookie_name = 'punbb_cookie';
$cookie_domain = '';
$cookie_path = '/';
$cookie_secure = 0;
$cookie_seed = '58c741eb';

define('PUN', 1);

Can someone please help.
Thanks