Home  >  Article  >  Backend Development  >  dedecms php.ini register_globals must is Off_PHP tutorial

dedecms php.ini register_globals must is Off_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:53:47765browse

dedecms php.ini register_globals must is Off

The way is to go directly to include/common.inc.php tutorial

----
//Disable session.auto_start
if ( ini_get('session.auto_start') != 0 )
{
exit('php.ini session.auto_start must is 0 ! ');
}
----
Delete.

==================
After deleting this, search further down. . .
There is another place
if ( ini_get('register_globals') )
{
exit('php.ini register_globals must is Off! ');
}

It can be solved perfectly after deleting it.

The parts that need to be deleted are:
1. Lines 10-20
//Enabling register_globals will have many unsafe possibilities, so it is mandatory to close register_globals
if ( ini_get('register_globals') )
{
exit('php.ini register_globals must is Off! ');
}

//Disable session.auto_start
if ( ini_get('session.auto_start') != 0 )
{
exit('php.ini session.auto_start must is 0 ! ');
}

2. Lines 72 to 75
if ( ini_get('register_globals') )
{
exit('php.ini register_globals must is Off! ');
}

Delete the above two points to solve the problem perfectly!

Search for this item in apche's php.ini. Yours should be register_globals = on. Change it to register_globals = off. Save and restart the server environment. For example, restart apche

The morning update is mainly to strictly filter register_globals and session.auto_start
If you are a standalone server user, you can modify php.ini in the php configuration file and change register_globals=On to register_globals=Off
At the same time, change session.auto_start=1 to session.auto_start=0, and then restart Apache.
If you are a virtual host user, please notify the space provider as much as possible to let them modify the configuration, or you can try ini_set('session.auto_start',0).
If that doesn't work, the only last resort is to go directly to include/common.inc.php

----
//Disable session.auto_start
if ( ini_get('session.auto_start') != 0 )
{
exit('php.ini session.auto_start must is 0 ! ');
}

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632370.htmlTechArticlededecms php.ini register_globals must is Off. The method is to go directly to include/common.inc.php tutorial --- - //Disable session.auto_start if ( ini_get('session.auto_start') != 0 ) { exit('ph...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn