Search found 180 matches

by chris
Tue Aug 14, 2018 8:23 pm
Forum: Postfix
Topic: postfix forward mail to multiple recipients
Replies: 2
Views: 35165

Re: postfix forward mail to multiple recipients

Yes it possible.
Separate the emails with comas.

Edit the file /etc/postfix/vmail_aliases

Code: Select all

group@domain.com bob@domain.com,alice@domain.com
by chris
Mon May 07, 2018 6:17 pm
Forum: PHP
Topic: SOLVED: PHP file_put_contents not writing to /tmp
Replies: 1
Views: 12853

Re: PHP file_put_contents not writing to /tmp

Found the solution:

Apache/php now create a directory in /imp which hold the /tmp/file.tmp

Code: Select all

/tmp/systemd-private-9b5e7c68bxxx45faa1a812b5df02f1ab-apache2.service-5ExxRI/tmp/
So it doesn't write directly to /tmp.
Makes it more difficult to read it by another script :-(
by chris
Sun May 06, 2018 8:22 pm
Forum: PHP
Topic: SOLVED: PHP file_put_contents not writing to /tmp
Replies: 1
Views: 12853

SOLVED: PHP file_put_contents not writing to /tmp

I have a php script that writes to /tmp directory

Code: Select all

file_put_contents('/tmp/file.tmp',$value);
But it doesn't write, I can't find the files.
I also don't get errors (php or in apache)

Anyone got any ideas ?
by chris
Fri Feb 09, 2018 9:52 pm
Forum: SQL
Topic: SOLVED: update query update from another table
Replies: 2
Views: 16244

Re: update query update from another table

Yes, you can with update:

here is an example:

Code: Select all

UPDATE update_table AS a, source_table AS b SET a.update_column=b.source_table WHERE a.id=b.id;
by chris
Sat Feb 03, 2018 9:25 pm
Forum: HTML
Topic: HTML CSS show li items in multiple columns
Replies: 1
Views: 14657

Re: HTML CSS show li items in multiple columns

You can use CSS and set inline-block ( with fixed width ) It will set the Li-element next to each other, and with fixed-width it will look like columns. li {display: inline-block; width:200px;} You can also play with the following in CSS, but the support depends on browser. columns: 2; -webkit-colum...
by chris
Tue Jan 30, 2018 8:44 pm
Forum: SQL
Topic: SOLVED : Drop table fails
Replies: 2
Views: 13064

Re: Drop table fails

The foreign key is actually on another table; Use this command to find it: SELECT * FROM information_schema.table_constraints WHERE constraint_schema = 'DATABASE_NAME' AND constraint_type = 'FOREIGN KEY' ; Once you find it, you can remove it on that table: ALTER TABLE other_table DROP FOREIGN KEY co...
by chris
Thu Jan 11, 2018 2:56 pm
Forum: Shell
Topic: SOLVED : Bash remove trailing digits
Replies: 2
Views: 12923

Re: Bash remove trailing digits

Thanks that is what I was looking for :-)
by chris
Tue Jan 09, 2018 10:06 pm
Forum: Shell
Topic: SOLVED : Bash remove trailing digits
Replies: 2
Views: 12923

Re: Bash remove trailing digits

You can use

Code: Select all

VARIABLE="test 556";

VARIABLE=${VARIABLE//[0-9]/};
But this will remove all digits not only at the end.

Better is to use sed

Code: Select all

VARIABLE=`echo $VARIABLE | sed -e 's/[0-9]*$//g'`;
by chris
Fri Dec 22, 2017 8:24 pm
Forum: Servers
Topic: Error while writing to "/var/log/procmail.log"
Replies: 0
Views: 27409

Error while writing to "/var/log/procmail.log"

Hello,

I have a error message in my logs :

Code: Select all

procmail: Error while writing to "/var/log/proclog.log"
Put the user postfix owns the file and has writing permissions.
I don't understand.
by chris
Wed Dec 06, 2017 10:10 pm
Forum: Servers
Topic: bind forward one hostname to another host
Replies: 1
Views: 11678

Re: bind forward one hostname to another host

Almost correct,
You need to add CNAME

Code: Select all

foo.example.com.    IN   A           192.168.1.1
bar.example.com.    IN   CNAME   foo.example.com.