hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Root Path
Reply

Forum Jump

Root Path

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 05-21-2004, 06:24 PM
Andy_Wilson Andy_Wilson is offline
Newbie
 
Join Date: May 2004
Posts: 7
Question

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



Sponsored Links
  #2  
Old 05-21-2004, 09:52 PM
hiryuu hiryuu is offline
Web 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!

  #3  
Old 05-21-2004, 11:15 PM
shraz shraz is offline
Junior Guru
 
Join Date: Apr 2004
Posts: 245
you need to update to php 4

Sponsored Links
  #4  
Old 06-02-2004, 01:11 PM
Andy_Wilson Andy_Wilson is offline
Newbie
 
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?

  #5  
Old 06-02-2004, 01:43 PM
alteree alteree is offline
Newbie
 
Join Date: Jun 2004
Location: Chicago, IL
Posts: 15
Call phpinfo() and see if the _SERVER["DOCUMENT_ROOT"] gives you correct value

  #6  
Old 06-02-2004, 05:49 PM
Andy_Wilson Andy_Wilson is offline
Newbie
 
Join Date: May 2004
Posts: 7
Post

OK, tried that for the doc_root i get no value on both local and master value.

Please help,
Andy Wilson


Last edited by Andy_Wilson; 06-02-2004 at 06:02 PM.
  #7  
Old 06-02-2004, 07:26 PM
Dan Grossman Dan Grossman is offline
Web Hosting Master
 
Join Date: Oct 2003
Posts: 1,479
Try using absolute paths. /home/username/www/forum/ for example.

__________________
Dan Grossman - dan @ awio.com
My Blog | Affiliate Program for Web Hosts

  #8  
Old 06-03-2004, 03:49 AM
Andy_Wilson Andy_Wilson is offline
Newbie
 
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

  #9  
Old 06-10-2004, 01:39 PM
Andy_Wilson Andy_Wilson is offline
Newbie
 
Join Date: May 2004
Posts: 7
Bump, please I need help fast!
This root path thing is really holding my site back.

  #10  
Old 06-10-2004, 05:01 PM
Dan Grossman Dan Grossman is offline
Web 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.

__________________
Dan Grossman - dan @ awio.com
My Blog | Affiliate Program for Web Hosts

  #11  
Old 06-10-2004, 09:55 PM
DSLWeb DSLWeb is offline
WHT 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

__________________
DSL WebHosting Solutions
Fast Affordable WebHosting Solutions
24/7/365 Support

  #12  
Old 06-11-2004, 02:13 AM
mwaseem mwaseem is offline
Web Hosting Guru
 
Join Date: Dec 2003
Location: Pakistan
Posts: 339
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

  #13  
Old 06-11-2004, 02:53 AM
Andy_Wilson Andy_Wilson is offline
Newbie
 
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
//
It's the
PHP Code:
$phpbb_root_path '../forum/'
bit that doesn't work because the ../ root path doesn't work.

Andy Wilson

  #14  
Old 06-11-2004, 02:54 AM
Dan Grossman Dan Grossman is offline
Web 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.

__________________
Dan Grossman - dan @ awio.com
My Blog | Affiliate Program for Web Hosts

  #15  
Old 06-11-2004, 12:19 PM
Andy_Wilson Andy_Wilson is offline
Newbie
 
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

Reply

Related posts from TheWhir.com
Title Type Date Posted
ICANN Delegates More than 100 New gTLDs to Root Zone Web Hosting News 2014-01-24 13:41:02
GoGrid Launches Free Cloud Migration Service through Racemi Partnership Web Hosting News 2013-04-10 11:16:38
SSHD Rootkit in the Wild Blog 2013-02-22 16:44:08
Mozilla Updates CA Certificate Policy for Software Products Web Hosting News 2013-02-19 12:32:22
CloudLinux Improves Virtualized File System for Shared Web Hosts Web Hosting News 2012-05-30 15:17:05


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?