When on the site, and you go to view a blog, you get the classic redbox db access error. In the admin backend I get the same when I try and post moderate blogs. I just upgraded from 5.3, followed everything to a "t" and had no issues. Help?
When on the site, and you go to view a blog, you get the classic redbox db access error. In the admin backend I get the same when I try and post moderate blogs. I just upgraded from 5.3, followed everything to a "t" and had no issues. Help?
Dolphin 5.6 ...I think
Here are the error logs emailed from this.
Error in /blog.php: Unknown column 'Blog.categoryID' in 'on clause'
Query: '
SELECT
DISTINCT `BlogCategories`.`categoryID` AS catID,
`BlogCategories`.`ownerId`,
`BlogCategories`.`categoryName`,
`BlogCategories`.`categoryDesc`,
`BlogCategories`.`categoryPhoto`,
`Blog`.`blogID` AS blogID,
`Blog`.`blogCaption`,
`Blog`.`blogText`,
`Blog`.`blogDate`,
`Blog`.`blogReadPermission`,
`Blog`.`blogCommentPermission`,
`Blog`.`blogStatus`,
`Blog`.`blogPhoto`,
`Profiles`.`ID` AS profID,
`Profiles`.`NickName`
FROM
`BlogCategories`
LEFT JOIN `Blog` ON `Blog`.`categoryID` = `BlogCategories`.`categoryID`
INNER JOIN `Profiles` ON `BlogCategories`.ownerId = `Profiles`.`ID`
WHERE
`BlogCategories`.`ownerId` = '2'
GROUP BY `BlogCategories`.`categoryID`
;
'
____________________________
Error in /admin/post_mod_blog.php: Unknown column 'Blog.categoryID' in 'on clause'
Query: '
SELECT
`Blog`.`blogID`,
`Blog`.`blogCaption`,
`Blog`.`blogText`,
`Blog`.`blogDate`,
`Blog`.`blogPhoto`,
`Profiles`.`ID`,
`Profiles`.`NickName`
FROM `Blog`
INNER JOIN `BlogCategories` ON `Blog`.`categoryID` = `BlogCategories`.`categoryID`
INNER JOIN `Profiles` ON `BlogCategories`.`ownerID` = `Profiles`.`ID`
WHERE `blogStatus` = 'disapproval'
LIMIT 0, 10
;
'
Dolphin 5.6 ...I think
Answer found:
If you get a red-box message "Database access error" when trying to view the Blog section in admin or user panels (after
applying upgrade pack from 5.3 to 5.4),
then you need to do these actions:
1) go to your Dolphin admin panel -> manage database section, choose "Backup structure and content" and and press "Save" button.
2) go to your phpMyAdmin panel and choose your Dolphin's database.
3) press "SQL" command window and there run this query:
ALTER TABLE `Blog` ADD `categoryID` int(11) default NULL after `blogID`;
4) Check the blog pages again to make sure it worked.
Dolphin 5.6 ...I think
hmm just tried that, but i get this:
Error
SQL-query :
ALTER TABLE `Blog` ADD `categoryID` int( 11 ) default NULL AFTER `blogID`
MySQL said:
#1060 - Duplicate column name 'categoryID'
I will also say Im no big programmer, more a webmaster and seo
hmm no reply to this
Originally Posted by taskmaster
What is the error logs emailed to you after you get a red-box message "Database access error" ? Maybe you have different case.
damn that was a quick reply.
Error in /blog.php: You have an error in your SQL syntax near ';
' at line 27
Query: '
SELECT
DISTINCT `BlogCategories`.`categoryID` AS catID,
`BlogCategories`.`ownerId`,
`BlogCategories`.`categoryName`,
`BlogCategories`.`categoryDesc`,
`BlogCategories`.`categoryPhoto`,
`Blog`.`blogID` AS blogID,
`Blog`.`blogCaption`,
`Blog`.`blogText`,
DATE_FORMAT(`Blog`.`blogDate`, '%m-%d-%y %H:%i') AS blogDate,
`Blog`.`blogReadPermission`,
`Blog`.`blogCommentPermission`,
`Blog`.`blogStatus`,
`Blog`.`blogPhoto`,
`Profiles`.`ID` AS profID,
`Profiles`.`NickName`
FROM
`BlogCategories`
LEFT JOIN `Blog` ON `Blog`.`categoryID` = `BlogCategories`.`categoryID`
INNER JOIN `Profiles` ON `BlogCategories`.ownerId = `Profiles`.`ID`
WHERE
`BlogCategories`.`ownerId` = '5'
GROUP BY `BlogCategories`.`categoryID`
;
'
I think your case is different not the upgrade bug.
Originally Posted by taskmaster
Hmmm im not sure why you have the ' (single quote) and the bottom of the error message is this part of the emailed log error?
GROUP BY `BlogCategories`.`categoryID`
;
'
yes
GROUP BY `BlogCategories`.`categoryID`
;
'
is in the email, my installation is a pure v5.5 no upgrade.
I think we need to do it the hardway![]()
IN inc/db.inc.php, IN function db_res and db_arr
look for this line :
Add this line :echo PrintErr( 'Database access error' );
This will show brief information of the error.echo "<br>SQL ERROR : ".mysql_error()." QUERY : ".$query;
Originally Posted by taskmaster
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks