Pixelated a phpBB Template by SkaidonDesigns
 
Cheapest Web Software Support Area Forum Index www.cheapestwebsoftware.com
Play with the Best, be the Best!
Gallery Scraper
FAQ
Search
Memberlist
Usergroups
Profile
Log in to check your private messages
Log in

The Mightiest Webmaster Solutions Ever
Blogs Organizer
Blogs Organizer
Cheapest Adult Scripts
Cheapest Adult Scripts
Special Offers
Special Offers
Rocket Pinger
Rocket Pinger

Haven't registered yet? Do it here now!
Cronjob command syntax with PHP on my host - is it working?
Topic Tags:
 
Post new topic   Reply to topic    Cheapest Web Software Support Area Forum Index -> Rocket Pinger
View previous topic :: View next topic  
Author Message
Scott C



Joined: 21 May 2008
Posts: 18

PostPosted: Wed May 21, 2008 11:33 am    Post subject: Cronjob command syntax with PHP on my host - is it working? Reply with quote
After installation, the Active Cronjobs List In Cronjobs Settings was empty so I set it manually in my hosting control panel (at GoDaddy.com - my hosting control panel is not CPanel). It lets me create a Cronjob command by browsing my domain and selecting the rpcron.php file, and then it fills in the command field with:

/web/cgi-bin/php5 "$HOME/html/rp/rpcron.php"

I noticed that it doesn't include the PHP path "usr/local/bin/php" (though I verified this location is correct by running the <? passthru("whereis php");?> command like you suggested)

According to my host support, the Cronjob is enabled and should work just fine. They cite the following:

The installed versions of PHP 4 and PHP 5 do not support the interpreter specification in a PHP file. In order to run a PHP script via Cron, you must specify the interpreter manually. For example:
    PHP 4: /web/cgi-bin/php "$HOME/html/test.php"
    PHP 5: /web/cgi-bin/php5 "$HOME/html/test.php5"
Note: In this example script, "$HOME" represents the full path to your Shared Hosting account. The actual path to your account will be provided if you select the the script from your account using the Browse button.


My question is:

However, even after I have set up the Cronjob, when I go back and look at the "Cronjobs Settings" in the Rocket Pinger Administration Controls, the Active Cronjobs List is still empty. Shouldn't it show the Cron job I just created now? I DID check the rpcronjobs file and it now contains the single line:

/web/cgi-bin/php5 "$HOME/html/rp/rpcron.php"

Does this mean it will work okay?
Back to top
View user's profile Send private message

Author Message
Atanasis
Owner


Joined: 22 May 2004
Posts: 4284
Location: The Net

PostPosted: Wed May 21, 2008 12:25 pm    Post subject: Reply with quote
no, it won't as you did it.

First, your host support pasted you:
/web/cgi-bin/php5 "$HOME/html/rp/rpcron.php"

it can't be like that, they tell you $HOME is the path, so you need to replace it.

go and setup the cronjob like this at the place in your hosting panel:
/web/cgi-bin/php5 /full/path/to//html/rp/rpcron.php

once you set it up, you won't see it in the "Active cronjobs list", because it can see only added automatically cronjobs.

and finally your "rpcronjobs" file should be empty, don't leave any text in it.
_________________
Thanks,
Kaktusan

Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number

Author Message
Scott C



Joined: 21 May 2008
Posts: 18

PostPosted: Wed May 21, 2008 7:44 pm    Post subject: Reply with quote
Atanasis wrote:
go and setup the cronjob like this at the place in your hosting panel:
/web/cgi-bin/php5 /full/path/to//html/rp/rpcron.php


So, when I set up the Cronjob in my hosting panel, should I leave out both the "-q" switch before the full path and the " >> /dev/null" at the end of the command?

Thanks
Back to top
View user's profile Send private message

Author Message
Atanasis
Owner


Joined: 22 May 2004
Posts: 4284
Location: The Net

PostPosted: Wed May 21, 2008 8:06 pm    Post subject: Reply with quote
yes, probably you don't need to use them since they are specific for the regular php executable being used.
_________________
Thanks,
Kaktusan

Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number

Author Message
Scott C



Joined: 21 May 2008
Posts: 18

PostPosted: Wed May 21, 2008 8:24 pm    Post subject: Reply with quote
OK, but I'm still not sure that it is working correctly. My Cronjobs command is now:

/web/cgi-bin/php5 /home/content/t/o/p/topinvesting/html/rp/rpcron.php

Also, when I look at the rpsettings table in the MySQL database, it shows the PHP path is:

/usr/local/bin/php

instead of:

/web/cgi-bin/php5

Could that be the problem?
Back to top
View user's profile Send private message

Author Message
Atanasis
Owner


Joined: 22 May 2004
Posts: 4284
Location: The Net

PostPosted: Wed May 21, 2008 9:10 pm    Post subject: Reply with quote
yes, could be it. in "general settings->php settings" you need to specify the full system path to the php executable.

/web/cgi-bin/php5
is relative path to your domain, not full path. also you need to use the full path for your cronjob too
_________________
Thanks,
Kaktusan

Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number

Author Message
Scott C



Joined: 21 May 2008
Posts: 18

PostPosted: Wed May 21, 2008 11:05 pm    Post subject: Reply with quote
My Cronjob now executes correctly because my host support informed me that I have PHP4, not PHP5, installed. So now my Cronjob command reads:

/web/cgi-bin/php /home/content/t/o/p/topinvesting/html/rp/rpcron.php


However, after the Cron job successfully runs, the RP Administration Panel still shows NO Automated Ping Events History.

I put /web/cgi-bin/php in General Settings--> PHP Settings. Is this right? My host support told me that the paths in the Cron job command above ARE the full paths and that rpcron.php was executed correctly. If /web/cgi-bin/php is not the full path you want me to put into General Settings--> PHP Settings, could that be because I have shared hosting instead of a dedicated server? You did not say that a dedicated host server was required to use Rocket Pinger.

I really need some help to make this work.

Thanks
Back to top
View user's profile Send private message

Author Message
Atanasis
Owner


Joined: 22 May 2004
Posts: 4284
Location: The Net

PostPosted: Wed May 21, 2008 11:15 pm    Post subject: Reply with quote
no, you don;t need dedicated server, it runs fine on any shared hosts.

just i am not sure /web/cgi-bin/php is properly executing the file.

either ask your host support to run on command line the cronjob command as is:
/web/cgi-bin/php /home/content/t/o/p/topinvesting/html/rp/rpcron.php
and see if any error will be printed

or, try it yourself by making file tmp.php with code:
Code:
<?
passthru('/web/cgi-bin/php /home/content/t/o/p/topinvesting/html/rp/rpcron.php');
?>


and run the tmp.php file with your browser and see if anything will be printed..
_________________
Thanks,
Kaktusan

Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number

Author Message
Scott C



Joined: 21 May 2008
Posts: 18

PostPosted: Thu May 22, 2008 12:07 am    Post subject: Reply with quote
The script rpcron.php DOES execute, and the output is:

Content-type: text/html

Is this correct?

Automated Events history is still empty.

Thanks
Back to top
View user's profile Send private message

Author Message
Atanasis
Owner


Joined: 22 May 2004
Posts: 4284
Location: The Net

PostPosted: Thu May 22, 2008 11:43 am    Post subject: Reply with quote
then, it runs fine.

best would be to pm me url and pass to your RP admin so i can take a look
_________________
Thanks,
Kaktusan

Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number

Display posts from previous:   
Post new topic   Reply to topic    Cheapest Web Software Support Area Forum Index -> Rocket Pinger All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group