Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#32 closed defect (released)

No access to Xapian::Auto::open(path, CREATE_..) in PHP

Reported by: Mikael Johansson Owned by: Olly Betts
Priority: high Milestone:
Component: Xapian-bindings Version: 0.8.0
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Linux

Description

The overloaded open method is only avaliable as Database open(const std::string &path);

and not as would be required if one would like to write to it WritableDatabase open(const std::string &path, int action);

"PHP Fatal error: unknown error in Xapian in" when doing new_WritableDatabase(open(path)). Perhaps one could fix the open() function to check how many arguments was sent and do the right thing or perhaps a new function open_in_mode(path, mode) in the bindings would be warranted?

URL: http://synd.grow.nu/snaps

Change History (4)

comment:1 by Mikael Johansson, 20 years ago

The Privoxy filters fudged the open() into PrivoxyWindowOpen() ..

comment:2 by Olly Betts, 20 years ago

Status: newassigned

This was highlighted on the mailing list recently. I thought someone was looking into a fix - I'll check...

comment:3 by Olly Betts, 20 years ago

Resolution: fixed
Status: assignedclosed

I've just gone in to try to fix this, and there's already a renamed version! In PHP, the WritableDatabase form is wrapped as:

open_writable(path, action)

Sorry I didn't check earlier.

I've now added a note to this effect to the documentation.

comment:4 by Olly Betts, 20 years ago

Operating System: Linux
Resolution: fixedreleased

Fixed in 0.8.2

Note: See TracTickets for help on using tickets.