errore

Postate qui discussioni di carattere generale riguardo a problemi di installazione e configurazione di osCommerce

Moderatore: mod Generali

Rispondi
paolo.grafiche
membro Junior
membro Junior
Messaggi: 6
Iscritto il: 22/10/2009, 13:19

errore

Messaggio da paolo.grafiche »

salve mi sono da poco imbattuto in os commerce ma gia non essendo pratico mi ritrovo bloccato dal primo errore :Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in c:\programmi\easyphp1-8\www\oscommerce\admin\includes\classes\language.php on line 20 vorrei sapere gentilmente come risolverlo grazie :|
dynamo
membro Master
membro Master
Messaggi: 1976
Iscritto il: 13/11/2007, 17:47
Contatta:

Re: errore

Messaggio da dynamo »

dovresti postare il codice perchè così è impossibile aiutarti :D

PS: ma hai fatto qualche modifica ad osc? e dove lo hai scaricato?
www.vinidimo.it

visitate e criticate se è il caso... solo con le critiche posso migliorarlo ^_^
paolo.grafiche
membro Junior
membro Junior
Messaggi: 6
Iscritto il: 22/10/2009, 13:19

Re: errore

Messaggio da paolo.grafiche »

grazie allora l'errore è questocome precedentemente detto:Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in c:\programmi\easyphp1-8\www\oscommerce-3.0a5\oscommerce\admin\includes\classes\language.php on line 20. IL codice non è stato modificato anche perche non saprei come :lol: è stato scaricato da:http://www.oscommerce.com/solutions/downloads ed è questo:
<?php
/*
$Id$

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2009 osCommerce

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License v2 (1991)
as published by the Free Software Foundation.
*/

require('../includes/classes/language.php');

class osC_Language_Admin extends osC_Language {

/* Public methods */
public function loadIniFile($filename = null, $comment = '#', $language_code = null) {
if ( is_null($language_code) ) {
$language_code = $this->_code;
}

if ( $this->_languages[$language_code]['parent_id'] > 0 ) {
$this->loadIniFile($filename, $comment, $this->getCodeFromID($this->_languages[$language_code]['parent_id']));
}

if ( is_null($filename) ) {
if ( file_exists('includes/languages/' . $language_code . '.php') ) {
$contents = file('includes/languages/' . $language_code . '.php');
} else {
return array();
}
} else {
if ( substr(realpath('includes/languages/' . $language_code . '/' . $filename), 0, strlen(realpath('includes/languages/' . $language_code))) != realpath('includes/languages/' . $language_code) ) {
return array();
}

if ( !file_exists('includes/languages/' . $language_code . '/' . $filename) ) {
return array();
}

$contents = file('includes/languages/' . $language_code . '/' . $filename);
}

$ini_array = array();

foreach ( $contents as $line ) {
$line = trim($line);

$firstchar = substr($line, 0, 1);

if ( !empty($line) && ( $firstchar != $comment) ) {
$delimiter = strpos($line, '=');

if ( $delimiter !== false ) {
$key = trim(substr($line, 0, $delimiter));
$value = trim(substr($line, $delimiter + 1));

$ini_array[$key] = $value;
} elseif ( isset($key) ) {
$ini_array[$key] .= trim($line);
}
}
}

unset($contents);

$this->_definitions = array_merge($this->_definitions, $ini_array);
}

public function injectDefinitions($file, $language_code = null) {
if ( is_null($language_code) ) {
$language_code = $this->_code;
}

if ( $this->_languages[$language_code]['parent_id'] > 0 ) {
$this->injectDefinitions($file, $this->getCodeFromID($this->_languages[$language_code]['parent_id']));
}

foreach ($this->extractDefinitions($language_code . '/' . $file) as $def) {
$this->_definitions[$def['key']] = $def['value'];
}
}

public function &extractDefinitions($xml) {
$definitions = array();

if ( file_exists(dirname(__FILE__) . '/../../../includes/languages/' . $xml) ) {
$osC_XML = new osC_XML(file_get_contents(dirname(__FILE__) . '/../../../includes/languages/' . $xml));

$definitions = $osC_XML->toArray();

if (isset($definitions['language']['definitions']['definition'][0]) === false) {
$definitions['language']['definitions']['definition'] = array($definitions['language']['definitions']['definition']);
}

$definitions = $definitions['language']['definitions']['definition'];
}

return $definitions;
}

function getData($id, $key = null) {
global $osC_Database;

$Qlanguage = $osC_Database->query('select * from :table_languages where languages_id = :languages_id');
$Qlanguage->bindTable(':table_languages', TABLE_LANGUAGES);
$Qlanguage->bindInt(':languages_id', $id);
$Qlanguage->execute();

$result = $Qlanguage->toArray();

$Qlanguage->freeResult();

if ( empty($key) ) {
return $result;
} else {
return $result[$key];
}
}

function getID($code = null) {
global $osC_Database;

if ( empty($code) ) {
return $this->_languages[$this->_code]['id'];
}

$Qlanguage = $osC_Database->query('select languages_id from :table_languages where code = :code');
$Qlanguage->bindTable(':table_languages', TABLE_LANGUAGES);
$Qlanguage->bindValue(':code', $code);
$Qlanguage->execute();

$result = $Qlanguage->toArray();

$Qlanguage->freeResult();

return $result['languages_id'];
}

function getCode($id = null) {
global $osC_Database;

if ( empty($id) ) {
return $this->_code;
}

$Qlanguage = $osC_Database->query('select code from :table_languages where languages_id = :languages_id');
$Qlanguage->bindTable(':table_languages', TABLE_LANGUAGES);
$Qlanguage->bindValue(':languages_id', $id);
$Qlanguage->execute();

$result = $Qlanguage->toArray();

$Qlanguage->freeResult();

return $result['code'];
}

function showImage($code = null, $width = '16', $height = '10', $parameters = null) {
if ( empty($code) ) {
$code = $this->_code;
}

$image_code = strtolower(substr($code, 3));

if ( !is_numeric($width) ) {
$width = 16;
}

if ( !is_numeric($height) ) {
$height = 10;
}

return osc_image('../images/worldflags/' . $image_code . '.png', $this->_languages[$code]['name'], $width, $height, $parameters);
}

function isDefined($key) {
return isset($this->_definitions[$key]);
}
}
?>
GRAZIE ANCORA SPERO POTRAI RISOLVERE IL MIO PROBLEMA :P
paolo.grafiche
membro Junior
membro Junior
Messaggi: 6
Iscritto il: 22/10/2009, 13:19

