AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   HLstatsX:CE (https://forums.alliedmods.net/forumdisplay.php?f=156)
-   -   Weird problem with installation (https://forums.alliedmods.net/showthread.php?t=204593)

morcin123 01-01-2013 08:25

Weird problem with installation
 
Hi,

I got weird problem with hlstatsx. :grrr:

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
:shock:

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 :down:

Mavrick4283 01-01-2013 11:56

Re: Weird problem with installation
 
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.

morcin123 01-01-2013 12:59

Re: Weird problem with installation
 
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...

Mavrick4283 01-01-2013 15:34

Re: Weird problem with installation
 
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");


morcin123 01-02-2013 09:47

Re: Weird problem with installation
 
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

Mavrick4283 01-02-2013 12:54

Re: Weird problem with installation
 
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.

morcin123 01-02-2013 13:03

Re: Weird problem with installation
 
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

Mavrick4283 01-02-2013 13:08

Re: Weird problem with installation
 
You should NOT have to do that...

Are you running php in safe mode?

morcin123 01-02-2013 13:12

Re: Weird problem with installation
 
safe_mode off

Mavrick4283 01-02-2013 13:27

Re: Weird problem with installation
 
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



All times are GMT -4. The time now is 07:59.

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