php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63607 Warning: dbase_open(): unable to open database
Submitted: 2012-11-26 13:17 UTC Modified: 2016-08-14 04:22 UTC
Votes:10
Avg. Score:4.4 ± 0.9
Reproduced:8 of 9 (88.9%)
Same Version:2 (25.0%)
Same OS:2 (25.0%)
From: helpdesk at cinematek dot be Assigned: cmb (profile)
Status: No Feedback Package: dbase (PECL)
PHP Version: 5.3Git-2012-11-26 (Git) OS: Centos
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-11-26 13:17 UTC] helpdesk at cinematek dot be
Description:
------------
$dbf_file="/mnt/db/part_cin.DBF";
/*Get filmcat metadata*/		
$db = dbase_open($dbf_file, 0);
$records = @dbase_numrecords($db) or die("Error reading filmcat's number of fields");
echo $records;  

The problem does not occur on PHP Version 5.3.10-1ubuntu3.4 but on CentOS PHP Version 5.3.3.

There is the dbf file : http://cinematek.be/ftp/upload/it/part_cin.dbf

the phpinfo for centos : http://cinematek.be/ftp/upload/it/phpinfo_not_ok.pdf

the phpinfo on ubuntu : http://cinematek.be/ftp/upload/it/phpinfo_ok.pdf

Test script:
---------------
$dbf_file="/mnt/db/part_cin.DBF";
/*Get filmcat metadata*/		
		$db = dbase_open($dbf_file, 0);
		$records = @dbase_numrecords($db) or die("Error reading filmcat's number of fields");
		echo $records;  

Expected result:
----------------
get number of records.

37

Actual result:
--------------
unable to open database.

Warning: dbase_open(): unable to open database /mnt/db/filmcat.dbf in /home/lloyd/public_html/metadata.class.php on line 17 Warning: dbase_numrecords(): Unable to find database for identifier 0 in /home/lloyd/public_html/metadata.class.php on line 19 Error reading /mnt/db/filmcat.dbf number of fields

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-27 01:48 UTC] alan_k@php.net
So you are saying

works fine with 5.3.10
fails with 5.3.3

Sounds like it was fixed in a newer version - so you need to upgrade...
 [2012-11-27 01:48 UTC] alan_k@php.net
-Status: Open +Status: Feedback
 [2012-11-27 09:24 UTC] helpdesk at cinematek dot be
yeah, i'll see if it's possible on CentOS.

There is another difference, on Ubuntu dbase is installed as an additional module ... Maybe i've to look this way too ?
 [2012-11-27 09:24 UTC] helpdesk at cinematek dot be
-Status: Feedback +Status: Open
 [2012-11-27 12:56 UTC] helpdesk at cinematek dot be
Hi,

Now i've updated to 5.3.19 and the problem is always there.
 [2016-08-05 14:37 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2016-08-05 14:37 UTC] cmb@php.net
Opening the dbf works fine for me with dbase 5.1.0. Which version
did you use?
 [2016-08-14 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Mar 29 22:01:26 2020 UTC