Cli error with imap_open()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • th.evensen@gmail.com

    Cli error with imap_open()

    Hi,


    I've written a script that use the imap functions to check my accounts
    for new messages. It works great from a server, but when trying to run
    it from the command line I get the following error:

    Fatal error: Call to undefined function: imap_open()


    I'm on osX 10.4.8 with the Marc Liyanage php5 package from
    http://www.entropy.ch/software/macosx/php/.

    "php -v" outputs:
    PHP 4.4.4 (cli) (built: Nov 1 2006 18:12:33)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

  • th.evensen@gmail.com

    #2
    Re: Cli error with imap_open()

    Solved it. Changing the path to the php cli did the trick

    $ which php
    /usr/bin/php
    $ export PATH=/usr/local/php5/bin:$PATH
    $ which php
    /usr/local/php5/bin/php

    On Dec 28, 2:09 pm, "th.even...@gma il.com" <th.even...@gma il.com>
    wrote:
    Hi,
    >
    I've written a script that use the imap functions to check my accounts
    for new messages. It works great from a server, but when trying to run
    it from the command line I get the following error:
    >
    Fatal error: Call to undefined function: imap_open()
    >
    I'm on osX 10.4.8 with the Marc Liyanage php5 package fromhttp://www.entropy.ch/software/macosx/php/.
    >
    "php -v" outputs:
    PHP 4.4.4 (cli) (built: Nov 1 2006 18:12:33)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

    Comment

    Working...