Jump to content

PHP 7.4.26 and Invision Community 4.7


Recommended Posts

Hi,

 

in preparation of the upgrade to 4.7 I asked my  hosting provider to switch to PHP 7.4.3+
The company installed PHP 4.7.26 on Debian 4.19, MariaDB and nginx

Using a test setup to check the compatibility I run in trouble.
phpinfo() reports a memory limit of 512MB while the compatibilty checker ips4.php reports "our PHP memory limit is too low. It needs to be set to 128M or more. You should contact your hosting provider or system administrator to ask for this to be changed." (see screenshots)

Could contain: Word, Text, Page, Menu, Calendar

Could contain: Word, File, Text, Page

Both the hosting provider and I are searching for the reason for this discrepancy - but with no success.

Do you have any ideas?

Regards Michael

Link to comment
Share on other sites

I do see that happening, yes, and if you click the small "phpinfo" link in the upper right of the second screenshot, it reports the same thing.

Is the ips4.php file on the second screenshot, a file that you just downloaded from the Marketplace and uploaded to your server?

Link to comment
Share on other sites

Unfortunately, the URLs listed there in your screenshot are not a licensed URL on any of your licenses. For support, please ensure you are using a license URL. Additionally, while we can review this, it often comes down to that there is a configuration misconception on the server, being one directory is running a different PHP configuration then another or there is caching in place.

Link to comment
Share on other sites

Hi Jim,

Correct, the listed URL is not a licensed one. 
As we tried the same on the licensed ones the forum software stopped working. In order to have running forums we choose to switch to this test setup (on the same server). 
So I ask again:  do you have any idea whats going wrong?

Link to comment
Share on other sites

In the location you have your ips4.php file, it is running with too low a memory_limit. So if its showing that in PHPInfo, you will need to check where this is being overrode

The location you have an installation is not one of your test installations, nor a live installation. If you are using it as test you must use your test installation key as per your license agreement

Link to comment
Share on other sites

12 hours ago, Marc Stridgen said:

The location you have an installation is not one of your test installations, nor a live installation. If you are using it as test you must use your test installation key as per your license agreement

I asked your colleagues to change one of my test installations to point to the above URL.
Now it's an official test installation.

Link to comment
Share on other sites

26 minutes ago, Michael Grote said:

I asked your colleagues to change one of my test installations to point to the above URL.
Now it's an official test installation.

I tried to take a courtesy look at your server directory to see if there is anything that sticks out there, but the FTP access details are incorrect. If in your Invision Community installation directory there is a .htaccess or php.ini, please ensure that these are set correctly and not overriding anything set at the server level.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

as I'm waiting for an unrestricted  FTP access I tried to drill down the error message.

For this I added an extra line of code in the ips4.php script as follows:

 

Quote

<?php
        $_memoryLimit = @ini_get('memory_limit');
        $memoryLimit = $_memoryLimit;
        preg_match( "#^(\d+)(\w+)$#", strtolower($memoryLimit), $match );
        if( $match[2] == 'g' )
        {
                $memoryLimit = intval( $memoryLimit ) * 1024 * 1024 * 1024;
        }
        else if ( $match[2] == 'm' )
        {
                $memoryLimit = intval( $memoryLimit ) * 1024 * 1024;
        }
        else if ( $match[2] == 'k' )
        {
                $memoryLimit = intval( $memoryLimit ) * 1024;
        }
        else
        {
                $memoryLimit = intval( $memoryLimit );
        }
?>

<li class="success"><?php echo $_memoryLimit; ?> memory limit.</li>

