Re: [sqlite] Problem with SQLite Pecl extension for PHP4

2007-05-10 Thread Derrell . Lipman
Brandon Eley <[EMAIL PROTECTED]> writes:

> No, I can't upgrade to PHP5, yet. We're on PHP4.

I was accessing sqlite 2.8.x databases with PHP4 a number of years ago.  It
worked fine.  The page I referred you to previously _initially_ discusses the
object interface for the sqlite functions.  That, AFAIR, didn't exist in php4.
The sqlite_* functions that are listed further down, however, did exist and
worked fine.

Try this as an alternate starting point:

  http://us.php.net/manual/en/function.sqlite-open.php

Just ignore the Object interface that is described for each function, and
stick with the sqlite_*() functions.

You might try running a script with phpinfo() to ensure that sqlite was
compiled into your build.  I recall it was compiled by default, but it's
conceivable it was left out of your build.

Cheers,

Derrell

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Problem with SQLite Pecl extension for PHP4

2007-05-10 Thread Derrell . Lipman
Brandon Eley <[EMAIL PROTECTED]> writes:

> Thank you for this information. How would I access the 2.8.x database  from
> within PHP? is it even possible?

Go to http://www.php.net.  Type "sqlite" into the search box at the top.  The
page it brings you to describes the sqlite 2.8.x interface.  The PECL
extension that you referenced is for accessing the newer 3.x databases.

Derrell

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Problem with SQLite Pecl extension for PHP4

2007-05-10 Thread T

Hi Brandon,


Is there a way to upgrade the module to SQLite 3 on PHP4?


I think so. I recall reading something about it, but since I was able  
to just install PHP5 I went via that route. Try Google:

http://www.google.com.au/search?q=SQLite3+PHP4

Tom


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Problem with SQLite Pecl extension for PHP4

2007-05-10 Thread Brandon Eley

No, I can't upgrade to PHP5, yet. We're on PHP4.

Brandon Eley
[EMAIL PROTECTED]



On May 10, 2007, at 9:04 AM, Chris Peachment wrote:


I think I have misread your original posting.
Can you upgrade your version of PHP?
I use PHP version 5.2.1.

Running phpinfo() reveals the PDO driver to be:

PECL version: 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6.2.1 2007/01/01  
09:36:05 sebastian Exp $

Sqlite Library: 3.3.7undefined

Since you can run sqlite3 against the database without issue,
it appears that the version embedded in PHP is the problem.

Chris Peachment

--

On Thu, 10 May 2007 08:46:30 -0400, Brandon Eley wrote:


Thank you for this information. How would I access the 2.8.x database
from within PHP? is it even possible?



The database is created from a shopping cart program, so I can't
upgrade it, it has to remain the same version (for now).



Brandon Eley
[EMAIL PROTECTED]





On May 9, 2007, at 10:59 PM, Chris Peachment wrote:



There was a change of file structure with version 3.x.x
and this is described in the documentation under Version 3
Overview.

You are attempting to use Sqlite3 on a version 2.8.x database
and the formats are not compatible.


On Wed, 9 May 2007 19:42:06 -0400, Brandon Eley wrote:


I've gone through a few tutorials and can't seem to get this right.
I've had my web host install the PECL extension and the  
following is

what is in my phpinfo();



sqlite
SQLite support  enabled
PECL Module version 1.0.3 $Id: sqlite.c,v 1.62.2.25 2004/07/10
12:25:33 wez Exp $
SQLite Library  2.8.14
SQLite Encoding iso8859



Directive   Local Value Master Value
sqlite.assoc_case   0   0



***



This is the PHP code I'm using:







***



This is the error I'm getting:



Warning: sqlite_open() [function.sqlite-open]: file is encrypted or
is not a database in /home/xxx/public_html/test.php on line 140



***



What am I doing wrong? I can run queries all day long using the
command line sqlite3 but I can't seem to get PHP to read the  
stinkin

database!



Any help would be GREATLY appreciated!



Brandon Eley
[EMAIL PROTECTED]









 
--

---
To unsubscribe, send email to [EMAIL PROTECTED]
 
--

---




- 


To unsubscribe, send email to [EMAIL PROTECTED]
- 







-- 
---

To unsubscribe, send email to [EMAIL PROTECTED]
-- 
---





