Go Back   Web Hosting UK Forums | Linux Windows Dedicated Server and cPanel VPS Hosting Forum > Support > php issues.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-26-2007, 02:09 PM
Senior Member
 
Join Date: Jan 2007
Posts: 939
Default cron

Anyone have any experience with cron?
I have written a reminder script and need a cron job to execute a php script daily. The times isn't a problem just the command line.

Normally i would write
Code:
"linx-dump http://www.my/scipt.php"
to run the script which does work if the file is in the root of the website, unfortunately I need the file to reside 'up a level' for security, but everytime i try, it won't run/parse the script.

I have tried wget and php q/ and don't know what else to try.......anyone help?

I originally wanted to have the file in a secure .htaccess protected folder but obviously it wouldn't run due to authorization

Thx
Jon
__________________
West Dorset Community
Reply With Quote
  #2 (permalink)  
Old 07-26-2007, 02:31 PM
Senior Member
 
Join Date: Feb 2007
Posts: 110
Default

Here is what I use to email me the error log of the sites I host:

php /home/baldockw/emailerrors.php
Reply With Quote
  #3 (permalink)  
Old 07-26-2007, 02:52 PM
Senior Member
 
Join Date: Jan 2007
Posts: 939
Default

Thx mate...
I am having huge problems running mine, i have tried that but to no avail.

I am wondering if it is because my script also has a couple of 'include' files embeded. They don't seem to parse. Script and cron runs fine when located in the root and all paths are correct.
Can't seem to find much help via search either.
__________________
West Dorset Community
Reply With Quote
  #4 (permalink)  
Old 07-26-2007, 03:01 PM
Senior Member
 
Join Date: Feb 2007
Posts: 110
Default

Hmm, doing it via "php " should parse it as any other php file includes and all. I'm not experienced enough with cron to say for sure though.
Reply With Quote
  #5 (permalink)  
Old 07-26-2007, 05:58 PM
Senior Member
 
Join Date: Jan 2007
Posts: 939
Default

Same here, maybe because it is not in the root?? I really don't know
__________________
West Dorset Community
Reply With Quote
  #6 (permalink)  
Old 07-26-2007, 06:31 PM
Senior Member
 
Join Date: Feb 2007
Posts: 110
Default

My script isn't in the web root either, it is one back from public_html.
Reply With Quote
  #7 (permalink)  
Old 07-26-2007, 09:36 PM
Administrator
 
Join Date: Mar 2006
Posts: 1,702
Default

linx-dump is unrecognized shell command. Seems like you are using this information from some other website as we dont have any such command on any of our linux servers.
__________________
Web Hosting UK - ASP MSSQL Hosting - cPanel Linux Hosting
AIM : webredback || msn : andrew @ webhosting.uk.com
Toll Free : 0808 262 0855
Reply With Quote
  #8 (permalink)  
Old 07-26-2007, 09:40 PM
kev woodman's Avatar
Premium Member
 
Join Date: Jul 2006
Location: Newport, Wales, UK.
Posts: 1,494
Default

I always use wget on mine.
__________________
homo sum: humani nil a me alienum puto ... ( just Google it )
Reply With Quote
  #9 (permalink)  
Old 07-27-2007, 12:54 AM
Senior Member
 
Join Date: Jan 2007
Posts: 939
Default

Quote:
Originally Posted by Administrator View Post
linx-dump is unrecognized shell command. Seems like you are using this information from some other website as we dont have any such command on any of our linux servers.
I don't know what you mean by this admin but can assure you it works fine on your server. Am using it now while i figure out why i can't parse the script above public_html.
__________________
West Dorset Community
Reply With Quote
  #10 (permalink)  
Old 07-27-2007, 02:51 PM
Senior Member
 
Join Date: Jan 2007
Posts: 939
Default

I managed to find the problem which should have been obvious but wasn't to me. Maybe of interest to someone in the future.

All include/require paths have to be 'absolute paths' not urls.
__________________
West Dorset Community
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:09 AM.
Copyright 2002-2007 WebHosting.uk.com. All rights reserved.
Web Hosting UK Forum