Results 1 to 14 of 14

Thread: GIF-error after first load of links with no pagerank info

  1. #1
    Join Date
    Oct 2007
    Posts
    31

    Default GIF-error after first load of links with no pagerank info

    When opening a category with links that have no pagerank info (not pagerank=0 but "No Pagerank information available) for the first time, Indexu returns the PHP Warning: "PHP Warning: readfile(themes/biology/images/pr/.gif): failed to open stream: No such file or directory in /srv/www/vhosts/trophort.com/httpdocs/googlepr.php on line 63" with associated problem rendering the (unavailable) GIF:



    This problem is fixed after reloading the page. Is there a way to avoid the problem at first page load?
    Last edited by kleinhev; 02-04-2009 at 02:44 AM.

  2. #2
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    When opening a category with links that have no pagerank info (not pagerank=0 but "No Pagerank information available) for the first time, Indexu returns the PHP Warning: "PHP Warning: readfile(themes/biology/images/pr/.gif): failed to open stream: No such file or directory in /srv/www/vhosts/trophort.com/httpdocs/googlepr.php on line 63" with associated problem rendering the (unavailable) GIF:
    Yes indexu shows php errors after a cache clearout on the 1st reload.

    the problem you have should lie in your rows.html, looks like you have an additional "/" forward slash in your actual image path in the file.

    themes/biology/images/pr/.gif
    fancy posting your rows.html as a file ?

    Hey kleinhev are you trophort or just promoting ?
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



  3. #3
    Join Date
    Oct 2007
    Posts
    31

    Default Can you find the error in rows.html?

    rows.html:

    <%if $sponsored%>
    <%include file="sponsored_rows.html"%>
    <%elseif $premium%>
    <%include file="premium_rows.html"%>
    <%else%>

    <div class="reguler_list"><%$number%>. <a target="_blank" href="<%$url%>" name="link_<%$link_id%>"><b style="color: #51697F"><%$title%></b></a></div>
    <div><%$description%></div>
    <b><a href="<%$site_url%>/<%$detail_page_url%>">Details</a></b> <b>Hits</b>: <%$hits%> <b>Votes</b>: <%$votes%> <b>Ratings</b>: <%$rating_img%> <b>Reviews</b>: <%$review_img%> <b>Google PR</b>: <img src="googlepr.php?link_id=<%$link_id%>" alt="" />
    <br /><br />
    <%/if%>

    (P.S.: I am TropHort.com!)

  4. #4
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    retracted
    Last edited by echo@; 02-04-2009 at 06:16 AM.
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



  5. #5
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    Sorry im still half asleap, this is why.

    your googlepr.php has the path themes/biology/images/pr/.gif

    when the correct path is themes/biology/images/pr/0.gif

    http://trophort.com/themes/biology/images/pr/0.gif the file does exisit

    search for pr/.gif in your googlepr.php file and replace with pr/0.gif
    Last edited by echo@; 02-04-2009 at 06:21 AM.
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



  6. #6
    Join Date
    Oct 2007
    Posts
    31

    Default

    googlepr.php:

    <?php

    /**
    *
    * INDEXU
    * Copyright(C), Nicecoder, 2000-2006, All Rights Reserved.
    *
    * INDEXU(tm) is protected by Indonesia and International copyright laws.
    * Unauthorized use or distribution of INDEXU(tm) is strictly prohibited,
    * violators will be prosecuted. To obtain a license for using INDEXU(tm),
    * please register at Nicecoder home page at Quality Web Based Software for Your Business - IndexU Link Directory - iDesk Help Desk - NiceTalk LiveHelp script - NiceMember membership script - NiceBackup cPanelâ„¢ backup utility - DMOZ Extractor
    *
    * Author:
    * Dody Rachmat Wicaksono (dody@nicecoder.com)
    * M. Zuber (zubby@nicecoder.com)
    *
    */

    /*================================================= ==
    main
    ================================================== =*/

    include "application.php";
    include "lib/pagerank.class.php";

    RemoveFilter("gzip_compression");
    RemoveFilter("runtime");
    RemoveFilter("start_session");
    RunPreFilter(__FILE__);

    $rank = 0;
    $query = "select rank from idx_pagerank
    where link_id = '$link_id'
    and engine = 'g'
    and (to_days(now()) - to_days(last_update) < $pagerank_cache)
    limit 1";
    $result = $dbConn->Execute($query);
    if ($result->RecordCount()) {
    $rank = $result->Fields('rank');
    }
    else {
    $query = "select url from idx_link where link_id = '$link_id' limit 1";
    $result = $dbConn->Execute($query);
    if ($result->RecordCount()) {
    $url = $result->Fields('url');
    if (intval(-6288256054) == -6288256054) {
    $engine = new googlerank64();
    }
    else {
    $engine = new googlerank32();
    }
    $rank = $engine->FetchPR($url);
    $query = "replace into idx_pagerank
    (link_id, engine, rank, last_update) values
    ('$link_id', 'g', '$rank', now())";
    $result = $dbConn->Execute($query);
    }
    }

    $rankimage = 'themes/' . $active_theme . '/images/pr/' . $rank . '.gif';

    header('Content-Type: image/gif');
    readfile($rankimage);

    RunPostFilter(__FILE__);

    ?>


    Should there not be a command " IF $rank IS MISSING THEN $rank='0' " (sorry, I 'm not much familiar with PHP/MySQL) in there?

  7. #7
    Join Date
    Oct 2007
    Posts
    31

  8. #8
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    googlepr.php looks fine kleinhev.

    Have you modified /lib/pagerank.class.php recentley?

    might be worth reinstalling pagerank.class.php from your archive.

    Other than that im out of ideas, ..
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



  9. #9
    Join Date
    Oct 2007
    Posts
    31

    Default

    No, I never touched /lib/pagerank.class.php. I'll play around with setting $rank to 0 if there is no rank returned...

  10. #10
    Join Date
    Oct 2007
    Posts
    31

    Default Solution

    Add the following 3 lines of code:

    if ($rank==NULL) {
    $rank = 0;
    }


    just above:

    $rankimage = 'themes/' . $active_theme . '/images/pr/' . $rank . '.gif';

    in googlepr.php.

  11. #11
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    this must be a bug then
    ____________________________
    http://www.articleconveyer.com
    Give Your Articles Exposure



  12. #12
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Post it in the Project Tools... Let one of the programmers confirm it
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  13. #13
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    I posted it for you. I dont know if this will get into 1.3 or not. I've already asked for a lot and I want to release it today.

  14. #14
    Join Date
    Aug 2008
    Posts
    49

    Default

    hello,

    the problem has be fixed, you could download on svn http://nicecoder.com/svn/index.php?act=changeset&id=984

Similar Threads

  1. Help, Page won't load
    By mck873 in forum v5.x
    Replies: 1
    Last Post: 11-03-2007, 10:49 AM
  2. Replies: 4
    Last Post: 12-23-2006, 10:17 PM
  3. Alexa Site info Links
    By lexpression in forum v5.x
    Replies: 7
    Last Post: 07-25-2005, 11:36 AM
  4. Replies: 1
    Last Post: 08-28-2004, 05:00 PM
  5. Replies: 1
    Last Post: 06-13-2003, 06:35 AM

Posting Permissions

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