Freitag, 30. August 2019

Mautic auf eigenem Webserver installieren

Man kann mautic aus den repositories von Github installieren, muss dann aber einen ssh-Zugang haben um compozer laufen lassen zu können. Damit installiert man weitere Pakete die für den Betrieb von Mautic notwendig sind. Ohne diese kommt der Fehler:

[fcgid:warn] [pid 37090] [client 1.1.1.1:46435] mod_fcgid: stderr: PHP Fatal error:  require(): Failed opening required '/var/www/app/../vendor/autoload.php' (include_path='.:/opt/php-7.2.9/lib/php') in /var/www/app/autoload.php on line 15

wechsle also in das entpackte mautic-directory und gib

composer install

ein. Es werden alle abhängkeiten in dieses Verzeichnis runtergeladen. Dann musste ich noch die Rechte anpassen, da ich den install mit root-Rechten gestartet hatte aber der Webhost auf seinem eigenen Benutzer läuft. Das kam mit dem Fehler zum ausdruck:

[fcgid:warn] [pid 37090] [client 1.1.1.1:47941] mod_fcgid: stderr: RuntimeException: Unable to create the cache directory (/var/www/app/cache/prod)

behoben durch:

chown www-data:www-data -R ./

Ich habe weiters gute Erfahurngen damit gemacht die Ausführungszeit in php zu erhöhen da ich sonst öfters timeouts hatte. Kann bei euch wenn ihr einen schnelleren Server habt aber auch nicht notwendig sein. Sonst muss also in die PHP.ini:

max_execution_time=300

Danach ist bei mir die Installation gelaufen. Hat man nicht die Möglichkeit den composer via ssh laufen zu lassen kann man sich das fertige Paket nach Eingabe einiger Daten von mautic.org/download herunterladen.  Sollten noch Fehler auftreten bitte https://www.mautic.org/download/requirements überprüfen sowie (von https://github.com/mautic/mautic#disclaimer )
  1. PHP modules:
    • required: zip, xml, mcrypt, imap, mailparse
    • recommended: openssl, opcache / apcu / memcached
    • recommended for development: xdebug
  2. Recommended memory limit: minimally 256 MB for testing, 512 MB and more for production.
  3. Recommended MySQL defaults can be set by running the queries SET GLOBAL innodb_default_row_format=DYNAMIC; SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

Bei der Installation war bei mir eine Empfehlung date.timezone in php.ini zu setzen:

date.timezone=Europe/Vienna



                                                                                                                                        

Dienstag, 4. Dezember 2018

Mails not sending to outlook.com or hotmail.com from own Mailserver

I've had the Problem that Microsoft Servers didn't accept my Mails from my server so I made DKIM and SFP-Records but that also not suceeded. So I read through the internet and found a lot of posts of frustrated admins and even ISPs with the message: Microsoft don't care about delivering mails due to the standard - the Mails are send, the code is ok but with no response they fall in the black hole and have never seen again.

https://twitter.com/search?f=tweets&q=hotmail%20blackhole&src=typd
https://www.akeyes.co.uk/blog/hotmail_com__outlook_com__live_com_blacklisting____a_pleasant_experience

So what to do? As company you can't really tell your customers to change their mailadress so they can get mails from you (we advising our customers to this but as IT company thats our job ;) ).

As mailserver owner you can register to Sendersupport / SNDS Service from outlook. There you can verify your own IPs and can manage them if they are on blocklists. As far as I got after checking all those mentioned points at https://sendersupport.olc.protection.outlook.com/pm/troubleshooting.aspx and your ip on https://sendersupport.olc.protection.outlook.com/snds/ipStatus.aspx

You also have to mail your request over this form
http://go.microsoft.com/fwlink/?LinkID=614866
(mind there are only 2000 chars allowd in the description box!) . Then you get a mail you have to confirm and then your IP is whitelisted. This lasts for one of my servers for over half a year now but some users reported that after a few weeks/months MS is again blocking emails. I think this could depend on the emails sent from the users of your Server so as anybody marks them as Spam Mirosoft will block it again.

Sonntag, 18. November 2018

Joomla Verzeichnis nicht beschreibbar trotz Schreibrecht für User auf Apache unter ISPConfig

Habe heute eine Website von einer Domain zur anderen umgezogen und hatte dann das Poblem, dass die Verzeichnisse nicht beschreibbar waren. Natürlich hatte ich die Besitzer aller Ordner und Unterordner aktualisiert aber trotzdem ging es nur, wenn die Gruppenrechte auf Schreibzugriff waren. Getestet habe ich das mit der configration.php Datei - im Backend eingeloggt, irgendeine Einstellung geändert, auf Speichern geklickt - geht nicht. Dann nach einem "chmod 774 configuration.php" gings auf einmal.

Schlussendlich war es die fehlende Funktion "Suexec" welche im ISPConfig in der Website-Konfiguration aktiviert werden muss.

Mittwoch, 18. Juli 2018

Installation einer zusäztlichen PHP-Version in ISPConfig 3.1.12

Ich habe schon einige Versionen laufen und habe mich dafür entschieden, die jeweilige Version immer updzudaten und nicht immer bis ins letzte zu gehen. Z.b. bei PHP 7.0 habe ich aktuell 7.0.24 auf meinem Ubuntu Server 14.04.5 installiert - die Verzeichnisse heißen aber 7.0.0 um nicht immer alles neu anlegen zu müssen und trotzdem relativ einfach Updates einspielen zu können, aktuell soll 7.0.30 eingespielt werden.

Dazu sucht man sich erst mal den Download unter http://de2.php.net/downloads.php

Jetzt stoppen wird den Webserver: sudo service apache2 stop
Jetzt wechseln wir in das Verzeichnis /opt/php-7.0.0 und laden uns das aktuelle .tar.bz2 herunter, in dem Fall: http://at2.php.net/distributions/php-7.0.30.tar.bz2
nun entpacken: sudo tar jxf php-7.0.30.tar.bz2
jetzt wechseln wir in das Verzeichnis und verschieben den Inhalt in den Ordner darüber (von /opt/php-7.0.0/php-7.0.30 in /opt/php-7.0.0):
cd /opt/php-7.0.0/php-7.0.30
sudo mv * ../
den leeren Ordner lassen wir als Hinweis zur Version bestehen.

nun kompilieren wir die PHP-Version wiefolgt:
sudo ./configure --prefix=/opt/php-7.0.0 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm

sudo make

sudo make install

nun kopieren wir die alten Konfigurationen zurück:
cd /opt/php-7.0.0
sudo cp ../php-7.0.24-old/lib/php.ini ./lib/
sudo cp ../php-7.0.24-old/etc/php-fpm.conf ./etc/
sudo cp ../php-7.0.24-old/etc/php-fpm.d/www.conf ./etc/php-fpm.d/



Anleitung Quellen:
https://www.howtoforge.com/tutorial/how-to-install-php-7-on-debian/
https://www.howtoforge.com/tutorial/how-to-install-php-5-6-on-ubuntu-16-04/