 | |  | | | Photopost Pro Installation & Upgrades If you're having install or upgrade problems |
May 27th, 2006, 01:50 AM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Aug 2002 Location: WA
Posts: 134
| mysql fetch errors...
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/wff/public_html/gallery/pp-inc.php on line 192
Warning: Invalid argument supplied for foreach() in /home/wff/public_html/gallery/pp-inc.php on line 2861
it started before a server transition, but not far enough to think it wasn't related. all pages returning the above, including admin. ideas? http://www.washingtonflyfishing.com/gallery/
Thanks,
South Fork
|
| |
May 27th, 2006, 09:12 AM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
well your not using the latest files it would appear cause line 192 is a closing bracket and nowhere near a query so I can't say the exact cause here cause I do not know what query there is thats failing.
I would suggest if this was an upgrade you run all applicable upgrades from 5.0-5.3 and do a repair on your database tables for photopost.
|
| |
May 27th, 2006, 12:56 PM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Aug 2002 Location: WA
Posts: 134
|
server upgrade, not pp. Running 5.2. Will upgrade to 5.3 and see if that cures anything. already ran a db repair, to no avail.
thanks Chuck.
|
| |
May 27th, 2006, 01:42 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
You want to tell me what line 192 is in your pp-inc.php so we know what query is failing?
|
| |
May 27th, 2006, 01:55 PM
|
#5 (permalink)
| | Member Verified Customer
Join Date: Aug 2002 Location: WA
Posts: 134
|
// Depending on the page, we don't need all the cached data (just saves space this way)
if ( THIS_SCRIPT != "upgrade" ) {
if ( THIS_SCRIPT == "ppindex" && $Globals['cachetimeout'] > 0 ) {
$totalv = ppmysql_query("SELECT * FROM {$Globals['pp_db_prefix']}cache WHERE id=1", $link);
}
elseif ( (THIS_SCRIPT == "showgallery" || THIS_SCRIPT == "showmembers" || THIS_SCRIPT == "showphoto") && $Globals['sidebar_global'] == "yes" ) {
$totalv = ppmysql_query("SELECT timestamp,statscache,calcache,catcache,catprops FROM {$Globals['pp_db_prefix']}cache WHERE id=1", $link);
}
else {
$totalv = ppmysql_query("SELECT timestamp,statscache,catcache,catprops FROM {$Globals['pp_db_prefix']}cache WHERE id=1", $link);
} $cacheq = mysql_fetch_array($totalv);
// timestamp is the time of the next scheduled update; do we need to update cache?
$updatecache = false;
if ( $cacheq['timestamp'] < $lasttimeon || $Globals['cachetimeout'] == 0 ) {
$updatecache = true;
}
}
|
| |
May 27th, 2006, 05:18 PM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
Okay so its the cache query and you did not run the upgrade script. The cache was added in 5.2 and it looks to me like your cache table does not exist. Try running the upgrade script.
|
| |
May 29th, 2006, 01:56 PM
|
#7 (permalink)
| | Member Verified Customer
Join Date: Aug 2002 Location: WA
Posts: 134
|
The error with the cache table is resolved. Ran the repair again on it before upgrading the script and it fixed the table. Cool. The second issue remains.
Warning: Invalid argument supplied for foreach() in /home/wff/public_html/gallery/pp-inc.php on line 2861
===================================
function set_group_perms( $usergroup, $xloop = 0 ) {
global $Globals, $link, $CatPerms, $User, $cacheq;
$listofcats = null; foreach( $Globals['cats'] as $key => $value ) {
list( $catugid, $ugnoup, $ugnoanno, $ugnoview, $ugnopost, $ugnovote, $cpass, $cwatermark, $cattype, $ismember, $catname, $catparent, $children, $catthumb, $canzip, $mods, $header, $footer, $headtags ) = $value;
$noupload=0; $noann=0; $noview=0; $nopost=0; $novote=0;
if ( $xloop == 0 ) {
$CatPerms['ugcat'][$catugid] = 1;
$CatPerms['uganno'][$catugid] = 1;
$CatPerms['ugview'][$catugid] = 1;
$CatPerms['ugpost'][$catugid] = 1;
$CatPerms['ugvote'][$catugid] = 1;
$CatPerms['parent'][$catugid] = $catparent;
$CatPerms['children'][$catugid] = $children;
$CatPerms['thumbs'][$catugid] = $catthumb;
$CatPerms['mods'][$catugid] = $mods;
$CatPerms['catpass'][$catugid] = $cpass;
$CatPerms['cattype'][$catugid] = $cattype;
$CatPerms['ismember'][$catugid] = $ismember;
$CatPerms['catwater'][$catugid] = $cwatermark;
$CatPerms['canzip'][$catugid] = $canzip;
$CatPerms['catname'][$catugid] = $catname;
$CatPerms['header'][$catugid] = $header;
$CatPerms['footer'][$catugid] = $footer;
$CatPerms['headtags'][$catugid] = $headtags;
if ( $listofcats == "" ) $listofcats = "$catugid";
else $listofcats .= ",$catugid";
}
$allnoup = explode( ",", $ugnoup );
foreach ($allnoup as $key) {
if ($usergroup == $key) {
$noupload=1;
}
}
$allnoanno = explode( ",", $ugnoanno );
foreach ($allnoanno as $key) {
if ($usergroup == $key) {
$noann=1;
}
}
$allnoview = explode( ",", $ugnoview );
foreach ($allnoview as $key) {
if ($usergroup == $key) {
$noview=1;
}
}
$allnopost = explode( ",", $ugnopost );
foreach ($allnopost as $key) {
if ($usergroup == $key) {
$nopost=1;
}
}
$allnovote = explode( ",", $ugnovote );
foreach ($allnovote as $key) {
if ($usergroup == $key) {
$novote=1;
}
}
if ( $noupload == 0 ) $CatPerms['ugcat'][$catugid]=0;
if ( $noann == 0 ) $CatPerms['uganno'][$catugid]=0;
if ( $noview == 0 ) $CatPerms['ugview'][$catugid]=0;
if ( $nopost == 0 ) $CatPerms['ugpost'][$catugid]=0;
if ( $novote == 0 ) $CatPerms['ugvote'][$catugid]=0;
}
ppmysql_free_result( $resultb );
$User['catlist'] = $listofcats;
return( $listofcats );
}
|
| |
May 29th, 2006, 08:53 PM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
Refresh your cache and you will be fine
Turn it off in admin and view the index then turn it back on
|
| |
May 30th, 2006, 04:39 PM
|
#9 (permalink)
| | Member Verified Customer
Join Date: Aug 2002 Location: WA
Posts: 134
|
In a round-about way that did it Chuck. Found that after repairing the cache table it was empty. Tried turning off the cache but at first it didn't seam to work. Imported data into cache from a backup, tweaked a category setting and then the cache updated. Working again in all respects.
Thanks for the help Chuck.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | |
Similar Threads | | Thread | Thread Starter | Forum | Replies | Last Post | | mysql errors | jaffy | Photopost Pro Installation & Upgrades | 1 | November 18th, 2005 05:29 PM | | mySQL errors | robinsf | Photopost Pro Installation & Upgrades | 4 | May 26th, 2005 12:27 PM | | MYSQL Errors | garybrun | Photopost Pro Installation & Upgrades | 7 | December 18th, 2004 04:37 AM | | mysql errors | ncg | ReviewPost Bug Reports | 2 | December 7th, 2004 10:50 PM | All times are GMT -5. The time now is 03:22 PM. | |