dotsmesh / dotsmesh-web-app

This is the source code of the Dots Mesh web app. It's officially hosted on dotsmesh.com, and also available on your own hosts.
https://about.dotsmesh.com
GNU General Public License v3.0
80 stars 4 forks source link

Cannot upload profile picture #4

Closed Meuschke23 closed 3 years ago

Meuschke23 commented 3 years ago

Hi, if i upload a new profile picture for my public profile i get a error:

Version:

grafik

Config:

<?php

return [
    'hosts' => ['meuschke.cloud'],
    'autoUpdate' => true,
    'updateSecret' => '*******************************'
];

Error:

location:
https://dotsmesh.meuschke.cloud/#meuschke.meuschke.cloud

state:
{"type":"window","details":{"location":"user/home"}}

date:
Tue, 03 Nov 2020 08:40:42 GMT

user agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0

name:
invalidResponse

message:
JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

callAPI:
{"host":"meuschke.cloud","method":"user.dataStorage","response":""}

Error (Log):

09:40:40:7337
Message:
Fatal error: Unknown: file created in the system's temporary directory in Unknown:0

Simple trace:

Full trace:
Array
(
)

Request:
POST https://dotsmesh.meuschke.cloud/

PHP variables:
Array
(
    [GET] => Array
        (
            [host] => 
            [api] => 
        )

    [POST] => Array
        (
        )

    [SERVER] => Array
        (
            [PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
            [PP_CUSTOM_PHP_INI] =>******/etc/php.ini
            [PP_CUSTOM_PHP_CGI_INDEX] => php74-fastcgi-nc
            [SCRIPT_NAME] => /index.php
            [REQUEST_URI] => /?host&api
            [QUERY_STRING] => host&api
            [REQUEST_METHOD] => POST
            [SERVER_PROTOCOL] => HTTP/1.0
            [GATEWAY_INTERFACE] => CGI/1.1
            [REMOTE_PORT] => 54886
            [SCRIPT_FILENAME] => ******/DotsMesh/index.php
            [SERVER_ADMIN] => [no address given]
            [CONTEXT_DOCUMENT_ROOT] => ******/meuschke.cloud/DotsMesh
            [CONTEXT_PREFIX] => 
            [REQUEST_SCHEME] => https
            [DOCUMENT_ROOT] => ******/DotsMesh
            [REMOTE_ADDR] => ******
            [SERVER_PORT] => 443
            [SERVER_ADDR] => ******
            [SERVER_NAME] => dotsmesh.meuschke.cloud
            [SERVER_SOFTWARE] => Apache
            [SERVER_SIGNATURE] => <address>Apache Server at dotsmesh.meuschke.cloud Port 443</address>

            [HTTP_COOKIE] => organizr_token_*********************
            [HTTP_ORIGIN] => https://dotsmesh.meuschke.cloud
            [CONTENT_TYPE] => application/json
            [HTTP_ACCEPT_ENCODING] => gzip, deflate, br
            [HTTP_ACCEPT_LANGUAGE] => de,en-US;q=0.7,en;q=0.3
            [HTTP_ACCEPT] => application/json
            [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0
            [CONTENT_LENGTH] => 149872
            [HTTP_CONNECTION] => close
            [HTTP_X_ACCEL_INTERNAL] => /internal-nginx-static-location
            [HTTP_X_REAL_IP] => ******
            [HTTP_HOST] => dotsmesh.meuschke.cloud
            [HTTPS] => on
            [PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY] => 0
            [PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY] => 0
            [FCGI_ROLE] => RESPONDER
            [PHP_SELF] => /index.php
            [REQUEST_TIME_FLOAT] => 1604392840.7179
            [REQUEST_TIME] => 1604392840
        )

)

Can you help me?

ivopetkov commented 3 years ago

Hi, I believe there is something wrong with the directory where the source code and the data are stored. You can see the directory name in the /DotsMesh/index.php file (its only job is to include the app PHP file).

Meuschke23 commented 3 years ago

Thank you for the fast reaction. As result i have reinstalled Dots Mesh with the Installscript: Webserver Dir for dotsmesh.meuschke.cloud is: *****/httpdocs/meuschke.cloud/DotsMesh grafik

there is a index.php:

<?php

require '***/httpdocs/meuschke.cloud/DotsMesh/Webapp/code/index.php';

and the Webapp folder In the Webappfolder there is the config.php, the sourcecode and the data. grafik

Is this wrong? Because i get the same errors. Now with the DotsMesh/Webapp Subdirectory.

It is an shared hosting environment powered by plesk.

ivopetkov commented 3 years ago

I found this description of the upload_tmp_dir php.ini option: The temporary directory used for storing files when doing file upload. Must be writable by whatever user PHP is running as. If not specified PHP will use the system's default.

I believe that the "file created in the system's temporary directory" error (it's actually a warning) is thrown because of switching to the system's default temp dir. I've never seen that before and I'll research more. It will be great if you research too and test different configurations.

Meuschke23 commented 3 years ago

I think i got it.

In Plesk. i changed: grafik

to

grafik

and now it seems to work. Thank you for the hint. This can be closed now.