简体   繁体   English

由于FastCGI进程意外退出,导致“由于发生内部服务器错误而无法显示该页面。”

[英]“The page cannot be displayed because an internal server error has occurred.” as a result of The FastCGI process exited unexpectedly

I am working with a php application deployed on Windows Azure. 我正在使用Windows Azure上部署的php应用程序。

I am running into an issue that results in the error: 我遇到了导致错误的问题:

"The page cannot be displayed because an internal server error has occurred."

when I look at the logs I see: 当我查看日志时,我看到:

HTTP Error 500.0 - Internal Server Error
D:\Program Files (x86)\PHP\v5.3\php-cgi.exe - The FastCGI process exited unexpectedly

The problem is that this happens when I want to get data from a sql server. 问题是,当我想从sql服务器获取数据时会发生这种情况。 When I try to post data to the sql server everything works fine. 当我尝试将数据发布到sql服务器时,一切正常。

The following code represents what I am trying to do with comments to explain what's happening: 以下代码表示我正在尝试使用注释来解释正在发生的事情:

try {
        // Try to connect to the database.
        $conn = new PDO ( "sqlsrv:server = server,1433; Database = name", "user", "password");
        $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
        $conn->beginTransaction();
            // This works out when executed (I see the row in the table).
        $query = "INSERT INTO owner (email) VALUES ('email@email.com')";
        $conn->exec($query);
        $result = $conn->query("SELECT email FROM owner");
        $conn->commit();
        // If the SQL select is succesfully performed ($result not false)
        if($result !== false) {
            echo "there are results";
            // Traverse the result set and shows the data from each row
            foreach($result as $row) {
              echo $row['email']. '<br />';
            }
        }

        $conn = null;        // Disconnect
    } catch ( PDOException $e ) {
        print( "Error connecting to SQL Server. Please call support!" );
        die(print_r($e));
    }

The code above does insert information in the table on the server but causes the error explained above. 上面的代码确实在服务器上的表中插入了信息,但是会导致上述错误。 Please let me know if there is any more information that I can provide. 请让我知道是否可以提供更多信息。

Check access database credentials or maybe you have duplicate entry in database for email@email.com . 检查访问数据库凭证,或者您在数据库中有重复的email@email.com条目。 What is logged in error log? 错误日志中记录了什么?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 PHPMailler错误(由于发生内部服务器错误,因此无法显示该页面。) - PHPMailler error (The page cannot be displayed because an internal server error has occurred.) 没有任何启用错误报告的选项,克服了“由于发生内部服务器错误而无法显示该页面。” - Getting over the “The page cannot be displayed because an internal server error has occurred.” without any option to enable error reporting HTTP错误500.0-内部服务器错误该页面无法显示,因为发生了内部服务器错误 - HTTP Error 500.0 - Internal Server Error The page cannot be displayed because an internal server error has occurred 错误“FastCGI 进程意外退出” - Error “The FastCGI process exited unexpectedly” FastCGI 进程意外退出 - The FastCGI process exited unexpectedly HTTP错误500-FastCGI进程意外退出 - HTTP Error 500 - The FastCGI Process Exited Unexpectedly Azure网站FastCGI进程意外退出 - Azure Websites The FastCGI process exited unexpectedly FastCGI进程在带有php 7.0.9 x64的Windows Server 2012 R2上意外退出 - The FastCGI process exited unexpectedly on Windows Server 2012 R2 with php 7.0.9 x64 Plexum安装提供错误C:\\ php \\ php-cgi.exe - FastCGI进程意外退出 - Plexum install gives error C:\php\php-cgi.exe - The FastCGI process exited unexpectedly IIS 7.5 PHP 故障“FastCGI 进程意外退出” - IIS 7.5 PHP failure "The FastCGI process exited unexpectedly"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM