dba_open() problem

This is a discussion on dba_open() problem within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Simple question, I hope. I have read everywhere that the following code should work : <?php $id = dba_open( "/tmp/...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-03-2006
Patrick Drouin
 
Posts: n/a
Default dba_open() problem

Simple question, I hope.

I have read everywhere that the following code should work :

<?php

$id = dba_open( "/tmp/test.db", "n", "db4" )
or die( "Couldn't open database" );
dba_close($id);
?>

When I run it, the database is created without a problem but the die()
statement is executed. Any idea why it can create the DB but it tells me
it can't?

Thanks,
Patrick
Reply With Quote
  #2 (permalink)  
Old 02-05-2006
Jim Michaels
 
Posts: n/a
Default Re: dba_open() problem


"Patrick Drouin" <patrick.drouin@gmail.com> wrote in message
news:cJGdnSHUI_TcAX7eRVn-ig@umontreal.ca...
> Simple question, I hope.
>
> I have read everywhere that the following code should work :
>
> <?php
>
> $id = dba_open( "/tmp/test.db", "n", "db4" )


resource dba_open ( string path, string mode [, string handler [, mixed
....]] )

you are using db4 as an optional handler? I don't see the handler listed in
your code. unfortunately, I see no user-notes in the CHM manual on this
function.

> or die( "Couldn't open database" );
> dba_close($id);
> ?>
>
> When I run it, the database is created without a problem but the die()
> statement is executed. Any idea why it can create the DB but it tells me
> it can't?
>
> Thanks,
> Patrick



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:26 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0