HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[solved]Cron question

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#74258 (In Topic #15459)
Avatar

Community saint

After setup the cron for our new site I got a first sign by mail with a error:

/bin/sh: /home/xxxxx/domains/xxxxxx/public_html/data/cron_bridge.php: Permission denied

need I set for this file a another right? now its 644


Harry


Last edit: by Harry-S


http://digiflash.nl Photo community  (dutch)
Back to the top
 
Posted
Rating:
#74276
Avatar

Community saint

On my host the permissions are set at 644 and the /data folder is set at 755.

My cron command is

Code

php -C -q --no-header /home/'*****'/public_html/data/cron_bridge.php
The first part of the command was given to me by my host. Without it, the cron job would not work without errors.


Last edit: by sholzy

Steve
Back to the top
 
Posted
Rating:
#74318
Avatar

Community saint

Oke thanks I will check this one.


http://digiflash.nl Photo community  (dutch)
Back to the top
 
Posted
Rating:
#74361
Avatar

Community saint

Cron gives a problem here.. What I try, now I got this one:

/home/xxx/domains/xxxxx/public_html/portaal/data/cron_bridge
.php: line 1: ?php: No such file or directory
/home/xxxxx/domains/xxxxxx/public_html/portaal/data/cron_bri
dge.php: line 3: ocPortal: command not found
/home/xxxxx/domains/xxxxxx/public_html/portaal/data/cron_bri
dge.php: line 4: syntax error near unexpected token `c'
/home/xxxxx/domains/xxxxx/public_html/portaal/data/cron_brid
ge.php: line 4: ` Copyright ocProducts, 2004-2011'

I'am on a linux server.


Last edit: by Harry-S


http://digiflash.nl Photo community  (dutch)
Back to the top
 
Posted
Rating:
#74367
Avatar

Community saint

I have changed something:

Have set : /usr/local/bin/php -q before the rest, nor error mails at the moment. :)


http://digiflash.nl Photo community  (dutch)
Back to the top
 
Posted
Rating:
#74372
Avatar

Community saint

Do you use cPanel?

Usually a "No such file or directory" means permissions if in fact the file or directory is there.

The easiest way to test permissions is to set permissions to 777 for that directory path and run the cron job. Don't leave permissions at 777 any longer than it take to test 1 run of cron. If it works then you know it's a permissions problem and you just need to find the offending permission. If not, you know it's a problem with cron. (I've always been a risk taker with these things  :devil: )

The safer (and longer) way would be to approach it from the opposite direction and increase permissions slowly as you test.

You may need to contact your host to know what is needed for the cron command to work (assuming permissions are set correctly).

Steve
Back to the top
 
Posted
Rating:
#74374
Avatar

Community saint

Thanks sholzy for your help.
It looks its working now. I can do may things on the server because is a dedicated. :)
Some times you need to bypass the code to get the right path for it.


http://digiflash.nl Photo community  (dutch)
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: