Error in advanced search page.
[Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here. And, remove this comment before actually posting!]
zen 1.5.5f - php 7.1
this appears to happen in the advanced search? if i go directly to the advanced search page - nothing come up - https://swordsofhonor.com/index.php?...dvanced_search
[08-Dec-2018 00:31:24 UTC] Request URI: /index.php?main_page=advanced_search&search_in_description=1&keyword=dental%20pla ster&inc_subcat=0&sort=20a, IP address: 99.230.146.113
#1 require() called at [/home/honor/public_html/includes/modules/pages/advanced_search/header_php.php:13]
#2 require(/home/honor/public_html/includes/modules/pages/advanced_search/header_php.php) called at [/home/honor/public_html/index.php:36]
[08-Dec-2018 00:31:24 UTC] PHP Warning: require(includes/classes/recaptchalib.php): failed to open stream: No such file or directory in /home/honor/public_html/includes/modules/pages/advanced_search/header_php.php on line 13
[08-Dec-2018 00:31:24 UTC] Request URI: /index.php?main_page=advanced_search&search_in_description=1&keyword=dental%20pla ster&inc_subcat=0&sort=20a, IP address: 99.230.146.113
#1 require() called at [/home/honor/public_html/includes/modules/pages/advanced_search/header_php.php:13]
#2 require(/home/honor/public_html/includes/modules/pages/advanced_search/header_php.php) called at [/home/honor/public_html/index.php:36]
[08-Dec-2018 00:31:24 UTC] PHP Warning: require(includes/classes/recaptchalib.php): failed to open stream: No such file or directory in /home/honor/public_html/includes/modules/pages/advanced_search/header_php.php on line 13
[08-Dec-2018 00:31:24 UTC] PHP Fatal error: require(): Failed opening required 'includes/classes/recaptchalib.php' (include_path='.:/opt/cpanel/ea-php71/root/usr/share/pear') in /home/honor/public_html/includes/modules/pages/advanced_search/header_php.php on line 13
Re: Error in advanced search page.
Your advanced search page is assuming that ReCAPTCHA was installed, and it apparently wasn't. Restore from a fresh download the file
includes/modules/pages/advanced_search/header_php.php
Re: Error in advanced search page.
Quote:
Originally Posted by
swguy
Your advanced search page is assuming that ReCAPTCHA was installed, and it apparently wasn't. Restore from a fresh download the file
includes/modules/pages/advanced_search/header_php.php
tried and it got rid of the recaptcha error but still this error:
[08-Dec-2018 05:38:50 UTC] Request URI: /index.php?main_page=advanced_search_result&keyword=merlin&search_in_description= 1&categories_id=&inc_subcat=1&manufacturers_id=&pfrom=&pto=&dfrom=&dto=&x=36&y=1 8, IP address: 160.3.207.42
#1 require(/home/honor/public_html/includes/modules/pages/advanced_search_result/header_php.php) called at [/home/honor/public_html/index.php:36]
[08-Dec-2018 05:38:50 UTC] PHP Warning: A non-numeric value encountered in /home/honor/public_html/includes/modules/pages/advanced_search_result/header_php.php on line 396
[08-Dec-2018 05:38:50 UTC] Request URI: /index.php?main_page=advanced_search_result&keyword=merlin&search_in_description= 1&categories_id=&inc_subcat=1&manufacturers_id=&pfrom=&pto=&dfrom=&dto=&x=36&y=1 8, IP address: 160.3.207.42
#1 require(/home/honor/public_html/includes/modules/pages/advanced_search_result/header_php.php) called at [/home/honor/public_html/index.php:36]
[08-Dec-2018 05:38:50 UTC] PHP Warning: A non-numeric value encountered in /home/honor/public_html/includes/modules/pages/advanced_search_result/header_php.php on line 397
Re: Error in advanced search page.
The error
A non-numeric value encountered in /home/honor/public_html/includes/modules/pages/advanced_search_result/header_php.php on line 397
is not consistent with a pristine copy of this file - that line should be blank. Please double check.
2 Attachment(s)
Re: Error in advanced search page.
Quote:
Originally Posted by
swguy
The error
A non-numeric value encountered in /home/honor/public_html/includes/modules/pages/advanced_search_result/header_php.php on line 397
is not consistent with a pristine copy of this file - that line should be blank. Please double check.
here is the coding around line 397 - Attachment 18165
1 Attachment(s)
Re: Error in advanced search page.
woops, wrong coding - there is the correct coding
Attachment 18164
Re: Error in advanced search page.
do not post code in images. it is far easier for anyone to read it if you copy and paste it embedded within BB code tags. see link just above footer on this page for info on BB code.
add:
(int)
just before the $_GET on lines 396 and 397
best.
Re: Error in advanced search page.
Quote:
Originally Posted by
carlwhat
do not post code in images. it is far easier for anyone to read it if you copy and paste it embedded within BB code tags. see link just above footer on this page for info on BB code.
add:
(int)
just before the $_GET on lines 396 and 397
best.
Why an integer rather than a floating point number or a determination of if it is set or not to then determine a value against which to calculate? Won't forcing either the provided value or the calculated value to an integer cause a sort of "rounding" issue? 24.99 set to an integer would result in 24, 24.99/10 set to an integer would result in 2 instead of 2.50 or 2.499...
Re: Error in advanced search page.
Quote:
Originally Posted by
mc12345678
Why an integer rather than a floating point number or a determination of if it is set or not to then determine a value against which to calculate? Won't forcing either the provided value or the calculated value to an integer cause a sort of "rounding" issue? 24.99 set to an integer would result in 24, 24.99/10 set to an integer would result in 2 instead of 2.50 or 2.499...
true.
you can use float.
Re: Error in advanced search page.
Quote:
Originally Posted by
mc12345678
Why an integer rather than a floating point number or a determination of if it is set or not to then determine a value against which to calculate? Won't forcing either the provided value or the calculated value to an integer cause a sort of "rounding" issue? 24.99 set to an integer would result in 24, 24.99/10 set to an integer would result in 2 instead of 2.50 or 2.499...
would i use (float) instead of (int)