Bottom
Failed opening required 'weather.class.php'
  • Posted: 02.03.2004, 20:08
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    Everything seems to work on my new installation, including initializing, activating, and administering the module. But when I create a weather block, I get the following error message when PostNuke builds my site's home page:

    Fatal error: Failed opening required 'weather.class.php' (include_path='') in /home/sites/site38/web/modules/weather/pnuserapi.php on line 601

    I checked the obvious for me: the php scripts are case sensitive, the files all exist, etc. However I am fairly new at this having worked on PostNuke for about a month now, part time.

    One question: where are the cache & temp files stored? Or what directories do I need to chmod 777 during installation? This was not clear in the installation notes.

    My host is a Cobalt RAQ running PHP 4.0.6 and PostNuke 0.72

    Thanks!
  • Posted: 02.03.2004, 21:19
       
    vedrine
    rank:
    Site Admin Site Admin
    registered:
     December 2003
    Status:
    offline
    last visit:
    09.10.08
    Posts:
    266
    Hello,
    Unfortunatly you are the first ont to report that type of problem.
    So, please can you try the following urls (normaly both should give the same result) :
    your_site_url/index.php?module=weather
    and
    your_site_url/index.php?module=weather&func=forecast
    and tell me if you get the same error message ?
    (I assume that before this, you install a least a city package, choose a default city and units, and a method (MSBC or weather.com) in the weather module administration as explained in the doc)
    All cached data are stored in the database (in table nuke_wthr_cache if your prefix is nuke_) so you don't have to chmod any directory.
  • Posted: 03.03.2004, 19:44
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    Sad to say, they both give me *exactly* the same error.

    I checked the pn_wthr_* (7 databases in all) from phpMyAdmin and they all looked good, although pn_wthr_cache was empty of data.

    Yes, I did install my local city package and tried both methods. First I tried MSBC, and since I am a US town, this was easy (thanks!). Then I registered with weather.com for a partner ID and authorization key, and returned to Weather's admin panel to set up for this method. But both methods generate the same error message.

    I did find two references to the same error with a search in Google. But they were both for XOOPS CMS and they were written in Japanese or German, so I came here! I did translate the German page and tried all the suggestions, but without results. The page as cached by Google:
    http://66.102.7.104/search?q=cache:AlQBS7Yd8NsJ:www.e-xoops.de/modules/news/article.php%3Fstoryid%3D55+Failed+opening+required+%27weather.class.php%27&hl=en&start=2&ie=UTF-8

    Note: my version of PostNuke is 0.726, not 0.72 as originally reported.
    Also, MySQL is at 3.23.32, Apache at 1.3.20.
  • Posted: 03.03.2004, 22:29
       
    vedrine
    rank:
    Site Admin Site Admin
    registered:
     December 2003
    Status:
    offline
    last visit:
    09.10.08
    Posts:
    266
    So I have a problem as I can see clearly where the problem occurs but not WHY !!
    With the url I gave to you, you call the weather_user_forecast function in pnuser.php and it calls the weather_userapi_getall function in pnuserapi.php , the first line of this function is
    require_once("weather.class.php");
    as the file weather.class.php is in the same modules/weather directory of your server there should be no problem but obviously it's not the case !!
    If you checked that the file is here and with the correct case for the name, I can't figure what is the problem !!
    One easy thing to try would be to replace this line by
    require_once("modules/weather/weather.class.php");
    it is line 601 in file pnuserapi.php
    If this fail, is your site online (is it on a shared or dedicated server ?) and can you give me an access to your site with ftp ??

    NOTE if the above change solve your problem, it is likely that you will have to do the same change to the line :

    require_once("snoopy.class.php");

    in the weather.class.php file
  • Posted: 03.03.2004, 23:52
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    It worked!! I had to make the same edit to snoopy.class.php in the weather.class.php file, as you predicted.

    I am hosted on a shared commercial server, "site38" - so it seems like I'm in a crowd. The server is a Cobalt RAQ4.
Quick reply
 
  • Options
Code:
Font color:  
Font size: