IIS not working with Windows 10 - php

I can retreive a simple web page but not php scripts. I get the following message when trying to run a php script.
"there was a problem retreiving the XML Data. Unauthorized (401). However, I have set all of the permissions in inetpub folder to allow access. It's IIS after installing Windows 10 without any mods.
Any ideas what the problem might be?

By trial and error, I found that I needed to go into IIS Default Web Page and click authorization. I then needed to enable Windows authorization.
I can now use localhost for testing web content.

Related

PHP script doesnt work in direct admin but work in cPanel

guys i have a PHP Script and i install it on Direct admin and i got this error
i have try change php version but its dont work
but i install this script on other host but in cPanel and its work fine
This page isn’t working avesk.net is currently unable to handle this request. HTTP ERROR 500
I'm not a professional. Explain a little simple what to do
why ? anyone can help me?
In DirectAdmin
There are several possible causes for receiving 500 error.
If you migrated your account from cPanel to DirectAdmin, check in public_html your .htacces file and remove everything that was created by cPanel, there is usually a comment before and after the code stating that this part was created by cPanel.
PHP version. Try to use in DirectAdmin the same version of PHP(cPanel) if possible.
Log in to DirectAdmin (at the user level)
If your server works with php-fpm, just below the domain name, there will be an option to change the PHP version of your account.
If your server work with CloudLinux, find the "Extra Features" menu and then "Select PHP Version". In this case you can change the version of PHP you want to use, and enable / disable PHP extensions (often a disabled extension can cause error 500).
If you have root access to the server, it is very likely that you will find some information in the log.
tail /var/log/httpd/domains/yourdomain.com.error.log
===
Regards

Issue loading remote PHP app via Virtual Directories in IIS

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?

Not able to open website on localhost, handler mapping is missing

When ever I try to open wordpress website on my localhost I get below error.
HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
I have tried enabling HTTP activation but that did not work.
I have installed PHP for IIS from microsoft web PI, that did not work.
I think there is handler mapping missing, I am not able to map handle.
install wamp or xaamp and start php and mysql Service.
create a folder for example "site".
Copy all worpress folder and file in to www/site in wamp server
and enter the "localhost/site" in the browser and install wordpress quiqly.
soon wordpress goto run
Go and download the WAMP http://www.wampserver.com/en/
Its a set for web developers, that includes php, apache and mysql.
You can se localhost to act as a real webserver, you can find online many tutorials and how to

admin-ajax.php error 500 on windows

Got a question about admin-ajax.php. I have a wordpress site that we got developed and a form that uses this php file. this form uses AJAX and PHP to submit to the API that we use. a applyform-page-form.php file contains the Jquery and AJAX calls. These calls utilize a custom plugin to facilitate the XML process. All of the standard WordPress add_action(); calls are processed in this plugin. The site was developed on a Linux hosting panel (hostgator) and was working great. Due to PCI compliancy issues we needed to migrate the site to a Windows IIS host. Once we moved to this host, we get an error 500 with admin-ajax.php. I am stumped on what is causing this error. I checked permissions on the folder and they are fine. The server setup seems ok, we are using the same version of PHP on the windows server, Curl is installed, Not getting any errors in the iis server logs, php server logs are pretty much useless as well.
Question is does anyone know if there are any issues with admin-ajax.php on an IIS server? I have googled for a couple days and nothing about IIS, just mainly Apache and all the answers were basically "get a new host".
Well the thing is that Wordpress use a file call .HTACCESS where it maps the routes for events and request, so, what is hapend here is that you call admin-ajax.php from somewhere that has no "ROUTE", and that is why you have an error 500, but is just because the wordpress is trying to find something that it cand reach.
Try to use the full path to this file.

Forbidden - you don't have permission to access occurring randomly on Browser

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

Categories