Search found 199 matches

by chris
Mon May 07, 2018 6:17 pm
Forum: PHP
Topic: SOLVED: PHP file_put_contents not writing to /tmp
Replies: 1
Views: 18479

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: 18479

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: 22190

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: 20073

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: 18916

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: 18746

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: 18746

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: 47008

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: 24853

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.
by chris
Sun Nov 19, 2017 8:07 pm
Forum: HTML
Topic: html CSS style second line spacing
Replies: 1
Views: 20033

Re: html CSS style second line spacing

Found a solution.

Code: Select all

li {
    list-style-type: disc;
    list-style-position: inside;
    text-indent: -4em;
    padding-left: 5em;
}