Help needed with this error message .....

Discussion in 'XML & RSS' started by ST12, Jan 30, 2006.

  1. #1
    I tried to put on my site some Yahoo News RSS, but got the followin Error message.


    Warning: Unknown(/home/boj/public_html/carp/carp.php): failed to open stream: No such file or directory in /home/bojidar1/public_html/bip/newsp_common.php(733) : eval()'d code on line 178

    Fatal error: (null)(): Failed opening required '/home/boj/public_html/carp/carp.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/boj/public_html/bip/newsp_common.php(733) : eval()'d code on line 178




    I have one main site, in publich_html folder (RSS is working fine on it) and the other sites are under it, each has its own folder.
    For example main site

    publich_html/..... all files and folders for the main site

    The rest of the sites are:

    public_html/garden/......

    public_html/roses/ .......

    public_html/bok/ .......
     
    ST12, Jan 30, 2006 IP
  2. tflight

    tflight Peon

    Messages:
    617
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The error message that means on line 178 of this file:
    /home/bojidar1/public_html/bip/newsp_common.php

    It was told to go look for this file:
    /home/boj/public_html/carp/carp.php

    But it wasn't there to be found. Without knowing what program you are using (or if it is custom) there is probably a setup issue somewhere. Notice that in once case your files are successfully launching from /home/bojidar1/ but then it couldn't find a file within /home/boj/

    So if there is a setting somewhere that asks for the absolute file path or document root you might want to check that it is /home/bojidar1/public_html/ instead of /home/boj/public_html/

    Hard to give you more without a little more background info.
     
    tflight, Jan 30, 2006 IP
  3. ST12

    ST12 Active Member

    Messages:
    1,205
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    90
    #3
    Thank you tflight.

    Here is the Yahoo RSS code (that works on the main site, but not on the sites under it)


    <?php
    $sfn = $_SERVER["DOCUMENT_ROOT"];
    $pos = strrpos($sfn, '/');
    $filename = substr($sfn,0,$pos).'/carp/carp.php';
    require_once($filename);

    // Show 3 items
    CarpConf('cborder','');
    CarpConf('maxitems',3);
    CarpConf('poweredby','');
    CarpConf('iorder','link,date,desc');
    CarpConf('bilink','<font face="Verdana" size="1pt"><b>');
    CarpConf('ailink','</b></font>');
    CarpConf('bidesc','<font face="Verdana" size="1pt">');
    CarpConf('aidesc','</font><br><br>');
    CarpConf('filterout','Yahoo! News');
    CarpConf('cacheinterval',300);
    CarpConf('linktarget',1);
    $t="{site-topic}";
    $r = '%22'.urlencode($t).'%22';
    $s ='http://news.search.yahoo.com/news/rss?ei=UTF-8&p='.$r;
    CarpCacheShow($s);
    $s='http://news.search.yahoo.com/search/news?p='.$t.'&sm=Yahoo%21+Search&fr=FP-tab-news-t&toggle=1';
    $t = htmlentities($s);
    echo '<p align="right">[ Read all the latest {site-topic} News <a href="'.$t.'">here.</a> ]</p>';
    ?>
     
    ST12, Jan 30, 2006 IP
  4. tflight

    tflight Peon

    Messages:
    617
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It looks to me like the script is hard coded to be run from your HTML root, not within a subdirectory. But that doesn't explain why it is looking in the incorrect document root. Did you download this script from somewhere or did you create it?
     
    tflight, Jan 30, 2006 IP
  5. ST12

    ST12 Active Member

    Messages:
    1,205
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    90
    #5
    it is from a program, I didn't create. Looks like I'll have to figure out how to put Yahoo RSS myself. Do you know where should I start. I need something very close to "copy" and "paste" with all the steps, without doing any coding.
    Thank you again!
    st12
     
    ST12, Jan 30, 2006 IP