Bug #12041: Incorrect upload graphics files into MySQL when start PHP as Apache module
| From: | dva at vlas dot ru | Date: | Wed, 11 Jul 2001 08:54:39 +0000 |
| Subject: | Bug #12041: Incorrect upload graphics files into MySQL when start PHP as Apache module | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-59668@lists.php.net to get a copy of this message | ||
From: dva@vlas.ru
Operating system: Windows98
PHP version: 4.0.6
PHP Bug Type: Apache related
Bug description: Incorrect upload graphics files into MySQL when start PHP as Apache module
$fd = fopen ($imagefile, "r");
$imagedata = addslashes ( fread ( $fd, filesize ($imagefile) ) );
fclose ($fd);
$link = mysql_connect ($Hostname, $Username, $Password) or die
(mysql_errno($link).mysql_error($link));
$db = mysql_select_db ($Database, $link) or die
(mysql_errno($link).mysql_error($link));
$query = "INSERT INTO $TableBanner (id, image) VALUES
('NULL', '$imagedata')";
@mysql_query ($query, $link) or die
(mysql_errno($link).mysql_error($link));
mysql_close ($link);
--
Edit bug report at: http://bugs.php.net/?id=12041&edit=1