Annoying Character Set Error
I've just installed PHP 4.4.2 and MySQL 5 on a Windows XP development machine.
I've installed a sample php script to download a blob file from a database.
Although everything seems to work correctly, I am getting the following error:
"File 'c:\mysql\share\charsets\?.conf' not found (Errcode: 2) Character set '#33' is not a compiled character set and is not specified in the 'c:\mysql\share\charsets\Index' file"
In my.ini I have the following variables set:
default-character-set=utf8
datadir="C:/Program Files/MySQL/MySQL Server 5.0/Data/"
I've Googled this error and many people have encountered it, but there has been no solution posted.
Any help would be appreciated!
Here's the PHP file 'download.php'
<?php
if(isset($_GET['id']))
{
// if id is set then get the file with the id from database
// This is an example of config.php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '{password}';
$dbname = 'upload';
// This is an example opendb.php
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
mysql_select_db($dbname);
$id = $_GET['id'];
$query = "SELECT name, type, size, content " .
"FROM upload WHERE id = '$id'";
$result = mysql_query($query) or die('Error, query failed');
list($name, $type, $size, $content) = mysql_fetch_array($result);
header("Content-length: $size");
header("Content-type: $type");
header("Content-Disposition: attachment; filename=$name");
echo $content;
mysql_close($conn);
exit;
}
?>
Subject
Written By
Posted
Annoying Character Set Error
April 24, 2006 01:55PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.