Date: 10/31/98
- Next message: Bug Database: "[PHP-DEV] Bug #887 Updated: Dosn't work at all ;-) Forget O_BINARY"
- Previous message: danny: "[PHP-DEV] CVS update: php3/doc/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: edetocquev <email protected>
Operating system: Windows 85
PHP version: 3.0.5
PHP Bug Type: dBase related
Bug description: Dosn't work at all ;-) Forget O_BINARY
There is a little bug in dbase function (dbase_create and dbase_open) when running PHP on Windows 95. Those functions open the file without the flag O_BINARY=0x8000 and dbase file are binary files. So when a record is added, the database is definitively corrupted.
I have found that I can pass 0x8002 to dbase_open, but there is no way to make dbase_create working properly, so I have had to modify the php3_dbase.dll.
But I think it's better to correct the bug ;-)
This append possibly on others database functions type, but I had tested only this one.
For example :
========= php-3.0.5/functions/dbase.c:500
if ((fd = open(filename->value.str.val,
#if (WIN32|WINNT)
O_BINARY|
#endif
O_RDWR|O_CREAT, 0644)) < 0) {
========= php-3.0.5/dbase/dbf_head.c:229
#if (WIN32|WINNT)
o_flags |= O_BINARY;
#endif
if ((fd = open(cp, o_flags)) < 0) {
-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>
- Next message: Bug Database: "[PHP-DEV] Bug #887 Updated: Dosn't work at all ;-) Forget O_BINARY"
- Previous message: danny: "[PHP-DEV] CVS update: php3/doc/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

