php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5112 dbase_create broken.. Here is a quick fix.
Submitted: 2000-06-18 23:54 UTC Modified: 2000-07-01 23:22 UTC
From: rezbin at yahoo dot com Assigned:
Status: Closed Package: dBase related
PHP Version: 4.0 Latest CVS (18/06/2000) OS: Linux 2.2.13
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rezbin at yahoo dot com
New email:
PHP Version: OS:

 

 [2000-06-18 23:54 UTC] rezbin at yahoo dot com
There is a problem with dbase_create in that it fails to recongnize the 2nd parameter as being an array of arrays.

I have done some digging, and found a solution to the problem, albet just a quick-fix it does do the trick.

First thing to do is apply the quick patch to the dbase.c file that is mentioned in bug ID: 4813, that will remove the page fault problems.

The way to get the function to work is this:
on the line 569:
  pval *filename, *fields, *field, *value;
make it read:
  pval *filename, *fields, *field, *value, **tmp;

On line 626 change:
  if (zend_hash_index_find(fields->value.ht, i, (void **)&field) == FAILURE) {
to read:
  if (zend_hash_index_find(fields->value.ht, i, (void **)&tmp) == FAILURE) {

Add the fallowing to line 631:
  field = *val;

repeate this method for the other references to function zend_hash_index_find, in dbase_create and it'll work just fine.

It looks like something has changed between PHP3 and PHP4, which must of broke the function.


Config line used: ./configure --with-mysql --with-apxs --enable-dbase --disable-debug

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-01 23:22 UTC] sterling at cvs dot php dot net
Fixed in CVS.  Thanks.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Nov 27 18:03:14 2021 UTC