phpMyFAQ Errors right on Index Page

Please report bugs here!

Moderator: Thorsten

Post Reply
cjdelgross
Posts: 5
Joined: Fri Mar 03, 2017 9:39 pm

phpMyFAQ Errors right on Index Page

Post by cjdelgross »

My installation is having some strange behavior. I cannot load the login page, many of the links resolve to the following Server Error:

erver Error in '/' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>




I enabled debug mode and index page loads with the following error:

phpMyFAQ warning [2]: sqlsrv_fetch_object() expects parameter 1 to be resource, boolean given in D:\WebSites\LenovoMobilityDashboard\motofaq\inc\PMF\DB\Sqlsrv.php on line 162
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: phpMyFAQ Errors right on Index Page

Post by Thorsten »

Hi,

do you see which query is failing?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
cjdelgross
Posts: 5
Joined: Fri Mar 03, 2017 9:39 pm

Re: phpMyFAQ Errors right on Index Page

Post by cjdelgross »

D:\WebSites\LenovoMobilityDashboard\motofaq\inc\Bootstrap.php:
PMF_Configuration->getAll() in line 149:
SELECT
config_name, config_value
FROM
faqconfig

D:\WebSites\LenovoMobilityDashboard\motofaq\inc\PMF\Session.php:
PMF_DB_Sqlsrv->nextID() in line 113:
SELECT
max(sid) as current_id
FROM
faqsessions

D:\WebSites\LenovoMobilityDashboard\motofaq\index.php:
PMF_Session->userTracking() in line 205:
INSERT INTO
faqsessions
(sid, user_id, ip, time)
VALUES
(2, -1, '172.50.4.152', 1488818620)

D:\WebSites\LenovoMobilityDashboard\motofaq\inc\PMF\Category.php:
PMF_Category->getOrderedCategories() in line 156:
SELECT
fc.id AS id,
fc.lang AS lang,
fc.parent_id AS parent_id,
fc.name AS name,
fc.description AS description,
fc.user_id AS user_id,
fc.group_id AS group_id,
fc.active AS active
FROM
faqcategories fc
LEFT JOIN
faqcategory_group fg
ON
fc.id = fg.category_id
LEFT JOIN
faqcategory_user fu
ON
fc.id = fu.category_id

WHERE
( fg.group_id IN (-1)
OR
(fu.user_id = -1 AND fg.group_id IN (-1)))
AND
fc.lang = 'en'
GROUP BY
fc.id, fc.lang, fc.parent_id, fc.name, fc.description, fc.user_id, fc.group_id, fc.active
ORDER BY
fc.parent_id, fc.id

D:\WebSites\LenovoMobilityDashboard\motofaq\index.php:
PMF_Tags->existTagRelations() in line 406:
SELECT
COUNT(record_id) AS n
FROM
faqdata_tags

D:\WebSites\LenovoMobilityDashboard\motofaq\index.php:
PMF_Session->getUsersOnline() in line 457:
SELECT
count(sid) AS anonymous_users
FROM
faqsessions
WHERE
user_id = -1
AND
time > 1488818320

D:\WebSites\LenovoMobilityDashboard\motofaq\index.php:
PMF_Session->getUsersOnline() in line 457:
SELECT
count(session_id) AS registered_users
FROM
faquser
WHERE
session_timestamp > 1488818320

D:\WebSites\LenovoMobilityDashboard\motofaq\inc\PMF\Helper\Category.php:
PMF_Category->getNumberOfRecordsOfCategory() in line 53:
SELECT
fcr.category_id AS category_id,
COUNT(fcr.record_id) AS number
FROM
faqcategoryrelations fcr, faqdata fd
WHERE
fcr.record_id = fd.id
AND
fcr.record_lang = fd.lang
GROUP BY fcr.category_id

D:\WebSites\LenovoMobilityDashboard\motofaq\inc\PMF\User.php:
PMF_User_UserData->get() in line 912:
SELECT
display_name
FROM
faquserdata
WHERE
user_id = 0

D:\WebSites\LenovoMobilityDashboard\motofaq\inc\PMF\Helper\Category.php:
PMF_Category->getNumberOfRecordsOfCategory() in line 53:
SELECT
fcr.category_id AS category_id,
COUNT(fcr.record_id) AS number
FROM
faqcategoryrelations fcr, faqdata fd
WHERE
fcr.record_id = fd.id
AND
fcr.record_lang = fd.lang
GROUP BY fcr.category_id

