I been haveing trpuble with the use of this php function in IIS and I would like a explaination why and hpw to get around the problem [Answered]RSS

1 reply

Last post Aug 30, 2007 08:00 PM by Christian Paparelli

  • I been haveing trpuble with the use of this php function in IIS and I would like a explaination w...

    Aug 18, 2007 06:26 AM|fshaw|LINK

    Here is the problem on my web site i have intergrated the vbulletin forum product and in building my web site i am put on my home page or another page like it and in the process of deguging the script after a great deal of investagating i have come to the clusions that the foloowing does not function the same on a IIS as other web server. Could some one explain why this is and how this problem can be worked around?

     Here is the php server side script I am working on

     <?php 
      $curdir = getcwd();
      chdir('../forums'); 
      require_once('./global.php');

     if (!$vbulletin->userinfo['userid'])
       {
        print_no_permission();
      }


    switch ($_POST['blue_lodge'])
    {
        case "John T. Heard Lodge":
            $vbulletin->url = $vbulletin->options['bburl'] . '/forumdisplay.php?f=30';
            eval(print_standard_redirect('redirecting to forum', false, true));
            break;
      
         default:
            echo "Invalid page";
            break;

    }

    ?>
     

    I have also tried this

      chdir('./forums/'); 
      require_once('./global.php');

     It is when i put this in that the

     if (!$vbulletin->userinfo['userid'])
       {
        print_no_permission();
      }

    but on my testing i found that chdir was the one that does not function as it should i was able to see it for shure by putting in echo stactments after i did a chdir and found that i had not gone to were i should have.

    It seems to have something to do with the web root and IIS but do not undersatand what might be going one please explain the diff and how to fix this problem - have removed a lot of the php script so one can focus on the real problem.

     

    THANKS

    Frank H. Shaw 

     

     

  • Re: I been haveing trpuble with the use of this php function in IIS and I would like a explainati...

    Aug 30, 2007 08:00 PM|Christian Paparelli|LINK

    Christian Paparelli
    [Microsoft MVP Window Server - IIS]
    http://mvp.support.microsoft.com
    http://italy.mvps.org
    My job: http://www.ithost.ch
    My blog: http://blogs.aspitalia.com/cp