IPv6 addrconf: prefix with wrong length

after i got up my ubuntu server i checked the syslog where the kernel kept griping about the following.

IPv6 addrconf: prefix with wrong length 48

To keep the syslog clean i searched for a way to suppress that message. it´s simple.

In /etc/sysctl.conf i add two lines

net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.all.autoconf = 0

There you go.

new database with user in mysql console

this will create a new database on the server with the new user having all rights granted on that db.


CREATE USER 'uname'@'localhost' IDENTIFIED  BY 'pass';

GRANT  USAGE ON *.* TO 'uname'@'localhost' IDENTIFIED  BY 'pass' WITH  MAX_QUERIES_PER_HOUR 0  MAX_CONNECTIONS_PER_HOUR  0  MAX_UPDATES_PER_HOUR  0  MAX_USER_CONNECTIONS  0 ;

CREATE  DATABASE  IF  NOT  EXISTS 'uname' ;

GRANT  ALL  PRIVILEGES  ON 'uname'.*  TO 'uname'@'localhost';

if there´s a problem when creating the database,  do not use the ‘ ‘ signs around the db name.

just to avoid phpmyadmin for this little task ;) i didn´t like to look that up everytime.

t3 version 4.4alpha backend without css and js

just solved another mystery that was dazzling my mind on a small project regarding TYPO3 version 4.4 alpha2 where the frontend worked like expected but the project code (that was updated from version 4.2.6) showed an ugly distorted backend.

all styles and javascript functions were gone!

i cleared any temporary data collection, checked rewrites, paths, everything was ok. i reloaded the sources :-) but it did not change anything. but when i started to delete all those extension corpses in typo3conf/ext/ i got one idea. extension pmktextarea integrated okay in backend in former t3 installations… and as i saw, it still did and somehow seemed to overwrite essential js for the backend. deleted the folder, cleared the TEMP* files in typo3conf/ and reloaded the backend. worked. phewww…

typo3 update to 4.3.3

all systems nominal. TYPO3 is now available in version 4.3.3 and it was easy to update for all of the projects i´m responsible for that where on 4.3.x already. good work, coredevs! looking forward to meet you at the t3dd

the changelog can be found in the TYPO3 wiki. the source can be found on sf.

my systems run without any changes. so just put the symlink to the right directory and the system is safe once more.

why update anyway?

you may delay ignore update, if following conditions are met.

  1. If you use TYPO3 in version  4.3.0, 4.3.1 or 4.3.2 (+ development releases of 4.4 branch).
  2. at least one of following PHP configuration variables set to “off”:
    • register_globals (“off” by default, advised to be “off”),
    • allow_url_include (“off” by default)
    • allow_url_fopen (“on” by default)
  3. You are using Suhosin and haven’t put URL schemes in configuration variable ”suhosin.executor.include.whitelist”.

these details were taken from the current security bulletin. TYPO3 is also a that good cms because the security team does their job that good.

The requested page didn’t have a proper connection to the tree root

Just a fast snip i was hunting today:

It might be helpful to you, if

  • you use RealUrl
  • get the errors after following links to pages what definetely are correct and visible
  • the errors shows “mp vars”

Get yourself the ‘realurlmanagement’  extension and list the pages in backend hat are the target of the links with it (use ‘pages’ option in module´s view)

The extension may show you several different paths to your page. Just flush them all and you´re good to go.

I was searching for user errors on a larger system for an hour, and did check the realurl caches at last.

And if you´re here but the above solution is not working for you, check the first obvious thing in your shortcut / linking page:

Did you specify the target page? :-)

Backend View

get user ip from behind reverse proxy setup

small problem, wide reach. if your TYPO3 is set up behind a reverse proxy (like pound) and you need the ip connection information of the visitors, T3´s userfunction method comes in handy.

fileadmin/scripts/fwdip.php


<?php
class user_fwdip {
 var $cObj;
 function main($content,$conf){
  $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
  return $ip;
 }
}
?>

This is the file you´d like to ask for the ip from within TYPO3.

To be able to use this file in a userfunc style you´ll need to include the file in TypoScript, i put it into an own TS template on one special page.


page.includeLibs.fwdip = fileadmin/scripts/fwdip.php

You now could put the stuff on the same TS template but i recommend this neat extension to generate the output to one special page in a content element. The extension wraps the TS in a COA.


20 = USER
20 {
 userFunc =user_fwdip->main
}

Now the page you put the element on should show your real ip address, instead of the proxy ip.

Simple, but fully worth a snippet.

piwik in version 0.5.2 + update script

while waiting for an almost ten gigabytes large piwik database to be updated, i’m just writing down that piwik got a new release yesterday.

upgrading piwik is easy. i pushed all steps to upgrade it on a linux (debian) server in a small shell script you may find useful.

simple update script for piwik

#!/bin/bash
# auto-update piwik
# @author bigbabou <bigbabou@web.de>
#

# where my current piwik resides
installdir=/var/www/

# where the ugly stuff should be made
workingdir=/home/bigbabou/

# used for copying the new piwik source
piwikdir=/home/bigbabou/piwik/*
logfile=updatepiwik.log

# where the new piwik can be downloaded
piwikurl=http://piwik.org/latest.zip

cd ${workingdir}

# check if update is necessary
wget -N -o${logfile} ${piwikurl}

# overwrite silently
unzip -q -o latest.zip

# tidy up old piwik dir
cd ${installdir}

rm -rf core js lang libs misc plugins tests themes tmp
rm index.php piwik.js piwik.php robots.txt README

# safe global.ini before updating
chown root config/global.ini.backup_by_script
chmod 770 config/global.ini.backup_by_script

echo 'copying new files'
cp -r ${piwikdir} .
chown -R www-data *
chgrp -R www-data *
ls --color=auto -lA ${installdir}

# make nightly precaching exectuable
chmod 770 ${installdir}'misc/cron/archive.sh'

# clean up stuff
cd ${workingdir}
rm latest.zip
rm How\ to\ install\ Piwik.html
rm -rf piwik

echo 'piwik update successful. have a nice day!'

## update db on shell
php ${installdir}index.php

echo ' - update script end -'
exit 0

two lines could be added for convenience

chmod 777 ${installdir}tmp/cache
chmod 777 ${installdir}tmp/templates_c

tt_news 3.0.0 outputs “?>”

the extension update yesterday was not as simple as i thought and what happenened when i came to work today? tons emails complaining about broken web layout in frontend. ha! it’s a pity, the extension is really a good piece of code – but in one file the php ending tag was appearing twice. this generated a ?> just before the output of TYPO3 ( the doctype declaration and else ).

after finding out that it definitely was tt_news i quickly found the bug in the bugtracker :)
alywas look in the bug tracker first.

and the solution is that simple:

in typo3conf/ext/tt_news/lib/class.tx_ttnews_cache.php remove the last line (which is the doublette “?>”) and the system does not print out that tag before the website begins.

but still, it’s a pity that firefox again handles even this error and displays the website the first time after clearing cache with the ?> and the next times without it. But the internet explorer is as dumb as we expect it to be. broken layout due to malformed code – no css inclusion.