Welcome Guest, Not a member yet? Register   Sign In
framework4.0.4 doenst run on php 7.1 alternative
#1

Guys,

I am trying to integrate your latest framework 4.0.4, in my new project but its requiring me to upgrade my PHP version from 7.1 to 7.2 or higher from my cpanel command line as stated below:
-----------------------------------------------------------------------------------------------------------------------------------
 "CodeIgniter CLI Tool - Version 4.0.4 - Server-Time: 2020-11-02 07:20:51am

Your PHP version must be 7.2 or higher to run CodeIgniter. Current version: 7.1.33tauenjic@c01 [~/public_html/superapp/install/ci-news]#

------------------------------------------------------------------------------------------------------------------------------------
Problem is, I already have 3 projects running, that are limited to PHP 7.1 and not higher... Is there an alternative way around that(meaning getting it to run on a  PHP version 7.1 without having to upgrade my PHP version)?

Anyways let me know if there is a way

thank your support in advance.

cheers
Reply
#2

@gelson,

Check with your host and see if they have the ability for you to run multiple versions of PHP. This is one possible solution.
Reply
#3

(11-02-2020, 08:56 AM)php_rocs Wrote: @gelson,

Check with your host and see if they have the ability for you to run multiple versions of PHP.  This is one possible solution.


Greetings,

Yes I believe its possible to run different version for different domains but if you are working on one domain i dont think its possible... correct me if I am wrong.

Regards
Reply
#4

(This post was last modified: 11-02-2020, 11:58 PM by John_Betong.)

@gelson,

As a temporary KLUDGE until you manage to upgrade the PHP version you could try disabling the error message and see if your new project actually breaks Smile

File: public/index.php
PHP Code:
<?php 
// Valid PHP Version?
$minPHPVersion '7.2';
if (
version_compare(PHP_VERSION$minPHPVersion'<'))
{
  // TEMPORARILY DISABLE UNTIL PHP Version upgraded
  // die("Your PHP version must be {$minPHPVersion} or higher to run CodeIgniter. Current version: " . PHP_VERSION);
}
unset(
$minPHPVersion); 
Reply
#5
Thumbs Up 

(11-02-2020, 11:57 PM)John_Betong Wrote: @gelson,

As a temporary KLUDGE until you manage to upgrade the PHP version you could try disabling the error message and see if your new project actually breaks Smile

File: public/index.php
PHP Code:
<?php 
// Valid PHP Version?
$minPHPVersion '7.2';
if (
version_compare(PHP_VERSION$minPHPVersion'<'))
{
  // TEMPORARILY DISABLE UNTIL PHP Version upgraded
  // die("Your PHP version must be {$minPHPVersion} or higher to run CodeIgniter. Current version: " . PHP_VERSION);
}
unset(
$minPHPVersion);

thanks for the suggestion broreallybut I tried that in the /public/index.php:
-----------------------------------------------------------
<?
php

Valid PHP Version
?
//$minPHPVersion = '7.2';
//if (phpversion() < $minPHPVersion)
//{
        //die("Your PHP version must be {$minPHPVersion} or higher to run CodeIgniter. Current version: " . phpversion());
//}
//unset($minPHPVersion);
-----------------------------------------------------------
but the error message still emerges...

that was a pretty nifty suggestion though 

Regards 
Reply
#6

(This post was last modified: 11-03-2020, 04:59 AM by gelson.)

(11-02-2020, 11:57 PM)@john Betongthanks for the suggestion bro! really! but I tried that in the /public/index.php: Wrote: -----------------------------------------------------------
<?php

Valid PHP Version?
//$minPHPVersion = '7.2';
//if (phpversion() < $minPHPVersion)
//{
        //die("Your PHP version must be {$minPHPVersion} or higher to run CodeIgniter. Current version: " . phpversion());
//}
//unset($minPHPVersion);
-----------------------------------------------------------
but the error message still emerges...

that was a pretty nifty suggestion though 

Regards


Quote:
John_Betong@gelson,

As a temporary KLUDGE until you manage to upgrade the PHP version you could try disabling the error message and see if your new project actually breaks Smile

File: public/index.php
PHP Code:
<?php 
// Valid PHP Version?
$minPHPVersion '7.2';
if (
version_compare(PHP_VERSION$minPHPVersion'<'))
{
  // TEMPORARILY DISABLE UNTIL PHP Version upgraded
  // die("Your PHP version must be {$minPHPVersion} or higher to run CodeIgniter. Current version: " . PHP_VERSION);
}
unset(
$minPHPVersion); 

(11-02-2020, 11:57 PM)@John Betongthanks for the suggestion bro! really! but I tried that in the /public/index.php: Wrote: -----------------------------------------------------------
<?php

Valid PHP Version?
//$minPHPVersion = '7.2';
//if (phpversion() < $minPHPVersion)
//{
        //die("Your PHP version must be {$minPHPVersion} or higher to run CodeIgniter. Current version: " . phpversion());
//}
//unset($minPHPVersion);
-----------------------------------------------------------
but the error message still emerges...

that was a pretty nifty suggestion though 

Regards


Quote:
John_Betong@gelson,

As a temporary KLUDGE until you manage to upgrade the PHP version you could try disabling the error message and see if your new project actually breaks Smile

File: public/index.php
PHP Code:
<?php 
// Valid PHP Version?
$minPHPVersion '7.2';
if (
version_compare(PHP_VERSION$minPHPVersion'<'))
{
  // TEMPORARILY DISABLE UNTIL PHP Version upgraded
  // die("Your PHP version must be {$minPHPVersion} or higher to run CodeIgniter. Current version: " . PHP_VERSION);
}
unset(
$minPHPVersion); 
Reply
#7

(11-02-2020, 11:31 PM)gelson Wrote:
(11-02-2020, 08:56 AM)php_rocs Wrote: @gelson,

Check with your host and see if they have the ability for you to run multiple versions of PHP.  This is one possible solution.


Greetings,

Yes I believe its possible to run different version for different domains but if you are working on one domain i dont think its possible... correct me if I am wrong.

Regards

Despite the fact that you are on 1 domain you should be able to run multiple versions of PHP on it.  Check with your ISP and see if they have this feature.
Reply
#8

The CI 4 minimum PHP version is 7.2, so don't expect it to work properly with PHP 7.1
Reply
#9

Look, sooner or later you would need to add external packgages to your project, people that maintain them push their PHP versions up. At the moment a resonable minimal PHP version is 7.2.5.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB