Click here to get back home

sqlite/PHP under OS X

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
sqlite/PHP under OS X Tim Streater 06-19-2008
Get Chitika Premium
Posted by Tim Streater on June 19, 2008, 5:22 pm
Please log in for more thread options
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

Posted by Jerry Stuckle on June 19, 2008, 8:30 pm
Please log in for more thread options
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
==================


Posted by Tim Streater on June 20, 2008, 3:52 am
Please log in for more thread options

> 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.

Posted by Baris-C on June 20, 2008, 4:29 am
Please log in for more thread options
>
> > 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

Posted by Jerry Stuckle on June 20, 2008, 7:04 am
Please log in for more thread options
Tim Streater 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
==================



Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap