Benutzer-Werkzeuge

Webseiten-Werkzeuge


faq

Dies ist eine alte Version des Dokuments!


Frequently Asked Questions

Database questions

How can I rename a column name in my database?

ALTER TABLE `properties` CHANGE `key` `pkey` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL

Fehlender TIMESTAMP / keine Daten in DB

falls beim Backend Server unter apache in der access_log die Einträge in der folgenden Art gelistet sind:

<IP> - - [<DATE>] "POST /backend/index.php/data/<UUID>.json?ts=0000&value=1 HTTP/1.1" 400 232

fehlt der TIMESTAMP des controllers (ts=0000).
In diesem Fall kann man Diesen testweise auch durch den Server erzeugen lassen, indem man ethersex (e6) ohne timestamp konfiguriert:

make menuconfig
  Applications:
    watchasync service:
      Include unix timestamp: ausschalten
      Summarize Events: ausschalten
      Path at the end: ".json"

Size of database and access_log

By using several higher resolution power meters with an S0 interface (DIN 43864) and an above average power consumption the harddisc space required by the (mysql-)database and apaches access_log can grow rapidaly to several hundert megabytes.

Since MySQL writes every change additionally to a binary log file (e.g. mysqld-bin.<nnnnnn>), its space requirements can be lowered by limiting the maximum size of these files and auto deleting older ones e.g. by inserting the following entries in /etc/mysql/my.cnf:

[mysqld]
expire_log_days = 7
max_binlog_size = 10M

This always creates an new binlog file when its size exceeds 10MB and deletes the ones which are older than 7 days.

Another major size reduction can be reached by frequently rotating apaches access_log file e.g. with logrotate.

In future we hope to reduce the database size additionaly by e.g. optionaly offering the implementation of a round-robin database like RRDtool

Fehlermeldungen im Frontend- bzw. Backend

Bad Request 400: Property tokens does not exist

Nach Aktualisierung eures Volkszählers durch „git pull“ muss euer Webserver „etc/init.d/apache2 restart“ neu gestartet werden.

Bad Request 400: Could not find driver

Hier fehlt euch der PDO Datenbanktreiber. In der volkszaehler.conf.php habt ihr den verwendeten Treiber konfiguriert. Dazu müsst ihr ihn in der php.ini laden:

extension=pdo_mysql.so

Parse error: syntax error, unexpected T_STRING

Error message: „Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in <filename>.php on line <line_number>“ reason: You're running php in a version < 5.3; verify by running „php -v“; result should begin with „PHP 5.3.“ or higher; solution: upgrade to 5.3.x or higher

Frontend: "500 error: Unknown backend response"

The parameter $config['lib']['doctrine'] could be missing in volkszaehler.conf.php. Insert something like this (taken from the current template volkszaehler.template.conf.php):

$config['lib']['doctrine']			= VZ_DIR . '/lib/vendor/Doctrine';

Distribution

Gentoo Linux

A couple of hints for people trying to get this running under Gentoo:

- Profile: hardened/linux/x86
- make.conf: USE="logrotate unicode userlocales -X -tcpd"
- package.use: "dev-lang/php apache2 gd mysql pdo"
- "emerge git jpgraph mysql pecl-apc phpmyadmin"

AVR Compiler:
see http://en.gentoo-wiki.com/wiki/Crossdev#AVR_Architecture

- "emerge crossdev"
- "crossdev -v --target avr --gcc 4.4.4-r2 --binutils 2.20.1-r1 --libc 1.6.8 -s1 --without-headers"
- "crossdev -v --target avr --gcc 4.4.4-r2 --binutils 2.20.1-r1 --libc 1.6.8"
- "ln -s /usr/i686-pc-linux-gnu/avr/lib/ldscripts /usr/avr/lib/ldscripts"
faq.1300493464.txt.gz · Zuletzt geändert: 2011/05/29 13:09 (Externe Bearbeitung)