-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Problem with SQLite Pecl extension for PHP4

2007-05-10 Thread Brandon Eley
It's ShopSite (www.shopsite.com) and I'm building add-on modules for  
the cart that need to access information in the DB.


Unfortunately, we can't upgrade to PHP5 just yet, as we have quite a  
few sites on the server running open source software and we haven't  
verified they are all compatible with PHP5.


Is there a way to upgrade the module to SQLite 3 on PHP4?

Brandon Eley
[EMAIL PROTECTED]



On May 10, 2007, at 8:58 AM, T wrote:


Hi Brandon,

I've had my web host install the PECL extension and the  
following is what is in my phpinfo();


sqlite
SQLite support  enabled
PECL Module version 1.0.3 $Id: sqlite.c,v 1.62.2.25 2004/07/10
SQLite Library  2.8.14


How would I access the 2.8.x database from within PHP? is it even  
possible?


I think you have the problem backwards. Your database data file is  
probably already "upgraded" to SQLite version 3.x format. But it's  
the SQLite executable library in PHP that is lagging at 2.8.14. You  
need to upgrade your PHP SQLite library so it can open your newer  
version database file.


The simplest way I found to do this, was to upgrade my PHP to the  
latest 5.2.1, which includes SQLite support for 3.x database files.


The database is created from a shopping cart program, so I can't  
upgrade it, it has to remain the same version (for now).


Out of curiosity, what is the shopping cart software that you're  
using?


Tom


-- 
---

To unsubscribe, send email to [EMAIL PROTECTED]
-- 
---





-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Problem with SQLite Pecl extension for PHP4

2007-05-10 Thread Chris Peachment
I think I have misread your original posting.
Can you upgrade your version of PHP?
I use PHP version 5.2.1.

Running phpinfo() reveals the PDO driver to be:

PECL version: 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6.2.1 2007/01/01 09:36:05 
sebastian Exp $
Sqlite Library: 3.3.7undefined

Since you can run sqlite3 against the database without issue,
it appears that the version embedded in PHP is the problem.

Chris Peachment

--

On Thu, 10 May 2007 08:46:30 -0400, Brandon Eley wrote:

>Thank you for this information. How would I access the 2.8.x database  
>from within PHP? is it even possible?

>The database is created from a shopping cart program, so I can't  
>upgrade it, it has to remain the same version (for now).

>Brandon Eley
>[EMAIL PROTECTED]



>On May 9, 2007, at 10:59 PM, Chris Peachment wrote:

>> There was a change of file structure with version 3.x.x
>> and this is described in the documentation under Version 3
>> Overview.
>>
>> You are attempting to use Sqlite3 on a version 2.8.x database
>> and the formats are not compatible.
>>
>>
>> On Wed, 9 May 2007 19:42:06 -0400, Brandon Eley wrote:
>>
>>> I've gone through a few tutorials and can't seem to get this right.
>>> I've had my web host install the PECL extension and the following is
>>> what is in my phpinfo();
>>
>>> sqlite
>>> SQLite support  enabled
>>> PECL Module version 1.0.3 $Id: sqlite.c,v 1.62.2.25 2004/07/10
>>> 12:25:33 wez Exp $
>>> SQLite Library  2.8.14
>>> SQLite Encoding iso8859
>>
>>> Directive   Local Value Master Value
>>> sqlite.assoc_case   0   0
>>
>>> ***
>>
>>> This is the PHP code I'm using:
>>
>>> >> $db = sqlite_open("/home/xxx/data/xxx.db");
>>> ?>
>>
>>> ***
>>
>>> This is the error I'm getting:
>>
>>> Warning: sqlite_open() [function.sqlite-open]: file is encrypted or
>>> is not a database in /home/xxx/public_html/test.php on line 140
>>
>>> ***
>>
>>> What am I doing wrong? I can run queries all day long using the
>>> command line sqlite3 but I can't seem to get PHP to read the stinkin
>>> database!
>>
>>> Any help would be GREATLY appreciated!
>>
>>> Brandon Eley
>>> [EMAIL PROTECTED]
>>
>>
>>
>>
>>
>>
>>
>>
>> -- 
>> ---
>> To unsubscribe, send email to [EMAIL PROTECTED]
>> -- 
>> ---
>>


>-
>To unsubscribe, send email to [EMAIL PROTECTED]
>-





