Hi All,

Sorry if this is repeating any previous posts. I ahve searched the forum and found similar items but none with the same problem (may have missed them if there are any).

Anyway, I have a multisite Drupal 5 set-up. The main site is site1. The two sites, in the sites folder, are site2 and site3.

On Tuesday morning I was able to go to http://site1/cron.php and run cron. The other two however came up with a 404 error. In the afternoon I re-uploaded the includes folder and the cron file. Logged in to all the sites. Ran cron from the admin section. Logged out and was able to run cron via the URL on all three sites. i.e. I could use:

http://site1/cron.php
http://site2/cron.php
http://site3/cron.php

Now this morning (Wed. 12th Nov) the two domains in the sites folder are back to giving me a 404 error. However, I have not changed a thing since they were working. I have triedclearing my browser cache, but as I said, I have not changed anything myself since they were last working.

Can anyone shed any light on this?
Regards,
Nick

Comments

nickbits’s picture

Hi,

Have cleared all cache, tried different browsers and machines. It therefore has to be something to do with the server. I do not know what thoguh. Can't see anything obvious in the logs. Will post them if that will help.

Nick

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

I have just picked this out of the logs:

[12-Nov-2008 04:08:21] PHP Warning:  include_once(./includes/bootstrap.inc) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in /******************/thatchamhistoricalsociety.org.uk/sites/nickbits.co.uk/cron.php on line 9
[12-Nov-2008 04:08:21] PHP Warning:  include_once() [<a href='function.include'>function.include</a>]: Failed opening './includes/bootstrap.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /*******/thatchamhistoricalsociety.org.uk/sites/nickbits.co.uk/cron.php on line 9
[12-Nov-2008 04:08:21] PHP Fatal error:  Call to undefined function  drupal_bootstrap() in /*********/thatchamhistoricalsociety.org.uk/sites/nickbits.co.uk/cron.php on line 10

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Anyone?

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Hi All,

I have additional errors logged this morning, after they have been ran by crontab. The main site, lets call it site1, gives:

Warning: include_once(./includes/bootstrap.inc): failed to open stream: No such file or directory in /home/drnickme/public_html/site1/cron.php on line 9

Warning: include_once(): Failed opening './includes/bootstrap.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/drnickme/public_html/site1/cron.php on line 9

Fatal error: Call to undefined function  drupal_bootstrap() in /home/drnickme/public_html/site1/cron.php on line 10

From site2, which is in the sites folder I get:

Could not open input file: http://nickbits.co.uk/cron.php

From site3, which is in the sites folder I get a 404 error. I would appreciate any help or links to other posts with simliar issues.

Cheers,
Nick

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Hi,

Okay, have just noticed that the crontabs has been altered from /usr/bin/curl http://site2/cron.php to /usr/local/bin/php -q http://site2/cron.php. Have changed back to see if that sorts the proble.

Cheers,
Nick

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Hi,

Did not work, all sites return 404 error.

Nick

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Hi,

Have also tried using cron-curl.sh and also get a 404 error. I am obviously missing something here, probably something so simple!

Nick

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Still no luck. Anyone else?

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Hi,

Dosn't anyone have any idea?

I now just get a 404 error. I can log-on and run cron manually via the control panel. If I go directly to http://mydomain.co.uk/cron.php when not logged in it goes to a page not found. This has to be something obvious. Have tried using the settings file with and without base_url set.

Ideas?

Nick

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

dman’s picture

You've not got much response, eh?
Strangely, I get a cron error (report via email from my host) about one time in 5, but consistently just for one or two sites out of several on the same platform.
They are for sites that are totally redundant at the moment, so I never investigated further.
*shrug*
:-/

.dan.
if you are asking a question you think should be documented, please provide a link to the handbook where you think the answer should be found.
| http://www.coders.co.nz/ |

nickbits’s picture

No, not a lot of response. The Drupal community, I have found, is usually very helpful. I know this may be repeating other threads, but any help, even a pointer to the right thread would have been of use.

As for the Cron, I just do not understand it. None of the sites run Crons manually or automatically unless I am logged in. I do not get how there can be a 404 error when it works if you log in!

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

pranay2284’s picture

Try using "poormanscron" module, hope this helps you out.

Using this you won't need to run cron manually.

nickbits’s picture

Hi,

I have used it, but it is not perfect. Not only that, it is bugging me that the cron is not working. I could understand it if there was a reason for it not to work.

Nick

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Have deleted all cron jobs, uploaded a fresh copy of drupal and get the same issue. Thatch is

