2016-04-19 14 views
0

私はシンプルなPHP登録フォームを作成し、VIA FTPを自分の紺碧のディレクトリにアップロードしました。 フォームの詳細を記入して送信ボタンをクリックすると、自動的にエラー500ページに進みます。彼らは私のスクリプトでエラーがないので、これは私には意味がありません。Azure PHPエラー500

ロギングがオンになっていることを確認しました。エラー報告を読んだとき、これはそれが言ったことです。

HTTP Error 500.0 - Internal Server Error 

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



Most likely causes: 
•IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred. 
•IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly. 
•IIS was not able to process configuration for the Web site or application. 
•The authenticated user does not have permission to use this DLL. 
•The request is mapped to a managed handler but the .NET Extensibility Feature is not installed. 

Things you can try: 
•Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account. 
•Check the event logs to see if any additional information was logged. 
•Verify the permissions for the DLL. 
•Install the .NET Extensibility feature if the request is mapped to a managed handler. 
•Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here. 



Detailed Error Information: 



Module 
    FastCgiModule 

Notification 
    ExecuteRequestHandler 

Handler 
    PHP54_via_FastCGI 

Error Code 
    0x00000000 



Requested URL 
    http://MyTestSite:80/register.php 

Physical Path 
    D:\home\site\wwwroot\register.php 

Logon Method 
    Anonymous 

Logon User 
    Anonymous 
# 

これは私の実際のコードです。

<?php 
    require_once 'processor/dbconfig.php'; 



    if(isset($_POST['submit'])) 
    { 
     $uname = trim($_POST['user']); 
     $umail = trim($_POST['email']); 
     $upass = trim($_POST['pwd']); 
     $fname = trim($_POST['first']); 
     $lname = trim($_POST['last']); 
     $ubranch = trim($_POST['branch']); 


       if($user->register($fname,$lname,$uname,$umail,$upass,$ubranch)) 
       { 
        echo 'Success'; 
       } 


    } 
    ?> 
    <html> 
    <head> 
      <!-- Latest compiled and minified CSS --> 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> 

    <!-- jQuery library --> 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> 

    <!-- Latest compiled JavaScript --> 
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> 
    <style type="text/css"> 
     .container { 
      margin-right: auto; 
      margin-left: auto; 
      margin-top: 15px; 
      margin-bottom: auto; 
      width: 200px; 
      clear: both; 
      padding: 20px 50px 20px; 
      width: 400px; 
      background: white; 
      border-radius: 3px; 
      -webkit-box-shadow: 0 0 200px rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3); 
      box-shadow: 0 0 200px rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3); 
     } 
    </style> 
    </head> 
    <body> 
    <div class="container"> 
    <form role="form" method="POST"> 

     <div class="form-group"> 
     <label for="user">Username:</label> 
     <input type="text" name="user" class="form-control" id="user"> 
     </div> 
     <div class="form-group"> 
     <label for="pwd">Password:</label> 
     <input type="password" name="pwd" class="form-control" id="pwd"> 
     </div> 
     <div class="form-group"> 
     <label for="email">Email:</label> 
     <input type="email" name="email" class="form-control" id="email"> 
     </div> 
     <div class="form-group"> 
     <label for="first">First Name:</label> 
     <input type="text" name="first" class="form-control" id="first"> 
     </div> 
     <div class="form-group"> 
     <label for="last">Last Name:</label> 
     <input type="text" name="last" class="form-control" id="last"> 
     </div> 
     <div class="form-group"> 
     <label for="branch">Branch:</label> 
     <input type="text" name="branch" class="form-control" id="branch"> 
     </div> 
     <input type="submit" name="submit" class="btn btn-default"/> 
    </form> 
    </div> 
    </body> 
    </html> 
+0

は、スクリプトの構文エラーや警告が発行されるなどの単純なものになる可能性があります。詳細については、エラーログを参照する必要があります。 –

+0

@MarcBエラーログ – Kevin

+0

を投稿しました。そこには何も役立ちません。あなたは掘り始めなければならないでしょう。 –

答えて

2

エラーを表示すると、詳細エラーが発生し、デバッグが簡単になります。 PHPスクリプトの先頭にこのコード行を置く:

ini_set('display_errors', 1); 

は次に、新しいエラーであなたの質問を更新します。

+0

ありがとうございました!私はそれを追加し、エラーは、PHPのバージョン5.5で、パスワードのハッシュは、私の晴れのPHPバージョンをチェックし、5.4に設定された未定義の関数password_hashを言ったが来た私は5.5とVIOLAにPHPのバージョンを更新!できます。ありがとう、もう一度男! – Kevin

+0

私の友人は、これがPHPを本当に起動する人のために自動化されていないのは驚くべきことです。あなたはそれが働いてうれしい! – Tommy

関連する問題