Results 1 to 10 of 10

Thread: CRON - Update_Tag_Cloud.php problem

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

    Default CRON - Update_Tag_Cloud.php problem

    I'm having a hard time getting the CRON for update_tag_cloud.php to run each night. I decided tonight to try running it from within my browser.

    Calling : http://www.<mydomain>.com/cronjobs/update_tag_cloud.php and I got the following message :

    Fatal error: Call to a member function Execute() on a non-object in /home/XXXX/public_html/cronjobs/update_tag_cloud.php on line 17
    Here is line 1 through 41 in update_tag_cloud.php with line 17 being in a bigger font size

    <?
    /*
    cronjobs name: Update_tag_cloud
    cronjobs URI: 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
    Description: update tag could be ran by cronjobs.
    Version: 1.0
    Author: indexu
    Author URI: -
    */
    global $site_url;
    // get new/updated links
    $query = "select keywords, category_id, cat1, cat2 from idx_link
    where suspended = 0
    and (new = 1 or updated = 1)
    and keywords != ''";

    $result = $dbConn->Execute($query);
    $tag_values = array();
    $i = 0;
    $total_record = $result->RecordCount();
    while ($row = $result->FetchRow()) {
    $i++;
    $keywords = $row["keywords"];
    $words = explode(",", $keywords);
    while (list($k, $v) = @each($words)) {
    $v = trim($v);
    if ($v) {
    if (strlen($v) > 2) {
    $v = addslashes($v);
    $tag_values[] = "('$v', 0, -1)";
    if ($row["category_id"]) {
    $tag_values[] = "('$v', $row[category_id], -1)";
    }
    if ($row["cat1"]) {
    $tag_values[] = "('$v', $row[cat1], -1)";
    }
    if ($row["cat2"]) {
    $tag_values[] = "('$v', $row[cat2], -1)";
    }
    }
    }
    Any thoughts?
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  2. #2
    Join Date
    Nov 2007
    Posts
    227

    Default

    Change

    Code:
    global $site_url;
    To
    Code:
    global $dbConn, $site_url;
    Regards
    mp
    For questions related to any mods I developed, please contact me by pm or email at webmaster [at] scriptdragon [dot] com

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

    Default

    I'm still getting the same thing
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  4. #4
    Join Date
    Nov 2007
    Posts
    227

    Default

    I'm checking the file now. I had to download it using the file manager in my cpanel. I am at work.
    For questions related to any mods I developed, please contact me by pm or email at webmaster [at] scriptdragon [dot] com

  5. #5
    Join Date
    Nov 2007
    Posts
    227

    Default

    Without being at home and being able to see the big picture, I am not sure if this file is meant to be called from a plugin or directly.

    If it is to be called form a plugin, the following code will probably throw an error.

    If it is to be called directly, then this code will work. Also, when it's used, it simply displays a blank screen.

    I can look into it further tomorrow, but for now add this code to the top just above the globals.

    Code:
    include "../application.php";
    Regards
    Wayne
    For questions related to any mods I developed, please contact me by pm or email at webmaster [at] scriptdragon [dot] com

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

    Default

    As mpdaddy stated, it doesn't appear to be including application.php which is required to connect to the database.

  7. #7
    Join Date
    Nov 2007
    Posts
    227

    Default

    Looking into it further I see that it is meant to be called by the admin/cronjobs.php file. Therefore it does not need to include the application.php file since the cronjobs.php already includes it. The update_tag_clouds.php file is not meant to be accessed directly.

    When I have better script access and more time, I will look into why the script does not seem to be working properly. When I know more, I will report back with my findings.

    Regards
    Wayne
    For questions related to any mods I developed, please contact me by pm or email at webmaster [at] scriptdragon [dot] com

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

    Default

    You guys are the best!!! Thank you for looking into it further
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  9. #9
    Join Date
    Nov 2007
    Posts
    227

    Default

    Frank

    My apologies. I have not been able to solve the problem you are having. I know that the only cronjob that updates the time is the clear_templates_c.php. The update_tag_cloud.php seems to function correctly, but does not update the time.

    I have limited internet access until at least Friday. I also have my 3 days off starting Friday. I will have more time to go through all the files and check it out more.

    On another note, I am almost finished with the last conversion projects you requested. I will keep you posted.

    Regard
    mp
    For questions related to any mods I developed, please contact me by pm or email at webmaster [at] scriptdragon [dot] com

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

    Default

    Hey Wayne...

    No need for apologies All is good and well When you have some free time, we can talk more then
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

Similar Threads

  1. Cron and .sh files
    By echo@ in forum INDEXU DELUXE v1.x
    Replies: 1
    Last Post: 11-26-2008, 09:06 PM
  2. Set daily cron job
    By CEC in forum v5.x
    Replies: 3
    Last Post: 09-27-2006, 10:19 AM
  3. Cron job
    By mycolumbus in forum v5.x
    Replies: 3
    Last Post: 08-27-2006, 08:22 PM
  4. cron job check url
    By lexpression in forum v5.x
    Replies: 0
    Last Post: 04-01-2006, 05:49 PM
  5. indexu maintenance script in cron
    By persut in forum v5.x
    Replies: 1
    Last Post: 01-17-2006, 01:38 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
  •