PHP-cgi permissions in subdirectoryRSS

3 replies

Last post Oct 14, 2012 06:28 PM by e1ny

  • PHP-cgi permissions in subdirectory

    Sep 28, 2012 08:40 PM|e1ny|LINK

    Hi All: I'm pre-flighting a wordpress migration on a development server running IIS6. I followed the instructions for installing PHP and the fast-cgi extension (http://php.net/manual/en/install.windows.iis6.php) and got everything configured and running (php-wise).

    I installed WP in a directory and created a new website in IIS Manager...something like "wpTemp.mysite.com". WP runs fine when I access it this way.

    My next step was to run it as a virtual directory under an existing website. I created a virtual directory called "wp" under an existing website on the same server, so that my URL looks like "dev.mysite.com/wp". The virtual directory points to the "wpTemp.mysite.com" that I set up initially.

    But when I try to browse the app using the virtual path, like "dev.mysite.com/wp/index.php", I'm getting a "404" error. The original URL "wpTemp.mysite.com/index.php" still works fine, so it seems to be a PHP permissions error in the virtual directory?

  • Re: PHP-cgi permissions in subdirectory

    Oct 03, 2012 01:56 PM|peterviola|LINK

    This sounds more like a Wordpress url issue than permissions. For the site running in the subdir open the WP dashboard go to settings and check the Wordpress Address and Site Address.

     You may also need to hardcode these two lines temporarily in wp-login.php.

    update_option('siteurl', 'http://your.domain.name/the/path' );
    update_option('home', 'http://your.domain.name/the/path' );

    http://codex.wordpress.org/Moving_WordPress

    Peter Viola
    MCTIP SA, EST, DBA 2008
    MCSA Windows Server 2012

    Please 'Mark as Answer' if this post helps you.

    www.peterviola.com
  • Re: PHP-cgi permissions in subdirectory

    Oct 14, 2012 06:16 PM|e1ny|LINK

    peterviola

    This sounds more like a Wordpress url issue than permissions. For the site running in the subdir open the WP dashboard go to settings and check the Wordpress Address and Site Address.

     You may also need to hardcode these two lines temporarily in wp-login.php.

    update_option('siteurl', 'http://your.domain.name/the/path' );
    update_option('home', 'http://your.domain.name/the/path' );

    http://codex.wordpress.org/Moving_WordPress

    Hi Peter: Thanks for responding, but I think it isn't WP specific...hopefully something simpler. FWIW I already updated the "home" variable in mySQL but it still is not working.

    I discovered that if I navigate to a TXT file in the virtual directory, it is served properly, like:

    dev.mysite.com/wp/license.txt

    The URL above resolves properly, but if I try to reach any page with a PHP extension, it is not served. I set up a simple test page called "test.php" with

    <?php
    phpinfo();
    ?>

    and tested it with:

     wpTemp.mysite.com/test.php

    dev.mysite.com/wp/test.php

    and it is served in the first case, but not in the second case.

    Similarly, php pages are not being processed in the root of the website either, for example:

    dev.mysite.com/test.php

    doesn't get served as well.

    Just FYI, this is a server 2003 web edition sp2 (not R2). PHP had not been installed initially...I installed the FastCGI handler and PHP 5.3.17 after the original website had been set up, so perhaps PHP is not automatically being mapped for this website, even though it works properly on the "wpTemp" website I set up after installing FastCGI/PHP?

  • Re: PHP-cgi permissions in subdirectory

    Oct 14, 2012 06:28 PM|e1ny|LINK

    OK, I figured it out...after installing FastCGI and PHP, I needed to manually edit the existing website's configuration and add a mapping for .php to fcgiext.dll.