Mas preciso passar ela pra um seridor onde o PHP está em ambiente seguro e com o safemode em ON. E ela não funciona.não cria as galerias ou os álbuns.
Como farei pra que funcione onde o safe mode esteja em ON.
Se alguem souber favor passar pra mim como fazer isso. agradeço desde já.Obrigado
usei este script aqui indicado:
http://phpbrasil.com...ipt.php/id/3198
Deu este erro.
Tem idéia do q aconteceu?? ou melhor como resolvo isso
Fatal error: Cannot redeclare checkinputarray() (previously declared in C:\Inetpub\vhosts\festasnachacara.com.br\httpdocs\galeria\images\globals.inc.php:25) in C:\Inetpub\vhosts\festasnachacara.com.br\httpdocs\galeria\images\globals.inc.php on line 25
Alinha do erro no script é esta:
25 function checkInputArray( &$array, $globalise=false ) {
26 static $banned = array( '_files', '_env', '_get', '_post', '_cookie', '_server', '_session', 'globals' );
O escript é este aqui, o globals.inc.php
1 <?php
2 /**
3 * @version $Id: globals.php-off 47 2005-09-15 02:55:27Z rhuk $
4 * @package Joomla
5 * @copyright Copyright © 2005 Open Source Matters. All rights reserved.
6 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
7 * Joomla! is free software and parts of it may contain or be derived from the
8 * GNU General Public License or other free or open source software licenses.
9 * See COPYRIGHT.php for copyright notices and details.
10 */
11
12 /**
13 * Use 1 to emulate register_globals = on
14 *
15 * Use 0 to emulate regsiter_globals = off
16 */
17 define( 'RG_EMULATION', 0 );
18
19 /**
20* Adds an array to the GLOBALS array and checks that the GLOBALS variable is
21 * not being attacked
22 * @param array
23 * @param boolean True if the array is to be added to the GLOBALS
24 */
25 function checkInputArray( &$array, $globalise=false ) {
26 static $banned = array( '_files', '_env', '_get', '_post', '_cookie', '_server', '_session', 'globals' );
27
28 foreach ($array as $key => $value) {
29 if (in_array( strtolower( $key ), $banned ) ) {
30 die( 'Illegal variable <b>' . implode( '</b> or <b>', $banned ) . '</b> 31passed to script.' );
32 }
33 if ($globalise) {
34 $GLOBALS[$key] = $value;
35 }
36 }
37}
38
39/**
40 * Emulates register globals = off
41 */
42function unregisterGlobals () {
43 checkInputArray( $_FILES );
44 checkInputArray( $_ENV );
45 checkInputArray( $_GET );
46 checkInputArray( $_POST );
47 checkInputArray( $_COOKIE );
48 checkInputArray( $_SERVER );
49
50 if (isset( $_SESSION )) {
51 checkInputArray( $_SESSION );
52 }
$REQUEST = $_REQUEST;
$GET = $_GET;
$POST = $_POST;
$COOKIE = $_COOKIE;
if (isset ( $_SESSION )) {
$SESSION = $_SESSION;
}
$FILES = $_FILES;
$ENV = $_ENV;
$SERVER = $_SERVER;
foreach ($GLOBALS as $key => $value) {
if ( $key != 'GLOBALS' ) {
unset ( $GLOBALS [ $key ] );
}
}
$_REQUEST = $REQUEST;
$_GET = $GET;
$_POST = $POST;
$_COOKIE = $COOKIE;
if (isset ( $SESSION )) {
$_SESSION = $SESSION;
}
$_FILES = $FILES;
$_ENV = $ENV;
$_SERVER = $SERVER;
}
/**
* Emulates register globals = on
*/
function registerGlobals() {
checkInputArray( $_FILES, true );
checkInputArray( $_ENV, true );
checkInputArray( $_GET, true );
checkInputArray( $_POST, true );
checkInputArray( $_COOKIE, true );
checkInputArray( $_SERVER, true );
if (isset( $_SESSION )) {
checkInputArray( $_SESSION, true );
}
foreach ($_FILES as $key => $value){
$GLOBALS[$key] = $_FILES[$key]['tmp_name'];
foreach ($value as $ext => $value2){
$key2 = $key . '_' . $ext;
$GLOBALS[$key2] = $value2;
}
}
}
if (RG_EMULATION == 0) {
// force register_globals = off
unregisterGlobals();
} else if (ini_get('register_globals') == 0) {
// php.ini has register_globals = off and emulate = on
registerGlobals();
} else {
// php.ini has register_globals = on and emulate = on
// just check for spoofing
checkInputArray( $_FILES );
checkInputArray( $_ENV );
checkInputArray( $_GET );
checkInputArray( $_POST );
checkInputArray( $_COOKIE );
checkInputArray( $_SERVER );
if (isset( $_SESSION )) {
checkInputArray( $_SESSION );
}
}
?>
Edição feita por: carlos, 03/11/2006, 13:02.