Area personale

 

Tag

 

Ultime visite al Blog

taichungmonellaccio19amorino11m12ps12acer.250miriade159prefazione09Marion20cassetta2limitedelbosco0marabertowjoerivetto6surfinia60Catter1na
 

Ultimi commenti

 
Creato da: taichung il 12/01/2011
Linux Drupal Pinephone Freerunner Android

 

 

PHP, change default email sender and address

Post n°56 pubblicato il 29 Luglio 2017 da taichung
 

The php.ini file lets you configure the default sender (the From in the email header) and email address

If you have multiple php.ini files (for example one for cli, one for apache, etc), you need to find the right one for your purpose or even change 'em all.

EX: You want to set the From field instead of thedefault www-data to noreply, and the email address of the sender as noreply@mydomain.net in a Linux system (for Windows it's different).

To accomplish this, add the following line in your php.ini file:
sendmail_path ='/usr/sbin/sendmail -t -i -fnoreply@mydomain.net -Fnoreply'

Where:
-F "name": Sets the name to put in the From: header.
-f address: Sets the From: address. This is just the E-mail address only, not the name.


Save, reboot all the involved services (webserver, php-fpm...) and you're done

Reference: http://www.courier-mta.org/sendmail.html
 
Condividi e segnala Condividi e segnala - permalink - Segnala abuso
 
 

Drush on Openshift

Post n°55 pubblicato il 01 Marzo 2017 da taichung
 

Because often, despite the quick start procedure, Openshift isn't able to correctly deploy a fresh Drupal 7 installation (for example doesn't provide the default user and password), we can try to install drush (another missing feature). After logging in through ssh to your application, add to app-root/data/.bash_profile:

PATH="$HOME/.composer/vendor/bin:$PATH"

Now we install drush through composer:

composer global require drush/drush:7.*

Dont'worry about composer complaining that it's not updated.

Re-read your bash_profile so that the installation path of drush will be known by the system:

. app-root/data/.bash_profile

All done, now drush should be in your PATH and you can verify by typing the command drush --help

If anything went wrong, check http://docs.drush.org/en/7.x/install/

This, like other bugs on Drpal installation on Openshift, has been already claimed to be solved several times, but as I've experimented, it's not...

 
Condividi e segnala Condividi e segnala - permalink - Segnala abuso
 
 

Drupal 7 numero di collegamenti (shortcut) sulla dashboard

Post n°54 pubblicato il 19 Settembre 2016 da taichung
 
Tag: Drupal

Il numero di collegamenti inseribili nella dashboard in alto in Drupal 7 è fissato a 7. Per modificare tale valore è necessario modificare il file modules/shortcut/shortcut.admin.inc, linea 16 da:

return variable_get('shortcut_max_slots', 7);

A

 

return variable_get('shortcut_max_slots', 10);

In tal modo ho ora a disposizione 10 slot per i miei collegamenti. Per rendere effettive le modifiche, oltre a salvare il file, è bene scollegarsi dal sito e poi ricollegarsi, oltre che a cancellare la cache del browser.

 
Condividi e segnala Condividi e segnala - permalink - Segnala abuso
 
 

Sostituire una stringa di testo in tutti i file in tutte le sotto cartelle

Post n°53 pubblicato il 25 Gennaio 2016 da taichung
 

Il seguente insieme di comandi mi permette di ricercare all'interno di tutti i file ascii (di testo) in tutte le cartelle e sotto cartelle, una stringa di testo, e poi sostituirla con un'altra. Per esempio, se volessi sotituire la stringa di testo foo con bar, dovrei lanciare:

grep -ri -l foo . | xargs sed -i 's/foo/bar/g'

 

Utilissimo per esempio per sostituire il nome di una funzione ricorrente in diversi file.

 
Condividi e segnala Condividi e segnala - permalink - Segnala abuso
 
 

Aggiungere suffisso a tutti i file di una cartella

Post n°51 pubblicato il 25 Gennaio 2016 da taichung
 

Si può usare uno script del fenere, per aggiungere il suffisso -2 a tutti i file della cartella con estensione .png:

for file in *.png ; do mv "${file}" "${file%.png}-2.png"; done

 

Il risultato è che per es, il file pippo.png viene rinominato in pippo-2.png

 
Condividi e segnala Condividi e segnala - permalink - Segnala abuso
 
 

Cerca in questo Blog

  Trova
 
RSS (Really simple syndication) Feed Atom
 

Archivio messaggi

 
 << Luglio 2024 >> 
 
LuMaMeGiVeSaDo
 
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
 
 

Sponsored link

 

Sponsored link

Inchiostro stampanti varie marche a prezzi competitivi

 

© Italiaonline S.p.A. 2024Direzione e coordinamento di Libero Acquisition S.á r.l.P. IVA 03970540963