Can't run Mantis 1.1.0 with PHP4

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
markmueller
Posts: 1
Joined: 20 Dec 2007, 09:49

Can't run Mantis 1.1.0 with PHP4

Post by markmueller »

Hi everybody,

there seems to be a problem running the new Mantis release on PHP4:

Code: Select all

Fatal error: Call to undefined function: stripos() in /export/mantis/htdocs/mantis-1.1.0/config_defaults_inc.php on line 104
I ran into this while running the usual "upgrade" script.

Isn't 1.1.0 supposed to be "the last release supporting PHP 4.x.x" ?

Is there a new (and hidden) switch somewhere in there to activate a PHP4 mode?

hohoho,
Mark Müller

p.s. PHP Version is PHP 4.4.2 (cli) (built: Feb 6 2006 15:32:16)

Victor filed this under http://www.mantisbt.org/bugs/view.php?id=8681
Kirill
Posts: 640
Joined: 25 Nov 2007, 08:05
Location: Kaliningrad, RF
Contact:

Re: Can't run Mantis 1.1.0 with PHP4

Post by Kirill »

Code: Select all

# --- Requirements ----------

* MySQL 3.23.2 and higher
* PHP 4.0.6 and higher
* a webserver

Code: Select all

stripos

(PHP 5)
seiji
Posts: 15
Joined: 03 Nov 2007, 09:43
Location: Chiba, Japan

Re: Can't run Mantis 1.1.0 with PHP4

Post by seiji »

http://www.mantisbt.org/bugs/view.php?id=8681
Mantis 1.1.0 doesn't work on PHP 4 installations since config_defaults_inc.php uses stripos(). Since Mantis 1.1.0 should be the last release that supports PHP 4, this should be replaced with a combination of strtolower() and strpos().

Replace:
$t_soap_api_path_pos = stripos( $t_path, $t_soap_api_path );

With:
$t_soap_api_path_pos = strpos( strtolower( $t_path ), $t_soap_api_path );
Post Reply