Mostrando entradas con la etiqueta web. Mostrar todas las entradas
Mostrando entradas con la etiqueta web. Mostrar todas las entradas

20110312

Joomla! Warning: Failed to move file!

Esta tarde he estado 'jugando' un rato con Joomla! sólamente para darme cuenta de la cantidad de lagunas que tengo en cantidad de materias.
La cosa es que he realizado una instalación de juguete utilizando el paquete XAMPP, que simplifica bastante la cosa. En muchos sitios he encontrado como realizar la instalación, pero al instalar módulos obtenía el siguiente error:
Warning: Failed to move file!

Como muchas otros sitios te contarán, instalar Joomla es tan sencillo como:
1.- descargar e instalar el paquete de XAMPP (yo lo suelo dejar en /opt como ya dije)
2.- descargar e instalar el paquete de Joomla! (lo dejo dentro /opt/lampp/htdocs/)
3.- Y a correr.

Pero claro, algunos sistemas operativos se toman más en serio el tema de los permisos que otros. El problema está en que los permisos de los ficheros que has descomprimido normalmente serán:
drwxr-xr-x  tuUsuario tuGrupo para los directorios
-rw-r--r--  tuUsuario tuGrupo para los archivos

En algunos sitios te sugieren hacer un chmod 777 para evitarte problemas, pero si tú eres de los que creen que esto en lugar de evitarlos los genera, te recomiendo no caer en la tentación.
Teniendo en cuenta que Apache se ejecuta con el usuario nobody y el grupo nogroup, lo que he hecho ha sido lo siguiente:
for i in `find . -type d`; do sudo chmod 770 $i; sudo chgrp nogroup $i; done
for i in `find . -type f`; do sudo chmod 660 $i; sudo chgrp nogroup $i; done

Con esto los permisos debería quedarte así:
drwxrwx---  tuUsuario nogroup para los directorios
-rw-rw----  tuUsuario nogroup para los archivos

De esta forma, el usuario propietario del proceso httpd de Apache podrá escribir en la instalación de Joomla!, y tú con tu usuario también.

This evening I've been 'playing' for a while with Joomla! just to realize that I have a lot to learn.
I'm using XAMPP to serve Joomla! on my laptop, but just after install both (XAMPP and Joomla!) and trying to install a module I got the following error:
Warning: Failed to move file!

As you could read in most sites to install the you just have to follow this steps:
1.- download and install the XAMPP package (I usually put it on /opt as I wrote before)
2.- download and install Joomla! package (inside the /opt/lampp/htdocs/ folder)
3.- And that's all folks.

But after that, the permissions on your files and/opt folders look like this:
drwxr-xr-x  yourUser yourGroup for the folders
-rw-r--r--  yourUser yourGroup for the files

You'll see some site that solve this problem using chmod 777, but I you're one of those who care about security I'll suggest to do the following:
for i in `find . -type d`; do sudo chmod 770 $i; sudo chgrp nogroup $i; done
for i in `find . -type f`; do sudo chmod 660 $i; sudo chgrp nogroup $i; done
 
After that, your permissions will look like this:
drwxrwx---  yourUser nogroup for the folders
-rw-rw----  yourUser nogroup for the files

With that, you'll be able to modify the Joomla files, and Joomla! too.

PS. I know, I know. My English is not good enought but, the more you help me, the more I learn.

20110227

XAMPP - SO + Apache + MySQL + PHP + Perl

Según su propia web, XAMPP es una forma fácil de instalar la distribución Apache que contiene MySQL, PHP y Perl. XAMPP es realmente simple de instalar y usar - basta descargarlo, extraerlo y comenzar.
Es multiplataforma y está disponible para GNU/Linux, MS Windows, Mac OS y SUN/Oracle Solaris. Está pensado para desarrolladores web, de forma pueden probar sus desarrollos sin la necesidad de complicarse con la instalación de estos servidores.
Los pasos que he seguido para la primera ejecución han sido:

1.- descarga del software de la página del producto
cd ~/descargas
wget http://www.apachefriends.org/download.php?xampp-linux-1.7.4.tar.gz

2.- lo descomprimimos
sudo tar xzf xampp-linux-1.7.4.tar.gz -C /opt

3.- y lo ejecutamos
/opt/lampp/lampp start
Y ya podemos acceder http://localhost (o https según sea el caso) para acceder a la página principal.

Ejecutando /opt/lampp/lampp nos devuelve un buen abanico de opciones de inicio.
Si queremos conectarnos con el cliente de MySQL desde la línea de comandos y obtenemos el siguiente error:

bdispatcher@tatil02:/opt/lampp$ mysql 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Lo único que tenemos que hacer el modificar la entrada socket en el fichero my.cnf de nuestra instalación para que apunte al socket de XAMPP:

bdispatcher@tatil02:/opt/lampp$ sudo find /opt/lampp/ -iname "*.sock*"
/opt/lampp/var/mysql/mysql.sock



As is written in its own web, XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use - just download, extract and start.
It's available for GNU/Linux, MS Windows, Mac OS and SUN/Oracle Solaris. It's pointed to the web developers who want an easy way to test and deploy their web applications.
Those are the steps followed to install and boot this server:

1.- download the package from the official website
cd ~/downloads
wget http://www.apachefriends.org/download.php?xampp-linux-1.7.4.tar.gz

2.- unpack it
sudo tar xzf xampp-linux-1.7.4.tar.gz -C /opt

3.- and boot it
/opt/lampp/lampp start

Now we can point our favorite web browser to http://localhost (or https) to access to the main page.
Typing /opt/lampp/lampp we get the full list of options.
Now if we try to reach the MySQL server but we get the following error:

bdispatcher@tatil02:/opt/lampp$ mysql 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

We just have to modify the socket parameter on our my.cnf with the right path to the XAMPP socket:

bdispatcher@tatil02:/opt/lampp$ sudo find /opt/lampp/ -iname "*.sock*"
/opt/lampp/var/mysql/mysql.sock

PS: If your English is better than mine and you find some mistakes, please tell me about them.