I would check with Mike, but I think it's possible that the mySQL database can fail, but the thumbs and images can still be retreived because they themselves are kept in the filesystem, not the database.
Put in "echo mysql_error();" before and after line 363, and see what additional info it spits out. Post it here as well, if you'd like. My hope is that it will say something like "failed to connect to table 'plogger_pictures'", a login failure, or that there were no results found; just something more to go on than $result is null (the only option if it's not a mySQL resource, I think).
What does that chunck of code do by the way? I cemmented it out and the error is gone and the album still seems to work. Can I leave it out without causing damage?
ex: // Album level display mode (display all pictures within album) $output .= '<input type="hidden" name="dl_type" value="pictures" />'; //$count_sql = "SELECT COUNT(*) AS num_items FROM `".$TABLE_PREFIX."pictures` WHERE parent_album = '$id'"; //$result = mysql_query($count_sql); //$num_items = mysql_result($result, 'num_items'); //$num = $num_items;
I think that variable $num, or $num_items, is passed to the generate_pagination function later on in the script. In other words, the code determines how many albums are in the collection and the variable is used to determine how many pages of content can be generated along with the corresponding page links.
As long as your amount of albums doesn't exceed your "number of thumbnails per page" option variable, there should be no deteriment. Having more will cause problems though, the pagination won't work properly.
One interesting thing... when I ran the install, I got the folowwing message: "Plogger has already been installed!"
This was before I installed it the first time. So I over-road the if statement that forces that comment so that I could get to the install wizzard.
Just a little while ago, I tried installing the code on a whole other server and got the same message. Why am I getting this message? and did I perhaps screw something up when I by-passed what brings up that message?
I also noticed that the "PREFIX" doesn't get the right db name... if you look at the code mysql_error(); brings up... it shows the following:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/lab11/public_html/foto/gallery.php on line 366 Table 'lab11_main.plogger_pictures' doesn't exist
(see here: http://www.lab11.evideohosting.ca/foto/index.php?level=album&id=6)
This is very interesting because the plogger tables are under a db called "lab11_foto" and not "lab11_main". I do have a lab11_main db but that's not where the plogger tables are.
Does this all mean anything to anyone? Do you see something I've missed.
Thanks a million to everyone that's helped so far... I appreciate the effort a lot!!!
There should be a file called "plogger-config.php". Make sure you set your mysql variables in there manually. Don't know why or if it matters, but plogger left them blank after my install. I filled them in because opening the file, it seemed like a good idea. I tend not to read instructions, so I can't remember if this is suggested for Plogger.. :)
I have a plog-config.php. Is this what you mean (connection info)? If it is, I filled it out. I'm really pulling out my hair here (and my head is shaved... that's hard to do). Anything else anyone can think of?
You'll guys will never beleive what I've gone through with this thing!!! I'm now pretty sure it was a "brain freeze" by my database. So here's how I stepped around the problem. I created a new connection right above that chunk of code and then calculated the "$result" using the new connection. Now it works fine.
Wow... I broke a sweat! Guys, you're probably all cringing at my "most likely" bad coding... but at this point I'm just happy it's working!
Thanks so much for all the help. You guys are all great!
Here's the final result: http://www.lab11.evideohosting.ca/foto/index.php?level=collection&id=1