|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-03-03 11:37 UTC] john dot navratil at sbcglobal dot net
[2017-04-01 21:09 UTC] tpunt@php.net
-Status: Open
+Status: Wont fix
[2017-04-01 21:09 UTC] tpunt@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 03:00:01 2025 UTC |
Description: ------------ Script to open and read a paradox DB file generates a segmentation fault when attempting to read a record. This appears to be related to some object initialization as I am able to successfully process this file using other scripts, quite easily. In fact, it was a bit of a challenge to preserve the error as I was stripping the script for a manageable example. At some point in my experimentation, I received the message "PHP Fatal error: paradox_db::get_record(): Could not fseek start of first data block.", but was unable to reproduce that error. It may be a clue. In the code, below, the error appears if the (stripped) paradoxOpen2() function is used, but does not if the in-line open code is used. I could provide you with the 'STOCKLOT.DB' file, but observed this error on each of three files I have. Reproduce code: --------------- function paradoxOpen2($file, $ioMode) { $fp = fopen($file, $ioMode); $pxdoc = new paradox_db(); $pxdoc->open_fp($fp); return $pxdoc; } $pxdoc = paradoxOpen2('STOCKLOT.DB', "r"); // Generates segmentation fault // $fp = fopen('STOCKLOT.DB', "r"); // Does not generate segmentation fault // $pxdoc = new paradox_db(); // $pxdoc->open_fp($fp); $arr = $pxdoc->get_record(1); Expected result: ---------------- (nothing) Actual result: -------------- segmentation fault