*

Recent

Author Topic: 1 error  (Read 6573 times)

gobi_Staff

  • Newbie
  • *
  • Posts: 6
  • Force: +0/-0
1 error
« on: August 09, 2010, 01:29:16 AM »
Hello,
I just installed the arcade script on my site (gobi.zzl.org) according to all the instructions,but I still have 1 error that can be seen in the right stats panel.I can't seem to get around it so please tell me if you have any ideas why I have this error.
Thanks

This is the error:
Users Online: Warning: opendir(): open_basedir restriction in effect. File(/var/lib/php) is not within the allowed path(s): (VIRTUAL_DOCUMENT_ROOT) in /www/zzl.org/g/o/b/gobi/htdocs/includes/functions.php on line 43 Warning: opendir(/var/lib/php): failed to open dir: Operation not permitted in /www/zzl.org/g/o/b/gobi/htdocs/includes/functions.php on line 43 1

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: 1 error
« Reply #1 on: August 09, 2010, 11:58:15 AM »
hmmm looks like either you didn't set the permission to 777 or maybe your hosting doesn't allow you to use such functions.
I'll wait for Kurt to read this and he would know a little more about it.
If the case is that your hosting doesn't allow it, I will fix it to work through mysql instead if you would like.

gobi_Staff

  • Newbie
  • *
  • Posts: 6
  • Force: +0/-0
Re: 1 error
« Reply #2 on: August 09, 2010, 12:21:36 PM »
Hello and thanks for the reply Adam LaCombe,

I must say that I'm sure I set all the required permissions as said in the instructions.If you could make it work by changeing it to work through mysql that would be great,if it isn't to much to ask for.
Thanks in advance.
« Last Edit: August 09, 2010, 12:28:04 PM by gobi_Staff »

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: 1 error
« Reply #3 on: August 09, 2010, 01:49:53 PM »
Yeah I'm thinking most defiantly your hosting doesn't allow it.
Would you like me to write the instructions out here for you and have you do it or would you rather have me do it?
If you would rather have me change it, you can PM me your ftp/cpanel info.

HumorSnitch

  • Newbie
  • *
  • Posts: 1
  • Force: +0/-0
Re: 1 error
« Reply #4 on: August 09, 2010, 06:23:46 PM »
I just came here to post about the same problem.

It's installed properly, but I'm getting this error, too.

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: 1 error
« Reply #5 on: August 09, 2010, 06:27:01 PM »
1) Open up PHPMyAdmin and go to your database where FAS is installed at.
2) Open up the table "dd_settings"
3) Add a column named "hits" and make sure you use BIGINT.
4) start up your ftp client and open up the folder templates/{your current template}/
5) Edit the file "template.php"

6) Find  this little snippet of code:
Code: [Select]
Total Hits: <?php include ("$directorypath/includes/counter.php"); ?><br />
and remove it.

7) Replace with this:
Code: [Select]
Total Hits: <?php
$h
=mysql_query("SELECT `hits` FROM `dd_settings`");
while(
$row mysql_fetch_array($h)){ echo "$row[hits]"; } ?>
<br />

8 ) then all the way at the bottom of the file add this:
Code: [Select]
<?php
mysql_query
("UPDATE dd_settings SET hits=hits+1");
?>


gobi_Staff

  • Newbie
  • *
  • Posts: 6
  • Force: +0/-0
Re: 1 error
« Reply #6 on: August 10, 2010, 01:36:41 AM »
Hello,

I've tried what you said but it doesn't seem to work.
I'm still having the same errors for online users in stats tab.
Have a look here gobi.zzl.org.

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: 1 error
« Reply #7 on: August 10, 2010, 05:30:43 AM »
Oh jeez   :o :o
I need glasses lol Sorry I was looking at the wrong thing and thinking it was the hit counter that was causing you problems.
My apologies.
Reupload the original template.php and you can remove the column "hits"

I will post a fix for this in a little while. I have a doctors appt. in a little bit and don't have the time to write it all out.
I been meaning to fix this and reupload the zip on here.

Sorry
« Last Edit: August 10, 2010, 05:32:44 AM by Adam LaCombe »

gobi_Staff

  • Newbie
  • *
  • Posts: 6
  • Force: +0/-0