<?php if ( $memoryLimit >= 128 * 1024 * 1024 😞 ?>
                                        <li class="success"><?php echo $_memoryLimit; ?> memory limit.</li>
<?php else: $success = FALSE; ?>
                                        <li class="fail">Your PHP memory limit is too low. It needs to be set to 128M or more. You should contact your hosting provider or system administrator to ask for this to be changed.</li>
<?php endif; ?>

 

The result looks like this:

Quote

PHP Requirements

  • PHP version 7.4.26.
  • cURL extension loaded
  • DOM extension loaded.
  • GD extension loaded.
  • Multibyte String extension loaded.
  • MySQLi extension loaded.
  • OpenSSL extension loaded.
  • Session extension loaded.
  • SimpleXML extension loaded.
  • XML Parser extension loaded.
  • XMLReader extension loaded.
  • XMLWriter extension loaded.
  • Zip extension loaded.
  • Exif extension loaded.
  • GMP extension loaded.
  • 512M memory limit.
  • Your PHP memory limit is too low. It needs to be set to 128M or more. You should contact your hosting provider or system administrator to ask for this to be changed.
  • No Suhosin restrictions.

From my point of view the PHP system reports 512M memory too, but your script does a the wrong evaluation.

Or am I completely wrong?

 

Link to comment
Share on other sites

Meanwhile I added two lines of code to print out the calculation values of the memory check.

The additional lines are printed in bold:

 

Quote

243 <?php
244         $_memoryLimit = @ini_get('memory_limit');
245         $memoryLimit = $_memoryLimit;
246
247         preg_match( "#^(\d+)(\w+)$#", strtolower($memoryLimit), $match );
248         if( $match[2] == 'g' )
249         {
250                 $memoryLimit = intval( $memoryLimit ) * 1024 * 1024 * 1024;
251         }
252         else if ( $match[2] == 'm' )
253         {
254                 $memoryLimit = intval( $memoryLimit ) * 1024 * 1024;
255         }
256         else if ( $match[2] == 'k' )
257         {
258                 $memoryLimit = intval( $memoryLimit ) * 1024;
259         }
260         else
261         {
262                 $memoryLimit = intval( $memoryLimit );
263         }
264 ?>
265
266 <li class="success"><?php echo $_memoryLimit; ?> $_memory limit.</li>
267 <li class="success"><?php echo $memoryLimit; ?> $memory limit.</li>
268
269 <?php if ( $memoryLimit >= 128 * 1024 * 1024 😞 ?>
270                                         <li class="success"><?php echo $_memoryLimit; ?> memory limit.</li>
271 <?php else: $success = FALSE; ?>
272                                         <li class="fail">Your PHP memory limit is too low. It needs to be set to 128M or more. You should contact your hosti ng provider or system administrator to ask for this to be changed.</li>
273 <?php endif; ?>

 

 

The result is as follows:

Quote

PHP Requirements

  • PHP version 7.4.26.
  • cURL extension loaded
  • DOM extension loaded.
  • GD extension loaded.
  • Multibyte String extension loaded.
  • MySQLi extension loaded.
  • OpenSSL extension loaded.
  • Session extension loaded.
  • SimpleXML extension loaded.
  • XML Parser extension loaded.
  • XMLReader extension loaded.
  • XMLWriter extension loaded.
  • Zip extension loaded.
  • Exif extension loaded.
  • GMP extension loaded.
  • 512M $_memory limit.
  • 512 $memory limit.
  • Your PHP memory limit is too low. It needs to be set to 128M or more. You should contact your hosting provider or system administrator to ask for this to be changed.
  • No Suhosin restrictions.

Again the additional result lines are in bold

The string 512M $_memory limit shows the result of the system call  $_memoryLimit = @ini_get('memory_limit');
while the string 512 $memory limit is the result of your script calculation.

This is compared to $memoryLimit >= 128 * 1024 * 1024 and fails

 

The above code can be found in line 244 to 268

 

Doing the same with PHP 7.3 enabled shows the correct result.

Quote

PHP Requirements

  • You are not running a compatible version of PHP. You need PHP 7.4.0 or above (8.0.0 or above recommended). You should contact your hosting provider or system administrator to ask for an upgrade.
  • cURL extension loaded
  • DOM extension loaded.
  • GD extension loaded.
  • Multibyte String extension loaded.
  • MySQLi extension loaded.
  • OpenSSL extension loaded.
  • Session extension loaded.
  • SimpleXML extension loaded.
  • XML Parser extension loaded.
  • XMLReader extension loaded.
  • XMLWriter extension loaded.
  • Zip extension loaded.
  • Exif extension loaded.
  • GMP extension loaded.
  • 512M $_memory limit.
  • 536870912 $memory limit.
  • 512M memory limit.
  • No Suhosin restrictions.

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...