August 2009

Disable PHP's Bad Features

Register Globals (register_globals):
Whether or not to register the EGPCS (Environment, GET, POST, Cookie, Server) variables as global variables.
We cannot disable register_globals from the script side (using ini_set, like we normally might), but we can use an .htaccess files to do this. Some hosts also allow you to have a php.ini file on the server.

Disabling with .htaccess
php_flag register_globals 0

Disabling with php.ini
register_globals = Off
 

Develope Bangla Unicode based Web Application using PHP-MySQL

1 .Make the database and Tables with CHARACTER utf8 and collation_connection =’utf8_general_ci’
2 . Must add following two lines just after selecting the database, i.e mysql_select_db() function:
mysql_query(’SET CHARACTER SET utf8′);
mysql_query(”SET SESSION collation_connection =’utf8_general_ci’”);
4 . Set the META-TAG as “Content-Type: text/html; charset=UTF-8″