Ok Paul
But first I want to say I am trying this on local host.
Bert
Ok Paul
But first I want to say I am trying this on local host.
Bert
Ok so http://localhost/emoncms should work (or just http://localhost depending on how you configured it).
Paul
I am getting the message “undefined”
Bert
Had this problem first time I installed
In the instal directory there is a .htaccess file but on some computers these files are hidden and when you ftp them up to the server, you just forget to upload that file
It contains all the redirects for apache and this undefined error ‘might’ originate in missing the redirects
If you can unhide your files, do so else make a new file (on root level where you installed emoncms and call it .htaccess) on the host with the following code
# Apache/PHP/Emoncms settings:
#
# Set the default handler.
DirectoryIndex index.php
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
#RewriteBase /sites/emon/
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-s
# Skip rewrites for known files, folders and 4xx/5xx errors so we know if something is wrong
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{REQUEST_URI} !=/robots.txt
RewriteCond %{REQUEST_URI} !^/?docs.*$
RewriteCond %{REQUEST_URI} !^/?Lib.*$
RewriteCond %{REQUEST_URI} !^/?Modules.*$
RewriteCond %{REQUEST_URI} !^/?scripts.*$
RewriteCond %{REQUEST_URI} !^/?Theme.*$
RewriteCond %{ENV:REDIRECT_STATUS} ![45]0[0-9]
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
# ------------------------------------------------------------------------------
# The following are taken from html5 boilerplate
# url: https://github.com/h5bp/html5-boilerplate/blob/master/.htaccess
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# | Proper MIME types for all files |
# ------------------------------------------------------------------------------
<IfModule mod_mime.c>
# Audio
AddType audio/mp4 m4a f4a f4b
AddType audio/ogg oga ogg opus
# Data interchange
AddType application/json json map
AddType application/ld+json jsonld
# JavaScript
# Normalize to standard type.
# http://tools.ietf.org/html/rfc4329#section-7.2
AddType application/javascript js
# Video
AddType video/mp4 f4v f4p m4v mp4
AddType video/ogg ogv
AddType video/webm webm
AddType video/x-flv flv
# Web fonts
AddType application/font-woff woff
AddType application/vnd.ms-fontobject eot
# Browsers usually ignore the font MIME types and simply sniff the bytes
# to figure out the font type.
# http://mimesniff.spec.whatwg.org/#matching-a-font-type-pattern
# Chrome however, shows a warning if any other MIME types are used for
# the following fonts.
AddType application/x-font-ttf ttc ttf
AddType font/opentype otf
# Make SVGZ fonts work on the iPad.
# https://twitter.com/FontSquirrel/status/14855840545
AddType image/svg+xml svgz
AddEncoding gzip svgz
# Other
AddType application/octet-stream safariextz
AddType application/x-chrome-extension crx
AddType application/x-opera-extension oex
AddType application/x-web-app-manifest+json webapp
AddType application/x-xpinstall xpi
AddType application/xml atom rdf rss xml
AddType image/webp webp
AddType image/x-icon cur
AddType text/cache-manifest appcache manifest
AddType text/vtt vtt
AddType text/x-component htc
AddType text/x-vcard vcf
</IfModule>
# ------------------------------------------------------------------------------
# | UTF-8 encoding |
# ------------------------------------------------------------------------------
# Use UTF-8 encoding for anything served as `text/html` or `text/plain`.
AddDefaultCharset utf-8
# Force UTF-8 for certain file formats.
<IfModule mod_mime.c>
AddCharset utf-8 .atom .css .js .json .jsonld .rss .vtt .webapp .xml
</IfModule>
# ------------------------------------------------------------------------------
# | Compression |
# ------------------------------------------------------------------------------
<IfModule mod_deflate.c>
# Force compression for mangled headers.
# http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
# Compress all output labeled with one of the following MIME-types
# (for Apache versions below 2.3.7, you don't need to enable `mod_filter`
# and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines
# as `AddOutputFilterByType` is still in the core directives).
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE application/atom+xml \
application/javascript \
application/json \
application/ld+json \
application/rss+xml \
application/vnd.ms-fontobject \
application/x-font-ttf \
application/x-web-app-manifest+json \
application/xhtml+xml \
application/xml \
font/opentype \
image/svg+xml \
image/x-icon \
text/css \
text/html \
text/plain \
text/x-component \
text/xml
</IfModule>
</IfModule>
# ------------------------------------------------------------------------------
# | File access |
# ------------------------------------------------------------------------------
# Block access to directories without a default document.
# You should leave the following uncommented, as you shouldn't allow anyone to
# surf through every directory on your server (which may includes rather private
# places such as the CMS's directories).
# CHAVEIRO: documentation needs this disabled
<IfModule mod_autoindex.c>
# Options -Indexes
</IfModule>
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Block access to hidden files and directories.
# This includes directories used by version control systems such as Git and SVN.
<IfModule mod_rewrite.c>
RewriteCond %{SCRIPT_FILENAME} -d [OR]
RewriteCond %{SCRIPT_FILENAME} -f
RewriteRule "(^|/)\." - [F]
</IfModule>
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Block access to files that can expose sensitive information.
# By default, block access to backup and source files that may be left by some
# text editors and can pose a security risk when anyone has access to them.
# http://feross.org/cmsploit/
# IMPORTANT: Update the `<FilesMatch>` regular expression from below to include
# any files that might end up on your production server and can expose sensitive
# information about your website. These files may include: configuration files,
# files that contain metadata about the project (e.g.: project dependencies),
# build scripts, etc..
<FilesMatch "(^#.*#|\.(bak|config|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$">
# Apache < 2.3
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
Satisfy All
</IfModule>
# Apache ≥ 2.3
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</FilesMatch>
# protect phpinfo, only allow localhost and local network access
<Files php-info.php>
Order Deny,Allow
Deny from all
Allow from 10
Allow from 172
Allow from 192
</Files>
Eric
But I am installing on localhost. I think no problems with the .htaccess file then.
Bert
localhost or remote host, it is still Apache and Apache needs to know where to go for some files. .htaccess tells it where to find them. Just try that already.
Eric
Yes I tried and it didn’t solved the problem
Bert
Eric
I am on Windows
Bert
I’m afraid I have never installed on Windows, so may not be able to help much.
Have you enabled “mod_rewrite” ?
have you been following this windows install guide? (I’m unsure how up to date it is)
This getting started with emoncms | Archived Forum might help too. You also need gettext (or at least, used to need it).
I switched to Linux when Win 8 appeared, so I’m no longer up to date on Wampserver, though I did write it up somewhere in Building Blocks, if my memory serves. Try searching there and the old forum if you’re still stuck.
Where can I find the script for registering?
I am using PhpEd (Nusphere) and maybe I can debug this.
Bert
It’s part of the User Module.
I am not sure but I think I am missing register.json
Bert
Is that possible that I am missing register.json?
Is the file not on Github?
Bert
Hi Bert,
You getting anywhere with this?
I have emoncms running fine on Win2012R2 for a while now. I seem to remember having permission issues to start with, and Redis was a bit unpleasant to get running.
I’m guessing your issue is not inside your emoncms directory (under \wamp\www) - when I update my emoncms, all I do is download the .zip from github, unzip to ‘emoncms’, copy (or merge if there were format changes) my settings.php and download & unzip dashboard under emoncms\modules (and I rebuild my emoncms directory this way quite often)
I’m running wampserver 2.5 32-bit.
I’ve attached my httpd.conf from \wamp\bin\apache\apache2.4.9\conf httpd.zip (6.6 KB)
Hi Sandy
I am not working with WAMP. I installed Nusphere(PhpEd).
I will install again but when I look what Paul said and look in the module I see that register.json is called.
That file is not on my system.
Bert
Hi Bert,
That “user/register.json” looks to me to be the server URL that your new user & password are being sent to. I don’t think that actually exists quite as that within the emoncms server code - but I believe the apache rewrite module is supposed to change that to something that can be processed.
And indeed, I get yor ‘undefined’ error if my rewrite configuration (in .htaccess) is not correct.
Sandy
Hi Bert
I simply answered your question asking where the script was, I would not expect there to be an issue within that code. I had already mentioned mod_rewrite, Eric had already said about .htaccess and now Sandy says the samething. Going by what you have disclosed so far it does seem to be to a routing issue where the URL’s are not being rewritten as expected/necessary. But it’s difficult to be sure as we have no idea what you have done to install or tried whilst trying to fix.
I think I will let it rest a while. It don’t work