On Sun, 24 Feb 2019 at 01:55, Tim Streater <t...@clothears.org.uk> wrote:

> (sorry for the duplicate - vibrating finger).
>
> I have a hosted web site using the SQLite functions from PHP. The page
> where PHP is used was failing, and on investigation this is because an
> SQLite function called from within PHP is now returning:
>
> Code: 10 (SQLITE_IOERR)
> Msg:  disk I/O error
>
> I will be working with my hosting provider but, is there a way to get more
> specific information about this?
>

I don't know if it's tricky to arrange from php, but you can call
sqlite3_config(SQLITE_CONFIG_LOG, callback_function) to register a logging
function. sqlite will call it when I/O errors are encountered¹, and the
message it provides includes the underlying OS error code/message.

¹ and also at other times; you probably want to filter out SQLITE_BUSY and
SQLITE_SCHEMA events at least

The downside of this is that this is a global config change, and the
message doesn't always identify the affected database (but for I/O errors
the filename is generally there).

-Rowan
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to