Skip to main content

Enable tokenizer in PHP 8.1

Comments

10 comments

  • cPRex Jurassic Moderator
    Hey there! Is it possible that you have added "tokenizer" to the disabled functions line for PHP? You can check this in WHM >> MultiPHP INI Editor, in this block: ; This directive allows you to disable certain functions for security reasons. ; It receives a comma-delimited list of function names. ; PHP: Description of core php.ini directives - Manual disable_functions = Normally tokenizer is enabled by default in all PHP installations, so it would have needed to be manually disabled somewhere.
    0
  • mluzza
    Hi, thanks for the reply. No. This is my php.ini: (attached) We also have php 7.2 and php 7.3. None have functions disabled.
    0
  • cPRex Jurassic Moderator
    What happens if you run this command on the machine? This will search the installed modules on the server: php -m | grep tokenizer
    0
  • mluzza
    Empty:
    0
  • mluzza
    While it's not there on php 8.1, it exists on 7.2 and 7.3:
    0
  • cPRex Jurassic Moderator
    Inside the following path on the server: /opt/cpanel/ea-php81/root/etc/php.d do you see the 20-tokenizer.ini file? If not, I would recommend just removing and reinstalling PHP 8.1, as that should be present by default.
    0
  • mluzza
    It's there:
    0
  • cPRex Jurassic Moderator
    I would try removing and reinstalling PHP 8.1. If that doesn't fix the issue, please submit a ticket to our team so we can take a look.
    0
  • mluzza
    Reinstalling fixed the issue. Thanks.
    0
  • cPRex Jurassic Moderator
    I'm glad that's all it was!
    0

Please sign in to leave a comment.