These are chat archives for ushahidi/Community

18th
Nov 2016
Nesp
@Nesp
Nov 18 2016 10:38
Hi there, I am trying to upload a image in my deployment but it does not work and I do not get any error in the console
could you help me?
@ushbot
@Theniqabicodermum @tameen
Ushbot
@ushbot
Nov 18 2016 10:58
[David Losada, Ushahidi] does the image get uploaded in the first place? you should check the server, in the application/media/uploads/ in the platform folder
Nesp
@Nesp
Nov 18 2016 11:29
I am on it
thanks
yes it is in there
you can see how many times I tried XD
blob
though I am using a virtual machine with NAT and port forwarding
could this be the problem?
everything is in platform/application/media/uploads/5/8
Ushbot
@ushbot
Nov 18 2016 11:42
[David Losada, Ushahidi] shouldn’t be a problem, the API would be serving those just like any other request
[David Losada, Ushahidi] so I guess your images appear as broken in the browser, could we see the URL for one of those broken images?
tameen
@tameen
Nov 18 2016 11:51
@ushbot, @d_samuraiNick_twitter and @Nesp helped me a lot. my deployment is working fine and i am waiting for Ushahidi Mobile apps. You guys are doing a great job.
Ushbot
@ushbot
Nov 18 2016 12:58
[David Losada, Ushahidi] Great to hear , tameen!
TheNiqabiCoderMum
@nqcm
Nov 18 2016 13:08
@ushbot hi my deployment is working ok except that when i try to post via email, the post doesn't show up. i have configured the email settings and i hv checked through web mail, the mails are delivered to this address but are not showing up in ushahidi app. can you guide me what could be wrong?
Nesp
@Nesp
Nov 18 2016 13:16
@ushbot sure, http://localhost:8080/media/uploads/5/8/582ed9c7a62d4-nadmo-logo-2.jpg
(yes the image appears broken in the browser)
blob
blob
Ushbot
@ushbot
Nov 18 2016 13:31
[David Losada, Ushahidi] theniq, did you set up the cron jobs too?
[David Losada, Ushahidi] nesp, localhost:8080 is the port for your backend server?
TheNiqabiCoderMum
@nqcm
Nov 18 2016 13:42
no wher are the instructions for them?
Ushbot
@ushbot
Nov 18 2016 13:44
[David Losada, Ushahidi] mm I see, they are under another install approach
[David Losada, Ushahidi] you would run crontab -e -u www-data (if you are running Debian or Ubuntu)
TheNiqabiCoderMum
@nqcm
Nov 18 2016 13:44
under the instructions for installing the release bundle?
Ushbot
@ushbot
Nov 18 2016 13:44
[David Losada, Ushahidi] yep
TheNiqabiCoderMum
@nqcm
Nov 18 2016 13:44
oh ok
so in which directory shoul di run this? or does it not matter?
Ushbot
@ushbot
Nov 18 2016 13:45
[David Losada, Ushahidi] it doesn’t matter, what you have to make sure is to change '<your document root>’ for the actual path where you installed platform
[David Losada, Ushahidi] the MAILTO= part is optional
TheNiqabiCoderMum
@nqcm
Nov 18 2016 13:46
ok let me try this
it says on cron tab running empty or something liek that
so should i just add the lines specified in the installation instructions?
Ushbot
@ushbot
Nov 18 2016 13:54
[David Losada, Ushahidi] yea, it’s normal if that command says the crontab was empty
[David Losada, Ushahidi] yes, just make sure to make the necessary modifications to the lines
TheNiqabiCoderMum
@nqcm
Nov 18 2016 13:56
ok
TheNiqabiCoderMum
@nqcm
Nov 18 2016 14:01
ok i have done it and now let me check.
one more question, if i have ushahidi installed in two different document roots, to be served for two different domain names, should i add the same lines to the same file with the changed document root?
Ushbot
@ushbot
Nov 18 2016 14:04
[David Losada, Ushahidi] the tasks execute every 5 minutes, so some delay is to be expected
TheNiqabiCoderMum
@nqcm
Nov 18 2016 14:08
ok
and what do you reckon i should do in the above situation?
TheNiqabiCoderMum
@nqcm
Nov 18 2016 14:17
nops not recving posts through email yet
Ushbot
@ushbot
Nov 18 2016 14:30
[David Losada, Ushahidi] there is a one to one correspondence between apache virtual hosts and document roots
TheNiqabiCoderMum
@nqcm
Nov 18 2016 14:31
so adding more cron jobs with diff document roots should be a problem?
Ushbot
@ushbot
Nov 18 2016 14:32
[David Losada, Ushahidi] so if you have two completely separate installations under two completely separate domain names .. it could look like this:
  • apache2/sites-enabled/api.domain1.conf -> /var/www/api.domain1
  • apache2/sites-enabled/domain1.conf -> /var/www/domain1
  • apache2/sites-enabled/api.domain2.conf -> /var/www/api.domain2
  • apache2/sites-enabled/domain2.conf -> /var/www/domain2
