PHP Cron Jobs (Could not open input file)


#1

Hi, I run a daily cron jobs, it worked fine, but since the last week it wasnt work.

Since last week, I receive this message in my email:

“[color=#FFA500]Could not open input file: /home/user/yyyyyyyyyy.com/file.php[/color]”

I have configured this cron job to this way in the control panel:

[color=#006400]/usr/local/php5/bin/php /home/user/yyyyyyyyyy.com/file.php[/color]

It worked fine until the last week

How can i fix this problem now?

Thanks a lot

Pablo


#2

First double check that the file still exists, then make sure the correct shell user is selected in the cron setup.

If that all checks out you could try adding this to the user’s .bashrc :

And run the job using: php /home/user/yyyyyyyyyy.com/file.php


#3

Hi, sXi, thanks for your help

but i dont know how to apply your comments

I tell you that the file exist. You can try access to http://www.fiestasconideas.com.ar/cronTest.php and it works fine

“cronTest.php” have in the first line this code:
[color=#006400]#!/usr/local/bin/php -q[/color]

user: “fiestas” Type: "FTP"
user: "pablodh " Type: “shell”

In the Control Panel, I have configured:

[color=#006400]/usr/local/php5/bin/php /home/fiestas/fiestasconideas.com.ar/cronTest.php
user: pablodh (on phact)
status: Enabled
Minute: 00
Hour: 14
every day
every month
every year[/color]

The cron until last week worked fine

In this domain “[color=#006400]Extra Web Security[/color]” always configured: False (Unchecked)


Now I receibed every day in my email:

[color=#FFA500]Cron pablodh@phact /usr/local/bin/setlock -n /tmp/cronlock.3783565101.109434 sh -c $’/usr/local/php5/bin/php /home/fiestas/fiestasconideas.com.ar/cronTest.php[/color]
[color=#FF0000]Could not open input file: /home/fiestas/fiestasconideas.com.ar/cronTest.php[/color]

Can you helpme again

Thanks a lot

Pablo


#4

Probably enforced Enhanced Security tripping it up.

Run the cron as fiestas.


#5

Thanks for the answer

I ticked “Extra Web Security” (True), but i cant change the user because in the cron setup says "User: (shell users only!)"
I did a test but the cron doesn´t work

user: “fiestas” Type: "FTP"
user: "pablodh " Type: “shell”

Should i have to change the user in the Fully Hosted domain panel to “pablodh”?

When i tried this, appeared this message “Move files to the new user? Unless you’re trying to start this domain over from scratch, you should probably leave this turned on!”

I have a doubt, And finally i decided don’t do this change

It is a good idea do this? to run the cron?

I wait your answer

Thanks a lot

Pablo


#6

It seems you’re looking at Manage Domains > Edit. You need to edit the user ‘fiestas’.

Users > Manage Users > Edit

Enhanced Security [checked]
Shell Account [checked]

Save Changes


#7

Yes!! It works fine again!!!

Thanks a lot for the help and patience

Thanks

Pablo