These are chat archives for ushahidi/Community

17th
Mar 2016
Ushbot
@ushbot
Mar 17 2016 01:39
[Robbie Mackay, Ushahidi] testing after the fact is hard..
[Robbie Mackay, Ushahidi] Not that this is news to anyone..
Ushbot
@ushbot
Mar 17 2016 08:22
[Mary, Ushahidi] Hello
[Angela Oduor Lungati, Ushahidi] Hello Mary
[Angela Oduor Lungati, Ushahidi] welcome to our public chat room
[Angela Oduor Lungati, Ushahidi] how can we be of help to you today?
Ushbot
@ushbot
Mar 17 2016 08:34
[Mary, Ushahidi] Basically I can't run our app: http://168.235.93.215/platform/httpdocs/
[Mary, Ushahidi] can you check?
[Mary, Ushahidi] I followed all steps on installation guide
[Angela Oduor Lungati, Ushahidi] @Jason see above ^^. Any chance you can help?
[Mary, Ushahidi] @Jason asked me to post my questions here
Ushbot
@ushbot
Mar 17 2016 08:43
[Jason Mule, Ushahidi] @Mary How did you create your .htaccess file. Did you rename `httpdocs/template.htaccess` to `httpdocs/.htaccess`?
[Mary, Ushahidi] @Jason Yes I did
[Jason Mule, Ushahidi] Do you know if you have mod_rewrite enabled?
[Mary, Ushahidi] Not yet
[Mary, Ushahidi] Can you give instructions to do it?
Ushbot
@ushbot
Mar 17 2016 08:56
[Jason Mule, Ushahidi] for starters you probably want to set your DocumentRoot to point to platform/httpdocs
[Mary, Ushahidi] Btw this is our structure: /var/www/html
index.php
platform
[Mary, Ushahidi] DocumentRoot is pointed to var/www/html
[Jason Mule, Ushahidi] so something like:
[Mary, Ushahidi] We need to put platform inside our root directory

[Jason Mule, Ushahidi] DocumentRoot /var/www/html/platform/httpdocs

<Directory "/var/www/html/platform/httpdocs">
Options FollowSymLinks
AllowOverride All
</Directory>

[Jason Mule, Ushahidi] You can also create a virtual host?
Ushbot
@ushbot
Mar 17 2016 09:02
[Mary, Ushahidi] I added this but now I'm getting 500
[Mary, Ushahidi] I'm now getting 500 on platform
[Jason Mule, Ushahidi] Could you share your .htaccess?

[Mary, Ushahidi] Here: # Turn on URL rewriting
RewriteEngine On

# Set base directory
RewriteBase /

# Protect hidden files from being viewed
#<Files .\*>
# Order Deny,Allow
# Deny From All
#</Files>

# Uncomment to force redirection to https site.
#RewriteCond %{HTTP:X-Forwarded-Proto} =http
#RewriteRule ^(.*)$ https://%{HTTP\_HOST}%{[ENV:REWRITEBASE](ENV:REWRITEBASE)}$1 [R=301,L]

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]

