Iis ошибка 500 при php

500 internal server error clearly indicates that something went wrong during the display of PHP page.

By default, web servers like IIS return only generic error messages in websites. Often, this causes the masking of real reason for IIS PHP errors such as 500 internal server error.

That’s why, we frequently get request from Windows server owners to find out the reason for PHP website errors and fix them as part of our Server Management Services.

Today, we’ll take a look on how Bobcares’ Engineers track the real reason and fix php 500 internal server error in IIS.

What causes PHP 500 internal server error in IIS

Basically, 500 Internal Server Error is IIS web server’s way of saying, “Something has gone wrong when I tried to display the page. Not sure what.

Now, its time to see the exact reasons for the 500 errors.

1. Permissions Error

From our experience in managing servers, our Windows Experts often see PHP 500 internal server errors due to wrong permissions and ownership on website files. In Windows servers, every file and every folder has its own set of permissions. Again, some permissions are inherited from the parent folders too. And, when the PHP binary do not have enough permissions to execute the scripts, it can result in 500 internal server error.

Similarly, ownership of the files also create problems. In Windows, specific users like IIS User, IIS WP User, etc. should have access on the website folders and files. For example, the IUSR account should have modify permissions on php scripts. And, when there are permission problems, website shows PHP errors.

2. Bad PHP Settings

Yet another reason for PHP internal server error is bad PHP settings. The PHP settings are specified in the configuration file at C:PHPPHP.ini. PHP binary take the values from this file while executing scripts.

A classic example will be PHP timeout settings. When the website PHP scripts has to fetch results from external resources, PHP timeout values often cause trouble.  Most system administrators set timeout values in PHP to avoid abuse of the server resources. And, if the PHP script executes for a time longer than the threshold limits, it eventually results in 500 error.

3. PHP module errors

A very few 500 errors happen when the PHP module on the server as such becomes corrupt too. As a result, it results in processing failure of PHP scripts.

Luckily, when the website reports the 500 error due to module failures, IIS often show a more specific error messages like:

500.0 Module or ISAPI error occurred.
500.21 Module not recognized.

How we fixed PHP 500 internal server error in IIS

Fixing PHP 500 internal server error in IIS need a series of steps. Let’s now see how our Dedicated Engineers fixed it for one of our customers and made PHP scripts running.

The customer reported 500 internal server error on WordPress website running in IIS.

1. Turning On Display errors

While the error correctly suggested that PHP had caused 500 error code, it did not provide application-specific information about what caused the error. Therefore, the the first step of investigation was to turn ON display errors option. For this, our Dedicated Engineers followed the steps below.

  1. Using Windows® Explorer, browse to C:PHP and open the Php.ini file in the PHP installation directory.
  2. Edit and set the display_errors = On directive.
  3. Save the file.
  4. Reset IIS using the command iisreset.exe

After turning on the errors, we reloaded the PHP and it showed a PHP parse error:

Parse error: parse error in C:inetpubusersxxxhttpdocsmysiteerror.php on line 3 >>

Often browser settings only show friendly error messages. In such cases, we recommend customer to turn it Off. For example, in Internet Explorer Go to Tools, Internet Options, Advanced tab, and then clear the Show friendly HTTP error messages check box.

Thus, it was a coding error on the PHP script. We suggested script modifications to customer and that fixed the error.

2. Running PHP script locally

Yet another way to find the exact error is to run the problem php script within the server. For this, our Support Engineers connect to the server via rdesktop and execute php script using the php.exe binary. It would show the  DLL’s that are having conflicts and causing the 500 error. We fix these conflicts and make the script working again.

3. Correcting PHP settings

In some cases, we need to correct the PHP settings to get the problem solved. Recently, when a customer reported problems with his website, we had to set the php directive open_basedir correctly to solve 500 Internal Server Error.

Similarly, when PHP cgi scripts show up some warning, IIS7 still displays an HTTP 500 error message. Although the best method is to fix the PHP scripts, often changing the default error handling for FastCGI in IIS7 to “IgnoreAndReturn200” also work as a temporary fix. The exact settings will look as shown.

