1

Topic: Function token_get_all() error

Hello!

I have a problem with function token_get_all(). When I am trying to access extension controlpanel, I see following error:

Fatal error: Call to undefined function token_get_all() in /****/****/*****/****/pun/include/xml.php on line 199

So I am asked my host admin and he says that I have to get code of token_get_all -function. So please, give me code of the function.

Big thanks!
Olli

Re: Function token_get_all() error

It's a PHP function: http://www.php.net/token_get_all

Re: Function token_get_all() error

See http://punbb.informer.com/forums/post/116372/#p116372

Carpe diem

4

Re: Function token_get_all() error

So what i have to tell for my host admin ?
What he have to do ?
Run command ?

Re: Function token_get_all() error

First of all you should ensure, that PHP on the server was compiled without token support. To do this go to <FORUM_URL>/admin/index.php?action=phpinfo.
Look with what parameters was compiled PHP in "Configure Command" line. If there is a "--disable-tokenizer" in this line, PHP should be recompiled without this option.

6

Re: Function token_get_all() error

Phpinfo doesnt work, it is disabled for security risks.

Re: Function token_get_all() error

Olli wrote:

Phpinfo doesnt work, it is disabled for security risks.

You've got a cool hosting provider. They care for you very much, so let them do it all for you. Just force them to do what you need or get away from them. My idea is that is not your problem, but theirs. You shouldn't waste your personal time for this.

Carpe diem

8

Re: Function token_get_all() error

So, I cant use PunBB extension feature if my hosting cant recompile php, he says that it is difficult hmm

Re: Function token_get_all() error

Does anyone has any ideas on a workaround for this? I want to add some extensions but my hosting provider is not really cooperative. And because of financial reasons I'd rather change the forum software than my hosting provider.

Re: Function token_get_all() error

clowntje wrote:

Does anyone has any ideas on a workaround for this?

You can delete the code depending on token_get_all:

                    $tokenized_hook = token_get_all('<?php '.$hook['content']);
                    $last_element = array_pop($tokenized_hook);
                    if (is_array($last_element) && $last_element[0] == T_INLINE_HTML)
                        $errors[] = $lang_admin_ext['extension/hooks/hook error4'];

But you should be sure the extension you install has no errors.