DeutschEnglish

Submenu

 - - - By CrazyStat - - -

4. May 2015

Typo3 6.2 and Crawler Failed opening required ‘PATH_t3libclass.t3lib_page.php’

Filed under: Typo3 — Tags: , , , , , , — Christopher Kramer @ 11:28

Typo3 6.2 with the current version of the crawler from TER (3.5) gives this error when executed by the planner from cron:

PHP Fatal error:  require_once(): Failed opening required 'PATH_t3libclass.t3lib_page.php' (include_path='[...]') in [...]typo3conf/ext/crawler/class.tx_crawler_lib.php on line 30

Or if you open the crawler module in the Info-Module, you get only a blank screen and these errors in the log:

PHP Fatal error:  require_once(): Failed opening required 'PATH_t3libclass.t3lib_pagetree.php' (include_path='[...]') in [...]typo3conf/ext/crawler/modfunc1/class.tx_crawler_modfunc1.php on line 30, referer: http://[...]/typo3/mod.php?M=web_info&moduleToken=[...]

PHP Fatal error:  require_once(): Failed opening required 'PATH_t3libclass.t3lib_pagetree.php' (include_path='[...]') in [...]/typo3conf/ext/crawler/modfunc1/class.tx_crawler_modfunc1.php on line 30, referer: http://[...]/typo3/backend.php

I found a bug report for this exists in the crawler bugtracker for over a year now. And the current crawler version 3.6.2 also fixes the problem, but for some reason is not in the TER yet. So to solve the problem:

Download crawler version 3.6.2 and replace “/typo3conf/ext/crawler/” with the contents of this archive.

Hope this helps somebody solving the issue faster.

Recommendation

Try my Open Source PHP visitor analytics script CrazyStat.

22. April 2015

HTML5: why is my comment a ‘bogus comment’!?

Filed under: Uncategorized — Tags: , , , , — Christopher Kramer @ 12:52

I checked the validity of an HTML5 document (using the HTML Validator extension for Firefox, which I highly recommend) and found an error about a “bogus comment”. The comment looked normal:

<!–– some comment ––>

Then I read the HTML5 specification and found out that the bogus comment state instead of the “normal” comment state is entered if after “<!”, the parser cannot find two dashes. I remembered that I had copied the comment from the web and not typed it myself, so I deleted the –– and typed them manually. Looking closely, you can see the difference:

<!–– some comment ––>
<!-- some comment -->

After that, the bogus comment error was gone.

So the reason was that the – signs were not “normal”, but some other characters for longer dashes that look similar. So whenever you see a “bogus comment”, try to type the comment tags yourself…

Hope this helps somebody.

20. March 2015

Remove duplicate mails from a maildir

Filed under: Linux,Server Administration — Tags: , , , , — Christopher Kramer @ 19:30

In case somehow, you got duplicate mails in a maildir, like me, maybe this is helpful to you:

find /var/mail/user -type d -name cur -print0 | xargs -0 /usr/bin/fdupes -n | less

Of course you need fdupes installed. On debian:

apt-get install fdupes

The above command is the dry run, showing you the duplicates.

Then to delete the duplicates, leaving only the first found file:

find /var/mail/user -type d -name cur -print0 | xargs -0 /usr/bin/fdupes -ndN | less

Use the same thing again with “new” instead of “cur” if you have duplicate unread mails. This only looks at duplicates within the same folder, so you can also safely run it on /var/mail for all users.

Note that this assumes the duplicates have exactly the same content. If you want to clean duplicates which are a bit different, consider this tool.

Update 2018: Three years later, I had the same problem, googled it and found my own blog post 😉 And it again solved the problem 🙂

19. March 2015

Owncloud: Share-Button for calendar is missing

Filed under: Server Administration — Tags: , , , — Christopher Kramer @ 16:04

Searching the share-Button for the calendar in your owncloud webinterface?

I was searching it and finally found out that adblock was removing it! “Fanboy’s Social Blocking List” includes a rule “###.icon-share”, which also removes Ownclouds-Share button.

So best, just disable Adblock for your owncloud server.

Nextcloud: Share button for files is missing

