Re: Command line PHP + DB access
| From: | Dan Fitzpatrick | Date: | Fri, 18 May 2001 16:45:28 +0000 |
| Subject: | Re: Command line PHP + DB access | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-9448@lists.php.net to get a copy of this message | ||
Jor,
You will need to have the Informix environment variables defined in your
shell environment:
INFORMIXDIR
INFORMIXSERVER
Make sure that the command line PHP binary you are using is compiled
with Informix support.
Dan
>Subject: Command line PHP + DB access
> Date: Fri, 18 May 2001 11:08:17 +0200
> From: Jordi Campos i Miralles <jordicm@nominalia.com>
> To: php-db@lists.php.net
>
>Hello everybody!
>
>I'm trying to access an Informix DB from a PHP script that has to be
>executed from the console with "php -q"...
>
>The script include some libraries I've done, and one of them is used to
>connect to the DB.
>
>Well, when this library is used through a PHP script executed by Apache
>there are no problems,
>
>BUT when the same library is used through a PHP script directly executed
>from the command line, the error:
>
>"Call to undefined function: ifx_connect()"... appear
>
>So, does anybody know how should I call the PHP script from the command
>line in order to let the database functions work?
>
>Thanks in advance.
>
>jor:)i