Opened 6 years ago

Closed 6 years ago

#1484509 closed Feature Patches (fixed)

r673 Does Not Work with PHP 4

Reported by: brian Owned by: thomasb
Priority: 1 - Highest Milestone: 0.1-rc2
Component: Client Scripts Version: git-master
Severity: normal Keywords:
Cc:

Description

I updated to the latest SVN r673. It works fine on PHP 5, but does not work on PHP 4. The problem is the new mbstring detection in program/include/main.inc @ line 478. It appears the extension_loaded("mbstring") was an attempt to prevent the error, however, mb_list_encoding() is a PHP 5 only command. On my PHP 4 server, the extension_loaded("mbstring") returns a "1", making the latest SVN fail on PHP 4.

I have a fix for this issue, though it may not be the ideal fix, this did resolve my problem...

Original Line 475:

  if (is_null($s_mbstring_loaded) && ($s_mbstring_loaded = extension_loaded("mbstring")))

Modified Line 475:

  if (is_null($s_mbstring_loaded) && ($s_mbstring_loaded = extension_loaded("mbstring")) && (substr(phpversion(),0,1) == "5"))

Yep, that's right. It just checks the major version of PHP to make sure it's 5.

Change History (2)

comment:1 Changed 6 years ago by thomasb

  • Milestone set to 0.1-rc2
  • Owner set to thomasb
  • Severity changed from critical to normal
  • Status changed from new to assigned

comment:2 Changed 6 years ago by thomasb

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in trunk [88f66ec8]

Note: See TracTickets for help on using tickets.