These are chat archives for ushahidi/Community

6th
Apr 2018
Igor Golov
@TechnoDexx
Apr 06 2018 04:26
@rjmackay It's bad news for me... But I want everything to work ... In any case, thanks for the support and understanding.
Igor Golov
@TechnoDexx
Apr 06 2018 06:06
@rjmackay Send issue to Github
Rob
@ryestew
Apr 06 2018 13:17
Hi Y’all - I’m installing ushahidi on a shared hosting on dreamhost - and on a subdomain. Actually I started doing this quite a while ago - but when I upload an image - the file gets uploaded but the media folder is not where the browser thinks it is - so is this an .htaccess problem?
Rob
@ryestew
Apr 06 2018 13:29
Or maybe it would be easier to start from a new installation - which I am trying now - at http://ush.updig.is/
but I’m getting the something went wrong error
It still could be the .htaccess file needs updating - is there an example of one that I can adapt or use?
Rob
@ryestew
Apr 06 2018 14:06
So I found a bit of advice to tweak your https://usha.updig.is/config.js2 file, so that backendUrl is set to "/platform/httpdocs/index.php/“ and that worked - the site comes up - but I can’t add a user. - any ideas if both are caused by the .htaccess file not working?
Ushbot
@ushbot
Apr 06 2018 14:09
[Carolyn Commons, Ushahidi] Hi ryestew, sorry you’re having trouble. When you try to add a user, do you get an error in the console? also, what is the response from the api in the network tab?
Rob
@ryestew
Apr 06 2018 14:10
just a sec...
in the console I get http://ush.updig.is/platform/httpdocs/index.php/api/v3/register 400 (Bad Request) vendor.6a8a7033cb6efe70c58c.js:109 POST
I’ll check the network tab now
Rob
@ryestew
Apr 06 2018 14:19
I also have a bunch of errors in the console when I load the page - before I get to add a user:
Ushbot
@ushbot
Apr 06 2018 14:22
[Carolyn Commons, Ushahidi] I think that’s another issue that shouldn’t be what’s causing the problem.
[Carolyn Commons, Ushahidi] can you share what the response from the api is in the network tab?
Rob
@ryestew
Apr 06 2018 14:26
vendor.6a8a7033cb6efe70c58c.js 200 script (index) (from memory cache) 0 ms config.js 304 script (index) 187 B 161 ms app.c1f9bfadccd7fe4547f3.js 200 script (index) (from memory cache) 0 ms sdk.js 304 script sdk.js 445 B 261 ms shim.77d3c8a0.js 200 script widget.intercom.io/ (from disk cache) 4 ms frame.87148ff0.js 200 script shim.77d3c8a0.js:1 (from disk cache) 24 ms 0.ea14198f1091cdab9420.js 200 script vendor.6a8a703….js:1 (from disk cache) 6 ms
and it keeps running with the same errors
error ( singular)
And I think my little shortcut in the config file didn’t really help. Because when I load the site: http://ush.updig.is/ the page loads and creates this url: http://ush.updig.is/views/map but when I refresh the page - I get a 404 not found error
This was what I had done: changed the https://usha.updig.is/config.js file, so that backendUrl is set to "/platform/httpdocs/index.php/“
Rob
@ryestew
Apr 06 2018 14:31
So this may all be related to the .htacess files - do you think they are working?
( and thanks for you help too!!)
Rob
@ryestew
Apr 06 2018 14:44
Any ideas?
Ushbot
@ushbot
Apr 06 2018 14:49
[Carolyn Commons, Ushahidi] when you select the “register” api call in the network tab? What is the status code?
Rob
@ryestew
Apr 06 2018 14:50
just a sec...
Ushbot
@ushbot
Apr 06 2018 14:50
[Carolyn Commons, Ushahidi] And the response
[Carolyn Commons, Ushahidi] please!
Rob
@ryestew
Apr 06 2018 14:52
in the network tab - I don’t see register but in the console I see:
Ushbot
@ushbot
Apr 06 2018 14:53
[Carolyn Commons, Ushahidi] you’ll need to open the network tab and then attempt to register a user again
Rob
@ryestew
Apr 06 2018 14:53
OK
Ushbot
@ushbot
Apr 06 2018 14:54
[Carolyn Commons, Ushahidi] then all of the api requests will fire and you should see one in red that has a 400 response. select that one and then select the “response” header
Rob
@ryestew
Apr 06 2018 15:00
The network tab was open but when I tried to sign up a user ( the 1st user) I got the flood of the POST errors in the console below: POST http://ush.updig.is/platform/httpdocs/index.php/api/v3/register 400 (Bad Request) - nothing new popped up in the network tab and when I carot down one of the errors I don’t see a response header or a start of a line in the console with the word 'response'
Ushbot
@ushbot
Apr 06 2018 15:03
[Carolyn Commons, Ushahidi] What did you see in the network tab when it was open and you tried to register a user? With the network tab open, you should see a header called “Name” and there will be a bunch of requests that appear. Was there one or multiple in red with error statuses?
[Carolyn Commons, Ushahidi] it should look something like this:
Rob
@ryestew
Apr 06 2018 15:09
OK - thanks - your screenshot helped
there were multiple register in red - I clicked on and I got this json file:
{
    "errors": [
        {
            "status": 400,
            "title": "The request is missing an access token in either the Authorization header or the access_token request parameter.",
            "message": "The request is missing an access token in either the Authorization header or the access_token request parameter.",
            "class": "Kohana_HTTP_Exception",
            "file": "/home/dh_mfqeu2/ush.updig.is/platform/application/classes/Ushahidi/Rest.php",
            "line": 297,
            "trace": [
                {
                    "file": "/home/dh_mfqeu2/ush.updig.is/platform/application/classes/Ushahidi/Rest.php",
                    "line": 73,
                    "function": "_check_access",
                    "class": "Ushahidi_Rest",
                    "type": "->",
                    "args": []
                },
                {
                    "file": "/home/dh_mfqeu2/ush.updig.is/platform/vendor/kohana/core/classes/Kohana/Controller.php",
                    "line": 69,
                    "function": "before",
                    "class": "Ushahidi_Rest",
                    "type": "->",
                    "args": []
                },
                {
                    "function": "execute",
                    "class": "Kohana_Controller",
                    "type": "->",
                    "args": []
                },
                {
                    "file": "/home/dh_mfqeu2/ush.updig.is/platform/vendor/kohana/core/classes/Kohana/Request/Client/Internal.php",
                    "line": 97,
                    "function": "invoke",
                    "class": "ReflectionMethod",
                    "type": "->",
                    "args": [
                        {
                            "request": {},
                            "response": {}
                        }
                    ]
                },
                {
                    "file": "/home/dh_mfqeu2/ush.updig.is/platform/vendor/kohana/core/classes/Kohana/Request/Client.php",
                    "line": 114,
                    "function": "execute_request",
                    "class": "Kohana_Request_Client_Internal",
                    "type": "->",
                    "args": [
                        {},
                        {}
                    ]
                },
                {
                    "file": "/home/dh_mfqeu2/ush.updig.is/platform/vendor/kohana/core/classes/Kohana/Request.php",
                    "line": 997,
                    "function": "execute",
                    "class": "Kohana_Request_Client",
                    "type": "->",
                    "args": [
                        {}
                    ]
                },
                {
                    "file": "/home/dh_mfqeu2/ush.updig.is/platform/httpdocs/index.php",
                    "line": 38,
                    "function": "execute",
                    "class": "Kohana_Request",
                    "type": "->",
                    "args": []
                }
            ]
        }
    ]
}
Ushbot
@ushbot
Apr 06 2018 15:12
[Carolyn Commons, Ushahidi] Super helpful! One more thing: in the platform repo, can you go to platform/application/logs and tell me if you see a folder 04 and a file in that folder 06
[Carolyn Commons, Ushahidi] If so, what is the error you’re seeing in that file?
Rob
@ryestew
Apr 06 2018 15:12
just a sec
you mean in the platform folder on the server? when I go to platform/application/logs - there is nothing in the folder
Ushbot
@ushbot
Apr 06 2018 15:20
[Carolyn Commons, Ushahidi] ok, thanks. let me see what we can do
[Carolyn Commons, Ushahidi] Try this: romina [< 1 minute ago]
https://stackoverflow.com/questions/37158714/enable-apache-http-authorization-header

[Carolyn Commons, Ushahidi] SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1

In the .htaccess

[Carolyn Commons, Ushahidi] or if that doesn’t work, add the to httpconf directly.

Also, check that mod_headers is setup

Rob
@ryestew
Apr 06 2018 15:31
cool - I’ll check that one
Ushbot
@ushbot
Apr 06 2018 15:32
[Carolyn Commons, Ushahidi] awesome! let us know how it goes
Rob
@ryestew
Apr 06 2018 15:33
oh which .htaccess files should I add that line to - in the root of the site or to all of them ( root, platform, application)
Rob
@ryestew
Apr 06 2018 15:45
Well I put it in the root of the site and it works!! which is the good news - ( this is when I try to add a user) bad news - I can’t login - it says the username / pw are wrong. So closer….but not there yet...
But I’ll try putting that rule you sent into the rest of the .htaccess files.
Ushbot
@ushbot
Apr 06 2018 15:46
[Romina Suarez, Ushahidi] hey . Awesome.
Give me a minute I’ll check in the site so I can see the console errors
[Romina Suarez, Ushahidi] Screen Shot 2018-04-06 at 12.49.57 PM.png
[Romina Suarez, Ushahidi] oh ok . There appears to be a permissions issue
[Romina Suarez, Ushahidi] can you check that apache has permission to write there?
Rob
@ryestew
Apr 06 2018 15:50
ok
I’m on a cheapo shared hosting plan - if I need to go to /tmp - I bet I won’t be able to get the permissions
But I can ask
Ushbot
@ushbot
Apr 06 2018 15:54
[Romina Suarez, Ushahidi] ahhh right
[Romina Suarez, Ushahidi] oh you know , we could try changingg where it looks for /tmp
[Romina Suarez, Ushahidi] in /application/config/ratelimiter.php
Rob
@ryestew
Apr 06 2018 15:56
OK - interesting!
Ushbot
@ushbot
Apr 06 2018 15:56
[Romina Suarez, Ushahidi] > ‘directory’ => ‘/tmp/ratelimitercache’,
could change to your root dirmaybe?
Rob
@ryestew
Apr 06 2018 15:57
sure
where do I put that change in?
Ushbot
@ushbot
Apr 06 2018 16:01
[Romina Suarez, Ushahidi] in /application/config/ratelimiter.php you should change 'directory' => '/tmp/ratelimitercache', to point to another directory
[Romina Suarez, Ushahidi] (one that you have)
Rob
@ryestew
Apr 06 2018 16:02
OK
Rob
@ryestew
Apr 06 2018 16:14
I did that - but nothing is showing up… I gotta step out for a bit. Its lovely outside.