|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Tim Streater wrote:
> Running 10.5.3. I'm trying to make a PHP command line script with sqlite > calls. But it fails at the first such (sqlite_open), saying "call to > undefined function sqlite_open ...". > > phpinfo() tells me that sqlite support is enabled. > > What am I missing? > > TIA - tim > Something here doesn't make any sense. If phpinfo() shows SQL Lite is enabled, then sqlite_open() will not be defined. I know this sounds stupid - but are you executing your phpinfo() from the same location that you're calling sqlite_open()? That is, if the sqlite_open() call is in a web application, is your phpinfo() being loaded from the same WEBSITE? Or, if this is a CLI application, are you calling phpinfo() from another CLI? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Jun 20, 10:52 am, Tim Streater <timstrea...@waitrose.com> wrote:
> In article <g3etrb$nn...@registered.motzarella.org>, > Jerry Stuckle <jstuck...@attglobal.net> wrote: > > > Tim Streater wrote: > > > Running 10.5.3. I'm trying to make a PHP command line script with sqlite > > > calls. But it fails at the first such (sqlite_open), saying "call to > > > undefined function sqlite_open ...". > > > > phpinfo() tells me that sqlite support is enabled. > > > > What am I missing? > > > > TIA - tim > > > Something here doesn't make any sense. If phpinfo() shows SQL Lite is > > enabled, then sqlite_open() will not be defined. > > Is that an extra "not" there? :-) > > > I know this sounds stupid - but are you executing your phpinfo() from > > the same location that you're calling sqlite_open()? That is, if the > > sqlite_open() call is in a web application, is your phpinfo() being > > loaded from the same WEBSITE? Or, if this is a CLI application, are you > > calling phpinfo() from another CLI? > > One PHP script contains just the phpinfo call. The other just has an > sqlite_open call. Both in my home directory. I run both from a Terminal > window by going: > > prompt> php somefile.php > > So - that's it. I faced same problem on php 5.2.5, i don't not if the bug was fixed as of 5.2.6, now i use PDO functions.. both on Linux and Windows |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Tim Streater wrote:
> In article <g3etrb$nnt$1@registered.motzarella.org>, > Jerry Stuckle <jstucklex@attglobal.net> wrote: > >> Tim Streater wrote: >>> Running 10.5.3. I'm trying to make a PHP command line script with sqlite >>> calls. But it fails at the first such (sqlite_open), saying "call to >>> undefined function sqlite_open ...". >>> >>> phpinfo() tells me that sqlite support is enabled. >>> >>> What am I missing? >>> >>> TIA - tim >>> >> Something here doesn't make any sense. If phpinfo() shows SQL Lite is >> enabled, then sqlite_open() will not be defined. > > Is that an extra "not" there? :-) > Yep :-) >> I know this sounds stupid - but are you executing your phpinfo() from >> the same location that you're calling sqlite_open()? That is, if the >> sqlite_open() call is in a web application, is your phpinfo() being >> loaded from the same WEBSITE? Or, if this is a CLI application, are you >> calling phpinfo() from another CLI? > > One PHP script contains just the phpinfo call. The other just has an > sqlite_open call. Both in my home directory. I run both from a Terminal > window by going: > > prompt> php somefile.php > > So - that's it. > OK, that's very strange then. How about pasting your failing code? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Tim Streater wrote:
> In article <g3g30i$ij4$1@registered.motzarella.org>, > Jerry Stuckle <jstucklex@attglobal.net> wrote: > >> Tim Streater wrote: > >>> One PHP script contains just the phpinfo call. The other just has an >>> sqlite_open call. Both in my home directory. I run both from a Terminal >>> window by going: >>> >>> prompt> php somefile.php >>> >>> So - that's it. >>> >> OK, that's very strange then. How about pasting your failing code? > > Right, I just tried this on the MacPro at work with these scripts: > > <? phpinfo (); ?> > > and > > <? sqlite_open (); ?> > > Hard to get much simpler than that. :-) > > OK - on the MacPro, I get a complaint that sqlite_open expects at least > one parameter. This would be as expected if things work. > > At home on my Mac Mini (both running 10.5.3) it appeared to behave > differently (no such function). I'll e-mail the phpinfo output to myself > at home and diff it with the output there, to see if there is any > difference with the PHP setup. > I wonder if your Mac Mini didn't include sqlite to save space. Your approach seems to be the best one right now. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Tim Streater wrote:
> In article <g3g6ve$4iv$2@registered.motzarella.org>, > Jerry Stuckle <jstucklex@attglobal.net> wrote: > >> Tim Streater wrote: >>> In article <g3g30i$ij4$1@registered.motzarella.org>, >>> Jerry Stuckle <jstucklex@attglobal.net> wrote: >>> >>>> Tim Streater wrote: >>>>> One PHP script contains just the phpinfo call. The other just has an >>>>> sqlite_open call. Both in my home directory. I run both from a Terminal >>>>> window by going: >>>>> >>>>> prompt> php somefile.php >>>>> >>>>> So - that's it. >>>>> >>>> OK, that's very strange then. How about pasting your failing code? >>> Right, I just tried this on the MacPro at work with these scripts: >>> >>> <? phpinfo (); ?> >>> >>> and >>> >>> <? sqlite_open (); ?> >>> >>> Hard to get much simpler than that. :-) >>> >>> OK - on the MacPro, I get a complaint that sqlite_open expects at least >>> one parameter. This would be as expected if things work. >>> >>> At home on my Mac Mini (both running 10.5.3) it appeared to behave >>> differently (no such function). I'll e-mail the phpinfo output to myself >>> at home and diff it with the output there, to see if there is any >>> difference with the PHP setup. >>> >> I wonder if your Mac Mini didn't include sqlite to save space. >> >> Your approach seems to be the best one right now. > > Grrr. I turned on invisibles in TextWrangler and - lo! there was some > shitty non-space character masquerading as a space. That's what comes of > using vi to edit stuff. > > Sorry to have troubled you. > :-) Just glad you found it! -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On Fri, 20 Jun 2008 18:50:31 +0100, Tim Streater wrote:
> Grrr. I turned on invisibles in TextWrangler and - lo! there was some > shitty non-space character masquerading as a space. That's what comes of > using vi to edit stuff. You're missing a "not" in that last sentence? vi's always been amazingly cooperative in showing me EVERYTHING in the file, even when sometimes I don't want it to. -- It's not hard, it's just asking for a visit by the fuckup fairy. -- Peter da Silva |
|
![]() |
| Outils de la discussion | |
|
|