PDA

View Full Version : Weird problem with installation


morcin123
01-01-2013, 08:25
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 :

Warning: require(INCLUDE_PATH/class_db.php) [function.require]: failed to open stream... blah blah blah

So i change in hlstats.php this:

require('config.php');

to this:

require((dirname(__FILE__)).'/config.php');

And i did this to rest of files too, i mean:

ingame.php || show_graph.php || sig.php || status.php || trend_graph.php

So far so good ? not really, now i got this:

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

so next changes ( in config.php ):


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 (http://scr.hu/0du4/6wgxb)

I don't know what I should change now :down:

Mavrick4283
01-01-2013, 11:56
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
I am on linux server.

absolute paths

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
No those are not the absolute paths and those are also not the relative paths.

Your config should look something like this

define("INCLUDE_PATH", "./includes");
define("PAGE_PATH", "./pages");
define("IMAGE_PATH", "./hlstatsimg");

morcin123
01-02-2013, 09:47
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:


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

Mavrick4283
01-02-2013, 12:54
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
I have copied all necessary files from "web" to my folder and I have changed in hlstats.php this:

require('config.php');

to this:

require((dirname(__FILE__)).'/config.php');

because without this modification, file did not include.

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


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

So sompting is messed up

Mavrick4283
01-02-2013, 13:08
You should NOT have to do that...

Are you running php in safe mode?

morcin123
01-02-2013, 13:12
safe_mode off

Mavrick4283
01-02-2013, 13:27
Ok, so your stats folder should have these folders


css
hlstatsimg
includes
pages
styles
updater


And these files


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

morcin123
01-02-2013, 13:31
And I got :)


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

Mavrick4283
01-02-2013, 16:55
I have no clue, tho i know that every thing does not have to be 777 (RWX)

I know that you do not have to edit any files other then the config for the DB info to get hlxce to work on windows and Linux servers. I can only guess that there is something in your php.ini that is eater stopping php from revealing the paths correct or you are running an older version of PhP and it is causing errors.

morcin123
01-03-2013, 09:26
Mavrick4283 thanks for your time.

Thing is that i have this script connected with my cakephp, in some way, sourcebans working well, but hlstatsx not. I think I must check my cakephp script.

So thanks again :)