Page 1 of 1
joomla
Posted: Mon May 07, 2007 6:06 am
by red
Hi,
As i am new to this form,Please anybody can help me how to use Joomla Uploaded files.
Joomla all files are uploaded through Server.
My main problem is ,when i open uploaded Joomla in browser error is displayed.
Parse error: syntax error, unexpected '=' in /home/kaverico/public_html/joomla1/globals.php on line 117
The Joomla1 file is also missing,what is the Error unexpected '=' .
How to solve this, Please help to correct this error and Use Joomla CMS.
Thanks in Advance.

Posted: Mon May 07, 2007 6:44 am
by volka
red wrote:Parse error: syntax error, unexpected '=' in /home/kaverico/public_html/joomla1/globals.php on line 117
Parse error means there's a syntax error in your script.
Please post line 110 to 120 of the file globals.php
Posted: Mon May 07, 2007 10:15 am
by Arawn
Did you upload (FTP) the PHP files as ASCII? A lot of FTP clients will transfer PHP files as binary by default.
joomla
Posted: Tue May 08, 2007 12:40 am
by red
feyd | Please use Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
[quote="volka"][quote="red"]Parse error: syntax error, unexpected '=' in /home/kaverico/public_html/joomla1/globals.php on line 117 [/quote]Parse error means there's a syntax error in your script.
Please post line 110 to 120 of the file globals.php[/quote]
This is my globals.php in Joomla package.
Code: Select all
<?php
defined( '_VALID_MOS' ) or die( 'Restricted access' );
define( 'RG_EMULATION', 1 );
function checkInputArray( &$array, $globalise=false ) {
static $banned = array( '_files', '_env', '_get', '_post', '_cookie', '_server', '_session', 'globals' );
foreach ($array as $key => $value) {
$intval = intval( $key );
// PHP GLOBALS injection bug
$failed = in_array( strtolower( $key ), $banned );
// PHP Zend_Hash_Del_Key_Or_Index bug
$failed |= is_numeric( $key );
if ($failed) {
die( 'Illegal variable <b>' . implode( '</b> or <b>', $banned ) . '</b> passed to script.' );
}
if ($globalise) {
$GLOBALS[$key] = $value;
}
}
}
function unregisterGlobals () {
checkInputArray( $_FILES );
checkInputArray( $_ENV );
checkInputArray( $_GET );
checkInputArray( $_POST );
checkInputArray( $_COOKIE );
checkInputArray( $_SERVER );
if (isset( $_SESSION )) {
checkInputArray( $_SESSION );
}
$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 );
}
}
?>
feyd | Please use Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
joomla
Posted: Tue May 08, 2007 12:49 am
by red
Arawn wrote:Did you upload (FTP) the PHP files as ASCII? A lot of FTP clients will transfer PHP files as binary by default.
I uploaded Joomla directly through FTP.PHP files as to be uploaded as ASCII or binary .
Please ,Help me How can i Uploaded Joomla files via FileZila which was installed when Xampp package was installed.
There is any need in modifications to be made in globals.php,Off or ON to set for all register and session methods.
Re: joomla
Posted: Tue May 08, 2007 9:22 am
by Arawn
red wrote:I uploaded Joomla directly through FTP. PHP files as to be uploaded as ASCII or binary.
PHP files should be uploaded in ASCII.
red wrote:Please ,Help me How can i Uploaded Joomla files via FileZila which was installed when Xampp package was installed.
I don't know much about XAMPP or Filezila. Most FTP clients have options, properties or preferences where you can add file extension to be uploaded as ASCII.
red wrote:There is any need in modifications to be made in globals.php,Off or ON to set for all register and session methods.
I think I'll leave that question for Volka or someone else, I'm too much of a PHP newb.
Thanks
Posted: Wed May 09, 2007 1:54 am
by red
Thanks a Lot!