Warning mysql_num_rows () supplied argument is not a valid

Trouble during PacsOne Server installations
Post Reply
Andrew
Warning mysql_num_rows () supplied argument is not a valid

Post by Andrew » Thu Feb 17, 2005 12:39 am

Warning mysql_num_rows () supplied argument is not a valid MySQL result resource in C:\Program Files\PacsOne\php\pacsone.php on line 29

Getting this error after logging in. Any ideas?

Andrew

Post by Andrew » Thu Feb 17, 2005 1:18 am

Seems to be something I screwed up with MySQL, as in, there is not a database, or at least one without tables.

Still haven't gotten it fired up.

Andrew

Post by Andrew » Thu Feb 17, 2005 1:25 am

Well, the DB is defintely there, although it doesn't show up under the Windows MySQL admin app. If I try to add the DB 'dicom' again using the command line, it says the db already exists.

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Thu Feb 17, 2005 2:29 am

You can do a quick test from the command line to see if your MySQL database is ok or not:

C:\mysql\bin>mysql -u {USERNAME} -p {DATABASE}

where {DATABASE}/{USERNAME} are the MySQL database/username you've created for PacsOne.

mysql>show tables;

If the above command returns 23 tables, then your database is fine (assuming you're running the Premium Edition)

If so, then the problem is probably with the MySQL PHP extension. Check the HTML output of the test page:

http://localhost/pacsone/Hello.php

and make sure you see the mysqli PHP extension is loaded successfully if you've installed MySQL 4.1.x; or the mysql PHP extension is loaded successfully if you've installed MySQL 4.0.x.

Andrew

Post by Andrew » Thu Feb 17, 2005 3:15 pm

Thanks for the input.

I determined last night that, as you suggested, there was a database and no tables. I was installing the Basic version. Never got it going. Tried Premium and everything works fine.

Post Reply