Re: 1 error
« Reply #8 on: August 10, 2010, 11:49:21 AM »
Lol, well as long as you can help me fix it  no harm done :).

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: 1 error
« Reply #9 on: August 10, 2010, 12:43:35 PM »
Some hosts do not allow you to include some files, nor open directories. Unfortunately, this means some things do not work on those hosts. Just from what I see on a quick look, it looks like your server is one of them.

Adam has been working on a better system for counting users online, but it is in the 2.1rc and not in the 2.0 stable. Right now the best things I can suggest are to either move to a different host, or remove the code that tries to display the number of users online. We are looking at changing some things in 2.1rc before releasing it, so I'm not suggesting that as the best alternative ATM.

If you are comfortable in editing code, you can try to move the database and code in 2.1rc into your 2.0 install. Or, you can use 2.1rc as it is now and edit the code to what is released as the final 2.1. Neither are recommmended for somebody not comfortable with editing code and manipulating databases though.

Sorry, but we are taking a bit longer to release 2.1 than we have in the past. Many of us have responsibilities we need to attend to though, and some of the new features need to have some bugs worked out first.

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: 1 error
« Reply #10 on: August 10, 2010, 04:20:16 PM »
As Kurt said, you can try the 2.1 if you're comfy coding  ;)
That version isn't stable and it only counts users online (ones who are logged into their account)

The one that you have now in 2.0 (version you're running currently) counts how many people are visiting your site.

The one I will post in a little bit will do the same thing but it will run thru a mysql database instead, thus allowing you to use this feature with your current hosting.

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: 1 error
« Reply #11 on: August 10, 2010, 05:55:29 PM »
Ok sorry for the time delay. Got to the hospital and they entered the date wrong in their system so I went for nothing. Then just now I had to help install new head lights in the van  >:( lol

So now here we finally go peoplez  :D

1) Open up PHPMyAdmin to the database FAS is running in and run the follow query:
Code: [Select]
CREATE TABLE `guests_online` (
`session` char(100) NOT NULL default '',
`time` int(11) NOT NULL default '0'
) TYPE=MyISAM;

2) Start up your ftp client and open up templates/{your current template}/

3) Edit the file "template.php", search for this line of code:
Code: [Select]
$totalcomments = $db->num_rows($db->query(sprintf('SELECT ID FROM dd_comments')));should be line 233

4) insert right below it the following:
Code: [Select]
$year = date('Y');
$session=session_id();
$time=time();
$time_check=$time-600; //SET TIME 10 MINS

$count=mysql_num_rows(mysql_query("SELECT * FROM `guests_online` WHERE session='$session'"));


if($count=="0"){
$sql1="INSERT INTO `guests_online`(session, time)VALUES('$session', '$time')";
$result1=mysql_query($sql1);
}
else {
"$sql2=UPDATE `guests_online` SET time='$time' WHERE session = '$session'";
$result2=mysql_query($sql2);
}

$count_user_online=mysql_num_rows(mysql_query("SELECT * FROM `guests_online`"));

5) now find the following:
Code: [Select]
Users Online: <? echo countusersonline(); ?><p>>Replace with:
Code: [Select]
Guests online: <?php echo $count_user_online?><p>
6) Insert the following at the bottom of the file:
Code: [Select]
<?php
$sql4
="DELETE FROM `guests_online` WHERE time<$time_check";
$result4=mysql_query($sql4);
?>


gobi_Staff

  • Newbie
  • *
  • Posts: 6
  • Force: +0/-0
Re: 1 error
« Reply #12 on: August 11, 2010, 02:04:40 AM »
Hey it worked  ;D.Thanks alot,now,I think, I got rid of all the errors.Should be easier from now on.

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: 1 error
« Reply #13 on: August 11, 2010, 02:22:23 AM »
Is this ported from your 2.1 code Adam? Haven't done a side by side comparison, but it looks vaguely familiar. Thanks!

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: 1 error
« Reply #14 on: August 11, 2010, 10:20:57 PM »
Hey it worked  ;D.Thanks alot,now,I think, I got rid of all the errors.Should be easier from now on.
No problem  :)
If you need anything else either post a topic or you can always PM me.

Is this ported from your 2.1 code Adam? Haven't done a side by side comparison, but it looks vaguely familiar. Thanks!

Nope, the one in V2.1 counts users online instead of guests.
I will be eventually adding the guests online feature in V2.1 though, along with a bunch of other things.