Raised This Month: $12 Target: $400
 3% 

Weird problem with installation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
morcin123
Junior Member
Join Date: Jan 2013
Old 01-01-2013 , 08:25   Weird problem with installation
Reply With Quote #1

Hi,

I got weird problem with hlstatsx.

So I have uploaded all necessary files into my folder, exccelent.

But when i try to run my new hlstats in my browser i got this :

Quote:
Warning: require(INCLUDE_PATH/class_db.php) [function.require]: failed to open stream... blah blah blah
So i change in hlstats.php this:

Quote:
require('config.php');
to this:

Quote:
require((dirname(__FILE__)).'/config.php');
And i did this to rest of files too, i mean:

Quote:
ingame.php || show_graph.php || sig.php || status.php || trend_graph.php
So far so good ? not really, now i got this:

Quote:
Warning: require(./includes/class_db.php) ... blah blah blah


so next changes ( in config.php ):

Quote:
define("APP_PATH", dirname(__FILE__));
define("INCLUDE_PATH", APP_PATH."/includes");
define("PAGE_PATH", APP_PATH."/pages/");
define("IMAGE_PATH", "/hlstatsimg");
Now it should work right ? not so fast !

http://scr.hu/0du4/ys3sm


Admin settings - someone cut options and stylesheet choose

I don't know what I should change now
morcin123 is offline
Mavrick4283
Veteran Member
Join Date: Apr 2010
Location: 127.0.0.1@root
Old 01-01-2013 , 11:56   Re: Weird problem with installation
Reply With Quote #2

Well first off you should NEVER need to change the core code.

If you are on a windows server you need to edit the config.php to the absolute paths.
__________________
Mavrick4283 is offline
morcin123
Junior Member
Join Date: Jan 2013
Old 01-01-2013 , 12:59   Re: Weird problem with installation
Reply With Quote #3

I am on linux server.

Quote:
absolute paths
Quote:
define("APP_PATH", dirname(__FILE__));
define("INCLUDE_PATH", APP_PATH."/includes");
define("PAGE_PATH", APP_PATH."/pages/");
define("IMAGE_PATH", "/hlstatsimg");
This should work... right ?

I have installed sourcebans without any problems... i think I give up...
morcin123 is offline
Mavrick4283
Veteran Member
Join Date: Apr 2010
Location: 127.0.0.1@root
Old 01-01-2013 , 15:34   Re: Weird problem with installation
Reply With Quote #4

No those are not the absolute paths and those are also not the relative paths.

Your config should look something like this
Code:
define("INCLUDE_PATH", "./includes");
define("PAGE_PATH", "./pages");
define("IMAGE_PATH", "./hlstatsimg");
__________________
Mavrick4283 is offline
morcin123
Junior Member
Join Date: Jan 2013
Old 01-02-2013 , 09:47   Re: Weird problem with installation
Reply With Quote #5

Quote:
define("INCLUDE_PATH", "./includes");
define("PAGE_PATH", "./pages");
define("IMAGE_PATH", "./hlstatsimg");
So... In almost clean installation with config loking like this above i got errors like this:


Quote:
Warning: require(./includes/class_db.php) ... blah blah blah
morcin123 is offline
Mavrick4283
Veteran Member
Join Date: Apr 2010
Location: 127.0.0.1@root
Old 01-02-2013 , 12:54   Re: Weird problem with installation
Reply With Quote #6

What does your file structure look like?

Did you just copy the web folder up there and change the config? or did you change it in some way.
__________________
Mavrick4283 is offline
morcin123
Junior Member
Join Date: Jan 2013
Old 01-02-2013 , 13:03   Re: Weird problem with installation
Reply With Quote #7

I have copied all necessary files from "web" to my folder and I have changed in hlstats.php this:

Quote:
require('config.php');
to this:

Quote:
require((dirname(__FILE__)).'/config.php');
because without this modification, file did not include.

Now config.php is original and i have this issue:

Quote:
Warning: require(./includes/class_db.php)
So sompting is messed up
morcin123 is offline
Mavrick4283
Veteran Member
Join Date: Apr 2010
Location: 127.0.0.1@root
Old 01-02-2013 , 13:08   Re: Weird problem with installation
Reply With Quote #8

You should NOT have to do that...

Are you running php in safe mode?
__________________
Mavrick4283 is offline
morcin123
Junior Member
Join Date: Jan 2013
Old 01-02-2013 , 13:12   Re: Weird problem with installation
Reply With Quote #9

safe_mode off
morcin123 is offline
Mavrick4283
Veteran Member
Join Date: Apr 2010
Location: 127.0.0.1@root
Old 01-02-2013 , 13:27   Re: Weird problem with installation
Reply With Quote #10

Ok, so your stats folder should have these folders

Code:
css
hlstatsimg
includes
pages
styles
updater
And these files

Code:
autocomplete.php
config.php
hlstats.css
hlstats.php
index.php
ingame.php
show_graph.php
sig.php
status.php
trend_graph.php
updatecheck_helper.php
__________________
Mavrick4283 is offline
Reply


Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode