29 dezembro, 2013

Drupal: "WARNING: You are not using an encrypted connection, so your password will be sent in plain text"

If your trying to install new themes or a new module and you don't have a ftp server installed you'll probably see this warning: "WARNING: You are not using an encrypted connection, so your password will be sent in plain text".
How to solve it quickly in linux:
Open a terminal and copy-past this:
sudo apt-get install vsftpd

Now that you have a ftp server running in your machine, uncomment the following lines ( = delete # from the lines):
local_enable=YES
write_enable=YES
present in the file vsftpd.conf :
- open the file in your favorite editor: nano, kate, gedit...:  
sudo nano /etc/vsftpd.conf

Save the changes in vsftpd.conf and restart the server:
sudo service vsftpd restart

Now, you can insert your linux username and password to fill the forms.

Solution found in: http://drupalalsur.org/apuntes/solucion-al-warning-you-are-not-using-encrypted-connection
My current linux distro: kubuntu 13.10.

18 dezembro, 2013

Apache2, MariaDB, PHP5, PHPMyAdmin + Drupal 8


Avisos: Warning
- Estou a usar Linux, Kubuntu 13.10, 64bit.
I'm using Linux, Kubuntu 13.10, 64bit.
- Estes passos são só para uso domestico
this steps are only for domestic use.

Apache2
sudo apt-get install apache2

MariaDB
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://mirrors.fe.up.pt/pub/mariadb/repo/10.0/ubuntu saucy main'
sudo apt-get update

sudo apt-get install mariadb-server

PHP5
sudo apt-get install php5 php5-mysql libapache2-mod-php5
Instalar outros modulos opcionais [install optional modules]
- verificar modulos disponiveis [check available modules]: apt-cache search php5
- instalar modulos [install modules]: sudo apt-get install php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

PhpMyAdmin
sudo apt-get install phpmyadmin

Configurar [configure] Apache:
- abrir o ficheiro [open the filel]: /etc/apache2/apache2.conf.
- incluir a seguinte linha [include the following line in]: Include /etc/phpmyadmin/apache.conf

Reiniciar [restart] Apache: sudo services apache2 restart

Se tiverem o seguinte problema ao tentar aceder ao phpmyadmin [If you had the following problem when I try to access phpmyadmin]:
ERROR 1045 (28000): Access denied for user 'root'@'localhost'
a solução que encontrei foi [the solution I found was]:
mysql -u root -p

Se for preciso reinstalar [if you need to reinstall] phpmyadmin: sudo dpkg-reconfigure phpmyadmin

Drupal
1- Download Drupal
2- Por omissão as páginas são guardadas em [By default the pages will be stored in] /var/www/, se não se quiser alterar isto, é preciso tomar posse da directoria [if you don't want to change that you'll need to take ownership of the directory]: sudo chown your_username /var/www/
3- Extrair o drupal para [extract drupal to]: /var/www/
4- No browser ir para [In your browser, go to]: localhost/'your_drupal_directory'
e correr o instalador [and run the installer].
5- Vai aparecer um erro devido há inexistencia de uma directoria [you'll get an error because some directory does not exit]:
mkdir /var/www/'your_drupal_directory'/sites/default/files
6- chmod 777 files voltar a carregar a pagina[and reload the page].
7- cp ./sites/default/default.settings.php ./sites/default/settings.php
8- chmod 777 settings.php

Configuração da Base de Dados [Database Conf]
phpmyadmin -> Base de Dados -> Create database -> "my_db_name" -> Clique Go