Hai Friends i need to turn magic quotes gpc off but my host not allows me changes through htacess files 
php vers is 5.3.x can anyone tell me how to turn off it in using the php code i this file ?
	
							
						
					php vers is 5.3.x can anyone tell me how to turn off it in using the php code i this file ?
PHP Code:
	
	
<?
if (function_exists('ini_set'))
{
ini_set('display_errors',0); // отключаем показ ошибок
ini_set('register_globals', 0); // вырубаем глобальные переменные
ini_set('session.use_cookies', 1); // используем куки для сессий
ini_set('session.use_trans_sid', 1); // используем url для передачи сессий
ini_set('arg_separator.output', '&'); // разделитель переменных в url (для соответствия с xml)
}
if (ini_get('register_globals')) {
// принудительно вырубаем глобальные переменные
$allowed = array('_ENV' => 1, '_GET' => 1, '_POST' => 1, '_COOKIE' => 1, '_FILES' => 1, '_SERVER' => 1, '_REQUEST' => 1, 'GLOBALS' => 1);
foreach ($GLOBALS as $key => $value) {if (!isset($allowed[$key]))unset($GLOBALS[$key]);}
}
list($msec, $sec) = explode(chr(32), microtime()); // время запуска скрипта
$conf['headtime'] = $sec + $msec;
define('DCMS_USE_MBSTRING', function_exists('mb_get_info'));
define('DCMS_USE_ICONV', function_exists('iconv'));
define('DCMS_USE_FFMPEG', class_exists('ffmpeg_movie'));
define('DCMS_USE_MCRYPT', function_exists('mcrypt_cbc'));
define('DCMS_USE_MYSQL', function_exists('mysql_info'));
define('DCMS_USE_GD', function_exists('gd_info'));
define('DCMS_SET_TIME_LIMIT', function_exists('set_time_limit'));
define('DCMS_USE_ERROR_REPORTING', function_exists('error_reporting'));
define('DCMS_CURL', function_exists('curl_init'));
define('DCMS_CURL_MULTI', function_exists('curl_multi_init'));
define('DCMS_TIME', time()); // текущее время
define('DCMS_TIME_TODAY',mktime(0, 0, 0)); // время на начало суток
$time=DCMS_TIME;
if (!DCMS_USE_MYSQL) die('Расширение MySQL недоступно');
if (DCMS_USE_ERROR_REPORTING)@error_reporting(0); // отключаем показ ошибок
// Ставим ограничение для выполнения скрипта на 60 сек
if (DCMS_SET_TIME_LIMIT)@set_time_limit(60);
if (DCMS_USE_MBSTRING)mb_internal_encoding('UTF-8');
if (DCMS_USE_ICONV)iconv_set_encoding('internal_encoding', 'UTF-8');
$phpvervion=explode('.', phpversion());
$conf['phpversion']=$phpvervion[0];
$upload_max_filesize=ini_get('upload_max_filesize');
if (preg_match('#([0-9]*)([a-z]*)#i',$upload_max_filesize,$varrs))
{
if ($varrs[2]=='M')$upload_max_filesize=$varrs[1]*1048576;
elseif ($varrs[2]=='K')$upload_max_filesize=$varrs[1]*1024;
elseif ($varrs[2]=='G')$upload_max_filesize=$varrs[1]*1024*1048576;
}
?>
 how to close this via script
 how to close this via script
							
						 But if it can't solve that problem via php.ini and htaccess than its not problem due to get_magic_quotes_gpc().
 But if it can't solve that problem via php.ini and htaccess than its not problem due to get_magic_quotes_gpc().  
							
						
Comment