Jump to content

Featured Replies

Posted

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}

 

 

Solved by Miss_B

Go to solution

Can you check if the phpinfo.php file is present at the following location:

adminfolder/core\modules\admin\support\

  • Author

Yes, the indicated file exists.

Edited by Mercury Forever

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.

  • Author

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;
	}
}

 

It sounds like it’s disabled by your webhost. 

  • Author

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 by Mercury Forever

  • Solution

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.

 

  • Author

Hi @Miss_B, Indeed, that line of php.ini (disable_functions) is blocked. Now it works when you remove it.

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.

Recently Browsing 0

  • No registered users viewing this page.