[David Losada, Ushahidi] in the crontab, you would just add four more lines ( using the second api document root)
TheNiqabiCoderMum
@nqcm
Nov 18 2016 14:35
yes i understand. i hv actually two completely separate installations working on the same server, and they are both working fine. except this post by email problem.
Ushbot
@ushbot
Nov 18 2016 14:35
[David Losada, Ushahidi] in order to test if your email capture is working, you can run ./bin/ushahidi dataprovider incoming from the command line , while you are at the folder where you installed the api (platform)
TheNiqabiCoderMum
@nqcm
Nov 18 2016 14:35
ok
Ushbot
@ushbot
Nov 18 2016 14:35
[David Losada, Ushahidi] that should give you some sort of informative output
[David Losada, Ushahidi] ah, is it a gmail address btw?
TheNiqabiCoderMum
@nqcm
Nov 18 2016 14:37
its giving me provider email, total = 0
no it is with my own domain
Ushbot
@ushbot
Nov 18 2016 14:38
[David Losada, Ushahidi] your own email service too? or google hosted?
TheNiqabiCoderMum
@nqcm
Nov 18 2016 14:40
no own email service
should i try with a gmail address?
Ushbot
@ushbot
Nov 18 2016 14:40
[David Losada, Ushahidi] ok , good
[David Losada, Ushahidi] no, it’s actually quite hard in some cases with gmail, because of all the security constraints they have been adding
TheNiqabiCoderMum
@nqcm
Nov 18 2016 14:41
ok
Ushbot
@ushbot
Nov 18 2016 14:41
[David Losada, Ushahidi] I would suggest taking a look at the logs , they are under application/logs
TheNiqabiCoderMum
@nqcm
Nov 18 2016 14:41
ok
there is a file .gitignore and a directory 2016
2016-11-18_1643.png
Ushbot
@ushbot
Nov 18 2016 14:44
[David Losada, Ushahidi] there’s further folder structure, look inside “11"
TheNiqabiCoderMum
@nqcm
Nov 18 2016 14:45
ok
there is a file 18.php
Nesp
@Nesp
Nov 18 2016 14:45
@ushbot yes it is, I am running the sever in a virtual machine and I do port forwarding through 8080
TheNiqabiCoderMum
@nqcm
Nov 18 2016 14:45
should i open it?
Ushbot
@ushbot
Nov 18 2016 14:45
[David Losada, Ushahidi] Theniq, yes you can take a look in it
[David Losada, Ushahidi] maybe something useful in there
[David Losada, Ushahidi] Nesp, what do you get when you run from the command line: `curl -v http://localhost:8080/media/uploads/5/8/582ed9c7a62d4-nadmo-logo-2.jpg`
[David Losada, Ushahidi] ?
Nesp
@Nesp
Nov 18 2016 14:47
I'll try not sure I can use curl from my widonws commandline,
but I could do curl -v http://localhost/media/uploads/5/8/582ed9c7a62d4-nadmo-logo-2.jpg from my virtual machine
Ushbot
@ushbot
Nov 18 2016 14:47
[David Losada, Ushahidi] yep that should work I guess
TheNiqabiCoderMum
@nqcm
Nov 18 2016 14:48
its showing error: database mysqli result object
2016-11-18_1648.png
its a long file, logging errors for all diff times, the screen shot is the top part of the file
Nesp
@Nesp
Nov 18 2016 14:51
blob
I get this
and the file is this
Ushbot
@ushbot
Nov 18 2016 14:59
[David Losada, Ushahidi] theniq, probably worth taking a look at the whole file. Can you post it somewhere?
[David Losada, Ushahidi] Nesp, it shouldn’t be returning html … is localhost:8080 the same hostname you use for accessing the website?
TheNiqabiCoderMum
@nqcm
Nov 18 2016 15:03
sorry for being completely stupid but can you tell me how can i download this file to share?
Ushbot
@ushbot
Nov 18 2016 15:07
[David Losada, Ushahidi] mm actually it's not that stupid of a question :)
Nesp
@Nesp
Nov 18 2016 15:07
@ushbot yes
oh you mean I need to navigate to platform?
Ushbot
@ushbot
Nov 18 2016 15:12
[David Losada, Ushahidi] theniq, you can install the package pastebininit then run `pastebinit -b http://paste.ubuntu.com < 18.php` , then give us the resulting URL
Nesp
@Nesp
Nov 18 2016 15:12
blob
Ushbot
@ushbot
Nov 18 2016 15:13
[David Losada, Ushahidi] ah, so you’ve got platform as a path in the same url you use for opening the website .. mm ok
Nesp
@Nesp
Nov 18 2016 15:14
yeah, not sure that's the best,
Ushbot
@ushbot
Nov 18 2016 15:14
[David Losada, Ushahidi] that’s fine
[David Losada, Ushahidi] for some reason the image links are not including that “platform/” bit though , we'd need to figure out why
Nesp
@Nesp
Nov 18 2016 15:16
bingo
you are right
if I open the deployment and right click on the image and open in a new tab
it does not show anything
but if I add /platform ...
blob
if it does not point to the right api path, why does all the rest work then? I mean I tried to add posts and publish them
Ushbot
@ushbot
Nov 18 2016 15:20
[David Losada, Ushahidi] I think you may need to edit the file application/config/init.php , and next to ‘base_url’ , change '/’ for '/platform’
TheNiqabiCoderMum
@nqcm
Nov 18 2016 15:23
ok thanks @ushbot i will do that and share the link here. but i won't be able to do it now. whenever i will share it here i will tag you. thanks for all the support. really appreciate it.
Nesp
@Nesp
Nov 18 2016 15:26
@ushbot great it works!
so this init.php specifies the path to the platform folder?
but I had to load again the picture in the general settings, could you explain me why?
thanks a lot :)
Ushbot
@ushbot
Nov 18 2016 15:35
[David Losada, Ushahidi] mm I guess the URL is stored in the database based on the settings at the moment of upload
[David Losada, Ushahidi] that setting in init.php specifies the base path needed to send requests to the api .. most setups are done at the root of the domain, that’s why usually it doesn’t need to be changed
[David Losada, Ushahidi] theniq, sure just let us know
Nesp
@Nesp
Nov 18 2016 15:40
Ok thanks!
:+1: