error mysql functions.lib.php on line 1257

Report bugs of current version 2.2.5 here!

Moderators: Moderator Team, Development Team

error mysql functions.lib.php on line 1257

Postby ciaociao on Sat Dec 27, 2003 7:20 pm

Hi

i installed ON an old version, new version oh PHPEE
i use old Mysql, but when i enter into user stats
i receiv

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/lestatis/public_html/libraries/functions.lib.php on line 1257

After this error into user stats, i can look all stats normally


Can you help me??
THANKSSSSS
Last edited by ciaociao on Sat Dec 27, 2003 7:23 pm, edited 1 time in total.
ciaociao
 
Posts: 8
Joined: Sat Dec 27, 2003 7:17 pm

Postby ciaociao on Sat Dec 27, 2003 7:22 pm

info functions.lib.php >>>>

get_online_users()
get the array of current online users
--------------------------------------------------*/
function get_online_users() {
global $tbl_logs,$timeout_onl,$curr_gmt_time;
$onlUsers = array(); $o = 0;
$sql = "SELECT logid FROM ".$tbl_logs." "
. "WHERE t_reload > ".($curr_gmt_time-$timeout_onl);
$res = mysql_query($sql);
>>>1257 while ($row = mysql_fetch_array($res)) {
ciaociao
 
Posts: 8
Joined: Sat Dec 27, 2003 7:17 pm

Postby sdjl on Sat Dec 27, 2003 7:42 pm

Do you have a URL that i could take a look at?
It makes it slightly easier in tracking down the problems.

I shall move this post to the Bug reports section as this could be something that will affect more users when they upgrade PPHLogger.

David
User avatar
sdjl
Moderator
 
Posts: 1282
Joined: Mon Nov 17, 2003 1:13 am
Location: London, UK

Postby ciaociao on Sat Dec 27, 2003 7:53 pm

thanks for answer

www.lestatistiche.com
rafnet
WyagFt

thankssss
ciaociao
 
Posts: 8
Joined: Sat Dec 27, 2003 7:17 pm

Postby sdjl on Sat Dec 27, 2003 8:00 pm

It could be because you have no stats for the function to work on.

Ill leave this post here for pipo to see, he may have some more suggestions/fixes :)

David
User avatar
sdjl
Moderator
 
Posts: 1282
Joined: Mon Nov 17, 2003 1:13 am
Location: London, UK

Postby V@no on Sat Dec 27, 2003 9:40 pm

apperiantly variable $tbl_userlog is not being set anywhere in the code...infact it only being used in /admin/admin3.php :
Code: Select all
$custtotal = get_totalrows('tbl_userlog');
so just to rid off the error message add before that line this:
Code: Select all
$tbl_userlog = PPHL_DB_PREFIX.'userlog';


I'm not quet sure what that function does, but I dont see any difference...
Image
User avatar
V@no
 
Posts: 161
Joined: Sat Nov 15, 2003 2:57 pm

Postby ciaociao on Sun Dec 28, 2003 1:01 am

thanks for your kindly reply..but just do it and nothing :(
ciaociao
 
Posts: 8
Joined: Sat Dec 27, 2003 7:17 pm

Postby ciaociao on Sun Dec 28, 2003 1:12 am

It's possible that the problem is because i USE
the old structure of MYSQL?

i install 2.2.5 and used all table and mysql of release 2.x (i don't remember..was old one)
ciaociao
 
Posts: 8
Joined: Sat Dec 27, 2003 7:17 pm

Postby V@no on Sun Dec 28, 2003 1:27 am

ah, wait a min...I had different error message then you...

anyway, I really dont understand why people using such outdated software witch probably has lots of holes and unsecure...
U'd better install v3.23 witch is the most stable and compatible version, or v4.0 if u want more features.

so, here what u can do (dont forged make backup before u do anything):
1) make sure that ALL files were replaced with new ones when u did upgrade (even config.inc.php)
2) if u know how to use a MySQL manager (or db itself, try to repair tables) (phpmyadmin has a feature to repair tables)
3) if nothing above helped, lets try trace the problem:
in /libraries/functions.lib.php find
Code: Select all
   return $onlUsers;
add before:
Code: Select all
echo $sql."<br>";
then try go that page again where it shows u error. it should show u some string, post here what it sais.


P.S. What version of pphlogger did u use before upgrading?
Image
User avatar
V@no
 
Posts: 161
Joined: Sat Nov 15, 2003 2:57 pm

Postby ciaociao on Sun Dec 28, 2003 1:34 am

i don't remember version...was an old version:( of last year


when i entrr into an account an i lokk usage
i receiv, before all stats,

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/lestatis/public_html/libraries/functions.lib.php on line 1257
SELECT logid FROM pphl_40250_logs WHERE t_reload > 1072564066
ciaociao
 
Posts: 8
Joined: Sat Dec 27, 2003 7:17 pm

Postby ciaociao on Sun Dec 28, 2003 1:42 am

i find version

2.2.2a


Now i used upgrade...
300mb of Mysql is a long upgrade and i receiv a lot of error
i wait the end
ciaociao
 
Posts: 8
Joined: Sat Dec 27, 2003 7:17 pm

Postby V@no on Sun Dec 28, 2003 1:52 am

ah...v2.2.2a of pphlogger, not MySQL as I understud u...:?

ok, but did u execute /upgrade/upd_2.2.2b-2.2.3.php script?
Image
User avatar
V@no
 
Posts: 161
Joined: Sat Nov 15, 2003 2:57 pm

Postby sdjl on Sun Dec 28, 2003 2:18 am

You will need to have upgraded from 2.2.2a to 2.2.3
Then from 2.2.3 to 2.2.5

This way your database entries will have been updated.
This could be why your logger isn't functioning correctly.

David
User avatar
sdjl
Moderator
 
Posts: 1282
Joined: Mon Nov 17, 2003 1:13 am
Location: London, UK

Postby ciaociao on Sun Dec 28, 2003 2:26 am

now i import another time old mysql and old version 2.2.a
then i upgrade all

THANKS
ciaociao
 
Posts: 8
Joined: Sat Dec 27, 2003 7:17 pm


Return to PPhlogger bug reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron