Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 09-12-2009, 02:39 PM   #1
halfpint
GFY's Halfpint
 
halfpint's Avatar
 
Industry Role:
Join Date: Jun 2007
Location: UK
Posts: 15,223
CRON JOB gurus what is wrong with this ??

One of the scripts I purchased wants me to set a cron job as follows

0 * * * * php "path to your website dir"/cron.php

So I set it up like this in Cpanel on a shared hosting account in the Advanced (Unix Style)

Minute Hour Day Month Weekday Command
0 * * * * /home/username/public_html/cron.php


I keep getting emails saying this

/bin/sh: /home/usermname/public_html/cron.php: Permission denied

Does this mean that the cron job is not being done or being denied permissions or does it mean my email address is not acepting emails from the cron job


If it is the cron job that is being denied should I change the file permissions on the cron.php or have I done something else wrong

Thanks
__________________

Get FREE website listings on Cryptocoinshops.net

Last edited by halfpint; 09-12-2009 at 02:40 PM..
halfpint is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 02:45 PM   #2
lazzlo
Confirmed User
 
lazzlo's Avatar
 
Join Date: Sep 2003
Location: Toronto
Posts: 3,709
Not a guru by any means but maybe the file needs execute permissions.
__________________
lazzlo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 02:47 PM   #3
brassmonkey
Pay It Forward
 
brassmonkey's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Yo Mama House
Posts: 77,228
make sure the path to php is right
__________________
TRUMP 2025 KEKAW!!! - The Laken Riley Act Is Law!
DACA ENDED - SUPPORT AZ HCR 2060 52R - email: brassballz-at-techie.com
brassmonkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 02:49 PM   #4
lazzlo
Confirmed User
 
lazzlo's Avatar
 
Join Date: Sep 2003
Location: Toronto
Posts: 3,709
or there's in error in the path
__________________
lazzlo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 02:49 PM   #5
greg80
Confirmed User
 
greg80's Avatar
 
Industry Role:
Join Date: May 2007
Posts: 1,644
change file permision so that user that is running that cron command can execute the file

(make the file executable for it's owner)
__________________
Say no to GoDaddy and high renewal prices! Go with NameSilo - FREE private whois for life, $8.99 regstrations and renewals. Free redirects, emails, great control panel and more! NameSilo rocks!
greg80 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 02:49 PM   #6
baddog
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: the beach, SoCal
Posts: 107,089
Not sure about cPanel, but with DirectAdmin you use the URL, so public_html would not be in the path.
baddog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 02:49 PM   #7
brassmonkey
Pay It Forward
 
brassmonkey's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Yo Mama House
Posts: 77,228
{PATH TO PHP} is usual /usr/local/bin/php

{PATH TO PHP} /home/******/public_html/cron.php
__________________
TRUMP 2025 KEKAW!!! - The Laken Riley Act Is Law!
DACA ENDED - SUPPORT AZ HCR 2060 52R - email: brassballz-at-techie.com
brassmonkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 02:54 PM   #8
frank7799
Confirmed User
 
frank7799's Avatar
 
Industry Role:
Join Date: Jul 2003
Location: In the middle of nowhere...
Posts: 1,974
If you set it up like this:

/home/username/public_html/cron.php

try this way instead (adding php and a space):

php /home/username/public_html/cron.php

If you just use /home/username/public_html/cron.php, the system will try to execute it as a shell script, I think, which causes the above error.

Last edited by frank7799; 09-12-2009 at 02:56 PM..
frank7799 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 02:55 PM   #9
fuzebox
making it rain
 
fuzebox's Avatar
 
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,102
You forgot to put "php" in front of the file you wanted to run.
fuzebox is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 02:58 PM   #10
halfpint
GFY's Halfpint
 
halfpint's Avatar
 
Industry Role:
Join Date: Jun 2007
Location: UK
Posts: 15,223
Quote:
Originally Posted by m4yadult View Post
If you set it up like this:

/home/username/public_html/cron.php

try this way insted (adding php and a space):

php /home/username/public_html/cron.php

If you just use /home/username/public_html/cron.php, the system will try to execute it as a shell script, I think, which caused the above error.
ha I think thats the problem because the installation says set the cron up as this

0 * * * * php "path to your website dir"/cron.php

It has the "php" with a space in front


thanks
__________________

Get FREE website listings on Cryptocoinshops.net
halfpint is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 02:58 PM   #11
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
Quote:
Originally Posted by fuzebox View Post
You forgot to put "php" in front of the file you wanted to run.

if that doesn't work, try full path to php /usr/bin/php or /usr/local/bin/php
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 02:59 PM   #12
halfpint
GFY's Halfpint
 
halfpint's Avatar
 
Industry Role:
Join Date: Jun 2007
Location: UK
Posts: 15,223
Quote:
Originally Posted by fuzebox View Post
You forgot to put "php" in front of the file you wanted to run.
thanks .. I just realised what I had done when m4yadult posted


thanks guys for the help
__________________

Get FREE website listings on Cryptocoinshops.net
halfpint is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 03:01 PM   #13
frank7799
Confirmed User
 
frank7799's Avatar
 
Industry Role:
Join Date: Jul 2003
Location: In the middle of nowhere...
Posts: 1,974
Quote:
Originally Posted by halfpint View Post
thanks guys for the help
No problem.
frank7799 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 03:42 PM   #14
PornMD
Mainstream Businessman
 
PornMD's Avatar
 
Industry Role:
Join Date: Jan 2007
Location: San Diego
Posts: 9,291
GFY CAN be a beautiful thing - problem solved in 20 mins, nice.
__________________
Want to crush it in mainstream with Facebook ads? Hit me up.
PornMD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 03:47 PM   #15
halfpint
GFY's Halfpint
 
halfpint's Avatar
 
Industry Role:
Join Date: Jun 2007
Location: UK
Posts: 15,223
Quote:
Originally Posted by PornMD View Post
GFY CAN be a beautiful thing - problem solved in 20 mins, nice.
Yep and its free ....people bitch about GFY all the time

I have asked for help a number of times on GFY and people on here have always helped

Thanks GFY and all the peeps that have helped me over the last 2 years
__________________

Get FREE website listings on Cryptocoinshops.net
halfpint is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 04:38 PM   #16
HomerSimpson
Too lazy to set a custom title
 
HomerSimpson's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Springfield
Posts: 13,826
needs path to php...

example
0 * * * * /usr/bin/php -q /home/user/public_html/cron.php

you can also use some other command such as get or wget

0 * * * * GET http://www.yoursite.com/cron.php
0 * * * * wget http://www.yoursite.com/cron.php
__________________
Make a bank with Chaturbate - the best selling webcam program
Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!!

PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email:
HomerSimpson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 04:40 PM   #17
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
make sure the php file has a shebang
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-12-2009, 04:49 PM   #18
brassmonkey
Pay It Forward
 
brassmonkey's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Yo Mama House
Posts: 77,228
Quote:
Originally Posted by HomerSimpson View Post
needs path to php...

example
0 * * * * /usr/bin/php -q /home/user/public_html/cron.php

you can also use some other command such as get or wget

0 * * * * GET http://www.yoursite.com/cron.php
0 * * * * wget http://www.yoursite.com/cron.php
yep .
__________________
TRUMP 2025 KEKAW!!! - The Laken Riley Act Is Law!
DACA ENDED - SUPPORT AZ HCR 2060 52R - email: brassballz-at-techie.com
brassmonkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.