# search string problem with special characters in php 4.4.7

- Thread: https://externals.io/message/42863
- Original archive: https://news-web.php.net/php.internals/42863
- Started by Bipul Agarwal on 2009-01-28T14:30:49+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #42863 — Bipul Agarwal — 2009-01-28T14:30:49+00:00

URL: https://externals.io/message/42863#42863

Hi all,

I have a search string which works just fine with php 4.4.9 and my local
host but some how its not working with php version 4.4.7.

Search is for a Swedish name with special characters like - åre - I am able
to display these characters properly on the browser. the only problem is
with searching keywords with special characters like above from the
database.

In php version 4.4.9 if we search for - åre - we get around 26 records which
is correct. but when we search the same in php version 4.4.7 (with same
coding and same database) it retracts over 11,000 records - which is not
correct. Database version for both servers is - MySQL client version:
5.0.51a


I have a deadline tomorrow and wonder if you could please help me out? the
problem could be because of php versions or it has to be in my codes?

Thanks in advance,
Bipul

---

## #42864 — Kalle Sommer Nielsen — 2009-01-28T14:38:29+00:00

URL: https://externals.io/message/42863#42864 · In reply to: #42863

Hello

2009/1/28 Bipul Agarwal <bipul@aphroecs.com>:
> Hi all,
>
> I have a search string which works just fine with php 4.4.9 and my local
> host but some how its not working with php version 4.4.7.

Upgrade to PHP5 first, PHP4 is not supported anymore

<snip>

> Thanks in advance,
> Bipul
>
>
> --
> 
> 
>
>



-- 
Kalle Sommer Nielsen

---

## #42865 — torokalpar@gmail.com — 2009-01-28T14:52:54+00:00

URL: https://externals.io/message/42863#42865 · In reply to: #42863

2009/1/28 Bipul Agarwal <bipul@aphroecs.com>

> Hi all,
>
> I have a search string which works just fine with php 4.4.9 and my local
> host but some how its not working with php version 4.4.7.
>
> Search is for a Swedish name with special characters like - åre - I am able
> to display these characters properly on the browser. the only problem is
> with searching keywords with special characters like above from the
> database.
>
> In php version 4.4.9 if we search for - åre - we get around 26 records
> which
> is correct. but when we search the same in php version 4.4.7 (with same
> coding and same database) it retracts over 11,000 records - which is not
> correct. Database version for both servers is - MySQL client version:
> 5.0.51a
>
>
> I have a deadline tomorrow and wonder if you could please help me out? the
> problem could be because of php versions or it has to be in my codes?
>
> Thanks in advance,
> Bipul
>
I think your problem is  Db related. Try cross testing the databases with
the different PHP versions, to make sure where the problem is.

>
>
> --
> 
> 
>
>


-- 
Alpar Torok

---

## #42866 — George Antoniadis — 2009-01-28T15:11:56+00:00

URL: https://externals.io/message/42863#42866 · In reply to: #42865

> 2009/1/28 Bipul Agarwal <bipul@aphroecs.com>
>
> > […]
> able
> > […]
> the
> > […]
> I think your problem is  Db related. Try cross testing the databases with
> the different PHP versions, to make sure where the problem is.
>
> > […]
>
>
> --
> Alpar Torok
>

Most likely there is something different on your mysql server configurations
and most probably that something is charset and/or collation related...
Check what "set names" can do for you.

G.