4. Fixing PHP binary

In some rare cases, the fix may involve complete rebuilding of PHP binary on the server. This happens mainly when the PHP program on the server becomes corrupt. However, in such cases our Dedicated Engineers always check the dependency of the package and do the reinstall. For control panel specific servers, we set the appropriate binary on the server.

[Broken PHP scripts causing big problems? Our IIS experts have the fix for you.]

Conclusion

In a nutshell, PHP 500 internal server error in IIS happens mainly due to reasons like buggy PHP scripts, wrong server settings and many more. Today, we saw the top reasons for the error and how our Support Engineers fix it for customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

I am trying to upload a file to an IIS based server. here is my code:

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
//ini_set('error_log','/httpdocs/error_log');
echo "upload_max_filesize: " . ini_get ("upload_max_filesize"). "<br>";
echo "post_max_size: " . ini_get ("post_max_size"). "<br>";
echo "memory_limit: " . ini_get ("memory_limit"). "<br>";
echo "max_file_uploads: " . ini_get ("max_file_uploads"). "<br>";
echo "max_execution_time: " . ini_get ("max_execution_time"). "<br>";
echo "max_input_time: " . ini_get ("max_input_time"). "<br>";
echo "file_uploads: " . ini_get ("file_uploads"). "<br>";
echo "default_socket_timeout: " . ini_get ("default_socket_timeout"). "<br>";
echo "<br>";
if ($_FILES["file"]["error"] > 0)
  {
  echo "Error: " . $_FILES["file"]["error"] . "<br>";
  }
else
  {
  echo "Upload: " . $_FILES["file"]["name"] . "<br>";
  echo "Type: " . $_FILES["file"]["type"] . "<br>";
  echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
  echo "Stored in: " . $_FILES["file"]["tmp_name"];
  }
?>
<html>
<body>

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<input type="submit" name="submit" value="Submit">
</form>

</body>
</html>

I used to get this error when i try to upload a file greater than 13MB:

Server Error

500 — Internal server error. There is a problem with the resource you
are looking for, and it cannot be displayed.

then i added the error_reporting and i got this:

Network Error (tcp_error)

A communication error occurred: «Can’t send more» The Web Server may
be down, too busy, or experiencing other problems preventing it from
responding to requests. You may wish to try again at a later time.

For assistance, contact your network support team.

this is the settings:

upload_max_filesize: 20M

post_max_size: 128M

memory_limit: -1

max_file_uploads: 20

max_execution_time: 50000

max_input_time: 50000

file_uploads: on

default_socket_timeout: 6000

this is the web.config file:

<?xml version="1.0"?>
<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    WindowsMicrosoft.NetFrameworkvx.xConfig 
-->
<configuration>
  <!--
    <configSections>
      <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
          <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
          <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
            <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
            <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
            <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
          </sectionGroup>
        </sectionGroup>
      </sectionGroup>
    </configSections>  
-->
  <appSettings />
  <system.web>
    <httpRuntime 
        executionTimeout="9000" 
        maxRequestLength="65536" 
        useFullyQualifiedRedirectUrl="false" 
        minFreeThreads="8" 
        minLocalRequestFreeThreads="4" 
        appRequestQueueLimit="1000" 
        enableVersionHeader="true" 
    />
    <customErrors mode="On" />
    <!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
    <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
    <authentication mode="Forms" />
    <!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
    <pages>
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </controls>
    </pages>
    <httpHandlers>
      <remove verb="*" path="*.asmx" />
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
    </httpHandlers>
    <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </httpModules>
    <sessionState timeout="2880" />
  </system.web>
  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        <providerOption name="CompilerVersion" value="v3.5" />
        <providerOption name="WarnAsError" value="false" />
      </compiler>
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        <providerOption name="CompilerVersion" value="v3.5" />
        <providerOption name="OptionInfer" value="true" />
        <providerOption name="WarnAsError" value="false" />
      </compiler>
    </compilers>
  </system.codedom>
  <!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
  <system.webServer>
    <security>
        <requestFiltering>
           <requestLimits maxAllowedContentLength="2147483648" />
        </requestFiltering>
    </security>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <remove name="ScriptModule" />
      <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </modules>
    <handlers>
      <remove name="WebServiceHandlerFactory-Integrated" />
      <remove name="ScriptHandlerFactory" />
      <remove name="ScriptHandlerFactoryAppServices" />
      <remove name="ScriptResource" />
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </handlers>
  </system.webServer>
  <runtime>
    <assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

