Results 1 to 15 of 15
Thread: Root Path
-
05-21-2004, 06:24 PM #1Newbie
- Join Date
- May 2004
- Posts
- 7
Root Path
Hi all!
First time posting on this forum so pls correct me if I go wrong anywhere.
My problem is that I am using php and whenever I use the ../ root path nothing works or I get errors.
I need this to define the root path of my forum which is located /forum/
but when I use ../forum/ i get errors, this is not the first time this has happend.
Do I need to update my php or something because that root path works on my friend's sites.
I am running on php 3.
Andy Wilson
-
05-21-2004, 09:52 PM #2Web Hosting Master
- Join Date
- Jan 2003
- Posts
- 1,715
My #1 pet peeve is vague error reports. Why should I waste time to discover information you already know? Not only do you need to wait that much longer to resolve your issue, but it means the next person in line waits longer before I can address their issue.
You get errors? What do you errors say? The forums work perfectly with some other root path, or you can't get them running at all?
PHP 3.x is ANCIENT by web standards. Unless you have some script that flat-out doesn't work under 4.x, you will be better off upgrading.Game Servers are the next hot market!
Slim margins, heavy support, fickle customers, and moronic suppliers!
Start your own today!
-
05-21-2004, 11:15 PM #3Junior Guru
- Join Date
- Apr 2004
- Posts
- 245
you need to update to php 4
-
06-02-2004, 01:11 PM #4Newbie
- Join Date
- May 2004
- Posts
- 7
OK, it kinda turns out that I have php version 4.3.6 isn't this a fairly recent version? If so why isn't the ../ root path working at all?
-
06-02-2004, 01:43 PM #5Newbie
- Join Date
- Jun 2004
- Location
- Chicago, IL
- Posts
- 15
Call phpinfo() and see if the _SERVER["DOCUMENT_ROOT"] gives you correct value
-
06-02-2004, 05:49 PM #6Newbie
- Join Date
- May 2004
- Posts
- 7
OK, tried that for the doc_root i get no value on both local and master value.
Please help,
Andy WilsonLast edited by Andy_Wilson; 06-02-2004 at 06:02 PM.
-
06-02-2004, 07:26 PM #7Web Hosting Master
- Join Date
- Oct 2003
- Posts
- 1,479
Try using absolute paths. /home/username/www/forum/ for example.
-
06-03-2004, 03:49 AM #8Newbie
- Join Date
- May 2004
- Posts
- 7
The absolute path doesn't work because it thinks that the absolute path is a directory (flashpointfx-studios.com/portal.php - the page I am using)
The pictures don't show and the links don't work.
Andy Wilson
-
06-10-2004, 01:39 PM #9Newbie
- Join Date
- May 2004
- Posts
- 7
Bump, please I need help fast!
This root path thing is really holding my site back.
-
06-10-2004, 05:01 PM #10Web Hosting Master
- Join Date
- Oct 2003
- Posts
- 1,479
Perhaps your web host, or the author of the script you're trying to get working, can help you better.
-
06-10-2004, 09:55 PM #11WHT Addict
- Join Date
- Apr 2004
- Location
- Texas
- Posts
- 163
What forums are you using?
Unfortunatly hard to help with your problem without knowing the script or at least see the code please post those and may be able to help you out
-
06-11-2004, 02:13 AM #12Web Hosting Guru
- Join Date
- Dec 2003
- Location
- Pakistan
- Posts
- 344
I can help you with ASP code. there are so many PHP programmers, hope somebody can translate it
[vb]
Dim sPath, pos
sPath = Server.MapPath("/111")
sPath = left(sPath, len(sPath) - 4)
pos = InStrRev(sPath, "\", -1, 1)
if pos > 0 then
sPath = left(sPath , pos -1)
end if
[/vb]Muhammad Waseem
Inspedium Corporation (Pvt) Ltd.
InsPanel - Hosting Control Panel for Windows 2000/2003
-
06-11-2004, 02:53 AM #13Newbie
- Join Date
- May 2004
- Posts
- 7
OK, I'm using phpbb forums and I've included part of the code in the portal I'm trying to use.
PHP Code:<?php
#######################################################################
## ##
## phpBB Fetch All - displays phpBB on any page ##
## ----------------------------------------------------------------- ##
## A portal example file. ##
## ##
#######################################################################
## ##
## Authors: Volker 'Ca5ey' Rattel <ca5ey@clanunity.net> ##
## [url]http://clanunity.net/portal.php[/url] ##
## ##
## This file is free software; you can redistribute it and/or modify ##
## it under the terms of the GNU General Public License as published ##
## by the Free Software Foundation; either version 2, or (at your ##
## option) any later version. ##
## ##
## This file is distributed in the hope that it will be useful, ##
## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
## GNU General Public License for more details. ##
## ##
#######################################################################
//
// This path points to the directory where phpBB is installed. Do
// not enter an URL here. The path must end with a trailing
// slash.
//
// Examples:
// forum in /aaa/bbb/ccc/ and script in /aaa/bbb/ccc/
// --> $phpbb_root_path = './';
// forum in /aaa/bbb/ccc/ and script in /aaa/bbb/
// --> $phpbb_root_path = './ccc/';
// forum in /aaa/bbb/ccc/ and script in /aaa/bbb/ddd/
// --> $phpbb_root_path = '../ccc/';
//
$phpbb_root_path = '../forum/';
//
// this setting is for the clanunity site - ignore it
//
// $phpbb_root_path = '../forum/';
define ('IN_PHPBB', true);
if (!file_exists($phpbb_root_path . 'extension.inc'))
{
die ('<tt><b>phpBB Fetch All:</b>
$phpbb_root_path is wrong and does not point to your forum.</tt>');
}
//
// phpBB related files
//
include_once ($phpbb_root_path . 'extension.inc');
include_once ($phpbb_root_path . 'common.' . $phpEx);
include_once ($phpbb_root_path . 'includes/bbcode.' . $phpEx);
//
// Fetch All related files - we do need all these because the portal is a
// huge example
//
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/common.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/stats.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/users.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/polls.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/posts.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/forums.' . $phpEx);
//
// start session management
//PHP Code:$phpbb_root_path = '../forum/';
Andy Wilson
-
06-11-2004, 02:54 AM #14Web Hosting Master
- Join Date
- Oct 2003
- Posts
- 1,479
It should be a full path. Try /home/username/public_html/forum or /home/username/www/forum or just ask your host.... they're the ones that know how your server is configured.
-
06-11-2004, 12:19 PM #15Newbie
- Join Date
- May 2004
- Posts
- 7
OK this may sound very wierd but true:
I figured there was no way to set the ../ root path so I decided to rename the .php extension to .html I tried it in the browser and it came out bla bla (please dont ask what was goin through my head, I'm a demented freak ).
I renamed the extension again back to .php tried it in the browser and...... WALA!!!
It worked! I dont know how but it did.
Thanks you guys anyway for your support.
Andy Wilson