Contact Form 7 sendet keine Emails

[WordPress] Contact Form 7 sendet keine E-Mails

Hallo zusammen,

heute mal wieder ein Problem mit einem WordPress Plugin. Nämlich Contact Form 7.

Das Plugin habe ich schon eine Weile im Blog und heute wollte es aktualisiert werden. Das habe ich auch gemacht und gleich mal geschaut ob es noch funktioniert. Und nein, tat es nicht :( Es gibt nur die Meldung „Das versenden der Nachricht war fehlerhaft. Bitte versuchen Sie es noch einmal zu einem späteren Zeitpunkt oder informieren Sie den Administrator.“ aus und verweigert den Dienst. :(

Obwohl alle Einstellungen richtig waren hat es keine E-Mails verschickt. Nach ein bisschen Rumprobieren habe ich dann die Lösung zufällig gefunden. Sie ist schon ein wenig abstrakt… aber geht. Weiterlesen

World No Tobacco Day 2012 – Tobacco industry interference

Hi,

Weltnichtrauchertag 2012 - Lass dich nicht einwickeln!for everybody who don’t know it yet, today is World No Tobacco Day. The most will probably not care and the smoker don’t give a sh** anyway. But I wanted at least to point on it. :)

The World Health Organisation (WHO) invented the World No Tobacco Day exactly 25 years ago. Since that day it is celebrated ever 31th of Mai.

Like for many other things as well does the World No Tobacco Day a slogan. This year it is Tobacco industry interference.

I don’t need to mention that smoking is not good for you and your surrounding. Additionally it cost money, it makes you stink and has no sense at all.
And now I shut up and smoke one… ^^

Best regards
Gordon

Image source: http://www.who-nichtrauchertag.de

Weltnichtrauchertag – Lass dich nicht einwickeln!

Hallo zusammen,

Weltnichtrauchertag 2012 - Lass dich nicht einwickeln!für alle die es noch nicht wissen, heute ist Weltnichtrauchertag. Die meisten wird es wahrscheinlich nicht interessieren und Rauchern geht es wahrscheinlich eh am Ar*** vorbei. Aber ich wollte wenigstens mal darauf hingewiesen haben :)

Die Weltgesundheitsorganisation (WHO) hat den Weltnichtrauchertag vor genau 25 Jahren ins Leben gerufen. Und seit dem Tag wird jedes Jahr am 31. Mai eben dieser Zelebriert.

Wie bei vielem, gibt es auch für den Weltnichtrauchertag ein Motto. Das lautet dieses Jahr „Lass dich nicht einwickeln!“.
Es ist eine Anspielung auf die Promotion (oder sollte man besser Propaganda sagen?) der Tabakindustrie.
In Deutschland ist die Werbung für Tabakwaren ja verboten. Dennoch schafft es die Zigarette bzw. die Tabakindustrie es noch immer jährlich tausende Menschen in ihren Bann zu ziehen. Natürlich ist das Nikotin die beste Waffe dabei. Eine Zigarette kann ausreichen um Süchtig zu machen.

Dennoch muss jemand erst einmal auf den Gedanken kommen an dem stinkenden Ding zu ziehen… und das eine volle Zigarette durchzuhalten.
Und ist man erst einmal abhängig… dann hat man sich einwickeln lassen. Man verunreinigt den eigenen Körper, schadet noch viel mehr der eigenen Gesundheit (und der anderer) und wirft kontinuierlich Geld zum Fenster raus. Gewinner ist die Industrie und der Staat. Vorteile gibt es keine!

Also: Nicht einwickeln lassen! Nichtraucher bleiben und alle Vorteile sind mit dir!

Viele Grüße
Gordon

Bildquelle: http://www.who-nichtrauchertag.de

[PHP] Comments in PHP scripts

Hello together.

Lets talk today about comments :)
When you start coding a script then is it useful to comment your code. So a small documentation in the script. Because as long as you are working on the script and it is in a relative small size, then you know still which line of source code is doing what.

But latest when you source code is growing bigger and/or you need to work on it after a few weeks or months… then is everything gone. How was it? What is this line doing? Where do I find this and this now? Everything gone… the code is just a big pile of confusing.
Latest now you’ll kick your ass that you haven’t commented the code.

Of course it takes a bit longer if you write also comments in the code… but some when it will pay back. Also (and especially) if the code will be handed over to another programmer is it important that the code is commented.