I accessed the server remotely and tested it the response was:

PHP Warning: POST Content-Length of 9202605 bytes exceeds the limit
of 8388608 bytes in Unknown on line 0

How can i fix this problem?



  • +1 888 500 1070 (Toll Free)


  • +1 888 500 1070 (Toll Free)

Assistanz

  • Product

    Unique Public & Private Cloud Management Portal for Data centers, Enterprise & Webhosting Companies.

    Easy-to-use self-service portal allows your customers the freedom to manage their cloud with minimal handholding.

    Self-service portal allows businesses to manage their resources, monitoring & vulnerability scan, by themselves.

    Centralized governance and secure and holistic management of resources across multiple clouds through RBAC.

  • Cloud services & AIOps

    PUBLIC CLOUD

    Transform Your Enterprise on AWS Cloud Platform with Cost-Effective, AIOps-Driven Managed Offerings.

    GCP

    Assistanz helps Enterpise, drive innovation, manage costs, governance and risks associated with their workloads on Google Cloud Platform.

    CONTAINER ORCHESTRATION

    Orchestrate containerized applications across multiple environments with end-to-end support from certified Kubernetes administrators.

    Helps organizations increase efficiency, reduce cost and speed up time to market through pipeline automation across different cloud platforms.

    PRIVATE CLOUD

    Assistanz are the largest supporter of CloudStack since 2015, specializing in design & implementation of laaS for private & public clouds.

  • Support Services

    Our IMS Plans cover IT infrastructure planning, design, implementation, maintenance and evloution

    If you are looking for staffs who could augment your webhosting business, then Assistanz is just the partner you’re looking for.

    Offload your cPanel Server management & support overheads and focus only on your business.

    A fully comprehensive plan to manage your Linux & Windows Plesk Servers.

    Our DirectAdmin server management plan provides you with unlimited hours of server.

    Enable easy migration of applications to cloud with our robust cloud server migration services.

    Connect with US

    Looking for more cutomized support solutions ?

    Our team is ready to help you

    Explore our free Configuration package, Scripts, Automations & More..

    Quality Management System

    ITILNEW

    bsi

    Bureau 27001

  • Company

    Established in 2004, Assistanz has become one of the most preferred IT Service providers across diverse industry segments and a complete one-stop shop for all your IT Needs & Solutions.

    Questions about our service?
    Our team can answer them for your within a day..

    AssistanZ Team

    If you care for a career…

  • Blog

