SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    ::==:: Bonzo_CS's Avatar
    Join Date
    Dec 2003
    Location
    (Cardiff Wales)
    Posts
    747
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PEAR only works in CLI not browser

    Hi All,

    I have followed this article Getting Started With PEAR

    All installs fine and if I produce a simple DBase connection using PEAR DB module all works well through the CLI. However when I access the same file using a browser I just get a blank white screen?

    Why is this happening? Any ideas?

    The logs are showing:
    [Tue Jul 04 14:29:26 2006] [error] [client 127.0.0.1] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'DB.php' (include_path='.:/home/bonzocs/pear/share/pear') in /var/www/html/Test/t1.php on line 6
    This path is correct to the DB.php being called.
    Last edited by Bonzo_CS; Jul 4, 2006 at 05:31.

  2. #2
    ::==:: Bonzo_CS's Avatar
    Join Date
    Dec 2003
    Location
    (Cardiff Wales)
    Posts
    747
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In case anyone is interested the matter is now resolved. The problem was that I had the wrong path in my php.ini file.

    The pear installer set the include path to the scripts and not the PEAR command which you obviously need to run. The correct path for me looks something like:

    include_path=".:/usr/lib/php:/usr/share/pear"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •