Mantis Bug Tracker
 

View Issue Details Jump to Notes ] Wiki ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010652mantisbtinstallationpublic2009-06-30 01:022010-04-22 15:14
Reporterandy_mbt 
Assigned Tojreese 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionduplicate 
PlatformOSOS Version
Product Version1.2.0rc1 
Target VersionFixed in Version 
Summary0010652: Clean install returns errors if Mantis installed in root
DescriptionIf 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 InformationI'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.
Attached Files

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

-  Notes
User avatar (0022314)
andy_mbt (reporter)
2009-06-30 01:05

0010535 might be related to this as well.
User avatar (0022315)
andy_mbt (reporter)
2009-06-30 01:30

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.
User avatar (0024884)
mantisbugs@rightshift.biz (reporter)
2010-03-23 12:45

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, '/');
User avatar (0024888)
XanaduNWH (reporter)
2010-03-23 21:41

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.

- Issue History
Date Modified Username Field Change
2009-06-30 01:02 andy_mbt New Issue
2009-06-30 01:05 andy_mbt Note Added: 0022314
2009-06-30 01:05 andy_mbt Issue Monitored: andy_mbt
2009-06-30 01:30 andy_mbt Note Added: 0022315
2010-03-23 12:45 mantisbugs@rightshift.biz Note Added: 0024884
2010-03-23 21:41 XanaduNWH Note Added: 0024888
2010-03-31 04:14 atrol Relationship added related to 0011700
2010-04-22 15:14 jreese Relationship added duplicate of 0011534
2010-04-22 15:14 jreese Status new => resolved
2010-04-22 15:14 jreese Resolution open => duplicate
2010-04-22 15:14 jreese Assigned To => jreese


MantisBT 1.2.2 git master-1.2.x[^]
Copyright © 2000 - 2010 MantisBT Group
Time: 0.2320 seconds.
memory usage: 1,970 KB
Powered by Mantis Bugtracker