View Issue Details

IDProjectCategoryView StatusLast Update
0010652mantisbtinstallationpublic2010-09-19 03:12
Reporterandy_mbt Assigned Tojreese  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.2.0rc1 
Summary0010652: Clean install returns errors if Mantis installed in root
Description

If the URL to mantis is simply a domain or a domain with subdomains (like https://mantis.int.domain.com/), the installation will complete successfully however Mantis will lose formatting/images and will return the following errors when you visit it:

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

If you then move your Mantis install to a subfolder (making the above URL to Mantis now look like https://mantis.int.domain.com/mantis/), everything will return to normal.

Note: I'm running Mantis over SSL, hence the https. I haven't tried it over http.

Additional Information

I've had to do the following to solve it (in config_inc.php):
$g_path = 'https://mantis.int.domain.com/';
$g_short_path = '/';
$g_absolute_path = 'C:/servers/XDEV/zdata/htdocs/example/mantis/';

With that, I can access Mantis error-free even when installed in my root folder by going to https://mantis.int.domain.com/

I'm thinking the errors are caused by the default values the above variables take (in config_defaults_inc.php):
$g_path = isset( $t_url ) ? $t_url : 'http://www.example.com/mantisbt/';
$g_short_path = $t_path . '/';
$g_absolute_path = dirname( FILE ) . DIRECTORY_SEPARATOR;

If this is done on purpose, I would suggest adding the above variables to the installer and asking users to fill them out before initiating the install to prevent post-install errors.

TagsNo tags attached.

Relationships

duplicate of 0011534 closedjreese Incorrect url/path detection 
related to 0011700 closedjreese Root path is incorrect in rendered html 

Activities

andy_mbt

andy_mbt

2009-06-30 01:05

reporter   ~0022314

0010535 might be related to this as well.

andy_mbt

andy_mbt

2009-06-30 01:30

reporter   ~0022315

Correction:

I removed [$g_absolute_path = 'C:/servers/XDEV/zdata/htdocs/example/mantis/';] from config_inc.php and my Mantis install still works, so I guess only the other 2 variables need to be configured manually to solve the above issue.

mantisbugs@rightshift.biz

mantisbugs@rightshift.biz

2010-03-23 12:45

reporter   ~0024884

This is repeatable on 1.2.0 Final on a WAMP stack. The error is in the

in config_defaults_inc.php

The calculation of $t_path should move the lines from out of its current if-statement

if ( '/' == $t_path || '\' == $t_path ) {
$t_path = '';
}

to just before

$t_path = rtrim($t_path, '/');

XanaduNWH

XanaduNWH

2010-03-23 21:41

reporter   ~0024888

Is the URL https://mantis.int.domain.com/ defined by vhost?
In your URL root,make a file to output the dirname( FILE ) . DIRECTORY_SEPARATOR value.
maybe, you should define the documentroot in vhost.