Ushbot
@ushbot
Mar 17 2016 09:15
[Jason Mule, Ushahidi] ok, could you check your error logs to see if there is a more specific error?
[Mary, Ushahidi] wait a sec
Ushbot
@ushbot
Mar 17 2016 09:22
[Mary, Ushahidi] These are some logs: [Thu Mar 17 05:20:45 2016] [error] [client 180.191.142.185] PHP Warning: require(/var/www/html/platform/src/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/platform/src/Init.php on line 20, referer: http://168.235.93.215/platform/
[Thu Mar 17 05:20:45 2016] [error] [client 180.191.142.185] PHP Fatal error: require(): Failed opening required '/var/www/html/platform/src/../vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/platform/src/Init.php on line 20, referer: http://168.235.93.215/platform/
[Jason Mule, Ushahidi] Did you run `bin/update`
[Mary, Ushahidi] Yes
Ushbot
@ushbot
Mar 17 2016 09:28
[Jason Mule, Ushahidi] ok, did composer run for you and do you have a vendor directory?
[Mary, Ushahidi] composer run for me
[Jason Mule, Ushahidi] could you check if you have a vendor directory on platform/
Ushbot
@ushbot
Mar 17 2016 09:34
[Mary, Ushahidi] nope
[Mary, Ushahidi] I don't have
Ushbot
@ushbot
Mar 17 2016 09:44
[Jason Mule, Ushahidi] so you need to run bin/update to download dependencies and run migrations otherwise the install will not complete...
[Mary, Ushahidi] I'll try to run bin/update again
[Jason Mule, Ushahidi] afterwards, your dependencies are installed in the vendor directory
[Mary, Ushahidi] Your requirements could not be resolved to an installable set of packages.
[Mary, Ushahidi] This is what I get
[Mary, Ushahidi] oh I s ee
[Jason Mule, Ushahidi] sorry, I think you will require a newer version of PHP as well...
Ushbot
@ushbot
Mar 17 2016 10:01
[Mary, Ushahidi] Can you give sample script to upgrade current php? I'm new to Linux
Ushbot
@ushbot
Mar 17 2016 10:22
[Jason Mule, Ushahidi] Upgrade methods will differ b/w distros but sharing CentOS instructions from an article: https://www.mojowill.com/geek/howto-install-php-5-4-5-5-or-5-6-on-centos-6-and-centos-7/. I haven't used these and you should probably test in a non production environment first.

[Link, Ushahidi]

Howto Install PHP 5.4, 5.5 or 5.6 on CentOS 6 and CentOS 7

I still use CentOS as my distro of choice on any new server and whilst things are getting better CentOS and RHEL still don’t have up to date versions of PHP available inside the default yum r…

Ushbot
@ushbot
Mar 17 2016 10:39
[Mary, Ushahidi] Thanks
[Mary, Ushahidi] I'm now getting this error msg: {
"errors": [
{
"status": "Fatal Error",
"title": "Class 'mysqli' not found",
"message": "Class 'mysqli' not found",
"class": "ErrorException",
"file": "/var/www/html/platform/application/classes/Database/MySQLi.php",
"line": 52,
"trace": [
{
"function": "shutdown_handler",
"class": "Kohana_Core",
"type": "::",
"args": []
}
]
}
]
}
Ushbot
@ushbot
Mar 17 2016 11:03
[Jason Mule, Ushahidi] could you search for php-mysqli and ensure that you are able to install the extension? Probably by running yum install php-mysqli but ensure it's for your PHP version.
[Mary, Ushahidi] @Jason thanks btw, a new error again
[Mary, Ushahidi] {
"errors": [
{
"status": 404,
"title": "Unable to find a route to match the URI: platform/httpdocs",
"message": "Unable to find a route to match the URI: platform/httpdocs",
"class": "Kohana_HTTP_Exception",
"file": "/var/www/html/platform/vendor/kohana/core/classes/Kohana/Request.php",
"line": 986,
"trace": [
{
"file": "/var/www/html/platform/httpdocs/index.php",
"line": 30,
"function": "execute",
"class": "Kohana_Request",
"type": "->",
"args": []
}
]
}
]
}
Ushbot
@ushbot
Mar 17 2016 12:01
[Jason Mule, Ushahidi] You can configure a virtual host or if you decide to run under a different DocumentRoot from platform/httpdocs, you will need to change the base_url in application/config/environments/development/init.php. Copy this file from application/config/init.php if you haven't done so already.
[Mary, Ushahidi] Okay after that I got this msg: {
"now": "2016-03-17T12:04:39+00:00",
"version": "3",
"endpoints": [
"collections",
"collections/posts",
"comments",
"config",
"contacts",
"csv",
"csv/import",
"dataproviders",
"forms",
"forms/attributes",
"forms/stages",
"layers",
"media",
"messages",
"notifications",
"passwordreset",
"permissions",
"posts",
"posts/geojson",
"posts/revisions",
"posts/translations",
"posts/updates",
"register",
"roles",
"savedsearches",
"tags",
"users"
],
"user": {
"id": null,
"email": null,
"realname": null
}
}
Ushbot
@ushbot
Mar 17 2016 12:09
[Jason Mule, Ushahidi] That means that you have successfully installed the API!
[Mary, Ushahidi] Wow nice! Thanks for your help
[Mary, Ushahidi] But now I'm gonna install platform-client
[Jason Mule, Ushahidi] no problem. Let us know if you need anything clarified.
[Mary, Ushahidi] Yes. From step 5: Set up build options. Create a `.env` file, you'll need to point BACKEND_URL at an instance of the platform api
[Mary, Ushahidi] What is the backend_url?
[Jason Mule, Ushahidi] so, create a file called .env and add that entry. BACKEND_URL is the url of the API you just installed
[Jason Mule, Ushahidi] does that make sense?
Ushbot
@ushbot
Mar 17 2016 12:38
[Mary, Ushahidi] Okay understood.
[Mary, Ushahidi] Why is it I'm getting this error when I run gulp build Error: File to import not found or unreadable: leaflet/dist/leaflet
Ushbot
@ushbot
Mar 17 2016 12:51
[Jason Mule, Ushahidi] Did you run npm install?
[Mary, Ushahidi] yes
[Jason Mule, Ushahidi] Please check that it completed without an error
Ushbot
@ushbot
Mar 17 2016 13:31
[Mary, Ushahidi] YEs
[Mary, Ushahidi] I tried viewing the site: Sorry, something went wrong. Try reloading the page.
Ushbot
@ushbot
Mar 17 2016 13:53
[Jason Mule, Ushahidi] what did you put as the BACKEND_URL?
[Mary, Ushahidi] platform/httpdocs/
[Jason Mule, Ushahidi] could you use the full url and try again?
Ushbot
@ushbot
Mar 17 2016 14:04
[Mary, Ushahidi] Yes
[Mary, Ushahidi] Also, I can't install bower install ngGeolocation
[Mary, Ushahidi] when trying to run gulp build
[Mary, Ushahidi] Error: Cannot find module 'ngGeolocation/ngGeolocation'
Ushbot
@ushbot
Mar 17 2016 14:26
[Jason Mule, Ushahidi] Please use npm install to install packages
[Mary, Ushahidi] Can't find so I manually installed them
[Mary, Ushahidi] After that another error appeared: Message:
notify-send must be installed on the system.
[Jason Mule, Ushahidi] install notify-send for your distribution since gulp needs that
[Mary, Ushahidi] Yes I already did
Ushbot
@ushbot
Mar 17 2016 14:43
[Jason Mule, Ushahidi] Did you try to install nodejs on your system so that you have access to npm?
[Mary, Ushahidi] Yes I did

