register_globals on servers with SuExec

November 19th, 2009

First of all allowing register_globals on, on a server is real stupid, it is a security risk that no hosting company should accept, but sometimes for old scripts it is necessary to have it on, in this case should be enabled on the customer account on the .htaccess file or if the server is running with SuExec support then on the php.ini file.

Usually entering the line:

register_globals=on

to the php.ini on the public_html should work, but on some servers we have noticed that this is not working. Unfortunately we do not know the exact reason for this issue, but we have another method to enable this.

First create a file called php5.cgi and add the following in it.

#!/bin/sh
exec /usr/local/cpanel/cgi-sys/php5 -c /home/account-username/public_html/php.ini

(change the user names, and copy the php.ini file in to the public_html)
Then add the following lines in the .htaccess file.

Options All -Indexes
AddHandler application/x-httpd-php5 .php
Action application/x-httpd-php5 /php5.cgi

Could not reserve enough space for object heap

November 18th, 2009

While restarting the red5 service on the server, If you get following error

——————BEGIN SESSION——————
root@server [~]# cd /usr/local/red5/dist
root@server [/usr/local/red5/dist]#./red5.sh &
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
===============================

Then the best solution for this error is to use the following command. This command will increase the java heap size.

Quote:
root@server [/]#export _JAVA_OPTIONS=”-Xms20m -Xmx64m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:NewSize=10m -XX:MaxNewSize=10m -XX:SurvivorRatio=6 -XX:TargetSurvivorRatio=80 -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled”

Be sure that it ends with a ” if it is missing add it manually. Then restart the red5

Quote:

root@server [~]# cd /usr/local/red5/dist
root@server [/usr/local/red5/dist]#./red5.sh &

If you are facing same problem “Error occurred during initialization of VM” again and again on the server then the problem is with the ulimit setting. If it is a cpanel/WHM server then add the following code in the start of the /etc/profile file.

Quote:
#cPanel Added Limit Protections — BEGIN

#unlimit so we can run the whoami
ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null

LIMITUSER=$USER
if [ -e "/usr/bin/whoami" ]; then
LIMITUSER=`/usr/bin/whoami`
fi
if [ "$LIMITUSER" != "root" ]; then
ulimit -n 100 -u 20 -m 200000 -d 200000 -s 8192 -c 200000 -v 200000 2>/dev/null
else
ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null
fi
#cPanel Added Limit Protections — END

Save and exit.

Log out and login again (or start another session) for these changes to take effect.

Installing red5, the simple way!

October 21st, 2009

It is not working any more, some files have been changed and our installer is now outdated, soon we will fix the issue. January 2010.

The following steps are intended to automate the installation of Red 5 versions 0.5 , 0.6.3 and 0.7.0 .
I know there is now 0.8 and even 0.9 versions but if your script doesnt need them go for the stable versions, 0.7 is my favorite.
1. Download the red5 installer script ,

Quote:
wget http://ffmpeg-hosting.net/red5_install

Note : Do not download the script to some location where every one can access it as someone may execute it and overwrite an old installation !

2. Make it executable,

Quote:
chmod +x red5_install

3. Execute the script,

Quote:
./red5_install

When the script is executed, it would ask for the red5 version to be installed. There are 3 choices as of now.. 0.7.0 , 0.6.3 and 0.5
Make the choice by entering the digits 1, 2 or 3 . Pressing any other key will select the latest version , 0.70 .

Quote:
# ./red5_install

Hello ,Please choose the RED5 version : (1,2,3 or 4)

1. RED5 0.7.0
2. RED5 0.6.3
3. RED5 0.5
Press Any other key to install 1. RED5 0.7.0

After the version is selected, the process is automated . If everything goes well, you will see something similar to the following as the last line,

Quote:
[DEBUG] 5467 main org.red5.server.Standalone.debug ) Startup done in: 5468 ms

Here the time ‘5648 ms’ may vary with different versions and servers. You can exit from this screen by entering the key combination of control and c (^c) as this should shutdown the red5 server normally.

Else if you get any error please leave a word at our help desk and we can install it for you.

If everything goes right, then red5 would be installed in /usr/local/red and it can be started by executing,

Quote:
./red5.sh &

to stop it

Change permissions to 755 of the file red5-shutdown.sh which is inside /usr/local/red

then ./red5-shutdown.sh

You will need to stop red5 after you upload your application to /usr/local/red/webapps

stop red5 and start it again so your application will be activated. after starting the red5 server, and when it arrives to “Startup done in: 5468 ms” log off from the terminal window CTRL  A+D

If you need any help contact support.

Convert Joomla to Spanish Language

October 16th, 2009

Estoy escribiendo esto para todos aquellos que deseen transformar sus websites (estructurados con Joomla y Jomsocial) de su versión original en inglés a su versión en Español. Debido a que encontré pocas pero bastante obscuras respuestas y debido también a que me costó un montón de café y adrenalina, expongo el método que descubrí para que todos se ahorren el mal rato.

1. Instalación del paquete de Español

1. Bájese la versión en Español de Joomla. Por ejemplo, Joomla_1.5.14-Spanish-pack_completo.

2. Localice el folder Joomla_1.5.14-Spanish-pack_completo\language\es-ES

3. Suba el folder entero a /public_html/language al servidor que aloja su website usando un programa para trasladar archivos entre el FTP de su website y su computadora. Yo uso FileZilla.

4. En el panel administrativo de Joomla, el paquete de Español estará ya disponible. Hágase de este el lenguaje oficial (”default”) usando el Language Manager.

Con esto se obtiene parte del texto en Español, como este:

2. Problema con la representación de símbolos Español.

El problema con el Español es que, sea cual sea el método para cargar los documentos .ini en el servidor que alberga el website, las tildes, las eZes, los signos de exclamación, etc, aparecen substituidos por símbolos extraZos. Después de lidiar con este problema por un día completo, entendí finalmente lo que estaba pasando. Cualquiera que haya sido el método usado para producir los documentos .ini estos fueron forzados a ser guardados en un formato llamado “UTF-8″. Lo pasó conmigo y posiblemente pasa con la mayoría de la gente, es que en algún momento nos vemos obligados a traducir la información a partir de los documentos en inglés, de tal manera que en el website no aparezca “user” sino “usuario”. Para hacer esto, usamos nuestro bien conocido Windows Wordpad, por ejemplo. Al re-guardar el archivo, de alguna manera se pierde este formato. Resolví el problema haciendo lo siguiente:

1. Ir a sourceforge.net

2. Bajar el programa Notepad ++   (http://sourceforge.net/search/?type_of_search=soft&words=notepad)

3. Una vez instalado, abrir el archivo .ini que lleva la traducción. Si se hace clic en Format, en el menu principal, el programa indicara el formato actual del documento. Como yo re-edite mi documento .ini en Windows Wordpad, el formato que se leía era Encode in ANSI.

4. Escoger el comando Format/Convert to UTF-8

5. Guardar el documento.

Si se desea se puede comprobar que esta vez se lee Encode in UTF-8.

Este documento estará listo para ser subido al website

3. Español para Jomsocial

Para traducir los títulos de la interface de Jomsocial al Español, subir (y substituir si es necesario) el documento es-ES.com_community.ini en el folder /public_html/language/es-ES del servidor que debió haberse creado después del paso 1 (arriba)

El documento que yo adjunto, es ajeno y lo encontré en alguna parte del internet. Supongo que está bien ofrecerlo en tanto no reclame derechos sobre él. Este documento está ya convertido al formato UTF-8, así que debe ser subido sin ser abierto.

Download es-ES.com_community.ini

Article written by Pablo from Latin Face

How to stop, start or restart red5

September 28th, 2009

Important commands for the red5:

Login to ssh and enter the following commands.

#cd  /usr/local/red   (takes you to the red5 folder)

to stop red5:
#service red5 stop
or
#./red5-shutdown.sh

the command to start red5:
#./red5.sh &

When you see this line:
2009-09-27 23:26:32,365 [main] INFO  org.red5.server.Standalone – Startup done i
n: 5464 ms   (it will be easy because the lines will stop running at this point)

Wait 15 seconds
Then you must log off from the terminal screen
Press ctrl+A+D (if you don’t log off, after a while red5 will go down again)

Every time you put some folder on /red5-server folder/webapps/ you will need to restart the red5.

Red5 Hosting