PHP 4.0 Bug #7678 Updated: Unable to establish connection: Can't initialize character set 7
| From: | stas@php.net | Date: | Tue, 07 Nov 2000 14:24:07 +0000 |
| Subject: | PHP 4.0 Bug #7678 Updated: Unable to establish connection: Can't initialize character set 7 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-37349@lists.php.net to get a copy of this message | ||
ID: 7678
Updated by: stas
Reported By: maxkir@email.com
Status: Open
Bug Type: MySQL related
Assigned To:
Comments:
For the record: I had this problem too, it was cured with using installed MySQL library and not that
supplied with PHP (i. e., --with-mysql=/path/to/mysql/dir). Please try it, it might help.
Previous Comments:
---------------------------------------------------------------------------
[2000-11-07 14:15:10] maxkir@email.com
CGI version of PHP4. (Apache module fails too)
./configure
--with-jpeg-dir=/usr/local
--with-gd --with-oracle
--with-mysql
--disable-debug
--enable-magic-quotes=yes
--enable-memory-limit=yes
--enable-url-fopen-wrapper=no
--enable-sysvsem=yes
--enable-sysvshm=yes
--enable-track-vars=yes
--with-system-regex
--enable-safe-mode
--with-gdbm
--with-java=/usr/local/j2sdk1_3_0
--with-zlib
magnat!kir$ mysql --version
mysql Ver 10.12 Distrib 3.23.25-beta, for pc-solaris2.7 (i386)
Mysql configure line:
./configure --without-debug --with-charset=koi8_ru --prefix=/usr/local --with
out-docs --disable-shared
Locale setting:
magnat!kir$ echo $LC_ALL
ru.koi8-r
Script:
magnat!kir$ cat ~/public_html/a.php
<?
$a = mysql_connect("localhost","kir","kir");
$res = mysql("kir_db", "select count(*) from test");
echo mysql_result($res,0);
echo $a;
?>
Run and ERROR:
magnat!kir$ ~/SOFT/bin/php -f ~/public_html/a.php
File 'NONEXISTENT/charsets/?.conf' not found (Errcode: 2)
Character set '#7' is not a compiled character set and is not specified in the '
NONEXISTENT/charsets/Index' file
<br>
<b>Warning</b>: MySQL Connection Failed: Can't initialize character set 7 (path
: default)
in <b>/h/home/kir/public_html/a.php</b> on line <b>2</b><br>
File 'NONEXISTENT/charsets/?.conf' not found (Errcode: 2)
Character set '#7' is not a compiled character set and is not specified in the '
NONEXISTENT/charsets/Index' file
<br>
<b>Warning</b>: MySQL Connection Failed: Can't initialize character set 7 (path
: default)
in <b>/h/home/kir/public_html/a.php</b> on line <b>3</b><br>
<br>
<b>Warning</b>: MySQL: A link to the server could not be established in <b>/h/
home/kir/public_html/a.php</b> on line <b>3</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in <b>/h
/home/kir/public_html/a.php</b> on line <b>4</b><br>
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7678