Assistanz

  • Product

    Unique Public & Private Cloud Management Portal for Data centers, Enterprise & Webhosting Companies.

    Easy-to-use self-service portal allows your customers the freedom to manage their cloud with minimal handholding.

    Self-service portal allows businesses to manage their resources, monitoring & vulnerability scan, by themselves.

    Centralized governance and secure and holistic management of resources across multiple clouds through RBAC.

  • Cloud services & AIOps

    PUBLIC CLOUD

    Transform Your Enterprise on AWS Cloud Platform with Cost-Effective, AIOps-Driven Managed Offerings.

    GCP

    Assistanz helps Enterpise, drive innovation, manage costs, governance and risks associated with their workloads on Google Cloud Platform.

    CONTAINER ORCHESTRATION

    Orchestrate containerized applications across multiple environments with end-to-end support from certified Kubernetes administrators.

    Helps organizations increase efficiency, reduce cost and speed up time to market through pipeline automation across different cloud platforms.

    PRIVATE CLOUD

    Assistanz are the largest supporter of CloudStack since 2015, specializing in design & implementation of laaS for private & public clouds.

  • Support Services

    Our IMS Plans cover IT infrastructure planning, design, implementation, maintenance and evloution

    If you are looking for staffs who could augment your webhosting business, then Assistanz is just the partner you’re looking for.

    Offload your cPanel Server management & support overheads and focus only on your business.

    A fully comprehensive plan to manage your Linux & Windows Plesk Servers.

    Our DirectAdmin server management plan provides you with unlimited hours of server.

    Enable easy migration of applications to cloud with our robust cloud server migration services.

    Connect with US

    Looking for more cutomized support solutions ?

    Our team is ready to help you

    Explore our free Configuration package, Scripts, Automations & More..

    Quality Management System

    ITILNEW

    bsi

    Bureau 27001

  • Company

    Established in 2004, Assistanz has become one of the most preferred IT Service providers across diverse industry segments and a complete one-stop shop for all your IT Needs & Solutions.

    Questions about our service?
    Our team can answer them for your within a day..

    AssistanZ Team

    If you care for a career…

  • Blog

Assistanz



  • Blog, Technologies




  • Loges




  • September 30, 2017

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

Steps to Resolve 500 Internal Server Error for PHP in IIS on Windows 2016

In this blog, we will show you the steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016.

ACCESSING PHP INFO PAGE

  • To troubleshoot this issue, place a phpinfo page under your website home folder.

<?php
phpinfo();
?>

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

  • Open the web browser and access the URL http://localhost/phpinfo.php and if you see the 500 Internal Server Error. Follow the below steps.

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

VERIFY THE IIS HANDLER MAPPING

  • Make sure that PHP was configured correctly in IIS.
  • Open IIS snap-in and click on the server name.

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

  • Double click on Handler Mappings icon.

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

  • You can see the list of handlers configured in that server. Double click on the PHP handler.

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

  • Make sure that php-cgi.exe was added as executable in IIS.

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

VERIFYING PHP MODULES

  • Open the command prompt and go-to PHP binary folder. In this demo, it is C:program filesphp 7.1 folder.

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

  • Type the below command to view the available modules in the PHP.

php –m

  • If PHP dependencies are installed correctly it will show the list of available modules in PHP or it will show the error like below.

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

  • It looks like Visual C++ is missing on the server. Google the VC++ and install it.

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

  • Browse the below URL and download the Microsoft Visual C++ 2015 Redistributable Update 3 RC package.

https://www.microsoft.com/en-us/download/details.aspx?id=52685

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

  • Click on Download and select vc_redist.x86.exe and click Next.

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

  • Once the download is complete, double-click on the vc_redist.x86.exe file. Accept the License Agreement and click on Install button.

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

  • Once the installation is successful click on close button.
  • Verify the PHP modules from the command prompt again. Now you will able to see the list of modules available in PHP.

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

  • Browse the info page again and you will able to see the PHP configuration information.

Steps to resolve 500 Internal Server Error for PHP in IIS on Windows 2016

  • So, PHP requires MSVC++ as a compiler to execute the coding.

VIDEO

Thanks for reading this blog. We hope it was useful for you to learn to resolve the PHP 500 internal server error in IIS

Loges

Loges

Most Popular:

Subscribe To Our Weekly Newsletter

