Recent Topics

1 Jul 28, 2006 05:20    

I am working on a NEW install of B2Evo v1.8beta on unix;

I have installed B2Evo several times on this same unix hosting environment with no problems. This time, installing v1.8, I get the following error:

b2evolution cannot be installed, because of the following errors:

* We need the PHP Tokenizer functions to get the list of Plugin events (Enabled by default since PHP 4.3.0 and available since PHP 4.2.0).

I have confirmed that my hosting provider is running PHP 4.3.10.

Any ideas on what to check out next? Thanks for any pointers.

2 Jul 30, 2006 18:41

Apparently something has changed between 1.6 to 1.8 that will not allow fresh installs in my environment because I went back and installed 1.6 in the same location and had no problems.

If anyone has faced the tokenizer issue I would love to resolve it (rather than never be able to upgrade this clients blog platform.

Thanks.

3 Jul 30, 2006 20:12

Put a script somewhere that just does

<?php phpinfo(); ?>


or use the PHPinfo link from /blogs/install/.

There is the "configure" statement used at the top. Is there "--disable-tokenizer" included?

Also, the tokenizer should have a own section in the phpinfo. Normally it should say: "Tokenizer Support enabled"

4 Aug 12, 2006 16:39

My host don't support tokenizer and don't plan to do so either.... Is it possible to work around this problem? Or must I change host?

5 Aug 16, 2006 21:29

There's no workaround, sorry.

7 Aug 20, 2006 21:51

Hi,

This is my first post, but I have been using b2evolution for a long time.

I was in the process of updating b2ev today as I have the 1.6 alpha and came upon the same problem as described above.
Talked to my host which could not enable tokenizer for me.

My question is: Is there any plans to find a work around for this issue or is the final answer for us to find a new host?

Please understand that switching host is not something everyone can do over a night.

Thanks for a great engine!

Regards,
David

8 Aug 20, 2006 22:51

Ok.

In /install/_functions_install.php remove or comment out the block:


	if( ! function_exists( 'token_get_all' ) )
	{
		// TODO: Use T_() ?
		$errors[] = 'We need the PHP Tokenizer functions to get the list of Plugin events (Enabled by default since PHP 4.3.0 and available since PHP 4.2.0).'; // String copied from _plugins.class.php
	}

And in /inc/_misc/_plugins.class.php change the get_registered_events() method with the following:


	/**
	 * Get a list of methods that are supported as events out of the Plugin's
	 * source file.
	 *
	 * @todo Extend to get list of defined classes and global functions and check this list before sourcing/including a Plugin! (prevent fatal error)
	 *
	 * @return array
	 */
	function get_registered_events( $Plugin )
	{
		global $Timer, $Debuglog;

		$Timer->resume( 'plugins_detect_events' );

		$plugin_class_methods = array();

		$classfile_contents = @file_get_contents( $Plugin->classfile_path );
		if( empty($classfile_contents) )
		{
			return array();
		}

		// TODO: allow optional Plugin callback to get list of methods. Like Plugin::GetRegisteredEvents().

		if( preg_match_all( '~^\s*function\s+(\w+)~mi', $classfile_contents, $matches ) )
		{
			$plugin_class_methods = $matches[1];
		}
		else
		{
			$Debuglog->add( 'No functions found in file "'.$Plugin->classfile_path.'".', array('plugins', 'error') );
			return array();
		}

		$supported_events = $this->get_supported_events();
		$supported_events = array_keys($supported_events);
		$verified_events = array_intersect( $plugin_class_methods, $supported_events );

		$Timer->pause( 'plugins_detect_events' );

		// TODO: Report, when difference in $events_verified and what getRegisteredEvents() returned
		return $verified_events;
	}

That should work.

9 Aug 27, 2006 01:01

Hi, i'm pretty new with php and databases, hardly known basic html for almost a year now.

To take care of the blogging, I thought b2evolution could do the job an I downloaded it today, august 26. But it seams to me that I have the same problem as "DSnow"..

I have seen through the two php-files that "blueyed" mentioned, to make the changes, but I could not find where in the files to do the changes.

As far as I can see from the phpinfo.php file, my server is running vs.2.0?
(Linux srv48 2.6.12.6-vs2.0 #1 SMP Wed Oct 12 12:28:03 CEST 2005 i686)

Am I blind not finding where in the files to do the changes, or is there nothing to change?
Other options??

10 Aug 27, 2006 01:07

@knowledgelessbeginner:
About the filenames: "/inc/_misc/_plugins.class.php" refers to the file inside of the "blogs" folder you've uploaded to your server..

11 Aug 27, 2006 14:28

@blueyed:
Ok...but the files I have upload to my server, are they not the same as the files I packed out to my own pc, the files I used to copy to the server?

If I have to change the files which is on the server, I have to download them back to my computer, change them and then upload them to the server?

By the way, I recieved answer from the support today, and my server does not support tokenizer.

12 Aug 27, 2006 18:11

knowledgelessbeginner, do whatever is needed to update the files on the server.

If you do not have a local testing copy of your site, then yes, either download the files, edit and re-upload them or use an editor which can edit the files "in place".

It does not matter, how you get the remote files updated..

13 Sep 03, 2006 12:33

Tried your solution. Didn't seem to work. I'll stick with 1,6 for a while...

14 Sep 05, 2006 01:05

mojman, what did not work? If the posted solution does not work, it will not work with 1.8.2 either - except if you've patched it not in the right way..

15 Sep 05, 2006 13:04

I can try it again. Although I did still say tonkenizer missing last time. But maybe I did something wrong. I'll try one more time.

Edit... did work! :)

16 Sep 08, 2006 11:54

It did work although I cannot access the plugin section. First i could se the installed plugins but when I tried to access the availible plugins it stopped to work. And have stopped since.

17 Sep 08, 2006 14:07

Hi. Just uploaded b2evolution 1.8.1 to my server.
My host doesn't support tokenizer and i tried to figure out the workaround.
I searched the install/index.php for the block mentioned, but i can't find it!
Is this changed from the beta to the rc1?

18 Sep 08, 2006 17:13

Itjenset, sorry, the instruction was wrong. The first block (checking if tokenizer is available) is in /install/_functions_install.php, not /install/index.php.

mojman, it seems like you have a fatal error now (parse error for example, by having an "}" too much).
Please see http://manual.b2evolution.net/Debugging#Blank_pages for how to get them displayed.

19 Sep 08, 2006 18:06

The dependency for tokenizer will be removed in 1.8.2.

Here are the relevant files to replace (_functions.install.php and _plugins.class.php):
http://evocms.cvs.sourceforge.net/evocms/b2evolution/blogs/install/_functions_install.php?view=markup&pathrev=v-1-8
http://evocms.cvs.sourceforge.net/evocms/b2evolution/blogs/inc/_misc/_plugins.class.php?view=markup&pathrev=v-1-8

btw: it would be great, if you could say which PHP version you are using, what its "configure statement" (from the top of phpinfo() - see http://manual.b2evolution.net/Debugging#phpinfo) looks like and what the server OS is (e.g. Debian).
Because the tokenizer extension should be enabled by default since PHP 4.3 and we have not expected that so many people have problems with it. Thanks.

20 Sep 09, 2006 12:37

My host have

Linux srv33 2.6.12.6-vs2.0 #1 SMP Wed Oct 12 12:28:03 CEST 2005 i686
Msql 4.0.24
PHP Version 4.4.4
and have disabled tokenizer manually by some reason...

The parse error was actually a old plugin who was incompatible with 1.81 so that is ok now :) Tha new files worked like a charm :)

Thanks a lot!

21 Sep 10, 2006 17:36

Upgraded to 1.8.1 RC today and ran into the PHP tokenizer missing error.

Updating _plugins.class.php and _functions_install.php as you mentioned solved the problem :D

Thanks blueeyed


Form is loading...