Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Aug 2005
    Posts
    70
    Thanks
    1
    Thanked 0 Times in 0 Posts

    PHP works on only one site...

    I'm running IIS 6 on Windows Server 2003, and I have one site currently running. PHP works absolutely fine, but when I add a new site, the new site cannot do PHP whatsoever! It doesn't even give me the download thing to download the php file, I only get 404 error.

    Remember the first site still works fine and perfect with PHP, but any other site I create doesn't. Both site's properties are identical, I even tried the second site with port 80 but no matter what I do one site will work and the others won't.

    What I find strange is that when PHP isn't usually working, I would get a download for the php file, but this 404 error is completely random, and btw, HTML files work fine - the PHP file is actually there and if i put the php file onto the working site, it works. It's as if that single site had somthing magic making it run php

    Totally bizare, please help me..

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Are you sure the files are there? Filenames are case sensitive on windows.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Aug 2005
    Posts
    70
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Yes! It's definately the file, and to prove it if i copy the EXACT same file and put it on the working site, it works! and directory wise, html files in the SAME directory work. This is soo strange but it's real important that i fix it.

  • #4
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,044
    Thanks
    2
    Thanked 316 Times in 308 Posts
    Make sure you have set the doc_root = setting in php.ini. If I remember correctly, this must be set on IIS systems. Something like -
    Code:
    doc_root = c:\inetpub\wwwroot
    On IIS, reboot your computer (just stopping and starting the web service does not work as of the last time I used IIS) to get any changes made to php.ini to take effect.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #5
    New Coder
    Join Date
    Aug 2005
    Posts
    70
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I just tried that: no difference. How can this be happening? How can this even be possible?

  • #6
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,044
    Thanks
    2
    Thanked 316 Times in 308 Posts
    What method did you use to install PHP?

    This sounds like an incomplete installation (not all the steps completed) and/or a permissions problems (only the root folder has the proper user/permissions set.)
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •