Drupal ошибка file

  1. Главная
  2. Форумы
  3. Техподдержка Drupal
  4. FAQ

Главные вкладки

  • Просмотр(активная вкладка)
  • Реакции

Стоял drupal на локалке и было все нормально. перенесла на хостинг выдает ошибки
warning: realpath() [function.realpath]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/visage/visage.biz.ua/www:/home/visage/.system/tmp:/usr/local/pear:/usr/bin) in /home/visage/visage.biz.ua/www/includes/file.inc on line 190.
warning: realpath() [function.realpath]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/visage/visage.biz.ua/www:/home/visage/.system/tmp:/usr/local/pear:/usr/bin) in /home/visage/visage.biz.ua/www/includes/file.inc on line 190.
warning: realpath() [function.realpath]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/home/visage/visage.biz.ua/www:/home/visage/.system/tmp:/usr/local/pear:/usr/bin) in /home/visage/visage.biz.ua/www/includes/file.inc on line 787.

Что делать? Искала в гугле ничего не помогло. пробовала создать папку tmp, тоже не помогает

  • Drupal6

For some time we are using the cloud files module. All seemed to work, however today we suddenly get the message «file could not be uploaded» when uploading. It seems that we are not able to get access to the container.

I created a new file field as a test and set it to PUBLIC and then i was able to upload a file. When using RACKSPACE Cloud Files I got the upload error again.

Today we also had a problem with cloud files. Although Rackspace does not understand what happened but the module was not able to use the Cloud files API. After contacting Rackspace, they investigated the problem but could not find an actual cause, but the problem was suddenly gone.

Any suggestions?

uploading images from desktop is fine but the problem is when i need to upload image from
mobile browser give me that error

  • the file 14343254.jpg could not be saved . an unknown error has occurred
  • the file in the Photo field was unable to be uploaded
  • photo field is required

asked Oct 2, 2014 at 8:10

Moayad AL-Najdawi's user avatar

I suggest you to use the devel module for that and in hook_file_presave($file) you should use dpm($file) to test if you get the file object. Try it like this:

function MYMODULE_file_presave($file){
  dpm($file);
}

If file_presave doesn’t work try the hook_file_insert($file).
Both will run if you press the upload button next to the file field or just hit the save button on node edit/add page and will output the file you uploaded to the screen as an object. If you don’t have the devel module get it from here: http://drupal.org/project/devel or if you have drush drush dl devel. Try to check the server error log or the recent messages in drupal at Reports. You may have a duplicate entry for the file uri in the database. Check if you modify the uploaded files in one of your custom modules. I hope it helps you a bit.

answered Oct 2, 2014 at 8:29

Krisztián Dudás's user avatar

2

i finally solved my problem after 1 week of searching

The problem is i am using aws ec2 server with 8GB volume and its 70% filled so images from mobile camera is large its generate unknown error so when i increase my volume to 50GB the problem is solved

answered Oct 15, 2014 at 8:20

Moayad AL-Najdawi's user avatar

После обновления движка drupal на v. 8.6.5, появилась проблема загрузки файлов на сайт. Например, я попробовал загрузить через админку новое обновление темы bootstrap и вылезла такая ошибка:

Ошибка загрузки обновлений:
Extracted file temporary://update-extraction-9e074b57/bootstrap/css/3.1.0/overrides-flatly.min.css does not have the correct file size ‘4096’ (11126 expected). Archive may be corrupted.

Попытался загрузить также файл на страницу, вышла ошибка без пояснения. Понимаю, что дело в разрешениях, но не могу найти понятный ответ в сети. Помогите, пожалуйста!

TLDR: I already figured out when exactly my problem happens so for people too lazy to read full thread please read here. Whenever I have some html content in any textfield in Open Atrium (I’m not sure if that happens just in OA or in Drupal) and I want to upload a file an error «An HTTP Error occured 0» pops up. When I’m disabling javascript I get Error: 403 Forbidden. The HTML must be there before I want to upload something, so it happens when I’m editing some field, not just creating it (so it must be in the database already). And one more thing — it happens also on newly installed instance of Open Atrium downloaded from Drupal’s site. (version 1.7)

I’m using open-atrium in drupal. Recently an error started to pop up — «An HTTP Error occured 0» while I try to upload files while editing a node (not while I’m commenting — there it works).

EDIT: I figured when it happens and why, but I cannot figure how to repair it! This issue happens when I have HTML inside content editor. When I select plain text or Markdown the issue doesn’t show up and I can upload files! What do you suggest I can try now?

I checked, the file is actually uploaded to server (so it’s not permission to directory problem) and I have jQuery Update installed (as some other topics state).

I disabled JavaScript (so it wouldn’t be sent with ajax) and the problem still persisted — this time with 403 Permission Error. My page is like this: http://example.com/example/node/225/edit and the permission error is showing something like this:

POST http://example.com/example/upload/js 403 (Forbidden)

Does anyone have any idea what might be wrong? How can I debug it to check what’s happening before/after upload? Remember that I actually upload the file to the server, but it just won’t attach to the topic while editing (it works on comments).

I’m attaching full HTTP headers sent with the request when JS was disabled:

http://example.com/example/node/225/edit

POST /example/node/225/edit HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:25.0) Gecko/20100101 Firefox/25.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pl,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://example.com/example/node/225/edit
Cookie: __utma=118809371.977078118.1375778041.1376992641.1378820396.3; __utmz=118809371.1375778041.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); SESSc3f285b6f1567ee5f358af2cabd3c968=5ae3330852770b675d5a76c42a9bbcf1; Drupal_l10n_client=0; DrupalAdminToolbar=expanded%3D0; has_js=1
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------198552096025328
Content-Length: 277355
-----------------------------198552096025328
Content-Disposition: form-data; name="title"

testtest
-----------------------------198552096025328
Content-Disposition: form-data; name="casetracker[pid]"

128
-----------------------------198552096025328
Content-Disposition: form-data; name="casetracker[assign_to]"

Test Test
-----------------------------198552096025328
Content-Disposition: form-data; name="casetracker[case_status_id]"

4
-----------------------------198552096025328
Content-Disposition: form-data; name="casetracker[case_priority_id]"

2
-----------------------------198552096025328
Content-Disposition: form-data; name="casetracker[case_type_id]"

11
-----------------------------198552096025328
Content-Disposition: form-data; name="field_due_date[0][value][date]"

11/23/2013
-----------------------------198552096025328
Content-Disposition: form-data; name="teaser_include"

1
-----------------------------198552096025328
Content-Disposition: form-data; name="body"

<p>fadsfdsf&nbsp;<strong>gfgdf</strong> fgd s</p>
-----------------------------198552096025328
Content-Disposition: form-data; name="format"

4
-----------------------------198552096025328
Content-Disposition: form-data; name="notifications_team[selected]"

1,11
-----------------------------198552096025328
Content-Disposition: form-data; name="files[upload]"; filename="tinymce_4.0.6.zip"
Content-Type: application/octet-stream

PK
HTTP/1.1 403 Forbidden
Content-Encoding: gzip
Vary: Accept-Encoding
X-Powered-By: PHP/5.2.9
Content-Type: text/html
Transfer-Encoding: chunked
Date: Tue, 19 Nov 2013 11:57:47 GMT
Server: LiteSpeed
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
----------------------------------------------------------

Понравилась статья? Поделить с друзьями:
  • Drugs activated ошибка
  • Dropbox при выполнении вашего запроса возникла ошибка
  • Dropbox ошибка при установке
  • Drone health ошибка
  • Droidcam ошибка connect failed please try again