ID:               31577
 Updated by:       php-bugs@lists.php.net
 Reported By:      sand001 at sympatico dot ca
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         dBase related
 Operating System: windows XP
 PHP Version:      5.0.2
 New Comment:

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


Previous Comments:
------------------------------------------------------------------------

[2005-02-08 11:03:27] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Please check if your webserver has all access privileges to the dbf
file.

------------------------------------------------------------------------

[2005-01-16 22:34:09] sand001 at sympatico dot ca

Description:
------------
I have found a bug on page function.dbase-add-record.html
[chm date: 2004-12-26]...

I can read from a .dbf file with PHP but I cannot write to it. I have
used PHP to create the .dbf or I have used my normally created .dbf
with the same structure. 

The same HTML input screen collects data so that I can write a .txt
delimited file with it and append it into the .dbf but the prescribed
code from the examples fails when the dbase_open() flag is set to '1'
or '2' as required to write the data. 

All of the echo lines show me that the fields are filled properly. The
dbase_open() command works well when the flag is set to '0' for
reading. I can output the data that I have put into the .dbf by
appending from the .txt file.

Reproduce code:
---------------
<?php
$filename="collect.txt";
$name="$_POST[name]";
$street="$_POST[street]";
$city="$_POST[city]";
$prov="$_POST[prov]";
$country="$_POST[country]";
$postal="$_POST[postal]";
$tel="$_POST[tel]";
$mail="$_POST[mail]";
$fax="$_POST[fax]";
echo "<strong> $name</strong><br>";
echo "<strong> $street</strong><br>";
echo "<strong> $city</strong><strong>, $prov</strong><strong>,
$country</strong><br>";
echo "<strong> $postal</strong><br>";
echo "<strong> $tel</strong><br>";
echo "<strong> $mail</strong><br>";
echo "<strong> $fax</strong><br>";

  $db=dbase_open("collectx.dbf",2) ;
  $def = array (trim($name), trim($street), trim($city), trim($prov),
trim($country), trim($postal), trim($tel), trim($mail), trim($fax));  
  dbase_add_record($db, $def);
  dbase_close($db)  
?>

Expected result:
----------------
I expect to be able to fill a .dbf file with HTML input as collected in
the fields that echo their contents to me, above. 

Thank you for your assistance.

Actual result:
--------------
Warning: dbase_open() [function.dbase-open]: unable to open database
collectx.dbf in c:\Inetpub\wwwroot\collect.php on line 23




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=31577&edit=1

Reply via email to