I am running a site on my home computer with IIS 10.0. I have already set the permissions to full-control (more specifically, I set IIS_IUSRS to Full control).
However, when I run the site (by right-clicking it and hitting Manage Website --> Browse), I get an empty loading page. It keeps loading and never finishes, and doesn't show any errors. My site is very simple (basically a hello world site).
My site is made with php. I have tried these URLs: localhost, localhost:80 (the port number), localhost/index.php, and localhost:80/index.php. None of them work.
I also have another php site that I hosted with IIS 10.0 and it works.
Why does this happen? How do I fix it?
Some more details:
Anonymous Authentication is enabled and set to Application pool identity
ASP.NET Impersonation is disabled
The site has a config file
Related
I’m currently running a wordpress IIS server for site hosting (lets call it Web01), then running a separate IIS server for web application hosting. (Apps01)
I’m trying to utilize virtual directories on Web01 to dish out the content provided by Apps01 on my website.
So Apps01 hosts an IIS application called FileRun in an IIS site simply called “FTP”. going to http://localhost shows the application launches properly and I can login and use it just fine.
On Web01, I created a virtual directory under my main web IIS site called “ftp” as well as provided it with proper "connect as" account permissions, performed test to verify successful connections and I can expand and see the virtual directory contents etc.... When I attempt to go to http://www.example.com/ftp from Web01. It loads a page stating “ION Loader is required” however, I already have this ION Loader, loaded on Apps01 and it is functional. (as it is part of the FileRun, install). So at this point I used PHP Manager to redirect Web01 on FTP Virtual Directory to point to PHP content on Apps01 since that is where the program is located. Now I'm receiving an internal 500 error when trying to load http://www.example.com/ftp from Web01.
I check the remote PHP servers logs (Apps01) and see the following errors:
[11-Jan-2018 11:46:58 America/New_York] PHP Warning: PHP Startup: Unable to load dynamic library '\apps01\PHP\v5.6\ext\php_sqlsrv.dll' - The specified module could not be found.
in Unknown on line 0
It appears to repeat this same error but with all php modules that are trying to be accessed from the remote Web01 server.
Any thoughts? Issues appear to be happening when running php based applications via virtual directories in IIS only. I tested by creating a test.php page with simple text. If I go to example.com/ftp/test.php, content loads fine. So it appears to be spefically an issue with PHP (either something about the UNC path in the VD settings or php.ini settings that need to be changed to allow this type of access etc...) I just can't find a clear answer for this issue with online searches.
P.S.
I searched on this site and found someone with a similar issue as me. However, their solution is not a real solution and will not work for me. He stated he simply copied the contents from the remote server onto the local Web server... I need the two servers separate so each can process its own roles independently (aka I need app server to process resources for app usage and web server to process web requests etc...)
How to enable the Virtual Directory Support php?
I have a LAMP application that works. I can deploy this in 15 minutes on a Linux server. I was handed a VPS to deploy it. All I get is WHM. I created an account and that got me a login to cPanel and to the box. cPanel ran some wizard that told me to put my "web source files" in /public_html There is an /cgi-bin inside of that. I cannot get any web assets to be visible from any of those folders. All I get is 404 not found. chmod 777. 404 not found.
My simple question is this: how could I get a simple hello world PHP script to run on a cPanel server? I've been building web pages since before we called them web pages. I do not need to know anything about PHP itself I want to know how to get the cPanel managed server to run PHP scripts. All the documentation I can find on cPanel assumes you've been using it forever. I just need some basic information. Where do I put my PHP code ?????
This is the way cPanel works. If you host your website on shared IP address (main IP address of your server), you cannot access your website using IP address directly. You will always redirect to "http://IP/cgi-sys/defaultwebpage.cgi URL.
To access your website without pointing our domain to your server, you can use temporary URL. By default, it is enabled on the cPanel server. You can access the temporary URL using the following URL:
http://IP/~cpanel_user
Please note that the temporary URL does not work under the following configuration:
If you have enabled mod_userdir tweak and didn't exclude default host
If your server is configured to use mod_ruid2
Hope this information will help you with future use.
I have my website live on Cent Os Server Apache 2.2.15. Developed on PHP Codeigniter.
I get Forbidden error for the 1st time as I visit the website.
But then as I refresh it goes away and the page is loaded perfectly.
This happens to random users and not for everyone.
For some the site runs smoothly without any error.
For me it looks like a configuration difference between those two servers. Make sure that both servers have exactly the same:
Apache configuration
PHP configuration
folders structure and permissions
i have built a webapp on Cakephp 2.3 on my localhost .in my localhost the url of my website was like that
localhost/Cakephp/
when i typed this address in my browser the url becomes like this
localhost/Cakephp/login
it is redirecting to the login page
now i have deployed my app into an online server so now i am getting this error on accessing the following url
url
http://www.webapp.com/login
error
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
URL rewriting is not working by default on IIS. You will have to set it up.
You will have to create WebConfig files and set it up there.
Personally I find hosting PHP Apps on Windows a sort of "going against the flow" because:
PHP was created to work within a Unix/Linux environment
Afterwards it was ported to Windows
Configuration and maintenance tend to be easier (for me at least) under Unix/Linux
Some tasks that are trivial under Unix/Linux require more coding under an IIS intance (file storage for example needs some Windows specific COM objects if the server utilizes users and groups)
The Url Rewriting is set up on 4 lines in 2 files in Apache. In IIS it takes several hundred lines of xml...
Oh yes, and Microsoft sucks :D (Yes, they do!)
Anyway this is my personal opinion (backed up with some bad experiences). I am not saying that IIS is a bad web server - on the contrary it is good, just not good enough for PHP Apps.
ServerA-> 64 Bit Windows 2008 (IIS 7 && PHP 5.3.6)
ServerB-> 32 Bit Windows 2003 (Fileserver)
I'm trying to access a \ServerB\directory1\directory2\file.abc via fopen through a site hosted on ServerA and am getting a Permission Denied error. It's the default website using the default application pool.
What I've tried giving the following accounts or groups in the AD full permissions to the directory (and file through inheritance) and it still gave the error:
manually created a IUSR_SERVERA account (it didn't previously exist)
IIS_WPG
Everyone
Network Service
Anonymous Access
Authenticated Users
The Identity for the DefaultAppPool is NetworkService and has 32 bit applications enabled.
IUSR_SERVERA has full permissions to the local php directory.
Any help is appreciated. I've temporarily solved the issue by copying the file needed locally to SERVERA's wwwroot folder, but that can't be a permanent solution at all.
Thanks
-Mike
Thanks for the ProcMon suggestion, it brought me to the answer. I didn't set up the default application correctly.
I read and re-read everything I could find, but nothing said this specificially:
If you need to access network files using PHP through IIS 7, set up an account with proper credentials in the Application Defaults for the site you're working on.
To do so, go into the IIS Manager
Select your site from the Connections pane
Click the View Applications link in the Actions pane (far right side of the screen)
Click Set Application Defaults in the Actions pane in the new screen
Choose DefaultAppPool from the Application Pool section
Enter proper credentials in the Physical Path credentials section
Know that changing the Process Model -> Identity in the Advanced Settings of the Default App Pool had no effect on allowing it to happen.
The IUSR_SERVERA account isn't going to be of much use, given that PHP is executing underneath the default app pool, which you said runs as NetworkService.
What you need to do is give permissions on ServerB to SERVERA\NetworkService, because that's a local account, not an AD account.
Otherwise, you could change the default app pool to run as IUSR_SERVERA, and then it should work, assuming that account is an AD account and not a local one.
If you still can't figure it out, grab a copy of ProcMon, and monitor the messages for accesses containing the desired path, and see what the actual OS denial reason is, and what account it's attempting to utilize.