SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Mar 2004
    Posts
    639
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pear example doesn't work on Unix server

    I'm trying to run Service_weather package on my server. This package contants example "weather.com-extensive.php". It works on my home Windows PC.

    I've installed PEAR and all packages I need on my server. When I try to run weather.com-extensive.php, I don't get any error message. There is just empty page in my browser.

    I think code stops working here:


    Code:
    // Object initialization - error checking is important, because of
    // handling exceptions such as missing PEAR modules
    $weatherDotCom = &Services_Weather::service("WeatherDotCom", array("httpTimeout" => 30));
    if (Services_Weather::isError($weatherDotCom)) {
        die("Error: ".$weatherDotCom->getMessage()."\n");
    }



    The code works before these lines.

    Where is the problem? How to resolve it?

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,290
    Mentioned
    198 Post(s)
    Tagged
    3 Thread(s)

    PEAR problem

    Kind of hard to tell by what you've shown. Please post the code that's before what you posted.

  3. #3
    SitePoint Guru
    Join Date
    Mar 2004
    Posts
    639
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague
    Kind of hard to tell by what you've shown. Please post the code that's before what you posted.
    Found error. &Services_Weather did not work because of wrong installation of PEAR packages.


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
  •