[Mary, Ushahidi] When I tried to run gulp build again I got this new error: [10:42:35] gulp-notify: [Gulp notification] CSS compiled
[10:42:35] gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
Message:

(notify-send:14080): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

[10:42:35] gulp-notify: [Gulp notification] CSS compiled
[10:42:35] Finished 'sass' after 795 ms
[10:42:35] gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
Message:

(notify-send:14083): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

[Jason Mule, Ushahidi] I think you can ignore that. Did gulp build complete?
Ushbot
@ushbot
Mar 17 2016 14:48
[Mary, Ushahidi] nope
[Mary, Ushahidi] it didn't build

[Mary, Ushahidi] [10:48:29] Using gulpfile /var/www/html/platform-client/gulpfile.js
[10:48:29] Starting 'copy-leaflet-icons'...
[10:48:29] Starting 'css'...
[10:48:29] Starting 'font'...
[10:48:29] Starting 'browserify'...
[10:48:29] Finished 'css' after 49 ms
[10:48:29] Finished 'font' after 45 ms
[10:48:29] Finished 'copy-leaflet-icons' after 394 ms
[10:48:29] Starting 'rename'...
[10:48:29] Finished 'rename' after 10 μs
[10:48:29] Starting 'sass'...
[10:48:30] gulp-notify: [Gulp notification] CSS compiled
[10:48:30] gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
Message:

(notify-send:14103): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

[10:48:30] gulp-notify: [Gulp notification] CSS compiled
[10:48:30] Finished 'sass' after 955 ms
[10:48:30] gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
Message:

(notify-send:14106): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

Ushbot
@ushbot
Mar 17 2016 15:03
[Jason Mule, Ushahidi] so I think you can ignore notifier errors as gulp build should still continue

[Mary, Ushahidi] And then I'm still getting this error msg Sorry, something went wrong. Try reloading the page.

nav.add_post
nav.home
nav.activity
app.documentation
app.report_a_bug
nav.settings

[Mary, Ushahidi] Also this one: platform/httpdocs/api/v3/config/site is getting 404
Ushbot
@ushbot
Mar 17 2016 15:35
[Jason Mule, Ushahidi] Could you try installing the API on a virtual host and set the DocumentRoot to platform/httpdocs. It looks like `gulp build` did not complete...
Ushbot
@ushbot
Mar 17 2016 15:43
[Mary, Ushahidi] I did install it on a virtual host
[Mary, Ushahidi] I run gulp build

[Mary, Ushahidi] [11:36:48] Using gulpfile /var/www/html/platform-client/gulpfile.js
[11:36:48] Starting 'copy-leaflet-icons'...
[11:36:48] Starting 'css'...
[11:36:48] Starting 'font'...
[11:36:48] Starting 'browserify'...
[11:36:48] Finished 'css' after 47 ms
[11:36:48] Finished 'font' after 44 ms
[11:36:48] Finished 'copy-leaflet-icons' after 382 ms
[11:36:48] Starting 'rename'...
[11:36:48] Finished 'rename' after 9.15 μs
[11:36:48] Starting 'sass'...
[11:36:49] gulp-notify: [Gulp notification] CSS compiled
[11:36:49] gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
Message:

(notify-send:14373): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

[11:36:49] gulp-notify: [Gulp notification] CSS compiled
[11:36:49] Finished 'sass' after 791 ms
[11:36:49] gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
Message:

(notify-send:14376): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

[11:38:03] Finished 'browserify' after 1.23 min
[11:38:03] Starting 'build'...
[11:38:03] Finished 'build' after 9.83 μs
[11:38:03] gulp-notify: [Gulp notification] JS compiled
[11:38:03] gulp-notify: [Gulp notification] JS compiled
[11:38:03] gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
Message:

(notify-send:14389): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

[11:38:03] gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
Message:

(notify-send:14393): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

Ushbot
@ushbot
Mar 17 2016 19:07
[Jason Mule, Ushahidi] Did you change your backend_url to point to the new API url?