Search found 183 matches

by chris
Tue Jun 08, 2021 6:23 pm
Forum: PHP
Topic: Solved : find if GD2 is installed
Replies: 2
Views: 435

Re: find if GD2 is installed

You can find ii with the command ( in shell)

Code: Select all

php -i | grep 'GD\|ImageMagick'
of with the following code in a php/html-file.

Code: Select all

<?php phpinfo(); ?>
It should be listed, if installed.
by chris
Sun May 16, 2021 8:39 am
Forum: MySQL
Topic: Grant rights to a backup user.
Replies: 2
Views: 14252

Re: Grant rights to a backup user.

PROCESS privilege is new as of MySQL 5.7.31 and MySQL 8.0.21 and is also needed if you don't use --no-tablespaces . privilege needed for mysqldump backup user: SELECT privilege for dumped tables SHOW VIEW for dumped views TRIGGER for dumped triggers LOCK TABLES if you don’t use the --single-transact...
by chris
Sun May 16, 2021 8:15 am
Forum: Shell
Topic: replace newline in text file
Replies: 1
Views: 441

Re: replace newline in text file

You can use sed

replace it with FOO:

Code: Select all

sed '{:q;N;s/\n/FOO/g;t q}' /path/text.txt
or just remove it:

Code: Select all

sed '{:q;N;s/\n//g;t q}' /path/text.txt
by chris
Sat May 08, 2021 8:41 am
Forum: General
Topic: Solved: Facebook not showing good picture for website
Replies: 1
Views: 511

Re: Facebook not showing good picture for website

Facebook uses Open Graph protocol to create a "template" of the web-page. If it can find it, it will try to create it's own. Normally it pretty good, but sometimes it goes really wrong. The good news is, Facebook engineers provided a great tool that can help you: https://developers.faceboo...
by chris
Sat Apr 17, 2021 4:18 pm
Forum: Postfix
Topic: Signed mail certificate
Replies: 2
Views: 695

Re: Signed mail certificate

A good site to test your (mail)-ssl is
https://www.checktls.com/index.html
by chris
Sat Apr 17, 2021 12:14 pm
Forum: Postfix
Topic: Signed mail certificate
Replies: 2
Views: 695

Re: Signed mail certificate

you first need to generate csr-file (and key). openssl req -new -nodes -keyout mail.server.com.key -out mail.server.com.csr Make sure you use the same host-name as used in your postfix config file (of dovecot or other mail server) in this example mail.server.com , not just the domain. Then send the ...
by chris
Sun Mar 14, 2021 8:53 pm
Forum: Servers
Topic: postsuper: fatal: scan_dir_push: open directory defer: Permission denied
Replies: 3
Views: 919

Re: postsuper: fatal: scan_dir_push: open directory defer: Permission denied

If it can't write the mails, it can't process the mail to send them.

an extreme solution is to delete the dir

Code: Select all

rm -fr /var/spool/postfix
and do a reinstall

Code: Select all

apt-get reinstall postfix
it will recreate the dir with the correct file-settings.
by chris
Sun Mar 14, 2021 8:25 pm
Forum: Servers
Topic: postsuper: fatal: scan_dir_push: open directory defer: Permission denied
Replies: 3
Views: 919

Re: postsuper: fatal: scan_dir_push: open directory defer: Permission denied

It looks like postfix does not have access to one or more directories.
Somehow the rights must have been changed.

You can try:

Code: Select all

chown -R postfix /var/spool/postfix
or

Code: Select all

postfix set-permissions
by chris
Fri Feb 12, 2021 7:10 pm
Forum: General
Topic: linux repeat command x times
Replies: 1
Views: 766

Re: linux repeat command x times

With the up arrow you get the last commands you typed, and press enter to execute it. If you want to run the same command several times, you can use for-loop ( in bash) for n in {1..3}; do <COMMAND>; done repeats 3 times Another option is watch If you want to repeat a command every x seconds, ideal ...
by chris
Sun Feb 07, 2021 7:48 am
Forum: SQL
Topic: mysql update add to text
Replies: 1
Views: 892

Re: mysql update add to text

you can use concat to add to already existing string (varchar,text,...)

Code: Select all

UPDATE table_name SET text_field=CONCAT(text_field,'string to add') WHERE  id='1';
It doesn't work if the value is NULL,
It works with an empty string ('').
So you should replace all NULL values with empty string before.