HELP ! cronjob | how to find PATH-TO-PHP ?

Discussion in 'PHP' started by arvalyne, Mar 21, 2013.

  1. #1
    hi , i'm trying to run this cronjob command in my hosting ..
    But i didn't know whre is my PHP path .. :(

    i'm baby in this .. help me please ..

    PATH-TO-PHP -q FULL-LOCAL-PATH-TO-DOMAIN/cron.php
    PATH-TO-PHP is the local path on your server to php and FULL-LOCAL-PATH-TO-DOMAIN is the full local path on your server to where you have the script installed.
     
    Solved! View solution.
    arvalyne, Mar 21, 2013 IP
  2. IGarret

    IGarret Active Member

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    3
    Trophy Points:
    51
    #2
    If you have SSH access to your hosting server, you can check it with "whereis php" command.

    In other case you can try to use simply "php" or "php5" command without full path, sometime it works.
     
    IGarret, Mar 21, 2013 IP
  3. #3
    normally, i go to cpanel, go to the file manager. In the left side of the filemanger is the list of directories... above that is the first part of the link, (such as home/toddsabc) you then add the rest of the path to where you file is.

    mine looks like:
    home/toddsabc/public_html/script/script.php

    here is an example of a cron job:
    /usr/local/bin/php -q /home/toddsabc/public_html/script/script.php

    I hope this helps you
     
    matt_62, Mar 21, 2013 IP
  4. arvalyne

    arvalyne Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4

    i'm using hostgator hosting . i can't find SSh access in cpanel ..
     
    arvalyne, Mar 21, 2013 IP
  5. arvalyne

    arvalyne Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #5

    thanks ! i found it . i've 3 domain in my hosting . is it same php folder located for all domain ??
     
    arvalyne, Mar 21, 2013 IP
  6. matt_62

    matt_62 Prominent Member

    Messages:
    1,827
    Likes Received:
    515
    Best Answers:
    14
    Trophy Points:
    350
    #6
    yes :) the basic star is the same with all domains that are hosted on the same cpannel account, which for me, means that they would all start with home/toddsabc/
     
    matt_62, Mar 21, 2013 IP