Help with SQL

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Help with SQL

Postby goose36 » Mon Nov 05, 2007 10:00 am

My SQL Database keeps messing up.



I keep getting something like this

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /usr/local/apache2/htdocs/vicidial/AST_timeonVDADall.php on line 609

how do I make that go away.
It keeps occuring maybe twice per day.. and it is starting to get annoying.
I have told my tech numerous times to help me or show me how to do the fix for it because i can't keep calling him and wait for that to get fixed..

I need it fixed right away..

Can anyone explain to me what may be causing that to happen more consistant?

and what is it that I need to do to fix it and keep it fixed.
goose36
 
Posts: 27
Joined: Thu Oct 18, 2007 3:27 pm

Postby mflorell » Mon Nov 05, 2007 2:39 pm

What is the SQL query right above that line in that script?
mflorell
Site Admin
 
Posts: 18339
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby chadahm » Mon Nov 05, 2007 2:40 pm

Well, there could be a number of things the problem...

mysql_num_rows() is a PHP function, it will error if there is no resource only on a sql result set defined. if there was 0 results, as it would return a 0 as it's output and not error.

Have the pages been modified? I've never seen that report do that out of the box. If so, I would change your error_reporting in php.ini. I've seen some errors happen where there is no campaign information.

http://us3.php.net/manual/en/function.error-reporting.php
chadahm
 
Posts: 49
Joined: Mon Oct 22, 2007 2:52 pm

Postby devafree » Tue Nov 06, 2007 1:11 pm

hello

maybe the table queried got marked as crashed?

devafree
devafree
 
Posts: 180
Joined: Wed Sep 20, 2006 5:03 pm

Postby nobesnickr » Tue Nov 06, 2007 7:30 pm

the exact same thing just happened to me today and now no calls can go out. Asterisk works fine and can manually call out through Xlite but nothing from Vicidial.

Asterisk CLI doesnt show any activity from Vicidial

Basically we were working great all day than we got down to about 25 dialable leads and the server completely locked up, had to hard boot (NOTHING was reacting)

When I booted back up we had this error.

Any help would be GREATLY appreciated
nobesnickr
 
Posts: 56
Joined: Thu Nov 01, 2007 6:44 pm

Postby nobesnickr » Tue Nov 06, 2007 8:21 pm

I figured it out on my end (I think)

my table vicidial_live_agents was corrupt

ran
repair table vicidial_live_agents

in mysql and it looks like that part of the issue has been solved

hope this helps!
nobesnickr
 
Posts: 56
Joined: Thu Nov 01, 2007 6:44 pm

this is how i solved it

Postby goose36 » Fri Nov 09, 2007 3:57 pm

I had my tech install phpmyadmin and with that it repairs the tables automatically without me doing anything.

if you dont know how to install that, see if any of the guys can help with it.

:)
goose36
 
Posts: 27
Joined: Thu Oct 18, 2007 3:27 pm

Postby devafree » Fri Nov 09, 2007 4:24 pm

hello

thats very interesting, I did not know phpMyAdmin could check tables and repair them automatically.


Any links on howtos, cannot ssem to find at the phpmyadmin documentation site.


Regards

Devafree
devafree
 
Posts: 180
Joined: Wed Sep 20, 2006 5:03 pm

Postby nobesnickr » Fri Nov 09, 2007 9:09 pm

it didnt repair for me but it helped me figure out what was going on.

I have Ubuntu and just used the lazy mans way of getting and install the package

apt-get install phpmyadmin


a quick google search should turn up a how-to for any operation system you have
nobesnickr
 
Posts: 56
Joined: Thu Nov 01, 2007 6:44 pm


Return to Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 281 guests