Update 2019-08-08: It seems Nextcloud has a similar issue. Here, the share-buttons for sharing files is missing. So again, the best solution is to disable any adblocker for nextcloud.

14. March 2015

Bind nameserver: view cache entries

Filed under: Linux,Server Administration — Tags: , , , , — Christopher Kramer @ 15:35

If you want to view the cache entries of your bind nameserver, this is how it works on bind9 on Debian:

rndc dumpdb
less /var/cache/bind/named_dump.db

Tested on Debian Wheezy. Hope this helps somebody.

6. March 2015

Owncloud: Upgrading to owncloud 8 fails (Integrity constraint violation in oc_filecache)

Filed under: Linux,PHP,Server Administration — Tags: , — Christopher Kramer @ 21:33

First, the upgrade to owncloud 8 in the web GUI failed. Then, I performed the upgrade in the console like this:

sudo -u www-data php /var/www/owncloud/occ upgrade

This gave an error like this (I don’t remember exactly):

An exception occurred while executing 'INSERT INTO "oc_filecache" ... Integrity constraint violation: key s_storage_path_hash is not unique
...
Upgrade failed

This owncloud is using a MySQL DB.

So what in the end solved the problem: First put Owncloud in maintainance mode:

sudo -u www-data php /var/www/owncloud/occ maintenance:mode --on

Then make sure no occ processes of old upgrade attempts are running. If there are, kill them. Then clear the oc_filecache using this MySQL command:

TRUNCATE oc_filecache;

Don’t worry, it will populate itself again during the upgrade. Then restart the upgrade:

sudo -u www-data php /var/www/owncloud/occ upgrade

This might take a lot of time! Better run this on a screen (see screen tutorial if you don’t know how) so it does not stop when your SSH connection breaks.

TortoiseGit: Windows for pull, push etc. take 5 minutes to appear, commit does not work

Filed under: Windows — Tags: , , , , — Christopher Kramer @ 21:14

My TortoiseGit showed a strange behaviour: When I tried to push or pull, the window took exactly 5 minutes to appear. The commit window did not appear any more. Reinstalling TortoiseGit did not fix the issue. I used the git Bash as a workaround for some time until I found a fix: TortoiseGit was not able to write into its temp directory because the security settings (NTFS rights) were somehow messed up. For the C:\Users\MyUser\AppData\Local\Temp\TortoiseGit, I added my user with full access rights and everything is now working again :).

Hope this helps someone to fix this faster in case someone has the same issue.

Spamassasin: MISSING_SUBJECT in every mail even though mail has a subject

Filed under: Linux,Server Administration — Tags: , , , — Christopher Kramer @ 09:48

I noticed the MISSING_SUBJECT rule matched for every mail recently even though the mails contained a subject header. Finally I found this in the spamd.log:

warn: Possible unintended interpolation of @yahoo in string at /etc/spamassassin/local.cf, rule MY_SPAMMY_YAHOO, line 1.
warn: rules: failed to compile Mail::SpamAssassin::Plugin::Check::_head_tests_0_4, skipping:
warn:  (Global symbol "@yahoo" requires explicit package name at /etc/spamassassin/local.cf, rule MY_SPAMMY_YAHOO, line 1.)

The reason was a rule like this:

header          MY_SPAMMY_YAHOO        To =~ /myspammyaddress@yahoo.de/
score           MY_SPAMMY_YAHOO        3
describe        MY_SPAMMY_YAHOO        Mail to myspammyaddress@yahoo.de is mostly spam

Escaping the @ in the rule fixed the Problem:

header          MY_SPAMMY_YAHOO        To =~ /myspammyaddress\@yahoo.de/

Hope this helps someone to spot the error faster.

The problem is that spamassasin does not autolearn ham if the ham messages match the MISSING_SUBJECT rule. So an error like this basically not only breaks lots of tests but also autolearning of ham. So lesson learned: better always look at the spamd.log after creating a new rule, even if you think you know what you are doing 😉

10. January 2015

Retro game Ignition / Bleifuss Fun under Windows 7 using DOSBox

Filed under: Windows — Tags: , , , , , — Christopher Kramer @ 15:37

Remember this retro game?

bleifuss fun

When I was a child, I used to play this with my friends in split screen, which is fun 😀

