View Issue Details

IDProjectCategoryView StatusLast Update
0011172mantisbtotherpublic2009-11-15 11:50
Reporterbtrotter Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version1.2.0rc2 
Summary0011172: Virtual DocRoot's muck up the works
Description

I'm a totally new mantis user trying to run it on a Godaddy hosted domain in a virtual doc root. Mantis keeps trying to tack on the virtual doc root relative path on to every page thanks to the html_meta_redirect and config_get( 'path' ). I managed to fight my way to the preferences page and set the path, and that helps about 50% of the links, but at least within management, many still redirect to the wrong place. I haven't had much chance to try anything else yet. I've been at this for less than 30 minutes.

In any case, I know Virtual DocRoots aren't the world's most common thing, but this is a bit of a showstopper if you're on a host that uses them unless I'm missing some easy way to fix the redirects.

Steps To Reproduce

Install on host with virtual doc root
Say the root/primary docroot is /var/www/html and you have a virtualdocroot in /var/www/html/sites/test with mantis in /var/www/html/sitse/test/tracker.

Mantis keeps shoving /sites/mantis on the URL when it shouldn't, despite setting path = string = "/tracker/" in the preferences, meaning every click to a new page one has to edit the URL in the header.

TagsNo tags attached.
Attached Files
mantis_docroot.patch (533 bytes)   
*** config_defaults_inc.php	Tue Oct  6 14:18:41 2009
--- config_defaults_inc.php.new	Sun Nov 15 09:46:10 2009
***************
*** 112,117 ****
--- 112,121 ----
  			$t_host = 'www.example.com';
  		}
  
+ 		if ( isset( $_SERVER['SUBDOMAIN_DOCUMENT_ROOT'] ) && isset( $_SERVER['DOCUMENT_ROOT'] ) ) {
+ 			$_SERVER['DOCUMENT_ROOT'] = $_SERVER['SUBDOMAIN_DOCUMENT_ROOT'];
+ 		}
+ 
  		// Get server root to compare with path to this file
  		if( !isset( $_SERVER['DOCUMENT_ROOT'] ) ) {
  			if( isset( $_SERVER['SCRIPT_FILENAME'] ) ) {
mantis_docroot.patch (533 bytes)   

Activities

btrotter

btrotter

2009-11-14 03:29

reporter   ~0023719

i made a mistake in the submission because I changed my mind about my example partway. I meant to say mantis keeps tacking on /sites/test instead of /sites/mantis.

btrotter

btrotter

2009-11-15 11:50

reporter   ~0023727

Last edited: 2009-11-17 19:02

proposed patch attached. there's probably a better way to handle it, but given the way that section is written, this was the quickfix.

EDIT: P.S. patch working in production for me.