1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help Need. Something Technical about Wordpress

Discussion in 'Blogging' started by snowmike, Nov 6, 2008.

  1. snowmike

    snowmike Newbie

    Joined:
    Dec 24, 2007
    Messages:
    32
    Likes Received:
    2
    Trying to install and use a referrers script with wordpress.
    To make this script work...i need to include the php code below.
    <? include_once('referrers/log.php'); ?>

    But the instruction say i need to do a "full root path for the include"...

    what is that mean...sorry i am noob at WP...

    can someone help.please.
     
  2. seomanifest

    seomanifest Regular Member

    Joined:
    Oct 5, 2008
    Messages:
    363
    Likes Received:
    81
    Occupation:
    Consultant
    The full path would be something like this:

    /home/virtual/yourblog.com/htdocs/wp-content/referrers/log.php
     
  3. dikozall

    dikozall Newbie

    Joined:
    Apr 23, 2008
    Messages:
    36
    Likes Received:
    94
    I always do one think when i don't know full root path. Make an error somewhere in the php code. Then try to load the page where the error is. You will see a message bla bla bla in /..../..../... on line XX this is your full root path. :)
     
  4. frostbyte

    frostbyte Registered Member

    Joined:
    Nov 7, 2007
    Messages:
    56
    Likes Received:
    19
    Try this:

    Code:
    include_once($_SERVER['DOCUMENT_ROOT'].'/referrers/log.php');
    
     
    • Thanks Thanks x 1
  5. xplicit

    xplicit BANNED BANNED

    Joined:
    Jul 21, 2008
    Messages:
    1,119
    Likes Received:
    1,053
    or you can
    Code:
    <? include_once('http://www.YOURSITE.com/referrers/log.php'); ?>
     
    • Thanks Thanks x 1
  6. snowmike

    snowmike Newbie

    Joined:
    Dec 24, 2007
    Messages:
    32
    Likes Received:
    2
    It worked!
    Thanks man!

    One more question, the script asking me to do a "Cron Job Installation"
    How do i do that/whats that mean...!?
     
  7. matapples01

    matapples01 Regular Member

    Joined:
    May 15, 2008
    Messages:
    358
    Likes Received:
    208
    I'm not a cron expert so if I butcher this someone chime in and correct me. Basically cron is a feature of most hosting companies and is a place where you go and enter a path to a script/file (maybe the file location you talked about above). You also enter the frequency (once a day, hour, minute...etc.) and save it. It basically instructs the server to (at your timeframe set) go to that file and execute the script in that file.
     
  8. mypmmail

    mypmmail Junior Member

    Joined:
    Jan 31, 2008
    Messages:
    111
    Likes Received:
    27
    ok .... i know this .... ;)

    i'm really bad at marketing, but should be able to answer your technical q ....

    cron is basically a task scheduler in the linux or unix world
    it's the same as windows' scheduled task found under
    Start | Programs | Accessories | System Tools | Scheduled Task

    what you need to take note is in your host cpanel, you should see a "cron job" option.
    use the standard mode for easier usage
    the only thing you need to take note is the path of the executable you specific.

    in there, you must specify the full path
    ie.
    php /home/youruserid/public_html/pathtoyourphp/your.php

    e.g
    say your host user id is bobfrapples, then to run the log.php as a cron, you should specify, the "php" at the beginning of the line is required.

    php /home/bobfrapples/public_html/referrers/log.php