Re: errore

Messaggio da paolo.grafiche »

dynamo ha scritto:dovresti postare il codice perchè così è impossibile aiutarti :D

PS: ma hai fatto qualche modifica ad osc? e dove lo hai scaricato?
grazie allora l'errore è questocome precedentemente detto:Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in c:\programmi\easyphp1-8\www\oscommerce-3.0a5\oscommerce\admin\includes\classes\language.php on line 20. IL codice non è stato modificato anche perche non saprei come è stato scaricato da:http://www.oscommerce.com/solutions/downloads LA VERSIONE è:3.OA5 ed IL CODICE DEL FILE CHE DA PROBLEMI è QUESTO: :P
<?php
/*
$Id$

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2009 osCommerce

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License v2 (1991)
as published by the Free Software Foundation.
*/

require('../includes/classes/language.php');

class osC_Language_Admin extends osC_Language {

/* Public methods */
public function loadIniFile($filename = null, $comment = '#', $language_code = null) {
if ( is_null($language_code) ) {
$language_code = $this->_code;
}

if ( $this->_languages[$language_code]['parent_id'] > 0 ) {
$this->loadIniFile($filename, $comment, $this->getCodeFromID($this->_languages[$language_code]['parent_id']));
}

if ( is_null($filename) ) {
if ( file_exists('includes/languages/' . $language_code . '.php') ) {
$contents = file('includes/languages/' . $language_code . '.php');
} else {
return array();
}
} else {
if ( substr(realpath('includes/languages/' . $language_code . '/' . $filename), 0, strlen(realpath('includes/languages/' . $language_code))) != realpath('includes/languages/' . $language_code) ) {
return array();
}

if ( !file_exists('includes/languages/' . $language_code . '/' . $filename) ) {
return array();
}

$contents = file('includes/languages/' . $language_code . '/' . $filename);
}

$ini_array = array();

foreach ( $contents as $line ) {
$line = trim($line);

$firstchar = substr($line, 0, 1);

if ( !empty($line) && ( $firstchar != $comment) ) {
$delimiter = strpos($line, '=');

if ( $delimiter !== false ) {
$key = trim(substr($line, 0, $delimiter));
$value = trim(substr($line, $delimiter + 1));

$ini_array[$key] = $value;
} elseif ( isset($key) ) {
$ini_array[$key] .= trim($line);
}
}
}

unset($contents);

$this->_definitions = array_merge($this->_definitions, $ini_array);
}

public function injectDefinitions($file, $language_code = null) {
if ( is_null($language_code) ) {
$language_code = $this->_code;
}

if ( $this->_languages[$language_code]['parent_id'] > 0 ) {
$this->injectDefinitions($file, $this->getCodeFromID($this->_languages[$language_code]['parent_id']));
}

foreach ($this->extractDefinitions($language_code . '/' . $file) as $def) {
$this->_definitions[$def['key']] = $def['value'];
}
}

public function &extractDefinitions($xml) {
$definitions = array();

if ( file_exists(dirname(__FILE__) . '/../../../includes/languages/' . $xml) ) {
$osC_XML = new osC_XML(file_get_contents(dirname(__FILE__) . '/../../../includes/languages/' . $xml));

$definitions = $osC_XML->toArray();

if (isset($definitions['language']['definitions']['definition'][0]) === false) {
$definitions['language']['definitions']['definition'] = array($definitions['language']['definitions']['definition']);
}

$definitions = $definitions['language']['definitions']['definition'];
}

return $definitions;
}

function getData($id, $key = null) {
global $osC_Database;

$Qlanguage = $osC_Database->query('select * from :table_languages where languages_id = :languages_id');
$Qlanguage->bindTable(':table_languages', TABLE_LANGUAGES);
$Qlanguage->bindInt(':languages_id', $id);
$Qlanguage->execute();

$result = $Qlanguage->toArray();

$Qlanguage->freeResult();

if ( empty($key) ) {
return $result;
} else {
return $result[$key];
}
}

function getID($code = null) {
global $osC_Database;

if ( empty($code) ) {
return $this->_languages[$this->_code]['id'];
}

$Qlanguage = $osC_Database->query('select languages_id from :table_languages where code = :code');
$Qlanguage->bindTable(':table_languages', TABLE_LANGUAGES);
$Qlanguage->bindValue(':code', $code);
$Qlanguage->execute();

$result = $Qlanguage->toArray();

$Qlanguage->freeResult();

return $result['languages_id'];
}

function getCode($id = null) {
global $osC_Database;

if ( empty($id) ) {
return $this->_code;
}

$Qlanguage = $osC_Database->query('select code from :table_languages where languages_id = :languages_id');
$Qlanguage->bindTable(':table_languages', TABLE_LANGUAGES);
$Qlanguage->bindValue(':languages_id', $id);
$Qlanguage->execute();

$result = $Qlanguage->toArray();

$Qlanguage->freeResult();

return $result['code'];
}

function showImage($code = null, $width = '16', $height = '10', $parameters = null) {
if ( empty($code) ) {
$code = $this->_code;
}

$image_code = strtolower(substr($code, 3));

if ( !is_numeric($width) ) {
$width = 16;
}

if ( !is_numeric($height) ) {
$height = 10;
}

return osc_image('../images/worldflags/' . $image_code . '.png', $this->_languages[$code]['name'], $width, $height, $parameters);
}

function isDefined($key) {
return isset($this->_definitions[$key]);
}
}
?>
GRAZIE ANCORA SPERO POTRAI RISOLVERE IL MIO PROBLEMA :P
dynamo
membro Master
membro Master
Messaggi: 1976
Iscritto il: 13/11/2007, 17:47
Contatta:

Re: errore

Messaggio da dynamo »

mi pare di capire che hai scaricato la versione 3...

e qui io mi domando... perchè hai scaricato quella versione che è un'alpha???

riscarica la versione v2.2 RC2a :wink:
www.vinidimo.it

visitate e criticate se è il caso... solo con le critiche posso migliorarlo ^_^
paolo.grafiche
membro Junior
membro Junior
Messaggi: 6
Iscritto il: 22/10/2009, 13:19

Re: errore

Messaggio da paolo.grafiche »

dynamo ha scritto:mi pare di capire che hai scaricato la versione 3...

e qui io mi domando... perchè hai scaricato quella versione che è un'alpha???

riscarica la versione v2.2 RC2a :wink:
grazie mille provo a riscaricare :wink:
paolo.grafiche
membro Junior
membro Junior
Messaggi: 6
Iscritto il: 22/10/2009, 13:19

istallazione lingua

Messaggio da paolo.grafiche »

finalmente sono riuscito ad istallare tutto volevo sapere come si fa a cambiare il tuttoin italiano grazie
dynamo
membro Master
membro Master
Messaggi: 1976
Iscritto il: 13/11/2007, 17:47
Contatta:

Re: errore

Messaggio da dynamo »

o scarichi la lingua italiana oppure...

scarichi il pacchetto realizzato dal nostro forum che trovi tutto (o quasi) in italiano e in più hai già installate molte contributions ;)
viewtopic.php?f=22&t=11221
www.vinidimo.it

visitate e criticate se è il caso... solo con le critiche posso migliorarlo ^_^
paolo.grafiche
membro Junior
membro Junior
Messaggi: 6
Iscritto il: 22/10/2009, 13:19

Re: errore

Messaggio da paolo.grafiche »

dynamo ha scritto:o scarichi la lingua italiana oppure...

scarichi il pacchetto realizzato dal nostro forum che trovi tutto (o quasi) in italiano e in più hai già installate molte contributions ;)
viewtopic.php?f=22&t=11221
salve come sempre il vs aiuto mi è prezioso ho scarricato il pacchetto italiano completo da oscommerce italia però istallandolo riscontro questo errore: FATAL ERROR: register_globals is disabled in php.ini, please enable it! o controllato il file è settato giusto premetto che uso easyphp1-8. grazie :P
dynamo
membro Master
membro Master
Messaggi: 1976
Iscritto il: 13/11/2007, 17:47
Contatta:

Re: errore

Messaggio da dynamo »

sul forum ci sono decine di discussioni a riguardo ;)
www.vinidimo.it

visitate e criticate se è il caso... solo con le critiche posso migliorarlo ^_^
Rispondi