Mercury Forever Posted September 16 Share Posted September 16 Hello, in the support module, I am accessing the "phpinfo" option and I get this error. Error: Call to undefined function IPS\core\modules\admin\support\phpinfo() (0) #0 /home/XXXXX/public_html/foro/system/Dispatcher/Controller.php(118): IPS\core\modules\admin\support\_phpinfo->manage() #1 /home/XXXXX/public_html/foro/applications/core/modules/admin/support/phpinfo.php(38): IPS\Dispatcher\_Controller->execute() #2 /home/XXXXX/public_html/foro/system/Dispatcher/Dispatcher.php(153): IPS\core\modules\admin\support\_phpinfo->execute() #3 /home/XXXXX/public_html/foro/paneladm/index.php(13): IPS\_Dispatcher->run() #4 {main} Link to comment Share on other sites More sharing options...
Miss_B Posted September 16 Share Posted September 16 Can you check if the phpinfo.php file is present at the following location: adminfolder/core\modules\admin\support\ Link to comment Share on other sites More sharing options...
Mercury Forever Posted September 16 Author Share Posted September 16 (edited) Yes, the indicated file exists. Edited September 16 by Mercury Forever Link to comment Share on other sites More sharing options...
Miss_B Posted September 16 Share Posted September 16 Can you check its contents and see if it hasn't gotten corrupted somehow? Or you can overwrite it with its counterpart from the Ips download package and see if it would help. Link to comment Share on other sites More sharing options...
Mercury Forever Posted September 16 Author Share Posted September 16 This is the content of the file, I don't know if it is corrupt or has something inconsistent. phpinfo.php ( PHP script, ASCII text ) <?php /** * @brief Display phpinfo * @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a> * @copyright (c) Invision Power Services, Inc. * @license https://www.invisioncommunity.com/legal/standards/ * @package Invision Community * @since 4 December 2020 */ namespace IPS\core\modules\admin\support; /* To prevent PHP errors (extending class does not exist) revealing path */ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) ) { header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' ); exit; } /** * Display phpinfo */ class _phpinfo extends \IPS\Dispatcher\Controller { /** * @brief Has been CSRF-protected */ public static $csrfProtected = TRUE; /** * Execute * * @return void */ public function execute() { \IPS\Dispatcher::i()->checkAcpPermission( 'get_support' ); parent::execute(); } /** * Support Wizard * * @return void */ protected function manage() { phpinfo(); exit; } } Link to comment Share on other sites More sharing options...
Daniel F Posted September 16 Share Posted September 16 It sounds like it’s disabled by your webhost. Miss_B 1 Link to comment Share on other sites More sharing options...
Mercury Forever Posted September 16 Author Share Posted September 16 (edited) Hello @Daniel F, How can I validate that? As background, last weekend I made a server change, to update from Centros7 to AlmaLinux 8.8, this was a server change from a scratch implementation. Regards, Edited September 16 by Mercury Forever Link to comment Share on other sites More sharing options...
Solution Miss_B Posted September 16 Solution Share Posted September 16 Are you on a shared hosting plan or do you manage your own Vps/Dedicated box? If the former, then there is nothing that you can do about it. Some hostsmay choose to disable the PHP function phpinfo() for security reasons, because it displays information which may be used to compromise the server that your site is running on. In that case you should contact your host and ask them if they can enable it. If the later, at the php.ini file find the following line: (it's located athe disable_functions directive) disable_functions = phpinfo and change it to disable_functions = and save the changes. That should enable phpinfo. Hope it helps. Richard Arch and Mercury Forever 2 Link to comment Share on other sites More sharing options...
Mercury Forever Posted September 16 Author Share Posted September 16 Hi @Miss_B, Indeed, that line of php.ini (disable_functions) is blocked. Now it works when you remove it. Miss_B 1 Link to comment Share on other sites More sharing options...
Miss_B Posted September 16 Share Posted September 16 59 minutes ago, Mercury Forever said: Hi @Miss_B, Indeed, that line of php.ini (disable_functions) is blocked. Now it works when you remove it. Glad to see that you got it solved. Link to comment Share on other sites More sharing options...
Recommended Posts