No spam, notifications only about new products, updates.

  • Remove From My Forums
  • Question

  • User1602581346 posted

    Each time I have an a PHP error it is giving me a 500 error with IIS 7.5 (Win 2008 R2). When I set the error to Detailed I get a blank page on remote and «the website cannot display the page» page on local. If error page is set to DetailsOnlyLocal I
    get the «500 — Internal server error.
    There is a problem with the resource you are looking for, and it cannot be displayed.» message.

    In my php.ini under error_log I have a file set. log_errors is On, error_reporting is E_ALL. The file that is logged can be accessible, written and readed by Users, Administrators and Network Service. The application pool allows 32 bits applications
    and is run under NetworkService.

    When I look for the trace i have this information :

    No.175. Warning -MODULE_SET_RESPONSE_ERROR_STATUS


    ModuleName

    FastCgiModule


    Notification

    128


    HttpStatus

    500


    HttpReason

    Internal Server Error


    HttpSubStatus

    0


    ErrorCode

    0


    ConfigExceptionInfo

     

    Notification

    EXECUTE_REQUEST_HANDLER


    ErrorCode

    The operation completed successfully. (0x0)

    The php error log remains empty. It is impossible to write under syslog.

    Basically I am not able to see any PHP error here, making debuging quite impossible.

    Any hints available to make the errors appears ? To help with the debugging, I am currently having an error with wordpress 3.0 and arras theme.

Answers

  • User-1405480850 posted

    Hi,

    First of all ensure that a simple PHP page is working fine. An example of simple PHP file is given below, copy paste the code, name it test.php and copy it your web root folder (typically C:inetpubwwwroot) which is where your Default Web Site point to
    on port 80.

    <?php
    phpinfo();
    ?>

    Now from the browser, type http://localhost/test.php and see if it displays everything. If not, this means your PHP is not configured well. I am giving few links which will help you configuring PHP:

    • Please make sure that proper php.ini is getting loaded. You can test PHP cli by using the command ‘php.exe -c <path to proper php.ini file> C:inetpubwwwroottest.php and ensure that PHP CLI is running fine. Now run without -c switch and see if
      it runs or not.

    • While running php.exe CLI if you get an error with regards to some DLL not found, try commenting the extension which is responsible for it. Since you are not getting anything in PHP error log I believe this is not the case. but here I am assuming that
      you have set PHP writing to error log properly.

    Let me know if still there is a problem. On IIS7.5 (Windows 7), PHP installation from WPI should work pretty well.

    Thanks,

    Don.

    • Marked as answer by

      Tuesday, September 28, 2021 12:00 AM

При изменении «Настройки постоянных ссылок» на «Название записи» возникала ошибка 500.

Решение было найдено тут, а именно в корневой папке (где установлен WordPress) создаем файл web.config:

<?xml version="1.0"?>
<configuration>
  <system.webServer>
     <rewrite>
        <rules>
           <rule name="Main Rule" stopProcessing="true">
              <match url=".*" />
              <conditions logicalGrouping="MatchAll">
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
              </conditions>
              <action type="Rewrite" url="index.php" />
           </rule>
        </rules>
     </rewrite>
  </system.webServer>
</configuration>

Внимание! Вся графика должна начинаться с «/» (то есть от корня сайта) с полными ссылками будут проблемы. надо разобраться….

Для того что бы в IIS 7 — показать ошибку 500
В файл web.config добавьте следующий раздел:

<configuration>
 <system.webServer>
   <httpErrors errorMode="Detailed" />
 </system.webServer>
</configuration>

либо смотреть ошибку через ie на самом серваке.

Ошибка HTTP 500.0 — Internal Server Error

Ошибка HTTP 500.0 - Internal Server Error
В последнее время часто происходят сбои процесса FastCGI. Повторите запрос позже

Выяснилось, что в откуда то появилось два обработчика php, возможно при обновлении php или что то еще.

Симптомы и решение:

1. Заходим в Диспетчер служб IIS (IIS Manager) -> Страницу управления нашим сайтом -> Сопоставление обработчиков (Handler Mappings)
2. Сортируем по пути и видим две *.php строки
3. Удаляем не нужную
Пользуемся  :)
P.S. Изменения вносятся в web.config

Понравилась статья? Поделить с друзьями:
  • Ihka система отопления с auc ошибка бмв
  • Ignore as err 0x0080 pandora ошибка
  • Ignition on фольксваген поло что означает ошибка
  • Ignition on фольксваген поло не заводится причины ошибка
  • Ignition on ошибка фольксваген поло что это