dtc9222 2015-11-02 19:38
浏览 154

500内部服务器错误WAMP PhpStorm

I'm currently developing a PHP project in PhpStorm using WAMP.

When I run my project I am getting '500 internal server error'. This error shows when I make code changes to a certain php file within my project. For example, I added a name attribute to a html input tag, and this resulted in '500 internal server error'.

Can somebody please advice on this error.

<?php
    require_once 'databaseLoginCredentials.php';
    $connection = new mysqli($db_hostname, $db_username, $db_password, $db_name);
    if ($connection->connect_error)
    {
        die("Connection failed " . $connection->connect_error);
    }
    $sql = ("SELECT * FROM tbl_patientdetails pd INNER JOIN tbl_doctors dr ON pd.pd_registerDoctorId = dr.dr_Id");
    $result = $connection->query($sql);
    if ($result->num_rows > 0 ) {
        while ($row = $result->fetch_object())
        {
            echo '<tr>';
            echo '<td><button name="btn-edit" id="btn-edit" value="Edit" onclick="populatePatientDetailsForm()">' . 'Edit' .'</button></td>';
            echo '<td><button name="btn-delete" id="btn-delete" value="Delete" onclick="">' . 'Delete' .'</button></td>';
            echo '<td>' . $row->pd_id . '</td>';
            echo '<td>' . $row->pd_forename . '</td>';
            echo '<td>' . $row->pd_lastname . '</td>';
            echo '<td>' . $row->pd_dateOfBirth . '</td>';
            echo '<td>' . $row->pd_gender . '</td>';
            echo '<td>' . $row->dr_id . '</td>';
            echo '<td>' . $row->pd_address . ' </td>';
            echo '<td>' . $row->pd_postcode . '</td>';
            echo '<td>' . $row->pd_phoneNumber .'</td>';
            echo '<td>' . $row->pd_email .'</td>';
            echo '</tr>';
        }
    } else
    {
        echo "0 Patients Returned";
    }
    $connection->close();
    ?> <!--END OF PHP-->
require_once 'databaseLoginCredentials.php';

if ($_POST['btn-submit']) {

    $id = $_POST['txt-patientId'];
    $forename = $_POST['txt-forename'];
    $surname = $_POST['txt-surname'];
    $dateOfBirth = $_POST['txt-dateOfBirth'];
    $gender = $_POST['ddl-gender'];
    $doctorId = $_POST['ddl-doctor'];
    $address = $_POST['txt-address'];
    $postcode = $_POST['txt-postcode'];
    $phoneNumeber = $_POST['txt-phoneNumber'];
    $email = $_POST['txt-email'];


    $conn = new mysqli($db_hostname, $db_username, $db_password, $db_name);

    if ($conn->connect_error) {
        die("Connection failed: (" . $conn->connect_error);
    }

    $sql = ("Update tbl_patientdetails
            SET pd_forename = '$forename',
                pd_lastname = '$surname',
                pd_dateOfBirth = '$dateOfBirth',
                pd_gender = '$gender',
                pd_registerDoctorId = '$doctorId',
                pd_address = '$address',
                pd_postcode = '$postcode',
                pd_phoneNumber = '$phoneNumeber',
                pd_email = '$email',
            WHERE pd_id = '$id'");

    if ($conn->query($sql) === TRUE) {

        echo "Success: ' .$id' ',' ' .$forename' Please redirect me Joe";
    } else {
        echo " error Joe: " . $conn->error;
        //Return to patiend Details page
    }

    $conn->close();
}

WAMP ERROR

  • 写回答

1条回答 默认 最新

  • douduidui1046 2015-11-03 19:55
    关注

    Turns out that 'SQL server reporting services' was blocking port 80. I have disabled the service and now WAMP runs fine (Green). I'm not confident that this was the only issue ...

    评论

报告相同问题?

悬赏问题

  • ¥15 CSS实现渐隐虚线边框
  • ¥15 thinkphp6配合social login单点登录问题
  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题