1. I can run cron.php for the main site with out loging on.
2. I can run cron.php for any sub site without loging on.
3. As sson as I have done step 2, I cannot re-run the cron job for the same site or any other sub sites without getting a 404 error
4. I can run cron manually on any site, but only by loging
5. Re-creating cron jobs has no affect of sub sites (works fine for main site).

Cron command is:

* * * * * /usr/bin/curl http://mysite.com/cron.php

This has me stumped. Have tried curl in cron (do not have access to lynx or wget), have tried the scripts as well.

Now when I change cron to:

* * * * * /usr/bin/curl http://www.mysite.com/cron.php

It appears to work (will keep you posted on this). Why when I can type into a browser window http://mysite.com and it loads can I not type in http://mysite.com/cron.php ?

Nick

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Hi,

Spoke too soon. Cron not working for sub-sites. I do not want to use poormans cron if I can help it. I would like better control. I just do not get why I can run cron when logged in but not via crontab.

Nick

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

This morning I am getting:

Warning: include_once(./includes/bootstrap.inc): failed to open stream: No such file or directory in /********************/cron.php on line 9

Warning: include_once(): Failed opening './includes/bootstrap.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /********************/cron.php on line 9

Fatal error: Call to undefined function  drupal_bootstrap() in /********************/cron.php on line 10

Doesn't anyone have any ideas?

Nick

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Hi,

I cannot believe that no one here has any advice other than poormans cron. Whilst that is a solution, I am obviously doing something wrong and I would like to know what.

I have now installed on my host, a completley clean Drupal 6.6 set-up. I add the following to crontab:

/usr/bin/curl http://www.mynewsite.com/cron.php

And I get a 404 error. A brand new site, new domain name, new Drupal code and it dosn't work. What am I doing wrong?

Nick

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

mainebob’s picture

Hi Nickbits,

I wonder if you solved your problem...
I have checked lots of drupal posts for solution but none yet... using drupal 6.8
my server crontab was erroring out for a couple of weeks and
I didn't notice... deleted and running manually showed error:

include_once(modules/node/node.pages.inc) [function.include-once]: failed to open stream: No such file or directory in /usr/.../includes/theme.inc on line 283.

Errors of the same format were seen first with CCK module...
uninstalled and deleted

Run Cron manually
Now error with Views .module....file
uninstalled and deleted...

Run Cron manually
Now error with Views .module....file
uninstalled and deleted...

Run Cron manually
Now error with advanced forums...
dont want to delete... much setup could be lost...

Seems like cron gets stuck in multiple places...
so I think it is NOT the Modules but something else...
so far no clues from other threads...

Yes, I deleded cron_semaphore from the database
and deleted data from the cache table...
still no go....

gaaaaaaaaaaaaaaaa!
Frustrating!

-Bob

nickbits’s picture

Hi Bob,

No I never did solve this. It only happened at the end of November and I know it is nothing I have done. I am assuming it is either something really basic in the code, file permissions or other server problem. Have you checked and set your base URL in the setup file?

Nick
----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

nickbits’s picture

Hi All,

I am still trying to figure this out. I have Drupal 6.8, I can log in and run cron (as noted previously), but get the following error:

Warning: include_once(./includes/bootstrap.inc): failed to open stream: No such file or directory in /home/***********/public_html/*************/cron.php on line 9

Warning: include_once(): Failed opening './includes/bootstrap.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*********/public_html/**************/cron.php on line 9

Fatal error: Call to undefined function  drupal_bootstrap() in /home/*********/public_html/****************/cron.php on line 10

when using this in the crontab

/usr/local/bin/php -q /home/*******/public_html/****************/cron.php

I have also tried using the following in crontab:

/usr/bin/curl http://mysite.com

In the resultant page it says "Page not found" but also has "page-406shtml" in the boday tag as a class. Can anyone tell me what the 406 is and why I should suddenly be getting it?

Cheers,
Nick

----------------------------------
Nick Young
www.nickbits.co.uk

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

adamtyoung’s picture

Our database is fairly large (~ 20000 entries) and cron sometimes fires the search index until it gets to a certain piece of data (19784, to be exact) at which point the search indexing stops and cron usually gives a message similar to the one in the above thread. WTF?

Adam Young
Vancouver, BC
http://www.adamtyoung.ca

nickbits’s picture

Hi,

Just to let you know, I did finally solve the issue. It was mod_security stopping it, which I did mention to my host to start with, at which point they ignored it and said it was me. Only got it solved when I did manage to get someone who know what mod_security was and how Drupal works.

Nick

------------oOo----------------------
Nick Young (www.nickbits.co.uk)

Antinoo’s picture

Glad to hear that you solved, Nick. :-)