FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


about cron jobs at directadmin





cihan
i have a cronjob request but a mail comes to me saying "permission denied".
what can be the problem?

my command is:
Code:

/home/cihan/domains/MYDOMAIN/public_html/MYFILE.php


my mails full text is:
Code:

/bin/sh: line 1:
/home/cihan/domains/MYDOMAIN/public_html/MYFILE.php: Permission
denied
MrBlueSky
Did you gave MYFILE.php executable and read permission? If not, try if that helps.
cihan
thank you MrBlueSky, i changed permission and that error went away but now there are other errors.

first i tried an test file test.php as:
Code:
<?php
echo "aaa";
?>


but this file also gave errors as follows:
Code:

/home/cihan/domains/MYDOMAIN/public_html/test.php: line 1: ?php: No such
file or directory
aaa
/home/cihan/domains/MYDOMAIN/public_html/test.php: line 5: syntax error
near unexpected token `newline'
/home/cihan/domains/MYDOMAIN/public_html/test.php: line 5: `?>'


when i removed first
Code:
<?php
and
Code:
?>
errors vanished.

then i thought the problem is that.and i removed them from my real file .normally this file gives no error if i run it from my browser but when it is done with cron jobs it gave errorrs again!!!Sad
my real file's first part is:
Code:

$url = "http://SOMEURL";
$input = @file_get_contents($url) or die('Could not access file: $url');

$lastcharacter = 1;
...
...
...


and the given error is:
Code:

/home/cihan/domains/MYDOMAIN/public_html/MYFILE.php:
line 2: =: command not found
/home/cihan/domains/MYDOMAIN/public_html/MYFILE.php:
line 3: syntax error near unexpected token `('
/home/cihan/domains/MYDOAIN/public_html/MYFILE.php:
line 3: `$input = @file_get_contents($url) or die('Could not access file: $url');


i didn't understand what is the error and how i can resolve it...can anybody help???
cihan
why files give no errors if executed normally(writing url to the adress bar) but give errors if cron jobs used?????

how do cron jobs work?

I have to use cron jobs for my site absolutely!!!Please help...

(my english is not my native language...sorry for mistakes)
Related topics
Cron Jobs
propos des cron jobs
[RESOLVED] cron jobs
Cron jobs
I don't have cron jobs enabled ?
cron jobs
Cron Jobs
Cron Jobs
Cron Jobs
Cron jobs - running a php file
Executing automated tasks without using cron jobs
Cron jobs (Server 2)
how do cron jobs work?
Cron jobs on DirectAdmin
Cron jobs and PHP?
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.