标签: internal-server-error

内部服务器错误

我正在开发短信发送应用程序,并且出于登录目的,我想使用POST方法从我的Android应用程序向网络服务器发送用户名和密码.

当我点击lo-gin按钮时,应用程序没有响应,并且控制台打印以下消息以响应Post请求.

HTTP/1.1 500内部服务器错误

虽然我的应用程序运行良好的GET方法.

我无法弄清楚为什么会造成这种情况......

整个代码在这里:

package com.vikas.httplogin;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class HttpLogin extends Activity {
    TextView tv;

    private static final String tag ="FATAL_ERROR";

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);        
        connecttoServer();
    }

    private void connecttoServer()
    { …
Run Code Online (Sandbox Code Playgroud)

java android http internal-server-error

5
推荐指数
1
解决办法
1万
查看次数

Django - 测试500状态的页面

我有一个项目,在某些视图中,某些更改可能会导致500状态.

为了不返回500状态,进行单元测试的最优雅的方法是什么,它将检查所有视图/页面(使用静态路由,当然没有vars)?

python django unit-testing internal-server-error

5
推荐指数
1
解决办法
1069
查看次数

500:使用PHPMailer时出现内部服务器错误

我正在尝试使用以下代码发送电子邮件,我收到内部服务器错误.我不知道为什么我遇到这个麻烦.

PHP代码:

<?php
    $mail = new PHPMailer();  // create a new object
    $mail->IsSMTP(); // enable SMTP
    $mail->SMTPDebug = 0;  // debugging: 1 = errors and messages, 2 = messages only
    $mail->SMTPAuth = true;  // authentication enabled
    $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail
    $mail->Host = 'smtp.gmail.com';
    $mail->Port = 465; 
    $mail->Username = 'myemail@gmail.com';  
    $mail->Password = "mypasswordhere";           
    $mail->SetFrom($from, $from_name);
    $mail->Subject = $subject;
    $mail->Body = $body;
    $mail->AddAddress('myemail@gmail.com');
    if(!$mail->Send()) {
        $error = 'Mail error: '.$mail->ErrorInfo; 
        return false;
    } else {
        $error …
Run Code Online (Sandbox Code Playgroud)

php error-handling phpmailer internal-server-error

5
推荐指数
1
解决办法
2万
查看次数

JQuery - ASP.NET Web服务(.asmx) - 内部服务器错误(500)

我在这个主题上看到了很多问题,但从来没有这个问题.我可以从浏览器窗口调用此Web服务,但是我收到了来自AJAX的错误.我收到内部服务器错误异常(500).它可能必须在JQuery中对我的URL做一些事情,因为我从localhost连接.这是我的WS的简化版本:

<System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="http://tempuri.org/webdienst/_default")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class _default
    Inherits System.Web.Services.WebService

    <WebMethod()> _
    <ScriptMethod(ResponseFormat:=ResponseFormat.JSON)> _
    Public Function getOrganizerEventsJSON(ByVal strUser As String, ByVal strPasswort As String) As TEvent
        Dim t As TEvent
        'I get the event for the specified username and password
        Return t

    End Function
End Class
Run Code Online (Sandbox Code Playgroud)

这是我的JS:

var ASMX = "http://localhost:56035/default.asmx/";
jQuery.callAsmx = function (method, data, onSuccess, onError) {
   var url = ASMX + method;
   return $.ajax({
        type: "POST",
        url: url,
        data: $.stringify(data),
        contentType: "application/json; charset=utf-8", …
Run Code Online (Sandbox Code Playgroud)

jquery json asmx internal-server-error

5
推荐指数
1
解决办法
6421
查看次数

安装opencart时出现内部服务器错误

我是新手打开购物车,我jsut上传文件到服务器并试图安装但是invaine,它给了我500内部服务器错误,它似乎来自.htacess文件

它已经.htacess.txt了,我重命名为.htacess并删除了它所说的删除的命令中的注释以消除这个错误,但它仍然是一样的!怎么解决这个问题?

这里是在线文件http://idev-inc.com/projects/idev_market.com/

  # 1.To use URL Alias you need to be running apache with mod_rewrite enabled. 

 # 2. In your opencart directory rename htaccess.txt to .htaccess.

 # For any support issues please visit: http://www.opencart.com

 #Options +FollowSymlinks

  # Prevent Directoy listing 
 Options -Indexes

 # Prevent Direct Access to files
 <FilesMatch "\.(tpl|ini|log)">
  Order deny,allow

 </FilesMatch>

  # SEO URL Settings
 RewriteEngine On
 # If your opencart installation does not run on the main web folder make sure you           folder it does …
Run Code Online (Sandbox Code Playgroud)

php opencart internal-server-error

5
推荐指数
0
解决办法
1万
查看次数

Apache2.4内部服务器错误目录匹配

我正在尝试保护.git和svn目录,以防止任何人能够访问它们,因为它们包含敏感的元信息。

我尝试使用以下规则,但收到内部服务器错误,但不确定为什么:

<Directorymatch "^/(.*/)*\.(git|svn)/">
    Require all denied
</Directorymatch>
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

.htaccess internal-server-error server

5
推荐指数
1
解决办法
1080
查看次数

批量删除操作在Yii2中发生内部服务器错误

我在Yii2中有批量删除操作,下面是代码剪切删除带有活动日志的记录(这里DBMS是PostgreSQL) -

$companies = Yii::$app->request->post('ids', '');
if($companies && count($companies)) {
    foreach ($companies as $company) {
        try{
            $utsendelseid = $company['utsendelseid'];
            $mailid = $company['mailid'];

            $model = MailSend::find()->where(['utsendelseid' => $utsendelseid, 'mailid' => $mailid])->one();

            if($model && !$model->mailsendt) {
                if($model->delete()) {
                    // if model deleted successfully then keep a log using commandBus
                    $companyModel = $this->findCompanyModel($model->kundenr);
                    $questionnaireModel = $this->findModel($utsendelseid);

                    Yii::$app->commandBus->handle(new AddCompanyLogCommand([
                    'kundenr' => $model->kundenr,
                    'portal_id' => ($questionnaireModel?$questionnaireModel->prosjektkode:''),
                    'activity' => Yii::t('backend', 'Slettet fra spørreskjema'),
                    'notes' => Yii::t('backend', 'Company "{company}"  has been deleted from questionnaire - "{questionnaire}"("{questionnaire_id}")', [ …
Run Code Online (Sandbox Code Playgroud)

php postgresql internal-server-error yii2

5
推荐指数
1
解决办法
92
查看次数

如何调试"内部服务器错误"?

当您对.htaccess文件进行更改时,如果出现问题,则会出现"内部服务器错误".这对我没有帮助.我如何找出实际错误是什么?

php apache apache2 internal-server-error

4
推荐指数
1
解决办法
1万
查看次数

Django 内部服务器 500 错误 AWS Elastic-Beanstalk 问题

如何修复 AWS eb 部署应用程序上的 Django Internal Server 500 错误?

我是否需要更改base.py文件中允许的主机以在 elasticbeanstalk 中包含 ec2 的 IP 地址?

# SECURITY WARNING: keep the secret key used in production secret!
# Raises ImproperlyConfigured exception if SECRET_KEY not in os.environ
SECRET_KEY = env('SECRET_KEY')

ALLOWED_HOSTS = []

# Application definition

INSTALLED_APPS = (
    'django.contrib.auth',
    'django_admin_bootstrapped',
    'django.contrib.admin',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
)
Run Code Online (Sandbox Code Playgroud)

...

STATIC_URL = '/static/'

ALLOWED_HOSTS = []
Run Code Online (Sandbox Code Playgroud)

...

我启用了调试并运行了 eb 配置和 eb 日志。在EB部署值显示下方,EB记录低于该值。您如何解决“没有名为 django 的模块”的问题?

    Creating application version …
Run Code Online (Sandbox Code Playgroud)

python django amazon-web-services http-status-code-500 internal-server-error

4
推荐指数
1
解决办法
9533
查看次数

类型错误 - 无法引用 Rack::Session::SessionId

我在尝试访问 Questions#Show 时遇到了一个神秘的错误。每当我重定向到视图时,我都会收到 500 内部服务器错误。根据我的服务器跟踪,问题出在“set_question”中的问题控制器中

\n\n
Started GET "/questions/1" for 127.0.0.1 at 2020-02-01 18:57:34 +0100\nProcessing by QuestionsController#show as HTML\n  Parameters: {"id"=>"1"}\n  User Load (1.1ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 ORDER BY `users`.`id` ASC LIMIT 1\n  Question Load (3.5ms)  SELECT `questions`.* FROM `questions` WHERE `questions`.`id` = 1 LIMIT 1\n  \xe2\x86\xb3 app/controllers/questions_controller.rb:105:in `set_question\'\nCompleted 500 Internal Server Error in 15ms (ActiveRecord: 4.6ms | Allocations: 3861)\n\nTypeError - can\'t quote Rack::Session::SessionId:\n
Run Code Online (Sandbox Code Playgroud)\n\n

但是我不太确定它出了什么问题

\n\n

问题控制器

\n\n
class QuestionsController < ApplicationController\n  before_action :set_question, …
Run Code Online (Sandbox Code Playgroud)

model-view-controller rack ruby-on-rails typeerror internal-server-error

4
推荐指数
2
解决办法
3293
查看次数