Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #2611 > unrolled thread
| Started by | luigi <luigi.bardelli@gmail.com> |
|---|---|
| First post | 2011-07-18 02:01 -0700 |
| Last post | 2011-07-18 03:24 -0700 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.lang.php
SQLITE_SCHEMA error with php 5.3 luigi <luigi.bardelli@gmail.com> - 2011-07-18 02:01 -0700
Re: SQLITE_SCHEMA error with php 5.3 "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-07-18 11:58 +0200
Re: SQLITE_SCHEMA error with php 5.3 luigi <luigi.bardelli@gmail.com> - 2011-07-18 03:24 -0700
| From | luigi <luigi.bardelli@gmail.com> |
|---|---|
| Date | 2011-07-18 02:01 -0700 |
| Subject | SQLITE_SCHEMA error with php 5.3 |
| Message-ID | <5e79933c-f1a3-4914-855f-bc9c9db3aa2a@e21g2000vbz.googlegroups.com> |
Hi, I am getting this error (something like once a day) on a php5.3 box. Do you know how this can be fixed? I have seen on the SQlite FAQ that this should not happen using sqlite3_prepare_v2() instead of sqlite3_prepare() in the C api: do you know which function pdo uses internally? thanks!!!!
[toc] | [next] | [standalone]
| From | "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> |
|---|---|
| Date | 2011-07-18 11:58 +0200 |
| Message-ID | <j0103j$34e$1@dont-email.me> |
| In reply to | #2611 |
El 18/07/2011 11:01, luigi escribió/wrote:
> I am getting this error (something like once a day) on a php5.3
> box.
> Do you know how this can be fixed?
>
> I have seen on the SQlite FAQ that this should not happen using
> sqlite3_prepare_v2() instead of sqlite3_prepare() in the C api: do you
> know which function pdo uses internally?
Having a look at the PHP source code for 5.3.x, it seems it uses the
same code as the sqlite3 extension:
http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/pdo_sqlite/sqlite_driver.c?view=markup
static int sqlite_handle_preparer(pdo_dbh_t *dbh, const char *sql, long
sql_len, pdo_stmt_t *stmt, zval *driver_options TSRMLS_DC)
{
[...]
i = sqlite3_prepare(H->db, sql, sql_len, &S->stmt, &tail);
And such extension has references to both of them:
http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/sqlite3/libsqlite/sqlite3.c?view=markup
** The sqlite3_exec() interface is a convenience wrapper around
** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()],
** that allows an application to run multiple statements of SQL
** without having to use a lot of C code.
** ^The authorizer callback is invoked as SQL statements are being compiled
** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()],
** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()]. ^At various
So I guess it tries to autodetect but uses sqlite3_prepare_v2() when
available.
I hope this helps.
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
[toc] | [prev] | [next] | [standalone]
| From | luigi <luigi.bardelli@gmail.com> |
|---|---|
| Date | 2011-07-18 03:24 -0700 |
| Message-ID | <5524bcd2-3b9d-4583-9bac-87fbdd3d8dfe@dp9g2000vbb.googlegroups.com> |
| In reply to | #2612 |
On 18 Lug, 11:58, "Álvaro G. Vicario"
<alvaro.NOSPAMTH...@demogracia.com.invalid> wrote:
> El 18/07/2011 11:01, luigi escribió/wrote:
>
> > I am getting this error (something like once a day) on a php5.3
> > box.
> > Do you know how this can be fixed?
>
> > I have seen on the SQlite FAQ that this should not happen using
> > sqlite3_prepare_v2() instead of sqlite3_prepare() in the C api: do you
> > know which function pdo uses internally?
>
> Having a look at the PHP source code for 5.3.x, it seems it uses the
> same code as the sqlite3 extension:
>
> http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/pdo_sqlite...
>
> static int sqlite_handle_preparer(pdo_dbh_t *dbh, const char *sql, long
> sql_len, pdo_stmt_t *stmt, zval *driver_options TSRMLS_DC)
> {
> [...]
> i = sqlite3_prepare(H->db, sql, sql_len, &S->stmt, &tail);
>
> And such extension has references to both of them:
>
> http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/sqlite3/li...
>
> ** The sqlite3_exec() interface is a convenience wrapper around
> ** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()],
> ** that allows an application to run multiple statements of SQL
> ** without having to use a lot of C code.
>
> ** ^The authorizer callback is invoked as SQL statements are being compiled
> ** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()],
> ** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()]. ^At various
>
> So I guess it tries to autodetect but uses sqlite3_prepare_v2() when
> available.
>
> I hope this helps.
>
> --
> --http://alvaro.es- Álvaro G. Vicario - Burgos, Spain
> -- Mi sitio sobre programación web:http://borrame.com
> -- Mi web de humor satinado:http://www.demogracia.com
> --
Hi Alvaro,
thanks: do you know what is used in pdo::prepare?
I keep having this error... how to avoid it?
thanks!
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web