XH 1.6.6: search function fails

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
kurtm
Posts: 50
Joined: Tue Sep 03, 2013 12:29 am
Location: New Zealand

XH 1.6.6: search function fails

Post by kurtm » Mon Jun 29, 2015 1:59 am

I've just installed Ver 1.6.6. When I execute a search function the response is..

"500 - Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request." ..
etc, etc...

What have I failed to do in the configuration or permissions.
The latest information about file and folder permissions tells me about what they do, not which folders and files to change/set. Also I'm advised that when launcing a new install I will be advised if the folder/file permissions need to be changed. I did not get any notifications on this.
On older versions the install instructions specified exactly which permissions had to be changed.
The problem happens on all the different templates I have tested. My server is Apache.

kurtm
Posts: 50
Joined: Tue Sep 03, 2013 12:29 am
Location: New Zealand

Re: XH 1.6.6: search function fails

Post by kurtm » Mon Jun 29, 2015 5:22 am

Okay - I found the installation reference pertaining to file/folder permissions here..
http://www.cmsimple-xh.org/wiki/doku.php/installation
So that's solved.
However, it doesn't fix the search problem.
Have fun!
Kurt

manu
Posts: 1085
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: XH 1.6.6: search function fails

Post by manu » Mon Jun 29, 2015 6:30 am

Check the "config > info" page if everything is ok, particularly the system check section. If the problem remains, try the debug mode.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 1.6.6: search function fails

Post by cmb » Mon Jun 29, 2015 10:58 am

Indeed, the debug mode should be helpful. I have encountered a problem with the search function a while ago on one server. PHP reported true for the check whether Normalizer::normalize exists, even though calling the method raised a fatal error. Maybe it's the same issue here.
Christoph M. Becker – Plugins for CMSimple_XH

kurtm
Posts: 50
Joined: Tue Sep 03, 2013 12:29 am
Location: New Zealand

Re: XH 1.6.6: search function fails

Post by kurtm » Tue Jun 30, 2015 12:04 am

I ran the 'System Info' process with the following response..

Code: Select all

System Info

Installed CMSimple Version

    CMSimple_XH 1.6.6  Released: 2015-03-15

Installed Plugins

    Filebrowser for CMSimple_XH 1.6.6
    Flexslider 0.4.7
    Hi_updatecheck 1.3
    Jquery 1.6
    Meta_tags for CMSimple_XH 1.6.6
    Pagemanager 2.0.5
    Page_params for CMSimple_XH 1.6.6
    Tinymce for CMSimple_XH 1.6.6
    Utf8 0.5.5
    Zgallery

Webserver

    Apache

PHP-Version

    5.3.28
    PHP Info »   (opens in a new window or tab)

Info and Help Links

    cmsimple-xh.org »
    cmsimple-xh.org/wiki/ »
    cmsimpleforum.com »
    cmsimplewiki.com »

System check

    OK PHP version = 4.3.10
    OK Extension 'pcre' loaded
    OK Extension 'session' loaded
    OK Extension 'xml' loaded
    OK './cmsimple/config.php' writable
    OK './cmsimple/languages/en.php' writable
    OK './cmsimple/log.txt' writable
    OK './content/' writable
    OK './content/content.htm' writable
    OK './core/css/' writable
    OK './templates/basic1/stylesheet.css' writable
    OK './templates/basic1/template.htm' writable
    OK './userfiles/' writable
    OK './userfiles/downloads/' writable
    OK './userfiles/images/' writable
    OK './userfiles/media/' writable
    OK './cmsimple/config.php' access protected
    OK './content/content.htm' access protected
    OK './templates/basic1/template.htm' access protected
    OK Default locale in use
    OK Time zone valid
    OK Magic quotes runtime off
    OK safe_mode off
    OK session.use_trans_sid off
    OK session.use_only_cookies on
    OK Without BOM 
No apparent issues found here.
Okay - I'll try the debug more and see what pops up. While I am able to make changes to the PHP code I prefer to keep away from that in case my changes introduce different bugs. I'm a believer that the programmer has the best understanding of the code functions.

Regarding information about setting file/folder permissions, it's starting to get a bit confusing now that the paths have changed for different versions. I'd suggest listing the settings separately for each the different major releases.
Thanks again for your assistance.
KurtM

kurtm
Posts: 50
Joined: Tue Sep 03, 2013 12:29 am
Location: New Zealand

Re: XH 1.6.6: search function fails

Post by kurtm » Tue Jun 30, 2015 12:25 am

