Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 27th October 2011, 11:54
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,483
Thanks: 835
Thanked 5,524 Times in 4,345 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Sponsored Links
  #12  
Old 27th October 2011, 12:08
Skyflash Skyflash is offline
Member
 
Join Date: Sep 2011
Posts: 56
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to Skyflash
Default

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
Reply With Quote
  #13  
Old 27th October 2011, 12:13
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,483
Thanks: 835
Thanked 5,524 Times in 4,345 Posts
Default

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
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #14  
Old 27th October 2011, 12:22
Skyflash Skyflash is offline
Member
 
Join Date: Sep 2011
Posts: 56
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to Skyflash
Default

Quote:
Originally Posted by till View Post
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
Reply With Quote
  #15  
Old 27th October 2011, 12:26
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,483
Thanks: 835
Thanked 5,524 Times in 4,345 Posts
Default

Pleases set timezone like this:

date.timezone = "Europe/Rome"

Also you can try to search google on how to debug wordpress cron, e.g.:

http://wordpress.org/extend/plugins/cron-debug-log/


http://www.google.de/search?gcx=c&so...wordpress+cron
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #16  
Old 27th October 2011, 12:46
Skyflash Skyflash is offline
Member
 
Join Date: Sep 2011
Posts: 56
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to Skyflash
Default

Quote:
Pleases set timezone like this:

date.timezone = "Europe/Rome"

http://www.google.de/search?gcx=c&so...wordpress+cron
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
Reply With Quote
  #17  
Old 27th October 2011, 12:50
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,483
Thanks: 835
Thanked 5,524 Times in 4,345 Posts
Default

You should check if the correct time zone is configured in linux, this setting is normally done during initial installation of the base linux.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #18  
Old 27th October 2011, 12:53
Skyflash Skyflash is offline
Member
 
Join Date: Sep 2011
Posts: 56
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to Skyflash
Default

Quote:
Originally Posted by till View Post
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
Reply With Quote
  #19  
Old 27th October 2011, 13:18
Skyflash Skyflash is offline
Member
 
Join Date: Sep 2011
Posts: 56
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to Skyflash
Default

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
Reply With Quote
The Following User Says Thank You to Skyflash For This Useful Post:
till (27th October 2011)
  #20  
Old 27th October 2011, 13:45
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,483
Thanks: 835
Thanked 5,524 Times in 4,345 Posts
 
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
Skyflash (28th October 2011)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Updating and Uploading to Wordpress website on ISPConfig3 - Fedora 13 MrCompTech Tips/Tricks/Mods 8 25th August 2014 15:18
Wordpress and client scheduled db backup Skyflash Installation/Configuration 5 28th September 2011 12:23
pop3 service alone is failed in "The Perfect Setup - Debian Sarge (3.1)" nandhu HOWTO-Related Questions 60 5th August 2008 16:15
add web site serr57 Installation/Configuration 18 13th April 2008 12:40
network issues now it says "401 The web site is blocked by administrator" Check General 3 26th February 2008 15:22


All times are GMT +2. The time now is 17:16.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.