Strict Standards
Strict Standards
Hi Fred,
MX Search worked very fine on 5.3. From now to than it doesn't work anymore and I got the following error:
Strict Standards: Only variables should be passed by reference in /is/htdocs/.../includes/MXSearch/KT_MXSearchConfig.class.php on line 122
-> PHP 5.3.16
Any idea?
Best wishes
Daniel
MX Search worked very fine on 5.3. From now to than it doesn't work anymore and I got the following error:
Strict Standards: Only variables should be passed by reference in /is/htdocs/.../includes/MXSearch/KT_MXSearchConfig.class.php on line 122
-> PHP 5.3.16
Any idea?
Best wishes
Daniel
Re: Strict Standards
Check your mod_sec rules and see if the search page triggers it somewhere.
I have php 5.3.16 on my servers and it works fine.
If there is a mod_sec report for the page calling the search script make sure to tell your host not to whitelist the domain for the rule, only whitelist the script.
I have php 5.3.16 on my servers and it works fine.
If there is a mod_sec report for the page calling the search script make sure to tell your host not to whitelist the domain for the rule, only whitelist the script.
Re: Strict Standards
Hi Fred,
I don't really know what I should do, but I disabled all PHP warning with .htaccess and now it works again. Thanks.
Best wishes
Daniel
I don't really know what I should do, but I disabled all PHP warning with .htaccess and now it works again. Thanks.
Best wishes
Daniel
Re: Strict Standards
Hi Daniel,
Ask your host to check the error logs and see if they can shed some more light on this.
You can also check in the folder from where the script is run, you might find an error log in there that can give you more info.
Ask your host to check the error logs and see if they can shed some more light on this.
You can also check in the folder from where the script is run, you might find an error log in there that can give you more info.
Re: Strict Standards
ok got it I don't have strict error reporting so I missed that one.
In php 5.xx you are not allowed to change the return value of a function.
Basically you can't say foo() returned 'ABC' but I want to make it return 'XYZ'
However if you say $protocol = foo() you can do whatever you want with $protocol.
Change KT_MXSearchConfig.class.php line 122 as follows
Original Line 122
Changed Line 122
In php 5.xx you are not allowed to change the return value of a function.
Basically you can't say foo() returned 'ABC' but I want to make it return 'XYZ'
However if you say $protocol = foo() you can do whatever you want with $protocol.
Change KT_MXSearchConfig.class.php line 122 as follows
Original Line 122
Code: Select all
$protocol = strtolower(array_shift(explode('/', $_SERVER['SERVER_PROTOCOL'])));
Code: Select all
$protocol = explode('/', $_SERVER['SERVER_PROTOCOL']);
$protocol = strtolower(array_shift($protocol));
Re: Strict Standards
Great Daniel,
Do us a favour and set your error reporting back to what it was and report any other errors you might come across.
For those that want to patch, you can download the updated MX Search file here.
http://www.interaktonline.info/files/56 ... earch.html
Do us a favour and set your error reporting back to what it was and report any other errors you might come across.
For those that want to patch, you can download the updated MX Search file here.
http://www.interaktonline.info/files/56 ... earch.html
Re: Strict Standards
Daniel,
You might want to change the into while you at it.
That is the generated code in your actual search page.
You might want to change the
Code: Select all
$HTTP_GET_VARS['XX']
Code: Select all
$_GET['XX']
That is the generated code in your actual search page.
Re: Strict Standards
Hi Fred,
yes I did tha too and works fine. There were two statements in my page.
Daniel
yes I did tha too and works fine. There were two statements in my page.
Daniel