And it is soooo simple ;) 2 slashes (//) for one line and a slash with a star for a multiple-line comment (/* at the beginning and */ at the end). And it will look like that:



And a multiple line comment:



Best regards
Gordon

[PHP] Kommentare in PHP Scripten

Hallo zusammen.

Heute reden wir mal über Kommentare :)
Wenn man ein Script erstellt, dann ist es sinnvoll das Script zu kommentieren. Also eine kleine Dokumentation im Script. Denn solange man gerade damit Arbeitet und das Script in einer relativen Größe bleibt, weiß man noch was genau welche Zeile macht und wozu Sie da ist.

Doch spätestens wenn das Script beachtliche Formen annimmt und/oder man nach Wochen oder Monaten mal wieder reinschaut… ist alles weg. Wie war das noch gleich? Was macht diese Zeile hier? Wo finde ich jetzt das und das?…  Alles weg… der Code besteht nur noch aus Kauderwelsch.
Spätestens jetzt tritt man sich selbst in den Ar*** das man den Code nicht Kommentiert hat.

Natürlich dauert es länger wenn man zum Code auch noch was schreiben muss… aber irgendwann kann es sich auszahlen. Auch (und gerade) wenn man ein Projekt von einem anderen Programmierer übernimmt ist es wichtig Dokumentierten Code vorzufinden.

Und es ist sooo einfach ;) 2 Schrägstriche (//) bei einer Zeile und ein Schrägstrich mit Stern bei mehreren Zeilen (/* am Anfang… und */ am Ende). Das ganze sieht dann so aus.



Und noch ein Mehrzeiliger Kommentar:



Viele Grüße
Gordon

Diving at Cape Greco Cyprus – The canyon and the caves

Hello together,

last Saturday we was finally diving again. :) A luxury which I actually can’t really afford, at the moment. But what can I do… just sitting stupid at home can’t be everything. And this year we’ve sworn us to go really diving.

And so we was going the dive shop of our confidence (Aloha divers Limassol) for a small adventure. This time we was going with the truck in the middle of nowhere. It was good it was a pickup truck… the last end to the dive spot was really off-road. :)

The plan was that we go to Cape Greco (after Ayia Napa) and to the dive spots The canyon and the caves. I’ve heard a lot already from the caves. Everybody was enthused about this spot… To be honest, I was a bit disappointed. Probably because everybody was telling me how nice it is there, so my expectations was bigger then the reality is.

But it was anyway great… and very adventurous (especially the entrances :) ). But have a look by your own. Of course there is a video. ;)

By the way video… I need to do anyway some more dives. The GoPro doesn’t have viewfinder or display. I need to record blind… and I need more practice in it. Especially in the first cave I was holding the camera to high :( But skills comes with practice. ;)

Also the video cut leaves a lot to be desired… I hope it will be not boring anyway.

Tauchen am Cape Greco – The canyon und The caves

Hallo zusammen,

am vergangenen Sonntag waren wir mal wieder Tauchen. :) Ein Luxus den ich mir im Moment eigentlich nicht wirklich gönnen kann. Aber was will man machen… nur dumm zu Hause rumsitzen bringt es ja auch nicht. Und dieses Jahr hatten wir uns eigentlich geschworen endlich mal wieder richtig Tauchen zu gehen.

Also ging es mit unserem Tauchshop des Vertrauens (Aloha Divers Limassol) auf ein kleines Abenteuer. Diesmal mit dem PickUp in die Walachei. Gut das es ein PickUp war… das letzte ende zum ersten Tauchspot war echt OffRoad. :)

Der Plan war das wir zum Cape Greco (noch hinter Ayia Napa) fahren und zu den Tauchplätzen „The canyon“ und „The caves“ fahren. Von den Höhlen (Caves) habe ich ja schon viel gehört gehabt. Alle haben geschwärmt wie schön es da ist. … Ich wahr ehrlich gesagt ein wenig enttäuscht. Wahrscheinlich weil es alle so schön geredet haben das ich sonst was erwartet habe.

Naja, toll war es trotzdem… und sehr Abenteuerlich (insbesondere die Einstiege :) ). Aber seht selbst. Es gibt natürlich ein Video.

Apropo Video… da muss ich sowieso noch einige Tauchgänge machen. Die GoPro hat ja keinen Sucher oder ein Display. Man filmt blind … und das kann ich noch nicht wirklich. Gerade bei der ersten Höhle hab ich die Kamera zu hoch gehalten :( Aber die Übung macht ja den Meister ;)
Auch der Videoschnitt lässt noch zu wünschen übrig. … Ich hoffe es wird euch trotzdem nicht langweilig.

[PHP] Delete a file with PHP

Hi together,

today I wand to answer the question how to delete a file with PHP.

