P.Z. Low Cost CPanel Web Hosting  

Go Back   P.Z. Low Cost CPanel Web Hosting > Page-Zone Web Hosting Main Forum > General FAQ > General Questions and Comments

General Questions and Comments Post your question or grace us with your knowledge. Posting limited to registered members.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Using CRON for a php script?
Old
  (#1 (permalink))
fshagan
Registered User
fshagan is on a distinguished road
 
Status: Offline
Posts: 50
Join Date: Dec 2002
Rep Power: 39
Using CRON for a php script? - 05-14-2003, 02:18 AM

I have a need to use CRON to run a php script, but it doesn't seem to be working.

The script imports messages from USENET into a forum in phpBB. I can run it from the browser, but I can't get a CURL command to make it work (I can, however, use CURL on another site on the same server with another script I'm running ... phpAdsNew ... for banners).

Any advice on this one? I'm trying to set up the CRON job in C-Panel, using the "Standard" option, with the command:

CURL http://www.mysite.tld/thispage/thatp...c/newssync.php

And it doesn't run. I don't get the email notification, and can't find any error messages in the logs. Very strange!
   
Reply With Quote
Old
  (#2 (permalink))
infosender
Registered User
infosender is on a distinguished road
 
Status: Offline
Posts: 56
Join Date: Sep 2002
Rep Power: 40
05-14-2003, 10:55 AM

Hi there,
This is below a working command for a sql backup via php,scheduled and executed by CRON.

php -q /home/myusername/public_html/export.php myusername_forum

So,as i suppose for you this must works also:

CURL /home/yourusername/public_html/thispage/that...nc/newssync.php

or
php -q /home/yourusername/public_html/thispage/that...nc/newssync.php
   
Reply With Quote
Old
  (#3 (permalink))
fshagan
Registered User
fshagan is on a distinguished road
 
Status: Offline
Posts: 50
Join Date: Dec 2002
Rep Power: 39
05-15-2003, 03:08 AM

Thanks! That worked.

I am getting errors, one of which is:
Quote:
Failed loading /usr/local/Zend/lib/ZendOptimizer.so: /usr/local/Zend/lib/ZendOptimizer.so: cannot open shared object file: No such file or directory
Which I think means cron is trying to call ZendOptimizer, but cannot find it. I submitted a help ticket on that one, with low priority. The script runs and does what its supposed to do, even with the errors.
   
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron job runs twice ldesign General Questions and Comments 2 01-09-2007 01:41 AM
cron backup cmyksteve Tips 0 10-21-2006 12:34 AM
Help with Cron Job neumannu47 General Questions and Comments 3 04-10-2005 11:39 PM
PHP and cron midwest General Questions and Comments 1 05-12-2004 12:48 PM
call php from cron overload General Questions and Comments 2 04-19-2003 06:13 AM


Live Help



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC6
vBulletin Skin developed by: vBStyles.com
Copyright © 2002 Page-Zone Web Hosting. All rights reserved.
Smilies provided by Crack's Smilies http://www.mysmilies.com