Cron Problem :-(

Status
Not open for further replies.

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
Hello,

I'm in Advanced PHP Configuration, and using php-cron. But, the include paths are not functioning properly. I have modified my Drupal cron file to use absolute path. But, all other include statements are failing with the same kind of error. The error message I'm getting is,

Warning: include_once(./sites/default/settings.php): failed to open stream: No such file or directory in /home/myistop/public_html/includes/bootstrap.inc on line 243

Warning: include_once(): Failed opening './sites/default/settings.php' for inclusion (include_path='.:/x10hosting/php2/lib/php') in /home/myistop/public_html/includes/bootstrap.inc on line 243

Warning: require_once(./includes/cache.inc): failed to open stream: No such file or directory in /home/myistop/public_html/includes/bootstrap.inc on line 895

Fatal error: require_once(): Failed opening required './includes/cache.inc' (include_path='.:/x10hosting/php2/lib/php') in /home/myistop/public_html/includes/bootstrap.inc on line 895

I have discussed this issue earlier, here => http://forums.x10hosting.com/free-hosting/33186-how-do-crons-work.html

But, now that thread is closed. So I have created a new thread for my issue.

Please help me.

Thanks in advance,
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
That is a path error not a cron error. The code you pasted is not using absolute paths.
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
I have modified the cron file to use absolute paths. But, the files that are included from cron file again includes some other files. But, I didn't modify all the files to use absolute paths. I think, that is the error. I have asked this same doubt to my friend. He asked me to include my public_html directory to the php include_path value. So, I have added the following statement in the beginning of my cron file.

Code:
ini_set('include_path',ini_get('include_path').':/home/myistop/public_html:');

I hope, this will solve the problem. I'll report the output after I receive the cron output email. Meanwhile, please tell me whether my approach is correct and will it fix my issue?

Thanks in advance.
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
No :-(
I'm getting the same type of error. No Such file or directory even after adding my public_html directory in include_path.

I don't know how to fix it...

Please help me...
 
Last edited:

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
I really don't know, can you change them to absolute paths and then paste the errors?
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
No.. Not yet fixed.. I just switched to use php instead of php-cron. But, memory limit is being stated as error when I use php.
 
Last edited:

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
Using just 'php' will use the basic version of PHP (v1) instead of any other version, that is why you need to use 'php-cron' instead.

Have you changed the scripts to use absolute paths instead of relative paths? The path errors that you are showing us have nothing to do with the version of PHP that you have.
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
You may know from my previous posts that, I'm running Drupal CMS. I don't know much about internal workings of Drupal and since I don't know what are the files that I have to edit for using absolute paths. I think, the include_path is the problem. I'm not sure... I'll post a support request in Drupal community and let you know whether Drupal has some issue relating absolute/relative paths.

Don't mistake me. I'm a beginner in PHP. I'll post after getting a reply from Drupal support team.
Edit:
I just searched for similar problem in drupal.org and found http://drupal.org/node/36844

But, I didn't get whether wget or lynx is enabled in X10Hosting.

Please throw some light on this topic.
 
Last edited:

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
Thanks for the information, Corey.

I have now updated my cron jobs to use the following command

wget -q /home/myistop/public_html/filename.php

After I receive the output email, I'll post whether it's working smoothly.

Thanks once again.
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
Can you tell if the script ran\worked without the Email?
 

kajasweb

New Member
Messages
1,723
Reaction score
0
Points
0
No. The script has NOT ran.

My Drupal Status Page states the following:

Cron maintenance tasks Last run 19 hours 12 min ago

But, I configured cron to run every 6 hours.

Whats the problem ?

Edit:
I just found that I was using a wrong format of command. Now, I'm using the following command.


Source: http://drupal.org/node/23714

Is this command, right ?

I'll post the output after I receive the output email / my Drupal cron status changes.

Update:
My Drupal Cron Status changed: Cron successfully ran. But, I didn't get any output email. I think, its because wget browser won't flush any output to email.

Output email is not a big matter. I got my cron working. ISSUE FIXED.

Thanks for all who replied to this thread and helped me.

Special thanks to X10Hosting Staffs and Corey.

I'm closing this thread.

X10 Rocks... :cool:
 
Last edited:
Status
Not open for further replies.
Top