1
myztacia
Failed opening required 'XOOPS_ROOT_PATH/class/template.php'
  • 2005/6/1 22:22

  • myztacia

  • Just popping in

  • Posts: 5

  • Since: 2005/6/1 2


Fatal error: main(): Failed opening required 'XOOPS_ROOT_PATH/class/template.php' (include_path='.;c:\php4\pear') in C:\Xitami\webpages\test\header.php on line 62

This is the error I get upon installation of the file. I verified that it is there, capitalization is correct...still not working x.x Help?

2
jensclas
Re: Failed opening required 'XOOPS_ROOT_PATH/class/template.php'

Please read this FAQ

It covers all of these sorts of messages. Ask again if you can't find the answer.

3
Catzwolf
Re: Failed opening required 'XOOPS_ROOT_PATH/class/template.php'
  • 2005/6/2 22:27

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


You are trying to use a constant quoted in a string.

Should try this instead

require XOOPS_ROOT_PATH.'/class/template.php'

Remember XOOPS_ROOT_PATH is a constant

ATB

Catz

4
Mithrandir
Re: Failed opening required XOOPS_ROOT_PATH/class/template.php

not sure that is the problem, Catz. I think those quotes are added by the PHP error message.

Most likely it is because XOOPS_ROOT_PATH is not defined at that point, but why that is, I cannot tell.

5
Catzwolf
Re: Failed opening required XOOPS_ROOT_PATH/class/template.php
  • 2005/6/2 22:39

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Yes, he may have forgotten to include the 'mainfile.php', in that case that is as far as that script will go lol

If he where to post that part of the code it would help a lot in debugging his problem.

6
myztacia
Re: Failed opening required XOOPS_ROOT_PATH/class/template.php
  • 2005/6/2 22:42

  • myztacia

  • Just popping in

  • Posts: 5

  • Since: 2005/6/1 2


I've already read the FAQ...read it before I posted. It doesn't cover exactly what's happening here. I'm sure it's because XOOPS_ROOT_PATH is not defined, but where should it be defined and how should I go about doing it? :-/ I feel like such a newb x.x lol.

7
myztacia
Re: Failed opening required XOOPS_ROOT_PATH/class/template.php
  • 2005/6/2 22:44

  • myztacia

  • Just popping in

  • Posts: 5

  • Since: 2005/6/1 2


mainfile.php IS included. Any other suggestions?

8
Catzwolf
Re: Failed opening required XOOPS_ROOT_PATH/class/template.php
  • 2005/6/2 22:45

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


You need to include the mainfile.php at the top of your script.

include '../../../mainfile.php';

Not sure if it is that far up the directory structure, but the php error message should tell you.

ATB

Catz

9
myztacia
Re: Failed opening required XOOPS_ROOT_PATH/class/template.php
  • 2005/6/2 22:48

  • myztacia

  • Just popping in

  • Posts: 5

  • Since: 2005/6/1 2


index.php:

echo " ";
// $Id: index.php,v 1.8 2003/03/23 23:03:58 okazu Exp $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
// <https://xoops.org/> //
// ------------------------------------------------------------------------ //
// This program 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 of the License, or //
// (at your option) any later version. //
// //
// You may not change or alter any portion of this comment or credits //
// of supporting developers from this source code or any supporting //
// source code which is considered copyrighted (c) material of the //
// original comment or credit authors. //
// //
// This program 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. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //
/**
* Catch new users and redirect them to the start page, if any
* @copyright © 2000 xoops.org
**/

/**
* redirects to installation, if XOOPS is not installed yet
**/
include "mainfile.php";

//check if start page is defined
if ( isset($xoopsConfig['startpage']) && $xoopsConfig['startpage'] != "" && $xoopsConfig['startpage'] != "--" ) {
header('Location: '.XOOPS_URL.'/modules/'.$xoopsConfig['startpage'].'/');
exit();
} else {
$xoopsOption['show_cblock'] =1;
include "header.php";
include "footer.php";
}
?>

10
myztacia
Re: Failed opening required XOOPS_ROOT_PATH/class/template.php
  • 2005/6/2 22:51

  • myztacia

  • Just popping in

  • Posts: 5

  • Since: 2005/6/1 2


Actually...I think I may have figured it out. I'll let you know if I have anymore questions :) Thanks for dealing with me! lol :)

Login

Who's Online

552 user(s) are online (64 user(s) are browsing Support Forums)


Members: 0


Guests: 552


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits