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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 07:01:28 2024 UTC