-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Problem with SQLite Pecl extension for PHP4

2007-05-10 Thread Ulrich Schöbel
It's the other way round: Your database is 3.x, your SQLite library
used by PHP is 2.8.14. Upgrade your PHP.

Ulrich


On Thursday 10 May 2007 14:46, Brandon Eley wrote:
> Thank you for this information. How would I access the 2.8.x database
> from within PHP? is it even possible?
>
> The database is created from a shopping cart program, so I can't
> upgrade it, it has to remain the same version (for now).
>
> Brandon Eley
> [EMAIL PROTECTED]
>
> On May 9, 2007, at 10:59 PM, Chris Peachment wrote:
> > There was a change of file structure with version 3.x.x
> > and this is described in the documentation under Version 3
> > Overview.
> >
> > You are attempting to use Sqlite3 on a version 2.8.x database
> > and the formats are not compatible.
> >
> > On Wed, 9 May 2007 19:42:06 -0400, Brandon Eley wrote:
> >> I've gone through a few tutorials and can't seem to get this right.
> >> I've had my web host install the PECL extension and the following is
> >> what is in my phpinfo();
> >>
> >> sqlite
> >> SQLite support enabled
> >> PECL Module version1.0.3 $Id: sqlite.c,v 1.62.2.25 2004/07/10
> >> 12:25:33 wez Exp $
> >> SQLite Library 2.8.14
> >> SQLite Encodingiso8859
> >>
> >> Directive  Local Value Master Value
> >> sqlite.assoc_case  0   0
> >>
> >> ***
> >>
> >> This is the PHP code I'm using:
> >>
> >>  >> $db = sqlite_open("/home/xxx/data/xxx.db");
> >> ?>
> >>
> >> ***
> >>
> >> This is the error I'm getting:
> >>
> >> Warning: sqlite_open() [function.sqlite-open]: file is encrypted or
> >> is not a database in /home/xxx/public_html/test.php on line 140
> >>
> >> ***
> >>
> >> What am I doing wrong? I can run queries all day long using the
> >> command line sqlite3 but I can't seem to get PHP to read the stinkin
> >> database!
> >>
> >> Any help would be GREATLY appreciated!
> >>
> >> Brandon Eley
> >> [EMAIL PROTECTED]
> >
> > --
> > ---
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > --
> > ---
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Problem with SQLite Pecl extension for PHP4

2007-05-10 Thread T

Hi Brandon,

I've had my web host install the PECL extension and the following  
is what is in my phpinfo();


sqlite
SQLite support  enabled
PECL Module version 1.0.3 $Id: sqlite.c,v 1.62.2.25 2004/07/10
SQLite Library  2.8.14


How would I access the 2.8.x database from within PHP? is it even  
possible?


I think you have the problem backwards. Your database data file is  
probably already "upgraded" to SQLite version 3.x format. But it's  
the SQLite executable library in PHP that is lagging at 2.8.14. You  
need to upgrade your PHP SQLite library so it can open your newer  
version database file.


The simplest way I found to do this, was to upgrade my PHP to the  
latest 5.2.1, which includes SQLite support for 3.x database files.


The database is created from a shopping cart program, so I can't  
upgrade it, it has to remain the same version (for now).


Out of curiosity, what is the shopping cart software that you're using?

Tom


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Problem with SQLite Pecl extension for PHP4

2007-05-10 Thread Brandon Eley
Thank you for this information. How would I access the 2.8.x database  
from within PHP? is it even possible?


The database is created from a shopping cart program, so I can't  
upgrade it, it has to remain the same version (for now).


Brandon Eley
[EMAIL PROTECTED]



On May 9, 2007, at 10:59 PM, Chris Peachment wrote:


There was a change of file structure with version 3.x.x
and this is described in the documentation under Version 3
Overview.

You are attempting to use Sqlite3 on a version 2.8.x database
and the formats are not compatible.


On Wed, 9 May 2007 19:42:06 -0400, Brandon Eley wrote:


I've gone through a few tutorials and can't seem to get this right.
I've had my web host install the PECL extension and the following is
what is in my phpinfo();



sqlite
SQLite support  enabled
PECL Module version 1.0.3 $Id: sqlite.c,v 1.62.2.25 2004/07/10
12:25:33 wez Exp $
SQLite Library  2.8.14
SQLite Encoding iso8859



