aaroneiche / do-want

Do Want - Open Source Gift Registry
18 stars 4 forks source link

mysql_fetch_assoc errors #92

Closed jduino closed 10 years ago

jduino commented 10 years ago

At the top of every page I am getting this error: Warning: mysql_fetch_assoc() expects parameter 1 to be resource, null given in /opt/do-want/db.class.php on line 57 Call Stack: 0.0004 627520 1. {main}() /opt/do-want/index.php:0 0.0011 632472 2. include('/opt/do-want/initialize.php') /opt/do-want/index.php:12 0.0031 652616 3. db->dbAssoc() /opt/do-want/initialize.php:18 0.0031 652712 4. mysql_fetch_assoc() /opt/do-want/db.class.php:57 Array ( [options] => [loggedIn] => 1 [userid] => 1 [fullname] => John Duino [admin] => 1 ) × Obviously I have display_errors turned on. PHP 5.3.8 (cli) (built: Sep 28 2011 17:34:42) mysql Ver 14.14 Distrib 5.1.58, for redhat-linux-gnu (x86_64) using readline 5.1

This happened for both a new install as well as when I migrated my existing phpgiftreg database.

aaroneiche commented 10 years ago

Hmm - are are you sure your DB user has the right permissions to access the DB? That would be my first guess. One of the things on my todo is to get DoWant to handle errors better on that level.

jduino commented 10 years ago

Yes, it does appear so. The only one it didn't was GRANT; tried it anyway, but no change. Otherwise I get a list of all my existing users, gifts, etc. And i can add items, delete items, etc.

aaroneiche commented 10 years ago

Did you checkout the source from github, or did you download the zipfile?

On Fri, Nov 22, 2013 at 11:22 PM, jduino notifications@github.com wrote:

Yes, it does appear so. The only one it didn't was GRANT; tried it anyway, but no change. Otherwise I get a list of all my existing users, gifts, etc. And i can add items, delete items, etc.

— Reply to this email directly or view it on GitHubhttps://github.com/aaroneiche/do-want/issues/92#issuecomment-29127655 .

jduino commented 10 years ago

I downloaded the zip file from the source page, do-want-master.zip. (The download page's 0.9.94 comes back as a 404). I assumed the master.zip was the current src (I'm not a git/github user).

aaroneiche commented 10 years ago

Whoops. This is totally my fault, the zip that Github provides is just a packaging of the code in it's current state, which sadly the last time I pushed up a copy it was not in a ready state. I should be more careful about the code I push up.

I have a clean copy I can send you, well put up on the site. Or if you know php at all you can remove the call in initialize.php on line

  1. The former is probably easier.

I downloaded the zip file from the source page, do-want-master.zip. (The download page's 0.9.94 comes back as a 404). I assumed the master.zip was the current src (I'm not a git/github user).

— Reply to this email directly or view it on GitHub.

jduino commented 10 years ago

I assume whatever you would put in a new zip file would have more changes than just the one call. But if it is just that edit I can handle that. Or if you prefer I fetch from git I can probably do that, too (I'm old school though....I still use rcs! But I can learn. )

Sent from my iBrain

On Nov 23, 2013, at 7:00 PM, Aaron Eiche notifications@github.com wrote:

Whoops. This is totally my fault, the zip that Github provides is just a packaging of the code in it's current state, which sadly the last time I pushed up a copy it was not in a ready state. I should be more careful about the code I push up.

I have a clean copy I can send you, well put up on the site. Or if you know php at all you can remove the call in initialize.php on line

  1. The former is probably easier.

I downloaded the zip file from the source page, do-want-master.zip. (The download page's 0.9.94 comes back as a 404). I assumed the master.zip was the current src (I'm not a git/github user).

— Reply to this email directly or view it on GitHub. — Reply to this email directly or view it on GitHub.

aaroneiche commented 10 years ago

I've fixed the file link on the page - you can unzip it. Copy over your custom, uploads, and config.php file and it should work without any issue. It won't make any changes to the db, so you should be fine there. http://aaroneiche.github.io/do-want/

jduino commented 10 years ago

Yes, that fixed it. Thanks.