displaying notices in top of page
Posted by: clarkster26 (208.87.228.---)
Date: March 24, 2022 03:46AM

I was having a problem with the page displaying info and errors from both MySQL and PHP. It displays a few things at the bottom of the page too.. I cannot figure out what setting turns this off. So I do not see this on the page? Here is my info



Server
Apache Configuration Version:
2.2.11
PHP Version:
5.3.0
Loaded Extensions:
Core bcmath calendar com_dotnet
ctype
date
ereg
filter
ftp
hash
iconv
json
mcrypt
mysqlnd
odbc
pcre
Reflection
session
SPL
standardtokenizer
zip
zliblib
xmldom
PDO
Phar
SimpleXML
wddx
xml
xmlreader
xmlwriter
apache2handler
curl
file
info
gdmb
string
mysql
mysqli
sqlite
Version.3.5h
MySQL



Here is the data it includes on the top of the page with lines between them. Sorry I am a noob and searched everywhere I could to locate what it causing this.




SELECT s.setting_key, s.input_id, IFNULL(sv.setting_value, s.default_value) AS value FROM s_setting s LEFT JOIN s_setting_to_value sv ON s.id = sv.setting_id WHERE 1 AND s.active = 1 AND s .module_id = 100
(mysql): 

SELECT id, parent_id, name, sort_order, private FROM s_kb_category c WHERE c.active = 1 ORDER BY name

SELECT c.* FROM s_kb_category c WHERE 1 AND c.parent_id = '0 ' AND c.active = 1 AND c.private = 0 AND 1 ORDER BY name
(mysql): SELECT COUNT(*) AS num FROM s_kb_glossary g

SELECT e.*, SUBSTRING_INDEhot smileye.body,' ',70) AS body, cat.id AS category_id, cat.name AS category_name, cat.active AS category_active, cat.private AS category_private, cat.commentable, cat.ratingable, r.votes AS votes, (r.rate/r.votes) AS rating, #IFNULL(SUM(c.active), 0) AS comment_num, IF(SUM(c.active) IS NULL, 0, FORMAT(SUM(c.active)/COUNT (DISTINCT cat.id), 0)) AS comment_num, UNIX_TIMESTAMP(e.date_updated) AS ts_updated, UNIX_TIMESTAMP(e.date_posted) AS ts_posted FROM (s_kb_entry e, s_kb_category cat, s_kb_entry_to_category e_to_cat) LEFT JOIN s_kb_comment c ON e.id = c.entry_id LEFT JOIN s_kb_rating r ON e.id = r.entry_id LEFT JOIN s_data_to_user_value du ON e.id = du.data_value AND du.rule_id = '12' WHERE 1 AND e.id = e_to_cat.entry_id AND cat.id = e_to_cat.category_id AND e.active = 1 AND cat.active = 1 AND IF(du.user_value, du.user_value = '',1) AND 1 AND cat.private = 0 AND e.private = 0 AND 1 AND e_to_cat.is_main = 1 GROUP BY e.id ORDER BY hits DESC LIMIT 0.15

Notice: Only variable references should be returned by reference in C:\wamp\www\kb\client\inc\KBClientModel.php on line 616



SELECT e.*, SUBSTRING_INDEhot smileye.body,' ',70) AS body, cat.id AS category_id, 
           cat.name AS category_name, cat.active AS category_active, 
           cat.private AS category_private, cat.commentable, cat.ratingable, 
           r.votes AS votes, (r.rate/r.votes) AS rating, 
           #IFNULL(SUM(c.active), 0) AS comment_num, 
           IF(SUM(c.active) IS NULL, 0, FORMAT(SUM(c.active)/COUNT (DISTINCT cat.id), 0)) AS comment_num, 
           UNIX_TIMESTAMP(e.date_updated) AS ts_updated, 
           UNIX_TIMESTAMP(e.date_posted) AS ts_posted 
FROM (s_kb_entry e, s_kb_category cat, s_kb_entry_to_category e_to_cat) 
LEFT JOIN s_kb_comment c ON e.id = c.entry_id 
LEFT JOIN s_kb_rating r ON e.id = r.entry_id 
LEFT JOIN s_data_to_user_value du ON e.id = du.data_value 
    AND du.rule_id = '12' 
WHERE 1 
AND e.id = e_to_cat.entry_id 
AND cat.id = e_to_cat.category_id 
AND e.active = 1 
AND cat.active = 1 
AND IF(du.user_value, du.user_value = '',1) 
AND 1 
AND cat.private = 0 
AND e.private = 0 
AND 1 
AND e_to_cat.is_main = 1 
AND e_to_cat.is_main = 1 
GROUP BY e.id 
ORDER BY date_posted DESC 
LIMIT 0.15

Notice: Only variable references should be returned by reference in C:\wamp\www\kb\client\inc\KBClientModel.php on line 616


Any help or direction where I can find this would be great. Thanks



Edited 2 time(s). Last edit at 03/24/2022 12:09PM by RiggsFolly.

Re: displaying notices in top of page
Posted by: Otomatic (Moderator)
Date: March 24, 2022 11:25AM

Hi,

Only variable references should be returned by reference in C:\wamp\www\kb\client\inc\KBClientModel.php on line 616

This warning is very clear. There is an error of variable passage in the line616 of the script KBClientModel.php and it has strictly nothing to do with Wampserver


Apache 2.2.11, it's an antique to put in the museum.

------------------------------------------------------------------------------------------------------------
Wampserver 3.3.0 32 bit - Apache 2.4.54.2 - PHP 8.2.0…5.6.40 - MySQL 5.7.39 - MariaDB 10.5.13/10.6.5
Wampserver 3.3.0 64 bit - Apache 2.4.54.2 - PHP 8.2.0…5.6.40 - MySQL 5.7.39/8.0.30 - MariaDB 10.5.17/10.9.2
PhPMyadmin 5.2.0 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Re: displaying notices in top of page
Posted by: clarkster26 (208.87.228.---)
Date: March 28, 2022 08:42PM

I understand what the error says but how do I get these errors to stop displaying in the browser?
I took a screenshot and here is a link to it. I need to know how to stop displaying what is in yellow please.

[www.picallow.com]

Re: displaying notices in top of page
Posted by: RiggsFolly (Moderator)
Date: March 29, 2022 01:27AM

The normal answer would be to write the PHP code correctly, but in this case I suspect that you are using a version of PHP that is not compatable with the site code you have downloaded.

I assume this is not code you have written yourself.
I suggest you check the requirements for this site, I would guess you are going to have to reduce the version of PHP you are using.

BUT....
Lets start from where we should have started in the beginning of this thread....
Please answer all the questions in READ (and answer) BEFORE YOU ASK A QUESTION

Then can you let us know what code you are running (what you downloaded)

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.2.8 32bit & 64bit) Aestan Tray Menu 3.2.4.7
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Sorry, only registered users may post in this forum.