Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

patch for upgrade from 1.7.0 to 1.7.1 - root web path issues fix


for anyone having problems with the root web path after upgrading to 1.7.1 as i did here is how you can patch it.

1. edit
2. comment out lines 63 and 64
3. in their place add the following line:

$here = '/your-web-path';

eg; in my case that's '/your-web-path' == '/support'

that's all you should have to do to fix the problem with this upgrade.

the bug is in the above mentioned lines.

yes i'm hardcoding it because it's 00:39 here and i'm tired so i'll just wait for the fix!



  • Could you try replacing the block (including the line to define ROOT_PATH) with this

    #Set Dir constants
    $root = str_replace('\\', '/', realpath(dirname(__file__)));
    $root2 = str_replace('\\','/', $_SERVER['DOCUMENT_ROOT']);
    $path = '';
    while (strpos($_SERVER['DOCUMENT_ROOT'], $root) === false) {
    $lastslash = strrpos($root, '/');
    $path = substr($root, $lastslash) . $path;
    $root = substr($root, 0, $lastslash);
    // Determine the path in the URI used as the base of the osTicket
    // installation
    if (!defined('ROOT_PATH'))
    define('ROOT_PATH', $path.'/'); //root path. Damn directories
  • thanks,
    these changes solved the problem and the pages load properly now
  • Geo,
    Thanks for pointing me into this post. I just wanted to chime in here to let everyone now that my issue ( ) was also resolved by this fix.
  • it should just be a one liner as per v1.7.0. however in 1.7.1 there's a change to the line that determines the cwd / document root / web path and therein lies the bug. i'm not a php programmer so i'd rather just wait for an official fix personally. this patch should suffice until that is released however.
  • osTicket is out on GitHub and the main osTicket site which includes, among other hotfixes, this fix.
  • Jared;44388 said:
    osTicket is out on GitHub and the main osTicket site which includes, among other hotfixes, this fix.
    The did not fix the front end stuff for me. I have done a fresh install and file replacements.
  • if by "front end" you mean css not loading / urls incorrect then perhaps try the patch i posted originally in this thread for the 1.7.0 release. apparently it's fixed in the release but i can't confirm that as i haven't installed it yet myself. that one line fix i originally posted in this thread is the only problem i have found with the upgrade from 1.7.0 to 1.7.1 so far.
  • Yep, the CSS is broken. The text reads just fine. Its all good, thank you for your contribution. I think I will downgrade for now.
Sign In or Register to comment.