Pavel Radvan Posted April 14, 2024 Posted April 14, 2024 Hi. I have from Tracy some strange error : Error: Call to undefined function token_get_all() in /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/includes/PwApiData.php:337 Stack trace: #0 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/includes/PwApiData.php(118): TracyPwApiData->getFunctionsInFile('...') #1 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/includes/PwApiData.php(25): TracyPwApiData->getProceduralFunctions('...') #2 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module.php(3082): TracyPwApiData->getApiData('...') #3 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/ConsolePanel.php(154): TracyDebugger::getApiData('...') #4 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(143): ConsolePanel->getPanel() #5 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(115): Tracy\Bar->renderPanels('') #6 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(89): Tracy\Bar->renderPartial('...') #7 /usr/local/www/apache24/data/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Debugger/DevelopmentStrategy.php(123): Tracy\Bar->render(Object(Tracy\DeferredContent)) #8 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Debugger/Debugger.php(319): Tracy\DevelopmentStrategy->renderBar() #9 [internal function]: Tracy\Debugger::shutdownHandler() #10 {main} How to solve this ? Thanks for answer. Pavel
adrian Posted April 14, 2024 Posted April 14, 2024 Never knew this could be disabled on some PHP installs, but a quick google returns this: https://stackoverflow.com/questions/8037245/zend-framework-call-to-undefined-function-token-get-all
Pavel Radvan Posted April 14, 2024 Author Posted April 14, 2024 Thanks for reply. I installed php-tokenizer extension and now there is another error : ErrorException: Undefined array key "pwFunctions" in /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/includes/PwApiData.php:25 Stack trace: #0 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/includes/PwApiData.php(25): Tracy\Bar->Tracy\{closure}(2, '...', '...', 25) #1 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module.php(3082): TracyPwApiData->getApiData('...') #2 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/ConsolePanel.php(154): TracyDebugger::getApiData('...') #3 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(143): ConsolePanel->getPanel() #4 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(115): Tracy\Bar->renderPanels('') #5 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(89): Tracy\Bar->renderPartial('...') #6 /usr/local/www/apache24/data/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Debugger/DevelopmentStrategy.php(123): Tracy\Bar->render(Object(Tracy\DeferredContent)) #7 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Debugger/Debugger.php(319): Tracy\DevelopmentStrategy->renderBar() #8 [internal function]: Tracy\Debugger::shutdownHandler() #9 {main} My server is on FreeBSD 14, PHP 8.3, MySQL81 pwFunctions should be defined somewhere?
adrian Posted April 15, 2024 Posted April 15, 2024 I wonder if it's because token_get_all wasn't available when Tracy first tried to scan all the files. I would try deleting the TracyApiData.proceduralFunctions cache (from the debug panel, click the DB icon to open that cache in Adminer where you can delete it) and then do a modules > refresh (although the second step likely isn't necessary).
Pavel Radvan Posted April 15, 2024 Author Posted April 15, 2024 Hi. Where is possible to have this panel you sent screenshot ? I cannot find which panel it is ... Here is screen from my panel config of tracy: How to see that you posted? Thanks Pavel
adrian Posted April 15, 2024 Posted April 15, 2024 Sorry, it's the Debug Mode panel - in the Cache section.
Pavel Radvan Posted April 15, 2024 Author Posted April 15, 2024 OK. I have found but do not have that TraceApiData.proceduralFunctions: Should I set some settings on or off?
adrian Posted April 15, 2024 Posted April 15, 2024 Would you mind uninstalling and reinstalling Tracy and see if that takes care of things please?
Pavel Radvan Posted April 15, 2024 Author Posted April 15, 2024 I uninstalled and also updated my server. Now is module installed again and it seems it is ok. Thanks for support 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now