Mercury Forever Posted September 16, 2023 Posted September 16, 2023 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}
Miss_B Posted September 16, 2023 Posted September 16, 2023 Can you check if the phpinfo.php file is present at the following location: adminfolder/core\modules\admin\support\
Mercury Forever Posted September 16, 2023 Author Posted September 16, 2023 (edited) Yes, the indicated file exists. Edited September 16, 2023 by Mercury Forever
Miss_B Posted September 16, 2023 Posted September 16, 2023 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.
Mercury Forever Posted September 16, 2023 Author Posted September 16, 2023 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; } }
Daniel F Posted September 16, 2023 Posted September 16, 2023 It sounds like it’s disabled by your webhost. Miss_B 1
Mercury Forever Posted September 16, 2023 Author Posted September 16, 2023 (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, 2023 by Mercury Forever
Solution Miss_B Posted September 16, 2023 Solution Posted September 16, 2023 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. Mercury Forever and Richard Arch 2
Mercury Forever Posted September 16, 2023 Author Posted September 16, 2023 Hi @Miss_B, Indeed, that line of php.ini (disable_functions) is blocked. Now it works when you remove it. Miss_B 1
Miss_B Posted September 16, 2023 Posted September 16, 2023 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.
Recommended Posts