Server responded with 0 code как исправить

Ошибка “Сервер ответил с кодом 0” обычно связана с проблемой соединения между вашим устройством и сервером. Существует несколько возможных причин этой ошибки, в том числе:

Проблемы с сетевым подключением: Это может быть вызвано слабым или нестабильным интернет-соединением, а также проблемами с Wi-Fi или сотовой связью вашего устройства.

Брандмауэр или антивирусное программное обеспечение: Некоторые брандмауэры или антивирусные программы могут блокировать соединения с определенными серверами. В этом случае вам может понадобиться добавить исключение для данного сервера.

Обслуживание или простой сервера: Сервер может находиться на техническом обслуживании или испытывать простои, что может вызвать эту ошибку.

Прокси-серверы: Если вы используете прокси-сервер, сервер может блокировать соединение.

Неправильная конфигурация сервера: В конфигурации сервера может быть ошибка, которая может вызвать эту ошибку.

Неверный URL: URL, к которому вы пытаетесь получить доступ, может быть неправильным или недействительным.

Чтобы исправить ошибку, вы можете попробовать следующее:

Проверьте подключение к Интернету и убедитесь, что у вас стабильное соединение.

Временно отключите брандмауэр или антивирусное программное обеспечение и попробуйте подключиться снова.

Дождитесь восстановления работы сервера, если он находится на техническом обслуживании или простаивает.

Попробуйте подключиться без использования прокси-сервера

Проверьте URL-адрес, к которому вы пытаетесь получить доступ, и убедитесь, что он правильный.

Если вы используете VPN, попробуйте отключить его и посмотреть, решит ли это проблему.

Повторите попытку позже, так как ошибка может быть временной и разрешиться сама собой.

Если ошибка сохраняется, вам следует обратиться к администратору сервера или в службу технической поддержки для устранения неполадок.

July 2021 Update: We identified an internal issue which may have been contributing to this issue. This issue should now be resolved. If you receive this error while uploading files to FileFactory, please contact support staff immediately.

For those more technically minded, we resolved this issue by increasing the nginx “proxy_connection_timeout” and “proxy_read_timeout” settings, as they were set too short, and caused an error when processing uploads.

Previous advice:

If you are receiving a “Server responded with 0 code error”, this usually means there is a connection problem between your PC and our servers. This could be due to a firewall or third party program running on your PC or network.

We recommend trying the following to isolate and identify this issue:

If you’ve tried all of the above and the problem persists, then please provide us with any additional information you think might help.

Решил установить dropzone programmatically на yii.
js код

$(function() {
            var dzone = new Dropzone("#dropZed", {
                paramName: "img_url",
                url: "/admin/MyGallery/ImagesUpload",
                method: "files",
                autoProcessQueue: false,
                addRemoveLinks: true,
                init: function() {
                    var submitButton = document.querySelector("#sb-all");
                    dzone = this; // closure

                    submitButton.addEventListener("click", function() {
                        dzone.processQueue(); // Tell Dropzone to process all queued files.
                    });
                }
            });
                Dropzone.autoDiscover = false;
        });

и php обработчик

public function actionImagesUpload(){
        $model = new MyGallery;
        if($_FILES['img_url']){
            if($_FILES['img_url']['error'] == 0){
                move_uploaded_file($_FILES['img_url']['tmp_name'],
                    Yii::app()->request->baseUrl . 'images/upload/' . $_FILES['img_url']['name']);
            }}
        $model->img_url = $_FILES['img_url']['name'];
        $model->save();
    }

в Mozile вылазит ошибка Server responded with 0 code в Chrome – Undefined index img_url;
У кого есть какие идеи по исправление этой ошибки ?

I’m working with dropzone js and I’m having an issue where in some computers dropzone doesn’t make anything.
Here’s what I have:

HTML:

<form action="acciones.php?accion=subirImagenes" class="dropzone" id="my-awesome-dropzone">
                        
</form>

Dropzone js options:

      url: null,
      method: "post",
      withCredentials: false,
      timeout: 30000,
      parallelUploads: 2,
      uploadMultiple: false,
      maxFilesize: 256,
      paramName: "file",
      createImageThumbnails: true,
      maxThumbnailFilesize: 10,
      thumbnailWidth: 120,
      thumbnailHeight: 120,
      thumbnailMethod: 'crop',
      resizeWidth: null,
      resizeHeight: null,
      resizeMimeType: null,
      resizeQuality: 0.8,
      resizeMethod: 'contain',
      filesizeBase: 1000,
      maxFiles: null,
      params: {},
      headers: null,
      clickable: true,
      ignoreHiddenFiles: true,
      acceptedFiles: null,
      acceptedMimeTypes: null,
      autoProcessQueue: true,
      autoQueue: true,
      addRemoveLinks: false,
      previewsContainer: null,
      hiddenInputContainer: "body",
      capture: null,
      renameFilename: null,
      forceFallback: false

I compared it on 5 computers with same web browser, and just works in my computer and another one. The strange thing is that when I open console on the other computers that aren’t working, there is no http request, not even an attemp on looking for it. Just the message on view that says “Server responded with 0 code”

I don’t know what’s going wrong, why it works just on some computers…

 UPDATE

It seems to be something about the headers, but I don’t know which ones should I include on “headers” dropzone option.

Skip to content



Open


Issue created Feb 07, 2020 by alpha23@alpha23

Wiki – attach file returns “Server responded with 0 code”

Using 11.10.4 (62c46465). Per gitlab-foss#56697 (closed) I modified per below and ran ‘gitlab-ctl reconfigure’ but it resulted in same error upon attempting to attach a file. Any help would be appreciated.

I have Gitlab CE in a docker container running behind Nginx. To solve the problem “Server responded with 0 code”, I added to the file /etc/gitlab/gitlab.rb the following entries:

# external_url 'GENERATED_EXTERNAL_URL'
external_url 'https://your_externarl_url'

nginx['listen_port'] = 80
nginx['listen_https'] = false
nginx['proxy_set_headers'] = {
  "X-Forwarded-Proto" => "https",
  "X-Forwarded-Ssl" => "on"
}

Добавить комментарий