PHP 4.0 Bug #7678 Updated: Unable to establish connection: Can't initialize character set 7

From: Date: Tue, 07 Nov 2000 17:26:26 +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-37372@lists.php.net to get a copy of this message
ID: 7678 Updated by: rasmus Reported By: maxkir@email.com Status: Open Bug Type: MySQL related Assigned To: Comments: Try a 'make clean' and recompile with your new --with-mysql=/usr/local switch. Previous Comments: --------------------------------------------------------------------------- [2000-11-07 16:14:01] maxkir@email.com I tried to use original mysql library and rebuild. IMHO, something wrong with configure process. I get: make[1]: Entering directory `/h/home/kir/SRC/php4' /bin/sh /h/home/kir/SRC/php4/libtool --silent --mode=link gcc -I. -I/h/home/kir /SRC/php4/ -I/h/home/kir/SRC/php4 -I/h/home/kir/SRC/php4/main -I/h/home/kir/SRC/ php4/Zend -I/h/home/kir/SRC/php4 -I/usr/local/include -I/usr/local/include/freet ype -I/usr/local/include/mysql -I/u/oracle7/rdbms/public -I/u/oracle7/rdbms/demo -I/u/oracle7/network/public -I/h/home/kir/SRC/php4/ext/xml/expat/xmltok -I/h/ho me/kir/SRC/php4/ext/xml/expat/xmlparse -I/h/home/kir/SRC/php4/TSRM -D_POSIX_PTH READ_SEMANTICS -DXML_BYTE_ORDER=12 -g -O2 -o php -export-dynamic stub.lo libphp4.la Undefined first referenced symbol in file mysql_num_fields .libs/libphp4.a(php_mysql.o) mysql_num_rows .libs/libphp4.a(php_mysql.o) mysql_insert_id .libs/libphp4.a(php_mysql.o) mysql_field_count .libs/libphp4.a(php_mysql.o) mysql_errno .libs/libphp4.a(php_mysql.o) mysql_error .libs/libphp4.a(php_mysql.o) mysql_affected_rows .libs/libphp4.a(php_mysql.o) ld: fatal: Symbol referencing errors. No output written to php collect2: ld returned 1 exit status make[1]: *** [php] Error 1 --------------------------------------------------------------------------- [2000-11-07 15:24:06] stas@php.net 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. --------------------------------------------------------------------------- [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

« previous php.dev (#37372) next »