Continuing saga....

Okay - I enabled 'Debug-Mode' as suggested and navigated pages in 'View Mode' and initiated another 'search'. No error messages and the search still failed with a 500 page error.

My install is 'out of the box' clean 1.6.6 as downloaded with no code changes or tampering. Template 'Mini1' default.
I have two separate sites, different URLs same host server, and both have the same problem.

Have fun!
KurtM

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 1.6.6: search function fails

Post by cmb » Tue Jun 30, 2015 10:24 am

kurtm wrote:Okay - I enabled 'Debug-Mode' as suggested and navigated pages in 'View Mode' and initiated another 'search'. No error messages and the search still failed with a 500 page error.
It's always hard to solve such problems without debug info. I suggest you try to remove the lines that use the Normalizer. That is in cmsimple/classes/Search.php line 96-98 and line 160-162.

If that doesn't help have a look at the PHP-Info (available from the System Info). Is the Suhosin extension installed?
Christoph M. Becker – Plugins for CMSimple_XH

kurtm
Posts: 50
Joined: Tue Sep 03, 2013 12:29 am
Location: New Zealand

Re: XH 1.6.6: search function fails

Post by kurtm » Wed Jul 01, 2015 1:53 am

Thanks cmb,

I'll follow your suggestion re Normalizer.

In the mean time, I've also installed ver 1.6.6 on a different host and 'search' works perfectly.

I have lodged a service request with my hosting provider and pointed to failing sites on my host and working sites on other hosts. Let's see if there is a problem with the PHP services.

I have a site on the same host using CMSimple XH 1.5.9 and the search works fine. Ie., 1.5.9 works and 1.6.6 fails. Same host. So now I'll downgrade the failing site to an older version and see if that fixes the problem.

Code: Select all

System Info

Installed CMSimple Version

    CMSimple_XH 1.5.9  Released: 2013-09-10

Installed Plugins

    Meta_tags
    Jquery
    Filebrowser
    Page_params
    Pagemanager
    Tinymce
    Utf8

PHP-Version

    5.3.28
    PHP Info »   (opens in a new window or tab)

Info and Help Links

    cmsimple-xh.org »
    cmsimple.org »
    cmsimpleforum.com »
    cmsimplewiki.com »

System check

    OkPHP version = 4.3
    OkExtension 'date' loaded
    OkExtension 'pcre' loaded
    OkExtension 'session' loaded
    OkExtension 'xml' loaded
    Ok'./cmsimple/config.php' writable
    Ok'./cmsimple/languages/en.php' writable
    Ok'./cmsimple/languages/enconfig.php' writable
    Ok'./cmsimple/log.txt' writable
    Ok'./content/' writable
    Ok'./content/content.htm' writable
    Ok'./content/pagedata.php' writable
    Ok'./downloads/' writable
    Ok'./images/' writable
    Ok'./templates/infoleft/stylesheet.css' writable
    Ok'./templates/infoleft/template.htm' writable
    Ok'./userfiles/' writable
    OkEncoding 'UTF-8' configured
    OkMagic quotes runtime off
So it is a process of elimination to see where the fault resides.

Now to rework the 'Search.php' code.

More to follow....

KurtM

kurtm
Posts: 50
Joined: Tue Sep 03, 2013 12:29 am
Location: New Zealand

Re: XH 1.6.6: search function fails

Post by kurtm » Wed Jul 01, 2015 2:08 am

Okay cmb - you put your finger on the problem.

Search works!

I commented out the 6 lines you referred to and the problem was fixed.

If you can advise me what would have caused the problem I'll advise my hosting service provider techies so they can check their PHP install. I'm not skilled in PHP programming so wouldn't have a clue where to look.

Now that version 1.6.7 is released I'll install that with the search.php fix.

Thanks again,
KurtM

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 1.6.6: search function fails

Post by cmb » Wed Jul 01, 2015 10:16 am

kurtm wrote:I commented out the 6 lines you referred to and the problem was fixed.
Great!
kurtm wrote:If you can advise me what would have caused the problem I'll advise my hosting service provider techies so they can check their PHP install.
I'm afraid there is not much that can be done. It seems to me that is a bug in some PHP versions (which one do you use?), and we may have to offer some workaround. Please replace both following lines in Search.php

Code: Select all

if (method_exists('Normalizer', 'normalize')) { 
with

Code: Select all

if (class_exists('Normalizer')) { 

If that works, it may be a general solution for CMSimple_XH 1.6.8.
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply