View Full Version : Archive help... (oh... and mysql errors, too)
mikelangelo
10-07-2005, 02:31 AM
Ok.. I've searched and read all the threads having to do with paged archive add_on. The categories appear to work... but I can't get my page to limit the number of tumbnails... arg... I'm apparantly more of a dufus with PHP than I thought...
Anyway... here's my archive page: http://www.mikelangelo.com/blog/index.php?x=browse&category=13
As you can see.. every image thumb is there...
I have it limited in the admin page to 25...but it doesn't work. I also get a big list of MySQL errors... Could anyone help me there, too. I've posted a screen shot of my admin screen which shows the errors here:
http://www.mikelangelo.com/adminErrors.jpg
Please... could someone esplain the problem for me? Or at least give me a direction to look in?
edit: Oh and here's my pixelpost version info...if it helps: (ooo...I just noticed the slight difference in MySQL versions... is that enough to give me these problems????
-----------------------------------------------------------------------------
PHP-version 4.3.3 (Pixelpost's min requirement: PHP version 4.3.0)
MySQL version 3.23.56 (Pixelpost's min requirement: MySQL 3.23.58)
GD-lib bundled (2.0.15 compatible) with JPEG support
Server software Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_perl/1.26 FrontPage/5.0.2 mod_ssl/2.8.12 OpenSSL/0.9.6b
EXIF Pixelpost is using exifer v1.5 for EXIF information.
Paths
Guessed imagepath: /home/virtual/site121/fst/var/www/html/blog/images/
Configured Imagepath /home/virtual/site121/fst/var/www/html/blog/images/
Image Directory: OK - Can we write to the directory? YES.
Thumbnails Directory: OK - Can we write to the directory? YES.
Language Directory: OK
Addons Directory: OK
Includes Directory: OK
Templates Directory: OK
Referers of Last Seven Days
// another error....
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/virtual/site121/fst/var/www/html/blog/admin/index.php on line 1004
Joe[y]
10-07-2005, 06:33 AM
i think the addon may be clashin with the advanced stat addon.
it's a long shot but try temporirly removing advanced stats from your addons folder and see if that helps.
mikelangelo
10-07-2005, 01:03 PM
wel, your partly right. If I remove the fancy archive addon and the advanced stat addon, all of sql errors on the admin screen goes away...but the paged archive still doesn't work... and that's more important to me at the moment.
I thought advanced Stats was somewhat important... But everything else seems to work fine.
Any other ideas?
Thanks for the help.
Joe[y]
10-07-2005, 01:12 PM
your mySQL version is currently not up to the pixelpost requirements - ask your host to update this first - i can't think of any other possible errors for now.
mikelangelo
10-07-2005, 04:24 PM
Yeah... i was afraid of that. I emailed them and I'm not sure they'll do it for me since I'm on a shared server...If anyone has any other suggestions... that would be groovy. Otherwise... I'll bug my host admin.
boogers. Thanks for the help.
Joe[y]
10-07-2005, 04:51 PM
Yeah... i was afraid of that. I emailed them and I'm not sure they'll do it for me since I'm on a shared server...If anyone has any other suggestions... that would be groovy. Otherwise... I'll bug my host admin.
boogers. Thanks for the help.
well i'm on a shared server and my host had no problem with upgrading.
go ahead and ask.
mikelangelo
10-08-2005, 01:32 PM
Wow... well... here's what support at my hosting company came up with... I'm amazed he went through this much effort for me. My host is 2advanced (http://www.2advanced.net), for any interested.
Now... he seemed to have found a couple bugs in the program. But he also apparantly found my problem. I feel foolish...but I'm going to post his response to me below. Basically, I guess, the "simple" template doesn't support the paged_archive...Anyway if you're interested... here's his long and very detailed report. (I changed the database name, just in case, for security reasons.)
-----------------------
Well, this is a bit longer than I had expected, but please read the
entire email.
I started with the MySQL error in the admin control panel, because
assumed that was the root of the problem.
In /blog/addons/advanced_stat.php, there were lines:
$query = "select count(*) as count from
".$pixelpost_db_prefix."visitors";
$countall = mysql_query($query);
$countall = mysql_fetch_array($countall);
This executes the query, and then immediately uses the result without
first checking if it's valid. I modified that to:
$query = "select count(*) as count from
".$pixelpost_db_prefix."visitors";
$countall = mysql_query($query);
if(!$countall) {
echo "Error: $query generated the following error " .
mysql_error() . "<br>";
}
$countall = mysql_fetch_array($countall);
Which checks for errors and prints the MySQL message so that you can
track down the cause.
With this debugging, we loaded the page again and saw that the query was
throwing a MySQL error (145) indicating that the table was corrupt
(which can happen if you, for example, run out of disk space on your
account). For that, we enter mysql (you could do this through the
control panel, if you wanted) and use REPAIR TABLE to fix it:
mysql> use databasename-_blog;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Didn't find any fields in table 'pixelpost_visitors'
Database changed
mysql> show tables;
+----------------------------------+
| Tables_in_databasename_-_blog |
+----------------------------------+
| pixelpost_ban |
| pixelpost_catassoc |
| pixelpost_categories |
| pixelpost_comments |
| pixelpost_config |
| pixelpost_pixelpost |
| pixelpost_stats |
| pixelpost_version |
| pixelpost_visitors |
+----------------------------------+
9 rows in set (0.00 sec)
mysql> REPAIR pixelpost_visitors;
ERROR 1064: You have an error in your SQL syntax near
'pixelpost_visitors' at line 1
mysql> REPAIR TABLE pixelpost_visitors;
+-------------------------------------------+--------+----------+-------
---+
| Table | Op | Msg_type |
Msg_text |
+-------------------------------------------+--------+----------+-------
---+
| databasename-_blog.pixelpost_visitors | repair | status | OK
|
+-------------------------------------------+--------+----------+-------
---+
1 row in set (0.10 sec)
From there, I noticed it still wasn't paging, so I investigated the
actual PHP code - the query:
$query = "select t1.id,t1.headline,t1.image from
{$pixelpost_db_prefix}pixelpost as t1
inner join {$pixelpost_db_prefix}catassoc as t2
where (t1.datetime<='$cdate')
$where
and t1.id = t2.image_id
group by t1.id
order by t1.datetime desc" .$limit;
Is invalid at the INNER JOIN statement (at least in this version of
MySQL, but I believe it may be invalid in many other versions as well).
I rewrote it as:
$query = "select t1.id,t1.headline,t1.image FROM
{$pixelpost_db_prefix}pixelpost as t1, {$pixelpost_db_prefix}catassoc as
t2
where (t1.datetime<='$cdate')
$where
and t1.id=t2.image_id
group by t1.id
order by t1.datetime desc" . $limit;
Which then correctly limited the rows returned to 30, but still didn't
fix the problem.
These two issues are really bugs in PixelPost, which I'll be happy to
submit to the maintainer. Unfortunately, they still didn't fix the
problem.
Finally, I realized that the pixelpost template you are using ('simple')
doesn't support paged archives! To enable paged archives, you can either
switch to pixelpost-light-archivepaged or modify browse_template.html in
/templates/simple/ to add the required tags (primarily
<THUMBNAILS_WHOLE_PAGED>, but you'll need a few more for the paging
menus). I quickly changed the template to test my assumption, the
archive was paged but the navigation was missing (because it's not in
that template), so I reverted it so that you can either change it
correctly, or transition your site to a template that supports paging.
Connie
10-08-2005, 06:34 PM
that's really great support! I never ran into so great support, I must admit.
Congratulations!
I will put these infos on our list..
mikelangelo
10-10-2005, 02:21 AM
Yes... There support is a HUGE reason I stay with them. I get this kind of support from them consistently, too! And I got this reply from jeff within an hour or so of sending the email... Blinking8s likes eleven2... I gotta' go with 2Advanced.net. It's nice to know there are more than one hosting company out there that are really good!
blinking8s
10-10-2005, 01:01 PM
haha...yeah, those are the only two i trust
i love 2a.net too, trust me, jeff is my hero over at the bb forums
but im B R O K E these days and suck up A LOT of storage space with this whole photography stuff, tack on college budget (debt), 2a is just out of my range, which is cool...one day i'll have something in their target market and get to bug jeff a lot more than i already do...hehe
make sure to send jeff my love for that...he send me an IM about the issues but i was away the last 4 days
mikelangelo
10-10-2005, 01:11 PM
ahhh... so you must be the one he mentioned at PP that he knew...
small world.
blinking8s
10-10-2005, 01:19 PM
haha...indeed it is a small world
Joe[y]
10-10-2005, 04:01 PM
for those people in the UK who want support as good as that 4uhosting.co.uk has never let me down - and is even better value!
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.