Jump to content

Error when using more than php 7.4 version


Go to solution Solved by WHMCS SamP,

Recommended Posts

Hello, did some one had error that same like me after i upgrade from 7.4 to 8.1
I enable view the error log, and i found this 

Error: Call to undefined function WHMCS\Security\putenv() in /www/wwwroot/.../vendor/whmcs/whmcs-foundation/lib/Security/Environment.php:0
Stack trace:
#0 /www/wwwroot/.../init.php(0): WHMCS\Security\Environment::setHttpProxyHeader()
#1 /www/wwwroot/.../admin/configgeneral.php(0): unknown()
#2 {main}

When i use php 7.4 back, it's become fine and no had issue like this.
Anyone had solution?

Link to comment
Share on other sites

  • 2 weeks later...
  • WHMCS Technical Analyst II
  • Solution

Hello,

This issue is most likely caused by the server's PHP 8.1 configuration, where putenv function is listed in the disable_functions setting. To resolve the error, you need to have your hosting provider or system administrator remove putenv from that setting.

Link to comment
Share on other sites

Hey
Thanks for helping.
But i got another problem.

I go to link blablabla.com/admin/index.php
and get this error 

Error: Call to undefined method WHMCS\License::getRegistrationDate() in /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Admin/Survey/Retently/v1/GlobalNps.php:0
Stack trace:
#0 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Admin/Survey/Retently/v1/GlobalNps.php(0): WHMCS\Admin\Survey\Retently\v1\GlobalNps->getLicenseStartDate()
#1 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Admin.php(0): WHMCS\Admin\Survey\Retently\v1\GlobalNps->generateOutput()
#2 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Admin.php(0): WHMCS\Admin->retentlyNpsSurveys()
#3 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Admin.php(0): WHMCS\Admin->output()
#4 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Admin/Controller/HomepageController.php(0): WHMCS\Admin->display()
#5 [internal function]: WHMCS\Admin\Controller\HomepageController->index()
#6 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/CallableHandler.php(26): call_user_func_array()
#7 /www/wwwroot/new.purbastore.com/vendor/middlewares/fast-route/src/FastRoute.php(96): Middlewares\Utils\CallableHandler::execute()
#8 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/HandleProcessor.php(0): Middlewares\FastRoute->process()
#9 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\HandleProcessor->_process()
#10 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\HandleProcessor->process()
#11 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}()
#12 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Delegate.php(31): call_user_func()
#13 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/DelegatingMiddlewareTrait.php(0): Middlewares\Utils\Delegate->process()
#14 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Admin\ApplicationSupport\Route\Middleware\Assent->process()
#15 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}()
#16 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Delegate.php(31): call_user_func()
#17 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/DelegatingMiddlewareTrait.php(0): Middlewares\Utils\Delegate->process()
#18 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Security/Middleware/Authorization.php(0): WHMCS\Security\Middleware\Authorization->process()
#19 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/AbstractProxyMiddleware.php(0): WHMCS\Security\Middleware\Authorization->process()
#20 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\AbstractProxyMiddleware->_process()
#21 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\AbstractProxyMiddleware->process()
#22 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}()
#23 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Delegate.php(31): call_user_func()
#24 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/DelegatingMiddlewareTrait.php(0): Middlewares\Utils\Delegate->process()
#25 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/AbstractProxyMiddleware.php(0): WHMCS\Admin\ApplicationSupport\Route\Middleware\Authentication->process()
#26 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\AbstractProxyMiddleware->_process()
#27 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\AbstractProxyMiddleware->process()
#28 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}()
#29 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Delegate.php(31): call_user_func()
#30 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/DelegatingMiddlewareTrait.php(0): Middlewares\Utils\Delegate->process()
#31 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Admin\ApplicationSupport\Route\Middleware\DirectoryValidation->process()
#32 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}()
#33 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Delegate.php(31): call_user_func()
#34 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/BackendPsr7Response.php(0): Middlewares\Utils\Delegate->process()
#35 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/BackendPsr7Response.php(0): WHMCS\Route\Middleware\BackendPsr7Response->_process()
#36 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\BackendPsr7Response->process()
#37 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}()
#38 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Delegate.php(31): call_user_func()
#39 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(56): Middlewares\Utils\Delegate->process()
#40 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/BackendDispatch.php(0): Middlewares\Utils\Dispatcher->dispatch()
#41 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\BackendDispatch->_process()
#42 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\BackendDispatch->process()
#43 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}()
#44 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Delegate.php(31): call_user_func()
#45 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutePathMatch.php(0): Middlewares\Utils\Delegate->process()
#46 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutePathMatch->_process()
#47 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutePathMatch->process()
#48 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}()
#49 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Delegate.php(31): call_user_func()
#50 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/WhitelistFilter.php(0): Middlewares\Utils\Delegate->process()
#51 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/DelegatingMiddlewareTrait.php(0): WHMCS\Route\Middleware\WhitelistFilter->_process()
#52 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\WhitelistFilter->process()
#53 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}()
#54 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Delegate.php(31): call_user_func()
#55 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableClientModuleRequest.php(0): Middlewares\Utils\Delegate->process()
#56 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableClientModuleRequest->_process()
#57 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableClientModuleRequest->process()
#58 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}()
#59 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Delegate.php(31): call_user_func()
#60 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableAdminRequestUri.php(0): Middlewares\Utils\Delegate->process()
#61 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableAdminRequestUri->_process()
#62 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableAdminRequestUri->process()
#63 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}()
#64 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Delegate.php(31): call_user_func()
#65 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableRequestUri.php(0): Middlewares\Utils\Delegate->process()
#66 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableRequestUri->_process()
#67 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableRequestUri->process()
#68 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}()
#69 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Delegate.php(31): call_user_func()
#70 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableRequestQueryUri.php(0): Middlewares\Utils\Delegate->process()
#71 /www/wwwroot/new.purbastore.com/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableRequestQueryUri->_process()
#72 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableRequestQueryUri->process()
#73 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}()
#74 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Delegate.php(31): call_user_func()
#75 /www/wwwroot/new.purbastore.com/vendor/middlewares/utils/src/Dispatcher.php(56): Middlewares\Utils\Delegate->process()
#76 /www/wwwroot/new.purbastore.com/admin/index.php(0): Middlewares\Utils\Dispatcher->dispatch()
#77 {main}

Do you know how to fix this 
Thank You

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated