[PHP-DB] [Correction] Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding

2007-07-24 Thread Neil Smith [MVP, Digital media]
The solution is pretty simple once you hit it, and works in both MySQL and PGSQL because it's standard SQL-92 : $query="SET NAMES 'UTF-8'"; Sorry - I meant $query="SET NAMES 'UTF8'"; As you pointed out, it's UTF8 not UTF-8 ;-) Cheers - Neil -- PHP Database Mailing List (http://www.php.net

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding

2007-07-23 Thread Neil Smith [MVP, Digital media]
At 01:18 23/07/2007, you wrote: Message-ID: <[EMAIL PROTECTED]> From: aldnin <[EMAIL PROTECTED]> Subject: Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding > This indicates that PHP not using UTF-8. That output is typical of > UTF-8 output as Latin characters

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread aldnin
>output_handler=mb_output_handler This helped me to fix any output to the browser properly, so I don't need to do any utf8_decode() any more, thanks. > Setting it to "7" won't let me even echo something else. Right, it's strange, but true... :-( > mbstring.detect_order = UTF-8,eucjp-win,sj

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread aldnin
thx a lot - what you're writing is really necessary to handle this problems in the future. The reason why I was looking for a faster solution is when you have to handle huge data which is utf8, and sometimes not utf8... etc you understand what I mean? ;-) Bruno Lustosa wrote: > On 7/21/07

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread Bruno Lustosa
On 7/21/07, aldnin <[EMAIL PROTECTED]> wrote: When I try to send this query (select 'lacarrière' as test;) to a UTF8 initialized pgsql-database (8.2.4) from PHP 5.2.3 I get this error: ERROR: invalid byte sequence for encoding "UTF8": 0xe87265 Short answer: start using utf-8 for just everyth

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread Niel
Hi You still haven't answered whether you're using any output handler, and if so which one. I use output_handler=mb_output_handler > I overloaded the mbstring variables with: > mbstring.func_overload = 6 > Setting it to "7" won't let me even echo something else. Very strange, the only addit

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread aldnin
> You did not answer the most important question. What, if any, output > buffering are you using? Are you using the mbstring module? If so, is > it set to overload the old string functions? Well, i checked for Multi Byte String functions, and it was enabled and configured before compiling with

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread Niel
Hi > > Well, I searched all the source code of phpPgAdmin for charsets and I found: > > "echo "\t charset={$data->codemap[$dbEncoding]}\" />\r\n";" > > So this means, phpPgAdmin sets the output charset to the charset which > is used by the databased connected to - but that's still not the > pro

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread aldnin
> Please configure your email client so we don't receive 5 copies of your > mail. Just fixed that issue, don't be afraid of that in the future. > This indicates that PHP not using UTF-8. That output is typical of > UTF-8 output as Latin characters. Well, maybe the output is not correct - when r

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread Niel
Hi Please configure your email client so we don't receive 5 copies of your mail. > I already did this and all encoding settings are right, but I figured out > something more. > > 1) Using pg_query for fetching UTF8 data from database is working properly. > Of course when I try to output it dir

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread aldnin
> My guess is that your PHP is not setup to handle UTF8, and is really > sending something else. UTF8 is the default client encoding because that > is the encoding of the database. It does not mean that PHP has set the > right one. Before running your test, try executing this: "SET > client_encodin

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread aldnin
> My guess is that your PHP is not setup to handle UTF8, and is really > sending something else. UTF8 is the default client encoding because that > is the encoding of the database. It does not mean that PHP has set the > right one. Before running your test, try executing this: "SET > client_encodin

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread aldnin
> My guess is that your PHP is not setup to handle UTF8, and is really > sending something else. UTF8 is the default client encoding because that > is the encoding of the database. It does not mean that PHP has set the > right one. Before running your test, try executing this: "SET > client_encodin

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread aldnin
> My guess is that your PHP is not setup to handle UTF8, and is really > sending something else. UTF8 is the default client encoding because that > is the encoding of the database. It does not mean that PHP has set the > right one. Before running your test, try executing this: "SET > client_encodin

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread aldnin
> My guess is that your PHP is not setup to handle UTF8, and is really > sending something else. UTF8 is the default client encoding because that > is the encoding of the database. It does not mean that PHP has set the > right one. Before running your test, try executing this: "SET > client_encodin

Re: [PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread John DeSoi
On Jul 21, 2007, at 7:53 AM, aldnin wrote: When I try to send this query (select 'lacarrière' as test;) to a UTF8 initialized pgsql-database (8.2.4) from PHP 5.2.3 I get this error: ERROR: invalid byte sequence for encoding "UTF8": 0xe87265 I use pg_query for the query delivery. Client

[PHP-DB] PHP + PostgreSQL: invalid byte sequence for encoding "UTF8"

2007-07-21 Thread aldnin
When I try to send this query (select 'lacarrière' as test;) to a UTF8 initialized pgsql-database (8.2.4) from PHP 5.2.3 I get this error: ERROR: invalid byte sequence for encoding "UTF8": 0xe87265 I use pg_query for the query delivery. Client Encoding is set to: client_encoding -

[PHP-DB] PHP PostgreSQL UTF-8 issue

2005-08-03 Thread Martin Edlman
Hello, I have problem with Unicode (UTF-8) data read from PostgreSQL 8.0, processed in PHP 4.3.5 and inserted back to DB. Situation: database with unicode (utf-8) encoding table customer name varchar(30), surname varchar(50) table invoice_tmp name varchar(70), surname varchar(70) Ther

[PHP-DB] PHP Postgresql Problem

2003-12-28 Thread Samir Kuthiala
Hi I seem to be having a problem with my PHP-Postgresql application. The program runs fine. However if the user closes the browser window while its loading it causes my postgresql to increase CPU usage to about 70%-80% and decreases the speed of the subsequent requests. Also the CPU usage remai

[PHP-DB] PHP + PostgreSQL

2002-05-22 Thread Luiz Gadelha Jr.
Hi, I am trying to configure a webserver running iplanet and php to connect to a postgresql server. My setup is the following: Web server: Solaris 2.6, iplanet 4.1, PHP 4.1 DB server: Linux 2.2.20 (debian woody), PostgreSQL 7.2.1. I have built PHP under Solaris with the configuration: ./config

[PHP-DB] PHP + Postgresql + Linux = Frustration

2002-01-26 Thread Mike DiChiappari
Hello, I am rather new to Linux but an old timer at software development. I am investigating alternate platforms for future development for my company. Linux is at the top of the list. I am trying to get a server setup with a db (PostgreSQL), web server (Apache), and some sort of web scripting

[PHP-DB] [PHP-PostgreSQL] table & field name case senstive problem

2001-11-13 Thread Vincent Ma
Hi everyone: I found the problem when retrieve data from table or field which are mix-case. I means table or field name like "accommdationType". contain lower and upper case character. For example: Query "select compID from table" after pg_exec() --> "select compid from table" Thus, I got

Re: [PHP-DB] PHP+Postgresql/Win32-correction

2001-08-30 Thread Jancs
Hi there! I am trying to use such combination of software: Apache 1.3.20/PHP4.06/Postgres 7.1.3/Win2K. I met a serious problem - some postgres database admin script (php) says "Unable to connect to server using user=user, password=password, etc". May be php script tries to autheticate the us

RE: [PHP-DB] PHP+Postgresql/Win32

2001-08-30 Thread Beau Lebens
: Jancs [mailto:[EMAIL PROTECTED]] // Sent: Friday, 31 August 2001 5:47 AM // To: [EMAIL PROTECTED] // Subject: [PHP-DB] PHP+Postgresql/Win32 // // // Hi there! // I am trying to use such combination of software: Apache // 1.3.20/PHP4.06/Postgres 7.1.3/Win2K. I met a serious problem - some

[PHP-DB] PHP+Postgresql/Win32

2001-08-30 Thread Jancs
Hi there! I am trying to use such combination of software: Apache 1.3.20/PHP4.06/Postgres 7.1.3/Win2K. I met a serious problem - some postgres database admin script (php) says "Unable to connect to server". I think i did everything i could - apache is running without problems, php is configu

RE: [PHP-DB] PHP+ postgresql help?

2001-08-20 Thread Jason
our actual query statement is correct though, the one below is not. > -Original Message- > From: Smileyq [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 20, 2001 7:53 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] PHP+ postgresql help? > > > Hey I'm new t

Re: [PHP-DB] PHP+ postgresql help?

2001-08-20 Thread speedboy
> print_r? Am I about to learn something new? Be still, my beating heart! print_r will print the array $row which is one of the rows returned by running your query. You can then see all the values in the array. Just run it, you will see what it does. Or alternatively echo just one field from

Re: [PHP-DB] PHP+ postgresql help?

2001-08-20 Thread Ted Rolle
print_r? Am I about to learn something new? Be still, my beating heart! On Tue, 21 Aug 2001, speedboy wrote: > > $conn = pg_connect ("host=localhost user=username password=password > > bname=dbname"); > > > > $sql = "SELECT * FROM database where lower('$name%') order by last;"; > > > $result =

Re: [PHP-DB] PHP+ postgresql help?

2001-08-20 Thread speedboy
> $conn = pg_connect ("host=localhost user=username password=password > bname=dbname"); > > $sql = "SELECT * FROM database where lower('$name%') order by last;"; > $result = pg_exec($conn, $sql); for ($i = 0; $i < pg_numrows($result); $i++) { $row = pg_fetch_array($result, $i);

[PHP-DB] PHP+ postgresql help?

2001-08-20 Thread Smileyq
Hey I'm new to php and using databases. I've setup a postgres server and have already populated the database. I'm able to connect the the server just fine with php my problem is showing the results. Can somebody show me a easy to understand example. For example. I've got a address book databas