First of all we have to separate. Files on the web server or files on the local hard disk. First yes, second no.
PHP doesn’t have access to files of the local file system of a visitor. No server side programming language can do it. Also client side languages (like Javascript) can’t do it. Else it would be easy for every single webpage to delete randomly files from your computer. That would be an disaster.

But on the web server is it – partly – possible to delete files. Partly means that you can’t delete every file. Also this would be a disaster.

The PHP-Script needs the right to delete files or at least specific files. Under Linux is the right system very strict.

But in the normal situation is it not so complicated like it sounds like. Because usually you delete a file which you created with the script. Like a temporary file or a file from a user upload (a picture for example). Such a file was created by the PHP script and inherit it’s user rights. And also the script has the right to delete this file again.

But how?
Very simple. All we need is the PHP command for deleting a file and the path of the file itself. It fits all in one code line.

$res = unlink("testdatei.hm");

That’s it. In $res we get a return value. 1 = successful deleted or 0 = Couldn’t delete the file.

You can use relative as well as absolute paths.

That’s it. Hope it was helpful :)

[PHP] Datei löschen

Hallo zusammen,

heute möchte ich mal auf die Frage eingehen ob man mit PHP Datei(en) löschen kann.

Zu erst einmal muss man unterscheiden. Dateien auf dem Webserver und Dateien auf der lokalen Festplatte. Ersteres ja, letzteres nein.
PHP hat natürlich keinen Zugriff auf die Dateien des Besuchers einer Webseite. Das hat keine Serverseitige Programmiersprache. Auch Clientseitige Scripte (wie Javascript) können das nur bedingt. Sonst wäre es ja jeder Webseite ohne weiteres wahllos Dateien zu löschen. Das wäre ein Desaster.

Auf dem Webserver kann PHP jedoch, bedingt, Dateien löschen. Bedingt heißt das man auch hier nicht einfach wahllos irgendwelche Dateien löschen kann. Auch das wäre ein Desaster.

Das PHP-Skript braucht für die entsprechende Datei auch entsprechende Rechte. Unter Linux sogar noch bestimmte Gruppen- und Benutzerzugehörigkeiten.

Doch im Normalfall ist es nicht so Kompliziert wie es sich jetzt anhört. Denn im Normalfall wird ja meist eine Datei gelöscht die auch mit dem gleichen Skript erstellt wurde. Also zum Beispiel eine temporäre Datei oder eine Datei die ein User hochgeladen (ein Bild z.B.). Dann wurde die Datei auch mit dem PHP Skript erstellt und trägt dessen User- und Benutzerrechte. Damit auch das Recht die Datei wieder zu löschen.

Doch wie funktioniert es?
Ganz einfach. Alles was wir brauchen ist der PHP-Befehl zum Datei löschen und der Pfad der Datei selbst. Das passt in eine Codezeile.

$res = unlink("testdatei.hm");

Das war’s schon. In $res ist dann der Rückgabewert enthalten. 1 = erfolgreich gelöscht und 0 = Datei konnte nicht gelöscht werden.

Bei Verzeichnisstrukturen können relative wie auch absolute Pfadangaben gemacht werden.

An octopus which pretend to be a stone

Hi,

I went yesterday snorkeling again. Of course with my new camera :) I bought a short while ago a new underwater camera (the GoPro Hero 2). Actually it is a action camera (for action sport). But also for diver very interesting. After the lens modification (with the Blurfix lens) is it also able to catch sharp underwater HD videos.
I just need to get in used to the recording itself. There is no viewfinder and no display. Everything by instinct and experience. … And when I see then something interesting, then I am so excited and fixed on the „great thing“, that I forget to handle the camera proper. :) :D

But yesterday I caught the first good recording. I was snorkeling so my round… till I saw an odd stone. Looked somehow strange. And then I saw that there was something attached, which doesn’t belong there.

An Octopus was holding itself on the stone and tried to pretend to be a part of this stone. It looked like he would think that it would work…. till I was one meter in front of him (pity the video just starts short before). Then is seemed like it become to hot for him… that his cover got blown… :) :)
So he break away from the stone slowly and swum under a close ton.

This Octopus was the second largest I ever saw, till now. Was already very impressive.

I hope that I can fly soon somewhere else… where I can explore and record more life under water. Here I can find maybe 1-2 times per week something interesting (and interesting is here already anything beside the usual small fish) :( Maybe Egypt or so. It’s not soo far… If the money is left for it.

But now first the video to the story… :)

Ahh, once more before: Our Nature is wonderful! Help to save and protect it!