ezlocale, initPHP, PHP setlocale

Author Message

Plamen Petkov

Monday 16 February 2004 1:48:53 am

Hi,

While testing the ez search engine, I found problems searching cyrillic text case insensitive (and other strange problems like geting search result consisting of ALL nodes in the content tree; but this is another story). Diging out ezsearchengine, ezlocale etc, I can not found any call to ezlocale.php:initPHP(), where is the actual call to PHP function setlocale(). setlocale() must be called with appropriate locale info in order PHP to be able to compare/sort etc.

I put a call to initPHP() in <ezroot>/index.php and now it is OK.

Is this the right aproach or not ?

Here is:
OS: FreeBSD 4-STABLE
Latest EZpublish
Latest PHP 4.X
Apache 1.3.X
MySQL 3.XX

regards,
plamendp

Jan Borsodi

Thursday 04 March 2004 4:51:04 am

The problem with setlocale is that it relies entirely up on the locale handling of PHP which doesn't separate charset from locale settings.
It will probably work on some locales but we can never be sure.

Perhaps we should enable this by default?

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:08:27
Script start
Timing: Jan 18 2025 19:08:27
Module start 'layout'
Timing: Jan 18 2025 19:08:27
Module start 'content'
Timing: Jan 18 2025 19:08:28
Module end 'content'
Timing: Jan 18 2025 19:08:28
Script end

Main resources:

Total runtime0.5921 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.9063152.6250
Module start 'layout' 0.00600.0034 740.531339.4453
Module start 'content' 0.00940.5812 779.9766522.2500
Module end 'content' 0.59060.0015 1,302.22668.1563
Script end 0.5920  1,310.3828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.5866160.0002
Check MTime0.00150.2555160.0001
Mysql Total
Database connection0.00070.124810.0007
Mysqli_queries0.541491.4452540.0100
Looping result0.00050.0840520.0000
Template Total0.561894.920.2809
Template load0.00220.366720.0011
Template processing0.559694.514820.2798
Template load and register function0.00020.036610.0002
states
state_id_array0.00100.162310.0010
state_identifier_array0.00080.131820.0004
Override
Cache load0.00170.2920200.0001
Sytem overhead
Fetch class attribute can translate value0.00070.120820.0004
Fetch class attribute name0.00170.292230.0006
XML
Image XML parsing0.00100.160820.0005
class_abstraction
Instantiating content class attribute0.00000.001430.0000
General
dbfile0.00100.1610170.0001
String conversion0.00000.003640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs