These are chat archives for ushahidi/Community

20th
Feb 2019
Chyril
@spfire
Feb 20 07:45
Hello, the newer version of my deployment allow anonymous/unregistered user to submit a post/report. How do I make sure that only registered user able to submit their post/report. (which file should I change)
because in my older version, the + sign doesn't show up unless you log in to the platform. I change to new version because my old one corrupted.
Ushbot
@ushbot
Feb 20 10:05
[David Losada, Ushahidi] diegopajarito, manuchis , how did you folks install? The key aspect is usually getting the different .htaccess files right. @manuchis, I see you are getting a 500, anything useful in the apache error log?
Manuel Portela
@manuchis
Feb 20 10:07
@ushbot Hi, we are deploying the platform-release (we tried v4 and v3) also checked all the htaccess , we are mainly working with the one in /platform/httpdocs . however, nothing works well. We are suspecting that it is some Dreamhost configuration that is blocking it
Ushbot
@ushbot
Feb 20 10:07
[David Losada, Ushahidi] @jgwyer_gitlab we had someone doing work for migrating crowdmap/v2 datastructures . The next step was testing and bundling that with instructions. We are just trying to find the time/opportunity to finish the job. Maybe we could work together? what is your timeline like?
[David Losada, Ushahidi] @manuchis which steps did you follow? there are several ways to install
Manuel Portela
@manuchis
Feb 20 10:10
The one that comes in the readme.md 1. untar 2. copy files 3. make the .env thing 4. phinx 5. check permissions 6. check httaccess
Ushbot
@ushbot
Feb 20 10:12
[David Losada, Ushahidi] @spfire each individual survey can be configured so that anyone can submit to it, or just specific user roles
Manuel Portela
@manuchis
Feb 20 10:12
the answer from the api is annoying http://server.15000km.org/platform/httpdocs/
Ushbot
@ushbot
Feb 20 10:14
Manuel Portela
@manuchis
Feb 20 10:14
yes
following the part of shared servers
Ushbot
@ushbot
Feb 20 10:16
[David Losada, Ushahidi] ok, so one by one… in your server root folder, the .htaccess looks like this: https://github.com/ushahidi/platform-release/blob/master/dist/html-htaccess . correct?
[David Losada, Ushahidi] *document root
Manuel Portela
@manuchis
Feb 20 10:18
no, sorry, because the instructions says that only the folder html should be uploaded
"Uncompress the release file and place the contents of the html folder in the webroot of your shared hosting domain or subdomain"
Ushbot
@ushbot
Feb 20 10:18
[David Losada, Ushahidi] mm I thought we bundled that with the html… let me check
Manuel Portela
@manuchis
Feb 20 10:20
at the webroot htaccess we only have:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*$ /index.html [PT,L]

Header set X-XSS-Protection "1; mode=block"

Ushbot
@ushbot
Feb 20 10:21
[David Losada, Ushahidi] yea, that’s for a setup where the client lives in its own virtualhost.. and the api in a separate one
Manuel Portela
@manuchis
Feb 20 10:21
oh
so, I changed now
but API gets 500
Ushbot
@ushbot
Feb 20 10:22
[David Losada, Ushahidi] ok, so both API and client want to be anchored to the root of the domain
Manuel Portela
@manuchis
Feb 20 10:23
not necesary but I don't know how to do it otherwise
the idea was to have a client at 15000km.org
Ushbot
@ushbot
Feb 20 10:23
[David Losada, Ushahidi] the path to check whether the API works would be http://server.15000km.org/api/v3/config
[David Losada, Ushahidi] (still a 500)
[David Losada, Ushahidi] what is in the apache error logs?
Manuel Portela
@manuchis
Feb 20 10:24
now is getting: [Wed Feb 20 02:23:52 2019] [alert] [client 62.57.62.103] /home/usr_155km/server.15000km.org/.htaccess: error: envclause should be in the form env=envar
Ushbot
@ushbot
Feb 20 10:31
[David Losada, Ushahidi] hmm yea that’s probably some host specific issue.. that seems to be one of the apache weird errors . Maybe try commenting out by now all the lines in the .htaccess that start with “Header”?
Manuel Portela
@manuchis
Feb 20 10:32
that solved, but we got back to previous error XD http://server.15000km.org/api/v3/config
Ushbot
@ushbot
Feb 20 10:39
[David Losada, Ushahidi] mm ok, that’s about the path that gets forwarded for PHP processing .. let me see
[David Losada, Ushahidi] so in platform/httpdocs you should have this .htaccess : https://github.com/ushahidi/platform-release/blob/master/dist/platform-httpdocs-htaccess
Manuel Portela
@manuchis
Feb 20 10:41
yes
I will double check in any case
Ushbot
@ushbot
Feb 20 10:42
[David Losada, Ushahidi] also, what is the PHP version that is set up for this?
Manuel Portela
@manuchis
Feb 20 10:43
7.1
but I also tried with 7.0 and 5.6
regarding that htaccess, I also tried to use all these combinations ( I found them in theforums):
RewriteRule ^(.*)$ index.php/$0 [L]

RewriteRule ^(.+)$ index.php?kohana_uri=$1 [L]

RewriteRule ^(.+)$ index.php?kohana_uri=$1 [PT,L,QSA]

RewriteRule .* index.php?kohana_uri=$0 [PT,L,QSA]

RewriteRule ^(.+)$ index.php?kohana_uri=$1 [L,QSA]

RewriteRule ^(.*)$ index.php?kohana_uri=$1 [PT,L,QSA]

RewriteRule .* index.php?kohana_uri=$0 [L,QSA]

RewriteRule .* index.php?kohana_uri=$0 [PT,L,QSA]

(phpinfo)
Ushbot
@ushbot
Feb 20 10:51
[David Losada, Ushahidi] yea 7.1 is probably best
Manuel Portela
@manuchis
Feb 20 10:53
yeap. it seems is getting crazy in the koahana routing I don't know where to look at
Ushbot
@ushbot
Feb 20 10:55
[David Losada, Ushahidi] there is no more kohana routing on 4.0 .. we substituted a lot of uses of that framework and gave them to Lumen
Manuel Portela
@manuchis
Feb 20 10:56
yes, I Know, in server.15000km.org we are in v3.12.3 now. In v4 we use to have another error, simething like "whoops, something went wrong" and nothing else, we rolled back to v3 because we thought that is more stable and there is more documentation, but it seems we are in the same page in both cases
Ushbot
@ushbot
Feb 20 10:57
[David Losada, Ushahidi] maybe you could try temporarily switching the index.php in platform/httpdocs for a phpinfo(); invocation , that should give useful info when we ask for /api/v3/config
Manuel Portela
@manuchis
Feb 20 10:57
Ushbot
@ushbot
Feb 20 10:57
[David Losada, Ushahidi] yes I saw that, but I would like to see how it behaves in the context of all the URL rewriting that is done
Manuel Portela
@manuchis
Feb 20 10:57
ok, nice idea
done
it works
Ushbot
@ushbot
Feb 20 11:01
[David Losada, Ushahidi] ok.. so the lumen router is picking up the route from either REDIRECT_URL or ORIG_PATH_INFO in the environment . REQUEST_URI looks fine, and I thought that’s what Lumen would pick up but.. alas. I guess there’s some research to be done about that.
Manuel Portela
@manuchis
Feb 20 11:01
remember that is v3 , so is kohana routing, i can check v4 also
Ushbot
@ushbot
Feb 20 11:02
[David Losada, Ushahidi] oh, v4 may be better indeed, sorry I see your comment now, multitasking here
Manuel Portela
@manuchis
Feb 20 11:02
yes me too, I will recover v4 with the htaccess that you gave me to see what happens
Ushbot
@ushbot
Feb 20 11:02
[David Losada, Ushahidi] thumbsup emoji
Manuel Portela
@manuchis
Feb 20 11:05
the error is different but maybe the origin is the same
I tested the phpinfo again and is working
Ushbot
@ushbot
Feb 20 11:15
[David Losada, Ushahidi] mm my bet is that it’s picking REDIRECT_URL for some reason .. maybe you could try editing the api’s index.php and adding a line at the top in the fashion of `$_SERVER[’REDIRECT_URL]
[David Losada, Ushahidi] oops wait
[David Losada, Ushahidi] $_SERVER[‘REDIRECT_URL’] = $_SERVER[‘REQUEST_URI’] ;
Manuel Portela
@manuchis
Feb 20 11:16
lets see
Ushbot
@ushbot
Feb 20 11:16
[David Losada, Ushahidi] careful with copy pasting it, because the pretty quotes (‘ and ’) won’t work
Manuel Portela
@manuchis
Feb 20 11:17
nope, same thing
Ushbot
@ushbot
Feb 20 11:19
[David Losada, Ushahidi] hm.. then maybe do the same with ORIG_PATH_INFO
Manuel Portela
@manuchis
Feb 20 11:20
$_SERVER['REDIRECT_URL'] = $_SERVER['ORIG_PATH_INFO'] ;
?
Ushbot
@ushbot
Feb 20 11:20

[David Losada, Ushahidi] no , I mean ..

$_SERVER[‘ORIG_PATH_INFO’] = $_SERVER[‘REQUEST_URI’] ;

same
Ushbot
@ushbot
Feb 20 11:23
[David Losada, Ushahidi] maybe we’ll get more detail if you could set APP_DEBUG=true in platform/.env
Manuel Portela
@manuchis
Feb 20 11:24
that's a good one
Ushbot
@ushbot
Feb 20 11:25
[David Losada, Ushahidi] ok, I see that now .. this is about the oauth keys
Manuel Portela
@manuchis
Feb 20 11:25
:O
Ushbot
@ushbot
Feb 20 11:25
[David Losada, Ushahidi] an oversight in the readme
Manuel Portela
@manuchis
Feb 20 11:26
what should i do ?
Ushbot
@ushbot
Feb 20 11:26
[David Losada, Ushahidi] from the platform/ folder, try running “artisan key:generate”
Manuel Portela
@manuchis
Feb 20 11:28
it seems I don't have artisan installed, let me check
Ushbot
@ushbot
Feb 20 11:28
[David Losada, Ushahidi] ah sorry “./artisan” maybe
Manuel Portela
@manuchis
Feb 20 11:28
PHP Parse error: syntax error, unexpected '?' in /home/usr_155km/serv2.15000km.org/platform/vendor/illuminate/support/Str.php on line 681
Ushbot
@ushbot
Feb 20 11:29
[David Losada, Ushahidi] mm maybe the version of php in the command line is older?
[David Losada, Ushahidi] php-v
[David Losada, Ushahidi] php -v
Manuel Portela
@manuchis
Feb 20 11:29
yes 5.6
dammt
Ushbot
@ushbot
Feb 20 11:30
[David Losada, Ushahidi] maybe they call it php7.1 or something like that
[David Losada, Ushahidi] in that case “php7.1 ./artisan key:generate”
Manuel Portela
@manuchis
Feb 20 11:32
done, but Class 'Memcached' not found
and it seems it works only in dedicated servers
can I jump it somehow ?
ok, I applied CACHE_DRIVER=array to .env
now "There are no commands defined in the "key" namespace. "
Ushbot
@ushbot
Feb 20 11:35
[David Losada, Ushahidi] mm yep , CACHE_DRIVER=file should also work
Manuel Portela
@manuchis
Feb 20 11:35
"Did you mean this?
apikey "
Ushbot
@ushbot
Feb 20 11:36
[David Losada, Ushahidi] mm let me check
[David Losada, Ushahidi] oh I got that wrong I think
[David Losada, Ushahidi] try “passport:install” instead of “key:generate”
[David Losada, Ushahidi] so many secrets…
Manuel Portela
@manuchis
Feb 20 11:38
omg!

"In KeysCommand.php line 44:

file_put_contents(/home/usr_155km/serv2.15000km.org/platform/storage/passpo
rt/oauth-public.key): failed to open stream: No such file or directory "+

that is the same error that I have before in the client
Ushbot
@ushbot
Feb 20 11:41
[David Losada, Ushahidi] alright so from platform .. just “mkdir -p storage/passport”
Manuel Portela
@manuchis
Feb 20 11:42
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'user_id' in 'field
list'

In Connection.php line 664:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'user_id' in 'field
list' (SQL: insert into oauth_clients (user_id, name, secret, redi rect, personal_access_client, password_client, revoked, id, updat ed_at, created_at) values (, Personal Access Client, OTmqUkv2Etr54jy5Kz
hafxvyPo9jRoptRd7FkljY, http://localhost, 1, 0, 0, 18a0d7f0-fa2c-40cb-9a4b-
4bc1d8d662c8, 2019-02-20 03:42:10, 2019-02-20 03:42:10))

it seems the column is "id" not user_id
all the table structure is different
Ushbot
@ushbot
Feb 20 11:49
[David Losada, Ushahidi] yea v3 and v4 have somewhat different database structures
[David Losada, Ushahidi] specially around the oauth stuff
Manuel Portela
@manuchis
Feb 20 11:49
but it seems the migration didn't installed the necessary
just in case I will make the migration again
Ushbot
@ushbot
Feb 20 11:49
[David Losada, Ushahidi] mm yea, the migrations should take care of it
Manuel Portela
@manuchis
Feb 20 11:52
ok, done
Ushbot
@ushbot
Feb 20 11:57
[David Losada, Ushahidi] weeee
Manuel Portela
@manuchis
Feb 20 11:57
XD
"No application encryption key has been specified." at the client
should I set up any key somewhere ?
Ushbot
@ushbot
Feb 20 11:58
[David Losada, Ushahidi] the .env file should have something like: APP_KEY=SomeRandomKey!!!SomeRandomKey!!!
[David Losada, Ushahidi] the important thing is the length of the key
[David Losada, Ushahidi] it has to be exactly that long, as in the example
Manuel Portela
@manuchis
Feb 20 11:58
which key should I put there ?
Ushbot
@ushbot
Feb 20 11:59
[David Losada, Ushahidi] any randomly generated 32-character string
Manuel Portela
@manuchis
Feb 20 11:59
ok
<3
now it seems that I cannot login as admin at the client, but that is another issue
Ushbot
@ushbot
Feb 20 12:16
[David Losada, Ushahidi] yay, that looks good
[David Losada, Ushahidi] does admin / administrator not work?
Manuel Portela
@manuchis
Feb 20 12:17
nop, i cannot login , and neither generate posts
"[Wed Feb 20 04:13:11 2019] [error] [client 62.57.62.103] Premature end of script headers: php71.cgi, referer: https://serv2.15000km.org/views/map" php log
many errors appear in the developer console , seems some 404 and 500 hndling the headers or something
and [Wed Feb 20 04:13:11 2019] [error] [client 62.57.62.103] Premature end of script headers: php71.cgi, referer: https://serv2.15000km.org/views/map
sorry, GET https://serv2.15000km.org/api/v3/users/me 401 (Unauthorized)
Ushbot
@ushbot
Feb 20 12:20
[David Losada, Ushahidi] mmm yea .. the last one is normal for being not logged in .. but those 500 are not
[David Losada, Ushahidi] maybe there’s something useful in platform/storage/logs
[David Losada, Ushahidi] it’s weird that some API requests are not working
Manuel Portela
@manuchis
Feb 20 12:22
yeap
#32 /home/usr_155km/serv2.15000km.org/platform/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(275): Laravel\Lumen\Application->callControllerAction(Array)
#33 /home/usr_155km/serv2.15000km.org/platform/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(255): Laravel\Lumen\Application->callActionOnArrayBasedRoute(Array)
#34 [internal function]: Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}(Object(Illuminate\Http\Request))
#35 /home/usr_155km/serv2.15000km.org/platform/vendor/laravel/lumen-framework/src/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#36 /home/usr_155km/serv2.15000km.org/platform/app/Http/Middleware/CheckForAnyScope.php(29): Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}(Object(Illuminate\Http\Request))
#37 /home/usr_155km/serv2.15000km.org/platform/vendor/illuminate/pipeline/Pipeline.php(149): Ushahidi\App\Http\Middleware\CheckForAnyScope->handle(Object(Illuminate\Http\Request), Object(Closure), 'config')
#38 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#39 /home/usr_155km/serv2.15000km.org/platform/vendor/laravel/lumen-framework/src/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#40 /home/usr_155km/serv2.15000km.org/platform/vendor/illuminate/pipeline/Pipeline.php(102): Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}(Object(Illuminate\Http\Request))
#41 /home/usr_155km/serv2.15000km.org/platform/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(410): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#42 /home/usr_155km/serv2.15000km.org/platform/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(256): Laravel\Lumen\Application->sendThroughPipeline(Array, Object(Closure))
#43 /home/usr_155km/serv2.15000km.org/platform/vendor/laravel/lumen-framework/src/Concerns/RoutesRequests.php(160): Laravel\Lumen\Application->handleFoundRoute(Array)
#44 [internal function]: Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}(Object(Illuminate\Http\Request))
#45 /home/usr_155km/serv2.15000km.org/platform/vendor/laravel/lumen-framework/src/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#46 /home/usr_155km/serv2.15000km.org/platform/vendor/barryvdh/laravel-cors/src/HandlePreflight.php(35): Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}(Object(Illuminate\Http\Request))
#47 /home/usr_155km/serv2.15000km.org/platform/vendor/illuminate/pipeline/Pipeline.php(149): Barryvdh\Cors\HandlePreflight->handle(Object(Illuminate\Http\Request), Object(Closure))
#48 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#49 /home/usr_155km/serv2.15000km.org/platform/vendor/laravel/lumen-framework/src/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#50 /home/usr_155km/serv2.15000km.org/platform/app/Http/Middleware/MaintenanceMode.php(32): Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}(Object(Illuminate\Http\Request))
#51 /home/usr_155km/serv2.15000km.org/platform/vendor/illuminate/pipeline/Pipeline.php(149): Ushahidi\App\Http\Middleware\MaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#52 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#53 /home/usr_155km/serv2.15000km.org/platform/vendor/laravel/lumen-framework/src/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#54 /home/usr_155km/serv2.15000km.org/platform/vendor/barryvdh/laravel-cors/src/HandleCors.php(36): Laravel\Lumen\Routing\Pipeline->Laravel\Lumen\Routing\{closure}(Object(Illuminate\Http\Request))
#55 /home/usr_155km/serv2.15000km.org/platform/vendor/illuminate/pipeline/Pipeline.php(149): Barryvdh\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))
#56 [internal function]: Illuminate\Pipeli
Ushbot
@ushbot
Feb 20 12:23
[David Losada, Ushahidi] would be good to look at the previous lines from that stack trace
[David Losada, Ushahidi] all the way up to #1 , and the error description
Manuel Portela
@manuchis
Feb 20 12:24
[2019-02-20 03:58:05] lumen.ERROR: RuntimeException: No application encryption key has been specified. in /home/usr_155km/serv2.15000km.org/platform/vendor/illuminate/encryption/EncryptionServiceProvider.php:42
Stack trace:
Ushbot
@ushbot
Feb 20 12:25
[David Losada, Ushahidi] mm I thought that was APP_KEY ..
Manuel Portela
@manuchis
Feb 20 12:26
it could be, 30 minutes ago
Ushbot
@ushbot
Feb 20 12:26
[David Losada, Ushahidi] maybe that’s just an old error yea
Manuel Portela
@manuchis
Feb 20 12:26
yeah, check the thing
the time
but that was the last log
one question, in the client config.json there is a client key, should I replace one with that created before ?
{
"client_id": "ushahidiui",
"client_secret": "35e7f0bca957836d05ca0492211b0ac707671261",
"backend_url": "/",
"google_analytics_id": "",
"intercom_app_id": "",
"mapbox_api_key": "pk.eyJ1IjoidXNoYWhpZGkiLCJhIjoiY2lxaXRrbmF5MDdxNmZubmUyN2p6bms5biJ9.o7pmKDIN1EtwMBp1VIzITQ",
"raven_url": ""
}
Ushbot
@ushbot
Feb 20 12:28
[David Losada, Ushahidi] no, that one’s fine
Manuel Portela
@manuchis
Feb 20 12:28
ok
Ushbot
@ushbot
Feb 20 12:29
[David Losada, Ushahidi] maybe the apache error log? … I’m starting to think those 500 are not generated by the API
Manuel Portela
@manuchis
Feb 20 12:30
I'm having this error from appache when I try to login [Wed Feb 20 04:25:36 2019] [error] [client 62.57.62.103] client denied by server configuration: /home/usr_155km/serv2.15000km.org/platform/vendor/illuminate/encryption/EncryptionServiceProvider.php:42
Manuel Portela
@manuchis
Feb 20 12:37
for users and roles is returning 401 unauthorized
Ushbot
@ushbot
Feb 20 12:38
[David Losada, Ushahidi] some people in the internets say it is wise to run “artisan config:cache” after adding the APP_KEY
[David Losada, Ushahidi] and if dreamhost gives you a way to restart the web server and whatever cgi workers are taking care of PHP, that too
Manuel Portela
@manuchis
Feb 20 12:39
they don't :(
Ushbot
@ushbot
Feb 20 12:40
[David Losada, Ushahidi] (users and roles returning 401 while logged out is also expected I think)
Manuel Portela
@manuchis
Feb 20 12:43
uhm
cache cleared, still the same
Ushbot
@ushbot
Feb 20 12:46
[David Losada, Ushahidi] :\ this is certainly quite puzzling .. the content return by the 500 error doesn’t help either . Do they give you a setting for apache not to do any rewriting when a 500 error occurs? As it is now, it seems to be rewriting to some non existing URL .
Manuel Portela
@manuchis
Feb 20 12:48
"Due to how Apache is configured, it's not possible to redirect to a custom 500 error page. When a 500 error is encountered, the browser default 500 page will display."
maybe is a memory issue
no is not, I'm monitoring and is not big deal
so, should be htaccess?
Manuel Portela
@manuchis
Feb 20 12:53
I think I solve it
I changed the httaccess in the api
from
RewriteRule .* index.php/$0 [PT]
to
RewriteRule .* index.php [PT]
Ushbot
@ushbot
Feb 20 12:54
[David Losada, Ushahidi] mm interesting
Manuel Portela
@manuchis
Feb 20 12:54
however, I keep getting 401 at post and if I want to login
Manuel Portela
@manuchis
Feb 20 13:00
uhm, seems 500 keep coming randonly also
Ushbot
@ushbot
Feb 20 13:00
[David Losada, Ushahidi] mm yea.. I have to admit that I’m clueless at this point
Manuel Portela
@manuchis
Feb 20 13:03
I see, well I will keep working on it.
Many thanks for all the help
Ushbot
@ushbot
Feb 20 13:04
[David Losada, Ushahidi] you are welcome, and thanks to you too! noticed a couple places where documentations could be improved
Manuel Portela
@manuchis
Feb 20 13:04
yes :D
btw, any clue about the 401 error ?
Ushbot
@ushbot
Feb 20 13:05
[David Losada, Ushahidi] ah when logging in it says the credentials are incorrect ..
Manuel Portela
@manuchis
Feb 20 13:06
yes, but, are ok
i tested with two users
Ushbot
@ushbot
Feb 20 13:06
[David Losada, Ushahidi] I’m not sure, but you can create an admin user from the command line , using artisan user:create
Manuel Portela
@manuchis
Feb 20 13:09
I created through the platform and I can see it in the mysql, but when try to login it doesnt work
it seems something is broken in the middle
Ushbot
@ushbot
Feb 20 13:12
[David Losada, Ushahidi] mm maybe try with a clean database if you can? there have been so many variations that maybe the saved state is not entirely ok
Manuel Portela
@manuchis
Feb 20 13:13
could be, remember that I created a new migration just before creating the key, so is pretty fresh
Ushbot
@ushbot
Feb 20 13:14
[David Losada, Ushahidi] as far as I remember, we usually have the key already set before running the migrations
[David Losada, Ushahidi] not sure if that could affect
Manuel Portela
@manuchis
Feb 20 13:15
oh
ok, I will try again
Manuel Portela
@manuchis
Feb 20 13:20
I think it worked
Manuel Portela
@manuchis
Feb 20 13:28
yeah!
Manuel Portela
@manuchis
Feb 20 13:29
:D
I hope it works when I deploy for production
Ushbot
@ushbot
Feb 20 13:33
[David Losada, Ushahidi] just one thing, the Header stuff that we commented at the beginning, that used to be important for the mobile app to work. I’m not 100% sure if that’s still the case with the latest versions of the mobile app. But if you try that and reach a conclusion, I’d be very grateful if you let me know
Manuel Portela
@manuchis
Feb 20 13:33
Ok, I will test it later
Now I'm documenting the changes in order to reproduce this
yo save my day!
Manuel Portela
@manuchis
Feb 20 13:51
it seems that the commands that fail are these:

Header add Access-Control-Max-Age "1728000" "expr=%{REQUEST_METHOD} == 'OPTIONS'"

Header add Content-Type "text/plain charset=UTF-8" "expr=%{REQUEST_METHOD} == 'OPTIONS'"

Header add Content-Length "0" "expr=%{REQUEST_METHOD} == 'OPTIONS'"

it seems that it works in Android but not in iOS
Manuel Portela
@manuchis
Feb 20 15:22
it did work in ios also :)
Ushbot
@ushbot
Feb 20 17:00
[David Losada, Ushahidi] thanks @manuchis ! I’m glad all this stuff works for you now
John Gwyer
@jgwyer_gitlab
Feb 20 22:34
Thanks David Losada for the reply. I've never used a web page like this, so I'm not sure how the communication works. Anyway, these deployments are using the "free" version that is currently online. We do not have a local server for any of this work. I am retired, and was hoping I could get this done in a few weeks for a presentation in March. I could work with someone, but I haven't done much with computers in over 4 years. Our "crowdmap" deployment isn't very large, but, I don't know what the structure was, and I would like to use it for our new "ushahidi" deployment.