php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6916 blob->savefromfile doesn't work for binary files
Submitted: 2000-09-28 02:11 UTC Modified: 2006-07-17 08:34 UTC
From: mb at sime dot com Assigned:
Status: Wont fix Package: OCI8 related
PHP Version: 3.0.16 OS: Windows, OCI8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
36 - 28 = ?
Subscribe to this entry?

 
 [2000-09-28 02:11 UTC] mb at sime dot com
In line 2708 the input file for the blob isn't opened in binary mode, so upload of binary data like images doesn't work on MS Windows platforms. Possibly should check if clob or blob and set O_BINARY accordingly.

Modified line:
		if ((fp = open(filename, O_RDONLY | O_BINARY)) == -1) {

works OK.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-28 02:16 UTC] mb at sime dot com
Same as 3587, sorry had overlooked that
 [2005-03-31 16:13 UTC] php-bugs at lists dot php dot net
We are sorry, but we do not support PHP 3 related problems anymore.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Dec 02 14:05:53 2022 UTC