I just found the old CD and wanted to get it running. This is the way that worked out:

  1. Download and install DOSbox
  2. Create an directory somewhere, e.g. “C:\Users\foo\dosbox”
  3. Start DOSbox
  4. Insert the Bleifuss Fun / Ignition CD into your CD drive (say it has drive D:)
  5. Mount the CD in DOSBox:
    mount d d:\ -t cdrom
  6. Mount the directory you created in step 2 as c:
    mount c c:\Users\foo\dosbox
  7. Switch to the CD-Rom by typing:
    d:
  8. Start the installation by typing:
    DOS_INST.EXE

  9. Go through the installation by pressing Enter, leaving the default location (C:\BLEIFUSS.FUN\ will end up in C:\Users\foo\dosbox\BLEIFUSS.FUN on your drive)
    bleifuss2
  10. Go into the installation directory
    c:
    cd BLEIFUSS.FUN
  11. Switch into Fullcreen: ALT + Enter
  12. Start the game by typing
    BLEI_DOS.BAT

bleifuss3

You can switch back from fullscreen with Alt + Enter and kill dosbox with CTRL + F9

You can increase the screen resolution under options to 800 x 600 to get the graphics a little better.

Next time you run the game, start Dosbox, insert the CD, mount it, mount c, go into the installation directory and start the game:

bleifuss_start

If you don’t want to insert the CD every time or don’t have a CD drive anymore, you can create an image of the CD using Daemon Tools and mount this into a virtual CD drive and mount this in DOSBox.

Of course this should work on any OS where DOSBox is running.

Have fun!

9. December 2014

Icinga: Group all services in a servicegroup instead of using a wildcard

Filed under: Linux,Server Administration — Tags: , , , , , , — Christopher Kramer @ 16:15

At some places you can use the * wildcard as a service description (which requires use_regexp_matching=0), but sometimes it does not seem to work:

Error: Could not expand services specified

Therefore, I simply wanted to group all services in one servicegroup. That’s quite easy if you use a generic service template as a basis for all services. First, create a servicegroup “allservices”:

define servicegroup {
        servicegroup_name               allservices
        alias                           All Services
}

Then edit your generic service template (see servicegroups line):

# generic service template definition
define service{
        name                            generic-service ; The 'name' of this service template
        active_checks_enabled           1       ; Active service checks are enabled
        passive_checks_enabled          1       ; Passive service checks are enabled/accepted
        parallelize_check               1       ; Active service checks should be parallelized (disabling this can lead to major performance probl$
        obsess_over_service             1       ; We should obsess over this service (if necessary)
        check_freshness                 0       ; Default is to NOT check service 'freshness'
        notifications_enabled           1       ; Service notifications are enabled
        event_handler_enabled           1       ; Service event handler is enabled
        flap_detection_enabled          1       ; Flap detection is enabled
        failure_prediction_enabled      1       ; Failure prediction is enabled
        process_perf_data               1       ; Process performance data
        retain_status_information       1       ; Retain status information across program restarts
        retain_nonstatus_information    1       ; Retain non-status information across program restarts
        notification_interval           0               ; Only send notifications on status change by default.
        is_volatile                     0
        check_period                    24x7
        normal_check_interval           5
        retry_check_interval            1
        max_check_attempts              4
        notification_period             24x7
        notification_options            w,u,c,r
        contact_groups                  admins
        servicegroups                   allservices ; ADD THIS TO ADD ALL SERVICES INTO THE allservices GROUP
        register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
        }

This assumes all your services use this template like this (see use line):

define service {
        hostgroup_name                  ssh-servers
        service_description             SSH
        check_command                   check_ssh
        use                             generic-service  ; USE THE TEMPLATE ABOVE
        notification_interval           0 ; set > 0 if you want to be renotified
}

 

Now you can easily use this servicegroup for example in serviceescalations (see servicegroup_name line):

 define serviceescalation{
        hostgroup_name          intranet-servers
        servicegroup_name       allservices
        first_notification      1
        last_notification       0
        notification_interval   1440
        contact_groups          intranet-admins
        }

Hope this helps somebody. I guess it works the same way in Nagios.

« Newer PostsOlder Posts »