Page 1 of 1

Can't run Mantis 1.1.0 with PHP4

Posted: 20 Dec 2007, 09:56
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

Re: Can't run Mantis 1.1.0 with PHP4

Posted: 21 Dec 2007, 19:00
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)

Re: Can't run Mantis 1.1.0 with PHP4

Posted: 22 Dec 2007, 12:44
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 );