Directive   Local Value Master Value
sqlite.assoc_case   0   0



***



This is the PHP code I'm using:







***



This is the error I'm getting:



Warning: sqlite_open() [function.sqlite-open]: file is encrypted or
is not a database in /home/xxx/public_html/test.php on line 140



***



What am I doing wrong? I can run queries all day long using the
command line sqlite3 but I can't seem to get PHP to read the stinkin
database!



Any help would be GREATLY appreciated!



Brandon Eley
[EMAIL PROTECTED]









-- 
---

To unsubscribe, send email to [EMAIL PROTECTED]
-- 
---





-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Problem with SQLite Pecl extension for PHP4

2007-05-09 Thread Chris Peachment
There was a change of file structure with version 3.x.x
and this is described in the documentation under Version 3
Overview.

You are attempting to use Sqlite3 on a version 2.8.x database
and the formats are not compatible.


On Wed, 9 May 2007 19:42:06 -0400, Brandon Eley wrote:

>I've gone through a few tutorials and can't seem to get this right.  
>I've had my web host install the PECL extension and the following is  
>what is in my phpinfo();

>sqlite
>SQLite support enabled
>PECL Module version1.0.3 $Id: sqlite.c,v 1.62.2.25 2004/07/10  
>12:25:33 wez Exp $
>SQLite Library 2.8.14
>SQLite Encodingiso8859

>Directive  Local Value Master Value
>sqlite.assoc_case  0   0

>***

>This is the PHP code I'm using:

>$db = sqlite_open("/home/xxx/data/xxx.db");
>?>

>***

>This is the error I'm getting:

>Warning: sqlite_open() [function.sqlite-open]: file is encrypted or  
>is not a database in /home/xxx/public_html/test.php on line 140

>***

>What am I doing wrong? I can run queries all day long using the  
>command line sqlite3 but I can't seem to get PHP to read the stinkin  
>database!

>Any help would be GREATLY appreciated!

>Brandon Eley
>[EMAIL PROTECTED]








-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Problem with SQLite Pecl extension for PHP4

2007-05-09 Thread Jon Scully

What user is httpd running as? Enter:

   ps aux | grep -v grep | grep httpd

Does that user (typically 'nobody') have permission to access the file
at your: /home/xxx/data/xxx.db ?

On 5/9/07, Brandon Eley <[EMAIL PROTECTED]> wrote:

I've gone through a few tutorials and can't seem to get this right.
I've had my web host install the PECL extension and the following is
what is in my phpinfo();

sqlite
SQLite support  enabled
PECL Module version 1.0.3 $Id: sqlite.c,v 1.62.2.25 2004/07/10
12:25:33 wez Exp $
SQLite Library  2.8.14
SQLite Encoding iso8859

Directive   Local Value Master Value
sqlite.assoc_case   0   0

***

This is the PHP code I'm using:



***

This is the error I'm getting:

Warning: sqlite_open() [function.sqlite-open]: file is encrypted or
is not a database in /home/xxx/public_html/test.php on line 140

***

What am I doing wrong? I can run queries all day long using the
command line sqlite3 but I can't seem to get PHP to read the stinkin
database!

Any help would be GREATLY appreciated!

Brandon Eley
[EMAIL PROTECTED]






-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Problem with SQLite Pecl extension for PHP4

2007-05-09 Thread Brandon Eley
I've gone through a few tutorials and can't seem to get this right.  
I've had my web host install the PECL extension and the following is  
what is in my phpinfo();


sqlite
SQLite support  enabled
PECL Module version 	1.0.3 $Id: sqlite.c,v 1.62.2.25 2004/07/10  
12:25:33 wez Exp $

SQLite Library  2.8.14
SQLite Encoding iso8859

Directive   Local Value Master Value
sqlite.assoc_case   0   0

***

This is the PHP code I'm using:



***

This is the error I'm getting:

Warning: sqlite_open() [function.sqlite-open]: file is encrypted or  
is not a database in /home/xxx/public_html/test.php on line 140


***

What am I doing wrong? I can run queries all day long using the  
command line sqlite3 but I can't seem to get PHP to read the stinkin  
database!


Any help would be GREATLY appreciated!

Brandon Eley
[EMAIL PROTECTED]