Go Back   Linux CentOS, Control Panel, Hot girl, TOP 10 GOOGLE, Server - System - Manager - CentOS, Operation System, SEO, VBB, HACKING and SECURITY - Rao vặt, tuyển dụng, Thiet ke website > Dành cho webmaster > Server Manager

Hack gunz.2it.in mới update ngày 2/3/2010 (test by Admin)
Hack map trong Dota - WarCraft 3 (da test ngay 27/01/2010)
Hack gg để chơi map dota cho war 1.23 va 1.24 - vẫn xài tốt
Hướng dẫn Hack gold member tại quán net để mang về nhà
hack map dota cho war3 ver 1.24c va 1.24d, co the chuyen tien
crack windows 7 all version (using activators)
hack cf 1052, hack cf 1053, hack cf 1054 ngay 15/02/2010

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 26-09-2008
Hackingart Member
 
Join Date: Sep 2008
Posts: 22
Thanks: 0
Thanked 1 Time in 1 Post
Default Using PHP script with crontab. How to run?

Hi, I am trying to use a PHP script as a test for a cron job.

My crontab is 1 line:

30 * * * * /home/www/inc/crontab.php

if I test the file through the browser (ie. http://www.tjsc.com.vn/inc/crontab.php), the PHP script works -- so there is nothing wrong with the PHP script itself or the path.

I aked my hosting admin for assistance and the error he keeps getting is:

/bin/sh: line 1: /home/www/inc/crontab.php: Permission denied

What permission do I need to set to get it to work???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 26-09-2008
Moderator
 
Join Date: Jul 2008
Posts: 151
Thanks: 4
Thanked 8 Times in 7 Posts
Default

What about this (adjust path to php executable below)?

30 * * * * /usr/bin/php /home/www/inc/crontab.php

Note that your host may not necessarily have the php executable installed if it is just meant to run as a module to Apache. Only you (or your host admin) will know how the PHP is configured. In that case, you will not be able to run PHP scripts on the command line.

By the way the following works for me:

a.php:

#!/usr/bin/php
<?php phpinfo() ?>

chmod +x a.php
./a.php

So you probably may do it too.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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



All times are GMT +8. The time now is 10:12 PM.


© Diễn đàn HackingArt (HA) được xây dựng và phát triển bởi các thành viên.
+ Diễn đàn HackingArt là nơi trao đổi của các webmaster chuyên nghiệp.