PHP-CGI Error Hosting Windows Server 2012

Asked

Viewed 251 times

0

I asked a question earlier about installing Laravel in Windows Hosting, because of the file web config..

I managed to get the site to run. I was able to make the file and put it in the folder public website. I just don’t know if he’s fully following the rules of the archive .htaccess that Laravel himself mounts. I’ll post the file code downstairs later.

Because now the following happens: when I open the site, it takes a little longer than usual. And when I click on another LINK a page appears with this error:

HTTP Error 500.0 - Internal Server Error

C: PHP_5.5 php-cgi.exe - The Fastcgi process exited unexpectedly

But if I refresh the page, it opens.

If I go to another page, it’s the same. And sometimes it doesn’t. I’ve tried it on several computers, it’s the same way.

What can it be ?

Follow the file web config..

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <defaultDocument>
        <files>
            <clear />
            <add value="index.php" />
            <add value="default.aspx" />
            <add value="Default.htm" />
            <add value="Default.asp" />
            <add value="index.htm" />
            <add value="index.html" />
        </files>
    </defaultDocument>
    <rewrite>
      <rules>
      <rule name="Rule 1" stopProcessing="true">
        <match url="^(.*)/$" ignoreCase="false" />
        <action type="Redirect" redirectType="Permanent" url="/{R:1}" />
      </rule>
      <rule name="Rule 2" stopProcessing="true">
        <match url="^" ignoreCase="false" />
        <conditions>
          <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
          <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        </conditions>
        <action type="Rewrite" url="index.php" />
      </rule>
    </rules>
    </rewrite>
    <handlers>
        <clear />
        <add name="php-5.5" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\PHP_5.5\php-cgi.exe" resourceType="Either" requireAccess="Script" />
        <add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
    </handlers>
  </system.webServer>
</configuration>
  • You are using IIS7?

  • It is not me, my dear. It is the Locaweb hosting. But it must be IIS7 yes.

  • Try to see with the provider if you have access to the management of your site. You can install fast gci through the Web Installer. Fast cgi provides several options for you to manage your php without having to put anything on the web.config. This is the best way because by setting everything in hand we can forget something. Just a note. I think IIS doesn’t read .htacces. Only webconfig.

  • Can you configure the error log in PHP.INI (if hosting limits you)? Generally error 500 is displayed in production mode, instead of showing the error of PHP file, it may be some information that Laravel tries to write or read in "Storage" folder that is inaccessible...

  • ...If you don’t know how to set it up, look in php.ini for a line that contains something like error_log=, and add a path like error_log=C:/Documents/peter/error_php.log, if already set then look for the log path. Note that if so ;error_log= the log will not work, so remove the ; and restart IIS (I believe IIS does not need to be "restarted").

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.