toolmania1 Posted December 12, 2009 Share Posted December 12, 2009 I also posted this in another forum if you see it in another one, I am just trying to get the answer today if possible. Using: Windows 2003 Standard Edition IIS PHP 5.2.5.5 I cannot access a php file when I try to hit it in my web browser ( IE or Firefox ). I can access a gif file though. I enter the web site using the internal ip to access the files. I also set up a virtual directory. The same thing applies here. I can access the gif file I put into the folder for the virtual directory, but I cannot access php files that are in the virtual directory. So, it appears that IIS is working since I can hit the gif file in a web browser. The problem is that I cannot hit a php page in any web browser from any virtual directory. I set the permissions on the folder for the virtual directory by adding 'Everyone' and allowing. ( This is not a system that will be accessed from the outside world, so security is not an issue. ) Earlier in the day, I had a an older version of all of the files in the virtual directory folder. I was able to access these files in the browser. Everything was working correctly. I could access php files from the virtual directory also. The problem only showed up after I started applying the new files / folders. Then, I renamed the old folder by attaching '_old' to the end of the folder name. I named the new folder, with the newer version of the files, the same name as the original folder for the virtual directory. So, the new folder has the same name as the old folder did. As far as I know, IIS should not be able to tell the difference. It should still be looking for the same folder and find it since the new folder has the same name. But, just in case IIS could tell, I removed the virtual directory and added it back in. This would be the virtual directory with the new folder that contains the new version of the files. I made sure the .php extension was still there and it was. ( Right click on virtual directory named 'george', choose properties, click on configuration, then I see 'php' in the 'Application Configuration' box. ) Also, when viewing the IIS Manager, I clicked on the 'Web Service Extensions' folder. On the right, php is listed as as a Web Service Extension and it is 'Allowed'. I checked the IIS logs and found this when I tried to access a php page in the virtual directory 'george': 2009-12-12 14:24:05 W3SVC1 192.168.2.46 GET /george/login.php - 80 - 192.168.1.51 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5+(.NET+CLR+3.5.30729) 302 0 0 But, as you can see, I can hit a page with the file extension .gif from within the virtual directory 'george': 2009-12-12 13:16:02 W3SVC1 192.168.2.46 GET /george/1click.gif - 80 - 192.168.1.51 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5+(.NET+CLR+3.5.30729) 200 0 0 I also cannot access a php file from the root virtual directory: 2009-12-12 14:03:05 W3SVC1 192.168.2.46 GET /test.php - 80 - 192.168.1.51 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5+(.NET+CLR+3.5.30729) 404 3 50 I can access the gif file in the virtual directory: 2009-12-12 13:16:02 W3SVC1 192.168.2.46 GET /george/1click.gif - 80 - 192.168.1.51 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.9.1.5)+Gecko/20091102+Firefox/3.5.5+(.NET+CLR+3.5.30729) 200 0 0 Any ideas? I think I need to fix something with php, but I do not know what. Quote Link to comment https://forums.phpfreaks.com/topic/184885-cannot-access-php-page-in-browser-using-iis-can-access-gif/ Share on other sites More sharing options...
felixtgomezjr Posted December 14, 2009 Share Posted December 14, 2009 when yo say you can not hit the php page, is there an error message? or when you type the url, there is a prompt for you to download the php file? Or is it just a clean page with nothing in it? You old files work then you create new files. I guess there was an error in your new file but you have turned off the error report of php so you can not see the error message? Can you try to make a very simple file with echo hello in it and see if it will run? Quote Link to comment https://forums.phpfreaks.com/topic/184885-cannot-access-php-page-in-browser-using-iis-can-access-gif/#findComment-976834 Share on other sites More sharing options...
toolmania1 Posted December 14, 2009 Author Share Posted December 14, 2009 It was an SSL issue. The coder did not tell me that he added SSL requirements in the newest version. Once I added the self signed certificate, the php files showed up. That would explain the 302 redirection. Thanks for the help though. Quote Link to comment https://forums.phpfreaks.com/topic/184885-cannot-access-php-page-in-browser-using-iis-can-access-gif/#findComment-977119 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.