XF 2.2 PHP Version: 8.3.0 and fresh install

chaptertwo

New member
On a new UBUNTU install on a hyperv VM, accessing http://localhost/community/install/ reports PHP needs to be greater than 7.0.0 but I am on v 8.3.0

<?php
$phpVersion = phpversion();
if (version_compare($phpVersion, '7.0.0', '<'))
{
die("PHP 7.0.0 or newer is required. $phpVersion does not meet this requirement. Please ask your host to upgrade PHP.");
}
$rootDir = realpath(DIR . '/..');
chdir($rootDir);
require($rootDir . '/src/XF.php');
XF::start($rootDir);
XF::runApp('XF\Install\App');
 
Are you getting that full file back? If so, your web server probably isn't configured to serve PHP correctly. We'd recommend using PHP 8.1, in any case.
 
i did:
sudo apt -y install php8.1
sudo a2dismod php8.3
sudo a2enmod php8.1
sudo systemctl restart apache2

Now this script in a php file
<?php
// Get the PHP version and store it in a variable
$phpVersion = phpversion();

// Display the PHP version
echo "PHP Version: " . $phpVersion;
?>

Tells me PHP Version: 8.1.26

But now http://localhost/community/install/ gives me a blank page with nothing in view page source...
 
There would most likely be something in the server error logs. You might also want to use the requirements script to make sure all required extensions are available.
 
I see. Yes I located:

and i need to sort out:

Requirements not met

The following XenForo requirements were not met. Please contact your host for help.

The required PHP extension MySQLi could not be found. Please ask your host to install this extension.
The required PHP extension GD could not be found. Please ask your host to install this extension.
The required PHP extension cURL could not be found. Please ask your host to install this extension.
The required PHP extensions for XML handling (DOM and SimpleXML) could not be found. Please ask your host to install this extension.

Additionally, the following warnings should be noted:

ZipArchive support is recommended for installing add-ons, styles and XenForo upgrades.
PHP extension(s) 'gmp', 'mbstring' are required for push notifications support.
 
Back
Top Bottom