IIS6 and PHP5 includes problemRSS

5 replies

Last post Oct 10, 2008 04:08 PM by murtaza_t

  • IIS6 and PHP5 includes problem

    Sep 30, 2008 09:06 PM|SWD|LINK

    I have IIS setup using host headers. PHP pages that have includes such as include menu.php at randomn times will use a menu.php file from a different site on the server. I have php on Apache and this problem does not exist. Other than do not use php on IIS, is there a solution to resolve?

    Thank you.

     

  • Re: IIS6 and PHP5 includes problem

    Oct 01, 2008 02:19 AM|ma_khan|LINK

    I am not sure I totally understand your description here... you are using include of a php file that does not exist on the same site... you are using include for a file that actually exists on a different website on the same server ... and that is not happening successfully ... ?? I am not sure of what you asked .... dont mind... :)

  • Re: IIS6 and PHP5 includes problem

    Oct 02, 2008 04:20 PM|SWD|LINK

    include file does exist, hence the reason it dose work sometimes.

    Sometimes, IIS will include a file of the same name from a different website that is on the same server.

    It is as if all php files are cached and IIS chooses any one of those files at randomn, instead of the one that is part of the website.

    therefore, if the server has 5 websites that have the same file called menu.php and on any one of the sites you include menu.php IIS will serve up at randomn anyone off those 5 menu.php files.

    understand now?

     

     

     

  • Re: IIS6 and PHP5 includes problem

    Oct 03, 2008 04:52 AM|ma_khan|LINK

     are you sure you are giving the right include path in your files...??

  • Re: IIS6 and PHP5 includes problem

    Oct 04, 2008 08:44 PM|SWD|LINK

     yes, code is correct, otherwise it would never work.

     <?php include "menu.php" ?>


    should not include a file from a diferent website. That is for sure!

     

  • Re: IIS6 and PHP5 includes problem

    Oct 10, 2008 04:08 PM|murtaza_t|LINK

     This is strange problem, I suppose some thing is either misconfigured or misinterpreted. I would suggest you to enable parent paths in Home directory >> configuration of a website and change the code to

     <?php include "./menu.php" ?>

     and check if that helps to get some where close to the problem you are facing.

    Please Mark the post as Answer if it has helped you.
    Regards,
    Murtaza