#  Fatal error: Call to undefined function token\_get\_all() - drupal 8

**URL:** <https://www.phphelp.com/t/fatal-error-call-to-undefined-function-token-get-all-drupal-8/25474>\
**Category:** PHP Installation and Configuration\
**Created:** [September 18, 2016, 2:20am UTC](https://www.phphelp.com/t/fatal-error-call-to-undefined-function-token-get-all-drupal-8/25474 "2016-09-18T02:20:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vince](https://www.phphelp.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.phphelp.com/u/vince)\
**Post date:** [September 18, 2016, 2:20am UTC](https://www.phphelp.com/t/fatal-error-call-to-undefined-function-token-get-all-drupal-8/25474/1 "2016-09-18T02:20:19Z")

</div>

Hi. I’m attempting to install drupal8 on FreeBSD 10.2 but when I try to load  
the front page in the browser, I get an empty page with just the error,

> Fatal error: Call to undefined function Doctrine\Common\Annotations\token\_get\_all() in /data/htdocs/test1/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php on line 56

All the other extensions listed in extensions.ini seem to load and Drupal7 is working fine.

The tokenizer extension is installed but phpinfo() does not show it enabled  
under the Configuration section. Although it does mention it in the PHP credits  
section.

Here is the contents of /usr/local/etc/php/extensions.ini

```
extension=dom.so
extension=filter.so
extension=ftp.so
extension=gd.so
extension=hash.so
extension=json.so
extension=mysqli.so
extension=pdo.so
extension=session.so
extension=simplexml.so
extension=xml.so
extension=curl.so
extension=tokenizer.so

```

I even upgraded from php 5.6.25 to php 7.0.10 but get the same result.

If I run “php -m” on the command line, tokenizer is in the list and if it  
comment it out in /usr/local/etc/php/extensions.ini, it is no longer in the  
list.

Could somebody please help?

OS: FreeBSD-10.2  
Web Server: nginx-1.10.1

---

<div class="post-metadata">

**Author:** ![vince](https://www.phphelp.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.phphelp.com/u/vince)\
**Post date:** [September 19, 2016, 12:25am UTC](https://www.phphelp.com/t/fatal-error-call-to-undefined-function-token-get-all-drupal-8/25474/2 "2016-09-19T00:25:21Z")

</div>

Additional information:

I discovered also that the global php.ini file is apparently also not  
getting loaded for some reason. This may be related.

phpinfo() shows

> Configuration File (php.ini) Path /usr/local/etc Loaded Configuration File (none)

Yet the file is there

> $ ls -l /usr/local/etc/php.ini -r--r--r-- 1 root wheel 69087 Sep 18 13:40 /usr/local/etc/php.ini

---

<div class="post-metadata">

**Author:** ![astonecipher](https://www.phphelp.com/user_avatar/www.phphelp.com/astonecipher/32/2797_2.png) [@astonecipher](https://www.phphelp.com/u/astonecipher)\
**Post date:** [September 19, 2016, 12:59am UTC](https://www.phphelp.com/t/fatal-error-call-to-undefined-function-token-get-all-drupal-8/25474/3 "2016-09-19T00:59:30Z")

</div>

This is about the best thing I could find to help.

[http://stackoverflow.com/questions/10711698/php-ini-is-nonexistent-loaded-configuration-file-none](http://stackoverflow.com/questions/10711698/php-ini-is-nonexistent-loaded-configuration-file-none)

---

<div class="post-metadata">

**Author:** ![vince](https://www.phphelp.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.phphelp.com/u/vince)\
**Post date:** [September 19, 2016, 1:25am UTC](https://www.phphelp.com/t/fatal-error-call-to-undefined-function-token-get-all-drupal-8/25474/4 "2016-09-19T01:25:12Z")

</div>

eureka! I found the problem.

Thank you astonecipher, for attempting to help but it turned out to  
be a user malfunction.

I kept wondering why I was getting different results between “php -i” from  
the command line and “phpinfo()” from the browser.

Turns out I had restarted nginx but forgot about the php-cgi processes.  
I finally noticed that phpinfo() still showed the older version of php.  
So even though I had installed the newer php package, the old php-cgi  
processes, that nginx talks to to run php scripts, were still running.  
I had to restart the fcgiwrap service.

It is all working now :).

---

<div class="post-metadata">

**Author:** ![astonecipher](https://www.phphelp.com/user_avatar/www.phphelp.com/astonecipher/32/2797_2.png) [@astonecipher](https://www.phphelp.com/u/astonecipher)\
**Post date:** [September 19, 2016, 1:27am UTC](https://www.phphelp.com/t/fatal-error-call-to-undefined-function-token-get-all-drupal-8/25474/5 "2016-09-19T01:27:16Z")

</div>

Glad you figured it out!
