From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020205 Description of problem: When running script via php interpreter while mysql daemon is running with default-character-set specified, script fails with "File 'NONEXISTENT/charsets/?.conf' not found (Errcode: 2)" error message. Version-Release number of selected component (if applicable): php-4.0.6-12 How reproducible: Always Steps to Reproduce: 1.specify default-character-set=latin2 in [mysqld] section of /etc/my.cnf 2.restart mysqld 3.create php script which uses mysql_* command, e.g. #!/usr/bin/php -q <? @$conn = mysql_connect("localhost","user","password"); echo "Hello, world\n"; ?> 4. run that srcipt Actual Results: File 'NONEXISTENT/charsets/?.conf' not found (Errcode: 2) Character set '#9' is not a compiled character set and is not specified in the 'NONEXISTENT/charsets/Index' file Hello, world Expected Results: Hello, world Additional info: Workaround is either not to specify default-character-set in /etc/my.cnf (it breaks localized behaviour) or to symlink /usr/share/mysql to NONEXISTENT in actual directory.
Perhaps should PHP be compiled with line #define SHAREDIR "NONEXISTENT" replaced with #define SHAREDIR "/usr/share/mysql" in ext/mysql/libmysql/my_config.h ?
Thanks for the report. Please reopen this bug if the issue is still reproducible against current releases.