View Issue Details

IDProjectCategoryView StatusLast Update
0010535mantisbtauthenticationpublic2010-02-22 14:34
ReporterRobyOneKenoby Assigned Todhx  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Platform1.2.0.rc3OSWindowsOS Version2000 Server
Product Version1.2.0a3 
Target Version1.2.0Fixed in Version1.2.0 
Summary0010535: I have error to login to MantisBT
Description

Once I upgrade from 1.1.7 to 1.2.0a3 i got this issue

SYSTEM WARNING: preg_match() [function.preg-match]: Compilation failed: missing ) at offset 111

SYSTEM WARNING: preg_match() [function.preg-match]: Compilation failed: missing ) at offset 84

SYSTEM WARNING: preg_match() [function.preg-match]: Compilation failed: missing ) at offset 111

SYSTEM WARNING: preg_match() [function.preg-match]: Compilation failed: missing ) at offset 84

and just before see this i have the following issue:

APPLICATION WARNING 0002702: Invalid session

Additional Information

I have the following configuration:

Apache 2.2
php 5.2.9-2
mysql 4.1.16)

mantis works on port 1000 and mysql works on port 3360 and once I checked the configuration in Admiistrato all is OK

TagsNo tags attached.

Relationships

has duplicate 0011132 closeddhx wrong happened when run "index.php " 

Activities

giallu

giallu

2009-05-26 10:24

reporter   ~0021920

I suspect you update of the code was inclomplete. try wiping the installation directory and replace it with fresh code (better if you stick with the lastest git code instead of a3)

RobyOneKenoby

RobyOneKenoby

2009-05-26 10:27

reporter   ~0021921

you means of mantisBT only a fresh installation ? or also with apache, PHP and Mysql ? where can i get the latest GT code ?

dhx

dhx

2009-05-26 17:03

reporter   ~0021925

He meant that you should replace just your copy of Mantis... it shouldn't be necessary to upgrade Apache, PHP and MySQL as your current versions meet the minimum requirements (as far as I know).

You can get the latest version of the git master by clicking the first/top "snapshot" link at http://git.mantisbt.org/?p=mantisbt.git;a=summary

This pulls the very latest development version.

Please be careful... it is a development version, so things change rapidly and sometimes break. You don't want to upgrade a live installation to a development version without backing up your databases, testing with a test installation, and then going live.

giallu

giallu

2009-05-26 17:04

reporter   ~0021926

I mean the latest code for mantisbt

GunSmoker

GunSmoker

2009-11-02 02:26

reporter   ~0023532

I got exactly the same problem. I have downloaded "MantisBT 1.2.0rc2" from here: http://www.mantisbt.org/download.php deleted old 1.8 files and replaced them with extracted archive. Run admin\install.php. Installation was all green, but I got the above mentioned errors.

I was able to track it down to string_sanitize_url function in string_api.php - the problem is with $t_pattern or one of 3 lines with preg_match below. If I comment this block - error dissappear. Sorry, don't know PHP nor regular expression to figure out what's wrong here.

GunSmoker

GunSmoker

2009-11-02 02:27

reporter   ~0023533

BTW, Apache is 2.2.9.0, PHP is 5.2.6.6.

kemadz

kemadz

2009-11-05 07:39

reporter   ~0023591

SYSTEM WARNING: preg_match() [function.preg-match]: Compilation failed: missing ) at offset 84

This warning was caused by the line 245 of the file core\string_api.php!

If you configure the mantisbt directory as the root directory of the web server, the $t_short_path means a "\" which causes the miss match(")").

I found this information in my php error log file. But it just logged this one.

kemadz

kemadz

2009-11-05 07:53

reporter   ~0023593

By the way, I just clone the source from the repository(git clone git://git.mantisbt.org/mantisbt.git).

winxp sp3 + nginx 0.8.22 + php 5.2.11 + mysql 5.1.40

If place the mantisbt directory under the root diretory of the web server, both of those two warnings disapear. So maybe the other warning was caused by the same reason.

dhx

dhx

2009-11-08 03:29

reporter   ~0023617

Thanks to everyone who reported and tested this issue. The detailed information provided made it very easy for me to see what the problem was (using $g_path and $g_short_path in a regular expression pattern without escaping special characters).

It should now be fixed ready for the next release. Please see the changesets attached to this issue if you'd like to backport it to an earlier version of Mantis that you may use using.

Related Changesets

MantisBT: master-1.2.x 55878bd7

2009-11-08 03:22

dhx


Details Diff
Fix 0010535: Escape path and short_path configuration options

As these two options can contain slashes, periods and other characters
with special meaning in PRCE, they must be escaped prior to use within
regular expression patterns.
Affected Issues
0010535
mod - core/string_api.php Diff File

MantisBT: master 193ae8b9

2009-11-08 03:22

dhx


Details Diff
Fix 0010535: Escape path and short_path configuration options

As these two options can contain slashes, periods and other characters
with special meaning in PRCE, they must be escaped prior to use within
regular expression patterns.
Affected Issues
0010535
mod - core/string_api.php Diff File