
27th October 2011, 10:54
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,911
Thanks: 693
Thanked 4,198 Times in 3,213 Posts
|
|
Another possible problem is described here:
http://www.bloghighlight.com/wordpre...ssed-schedule/
The cron in wordpress can fail if the system time is incorrect. Please check if your system time is ok e.g. with the date comand on the shell and also check in the php.ini file if the correct date.timezone is set there.
|

27th October 2011, 11:08
|
|
Member
|
|
Join Date: Sep 2011
Posts: 35
Thanks: 3
Thanked 2 Times in 2 Posts
|
|
Quote:
Please check that this value is not set in wp-config.php or that its set to false:
define('DISABLE_WP_CRON', true);
|
Ok, checked. The value was not present, so wp understand it is set to false by default. I've added it, and set to false
Code:
define('DISABLE_WP_CRON', false);
Quote:
|
another problem can be the max php memory size or max execution time. You can try to increase them in the cgi php.ini file and then restart apache.
|
Code:
vi /etc/php5/apache2/php.ini
; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 30
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M
Code:
vi /etc/php5/cgi/php.ini
; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 30
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M
|

27th October 2011, 11:13
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,911
Thanks: 693
Thanked 4,198 Times in 3,213 Posts
|
|
Please set max execution time to 300 and Memory Limit to 256M and restart apache. The Memory Limit required for Wordpress is 256M for Wordpress versions > 2.7
|

27th October 2011, 11:22
|
|
Member
|
|
Join Date: Sep 2011
Posts: 35
Thanks: 3
Thanked 2 Times in 2 Posts
|
|
Quote:
Originally Posted by till
Please set max execution time to 300 and Memory Limit to 256M and restart apache. The Memory Limit required for Wordpress is 256M for Wordpress versions > 2.7
|
Don't works 
It only works if i manually call the cron script http://skyflashtest.biz/wp-cron.php
I set limits suggested by you
I set date.timezone, previously commented in cgi and php php.ini
Code:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Europe/Rome
I don't know what i can do
|

27th October 2011, 11:46
|
|
Member
|
|
Join Date: Sep 2011
Posts: 35
Thanks: 3
Thanked 2 Times in 2 Posts
|
|
I've found this:
Code:
/wp-content/debug.log
[27-Oct-2011 09:40:05] PHP Warning: fopen(http://skyflashtest.biz/wp-cron.php?doing_wp_cron): failed to open stream: Connection timed out in /var/www/clients/client1/web1/web/wp-includes/class-http.php on line 876
The timestamp in the log seems the UTC time, because my zone real time is +2 (9.40 UTC = 11.40 Europe/Rome)
The correct timezone is configured in WP
|

27th October 2011, 11:50
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,911
Thanks: 693
Thanked 4,198 Times in 3,213 Posts
|
|
You should check if the correct time zone is configured in linux, this setting is normally done during initial installation of the base linux.
|

27th October 2011, 11:53
|
|
Member
|
|
Join Date: Sep 2011
Posts: 35
Thanks: 3
Thanked 2 Times in 2 Posts
|
|
Quote:
Originally Posted by till
You should check if the correct time zone is configured in linux, this setting is normally done during initial installation of the base linux.
|
root@server01:/var/www/clients/client1/web1/log# dpkg-reconfigure tzdata
Current default time zone: 'Europe/Rome'
Local time is now: Thu Oct 27 11:49:08 CEST 2011.
Universal Time is now: Thu Oct 27 09:49:08 UTC 2011.
But i think the real problem is not the timezone, but the PHP Warning: fopen(http://skyflashtest.biz/wp-cron.php?doing_wp_cron): failed to open stream: Connection timed out in /var/www/clients/client1/web1/web/wp-includes/class-http.php on line 876
|

27th October 2011, 12:18
|
|
Member
|
|
Join Date: Sep 2011
Posts: 35
Thanks: 3
Thanked 2 Times in 2 Posts
|
|
FOUND!
Seems a problem related to the address management in ISPConfig. Some website parts are locally resolved as www.websitename.biz and some other parts are resolved as /var/www/clients/client1/web1/web/.. so the wp-cron.php fails
Is described HERE
It seems the solution is add this directive into the wp-config.php:
define('ALTERNATE_WP_CRON', true);
I'm yet a little bit confused about the different path management (probably my dns mistake, but i think it is correct... i need to make a check) but this method is working
|
|
The Following User Says Thank You to Skyflash For This Useful Post:
|
till (27th October 2011)
|

27th October 2011, 12:45
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,911
Thanks: 693
Thanked 4,198 Times in 3,213 Posts
|
|
Quote:
|
Some website parts are locally resolved as www.websitename.biz and some other parts are resolved as /var/www/clients/client1/web1/web/.. so the wp-cron.php fails
|
But the first thing is a url while the second one is a system path. So I dont think that they get mixed up by PHP. For example the resolving of a IP can never return a system path, it will return always the domain. According to the error, its most likely a domain config issue, either in the website settings or in dns.
How did you configure the domain in the website settings in ispconfig?
In the domain field there should be just "websitename.biz" without www and in the outo subdomain field you should select "auto subdomain: www" to reach the domain with and without www.
In your dns record of the zone websitename.biz, there must be a a-record for the zone itself and a a-record for the www subdomain.
|
|
The Following User Says Thank You to till For This Useful Post:
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 20:04.
|
|
Recent comments
18 hours 42 min ago
23 hours 47 min ago
1 day 4 hours ago
1 day 6 hours ago
1 day 20 hours ago
1 day 20 hours ago
2 days 1 hour ago
2 days 7 hours ago
2 days 8 hours ago
2 days 9 hours ago