D:\WebSites\LenovoMobilityDashboard\motofaq\inc\PMF\Faq.php:
PMF_Faq->getStickyRecordsData() in line 3254:
SELECT
fd.id AS id,
fd.lang AS lang,
fd.thema AS thema,
fcr.category_id AS category_id
FROM
faqdata fd
LEFT JOIN
faqcategoryrelations fcr
ON
fd.id = fcr.record_id
AND
fd.lang = fcr.record_lang
LEFT JOIN
faqdata_group AS fdg
ON
fd.id = fdg.record_id
LEFT JOIN
faqdata_user AS fdu
ON
fd.id = fdu.record_id
WHERE
fd.lang = 'en'
AND
fd.date_start <= '20170306174340'
AND
fd.date_end >= '20170306174340'
AND
fd.active = 'yes'
AND
fd.sticky = 1
AND fdu.user_id = -1

D:\WebSites\LenovoMobilityDashboard\motofaq\inc\PMF\Faq.php:
PMF_Faq->getTopTenData() in line 1814:
SELECT
fd.id AS id,
fd.lang AS lang,
fd.thema AS question,
fd.updated AS updated,
fcr.category_id AS category_id,
fv.visits AS visits,
fv.last_visit AS last_visit,
fdg.group_id AS group_id,
fdu.user_id AS user_id
FROM
faqvisits fv,
faqdata fd
LEFT JOIN
faqcategoryrelations fcr
ON
fd.id = fcr.record_id
AND
fd.lang = fcr.record_lang
LEFT JOIN
faqdata_group AS fdg
ON
fd.id = fdg.record_id
LEFT JOIN
faqdata_user AS fdu
ON
fd.id = fdu.record_id
WHERE
fd.date_start <= '20170306174340'
AND fd.date_end >= '20170306174340'
AND fd.id = fv.id
AND fd.lang = fv.lang
AND fd.active = 'yes'
AND
fd.lang = 'en'
AND fdu.user_id = -1
GROUP BY
fd.id,fd.lang,fcr.category_id,fv.visits,fv.last_visit,fdg.group_id,fdu.user_id
ORDER BY
fv.visits DESC

42000: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Column 'faqdata.thema' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.D:\WebSites\LenovoMobilityDashboard\motofaq\inc\PMF\Faq.php:
PMF_Faq->getLatestData() in line 1854:
SELECT
fd.id AS id,
fd.lang AS lang,
fcr.category_id AS category_id,
fd.thema AS question,
fd.content AS content,
fd.updated AS updated,
fv.visits AS visits,
fdg.group_id AS group_id,
fdu.user_id AS user_id
FROM
faqvisits fv,
faqdata fd
LEFT JOIN
faqcategoryrelations fcr
ON
fd.id = fcr.record_id
AND
fd.lang = fcr.record_lang
LEFT JOIN
faqdata_group AS fdg
ON
fd.id = fdg.record_id
LEFT JOIN
faqdata_user AS fdu
ON
fd.id = fdu.record_id
WHERE
fd.date_start <= '20170306174340'
AND fd.date_end >= '20170306174340'
AND fd.id = fv.id
AND fd.lang = fv.lang
AND fd.active = 'yes'
AND
fd.lang = 'en'
AND fdu.user_id = -1
GROUP BY
fd.id,fd.lang,fcr.category_id,fv.visits,fdg.group_id,fdu.user_id
ORDER BY
fd.updated DESC

42000: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Column 'faqdata.thema' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.D:\WebSites\LenovoMobilityDashboard\motofaq\inc\PMF\Tags.php:
PMF_Tags->getAllTags() in line 490:
SELECT
MIN(t.tagging_id) AS tagging_id, t.tagging_name AS tagging_name
FROM
faqtags t
LEFT JOIN
faqdata_tags dt
ON
dt.tagging_id = t.tagging_id
LEFT JOIN
faqdata d
ON
d.id = dt.record_id
WHERE
1=1
AND d.active = 'yes'

GROUP BY
tagging_name
ORDER BY
tagging_name ASC

D:\WebSites\LenovoMobilityDashboard\motofaq\index.php:
PMF_Faq->showAllRecordsWoPaging() in line 749:
SELECT
fd.id AS id,
fd.lang AS lang,
fd.thema AS thema,
fcr.category_id AS category_id,
fv.visits AS visits
FROM
faqdata fd
LEFT JOIN
faqcategoryrelations fcr
ON
fd.id = fcr.record_id
AND
fd.lang = fcr.record_lang
LEFT JOIN
faqvisits fv
ON
fd.id = fv.id
AND
fv.lang = fd.lang
LEFT JOIN
faqdata_group fdg
ON
fd.id = fdg.record_id
LEFT JOIN
faqdata_user fdu
ON
fd.id = fdu.record_id
WHERE
fd.date_start <= '20170306174340'
AND
fd.date_end >= '20170306174340'
AND
fd.active = 'yes'
AND
fcr.category_id = 0
AND
fd.lang = 'en'
GROUP BY
fd.id,fd.lang,fcr.category_id,fv.visits
ORDER BY
id DESC

42000: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Column 'faqdata.thema' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: phpMyFAQ Errors right on Index Page

Post by Thorsten »

Hi,

this is the error:
42000: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Column 'faqdata.thema' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
I will take a look at it.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply