PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Re: sqlite/PHP under OS X
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Re: sqlite/PHP under OS X

Réponse
 
LinkBack Outils de la discussion
Vieux 20/06/2008, 01h30   #1
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sqlite/PHP under OS X

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

  Réponse avec citation
Vieux 20/06/2008, 09h29   #2
Baris-C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sqlite/PHP under OS X

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
  Réponse avec citation
Vieux 20/06/2008, 12h04   #3
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sqlite/PHP under OS X

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

  Réponse avec citation
Vieux 20/06/2008, 13h12   #4
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sqlite/PHP under OS X

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

  Réponse avec citation
Vieux 20/06/2008, 19h08   #5
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sqlite/PHP under OS X

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

  Réponse avec citation
Vieux 20/06/2008, 20h23   #6
Peter H. Coffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sqlite/PHP under OS X

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
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 11h36.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16359 seconds with 14 queries