Recent Topics

1 Nov 16, 2011 15:45    

I already had this problem in 4.0.3, 4.0.5, and now its baaaack.
Any suggestions?
blog.gerardprins.com

3 Nov 16, 2011 18:59

Here is the current code (lines 135-165). I understand it is already commented out because of //??

// Try forking a background process and let the parent return as fast as possbile.
	if( is_callable('pcntl_fork') && function_exists('posix_kill') && defined('STDIN') )
	{
		if( $pid = pcntl_fork() )
			return; // Parent

		function shutdown_kill()
		{
			posix_kill(posix_getpid(), SIGHUP);
		}

		if ( ob_get_level() )
		{	// Discard the output buffer and close
			ob_end_clean();
		}

		fclose(STDIN);  // Close all of the standard
		fclose(STDOUT); // file descriptors as we
		fclose(STDERR); // are running as a daemon.

		register_shutdown_function('shutdown_kill');

		if( posix_setsid() < 0 )
			return;

		if( $pid = pcntl_fork() )
			return;     // Parent

		// Now running as a daemon. This process will even survive
		// an apachectl stop.
	}

4 Nov 16, 2011 19:03

no, you need to wrap it with /* and */

/*

// Try forking a background process and let the parent return as fast as possbile.
	if( is_callable('pcntl_fork') && function_exists('posix_kill') && defined('STDIN') )
	{
		if( $pid = pcntl_fork() )
			return; // Parent

		function shutdown_kill()
		{
			posix_kill(posix_getpid(), SIGHUP);
		}

		if ( ob_get_level() )
		{	// Discard the output buffer and close
			ob_end_clean();
		}

		fclose(STDIN);  // Close all of the standard
		fclose(STDOUT); // file descriptors as we
		fclose(STDERR); // are running as a daemon.

		register_shutdown_function('shutdown_kill');

		if( posix_setsid() < 0 )
			return;

		if( $pid = pcntl_fork() )
			return;     // Parent

		// Now running as a daemon. This process will even survive
		// an apachectl stop.
	}

*/

5 Nov 16, 2011 19:24

OK did that. Let's see what happens now ;)

THX

6 Nov 17, 2011 18:10

Nope. Nothing happens...

7 Nov 17, 2011 18:15

Could you write more details.
Have you switched straight from v4.0.5 to 4.1.2?
Was the counter working in any 4.x version for you?

8 Nov 18, 2011 05:08

I did a clean install as you suggested a while ago.
I also updated the _html_header.inc.php and disabled _item_comment_form.inc.php in my Simple Zen skin as suggested.
And yes, the counter was working fine and I went straight from 4.0.5 to 4.1.2, and everything appears to be working hunky dory. Except the view counts, that is... ;)

9 Nov 18, 2011 06:15

I also updated the _html_header.inc.php and disabled _item_comment_form.inc.php in my Simple Zen skin as suggested.

This step is only needed if AJAX forms don't work in old skin.

10 Nov 18, 2011 07:22

By the way there's a new setting in v4.1.x "Smart view counting" under Global settings > General. Try to enable it...

11 Nov 18, 2011 17:41

Thanks for the tip. Was already enabled. View counts still not updating...


Form is loading...