register_globals on servers with SuExec

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 with 755 permissions 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

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

——————BEGIN SESSION——————
root@server [~]# cd /usr/local/red5
root@server [/usr/local/red5]#sh 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 is to increase the RAM available to the red5. Locate red5.sh, it is on the red5 folder and replace this line:

Code:
export JAVA_OPTS="$LOGGING_OPTS $SECURITY_OPTS $JAVA_OPTS"

with

Code:
export JAVA_OPTS="-Xms512m -Xmx1024m $LOGGING_OPTS $SECURITY_OPTS $JAVA_OPTS"
And restart red5.sh
On our server s at Hosting Marketers, and Red5 Server we actually give more RAM to red5:
Xms1024m and Xmx2048m
This really depends on the kind of machine you have and the RAM available.