Permessi Files E Cartelle ... Problema Grosso Grosso !

Ciao a tutti,

Ho cominciato da pochissimo a smanettare con Yii. Ho un hosting condiviso su IPage che non ha l’accesso SSH. Ho creato la webapp in locale poi l’ho uploadata sul server, come dice la guida.

Quando vado a digitare l’url dove dovrebbe apparire la schermata iniziale del framework, in locale lo fa, mi viene visualizzato il seguente messaggio d’errore che non riesco a risolvere:

Warning: require_once(/hermes/bosoraweb112/b886/ipg.ponzianoinfo/htdocs/risparambio/public/../../../../framework/yii.php): failed to open stream: No such file or directory in /hermes/bosoraweb112/b886/ipg.ponzianoinfo/htdocs/risparambio/public/index.php on line 12 Fatal error: require_once(): Failed opening required ‘/hermes/bosoraweb112/b886/ipg.ponzianoinfo/htdocs/risparambio/public/../../../../framework/yii.php’ (include_path=’.:/usr/local/lib/php-5.3.13/lib/php’) in /hermes/bosoraweb112/b886/ipg.ponzianoinfo/htdocs/risparambio/public/index.php on line 12

Può essere un problema di permessi ? di configurazione del server e del PHP ?

Per informazione:

la struttura del sito è /htdocs/nomemiosito/public/ … poi i files di webroot di Yii.

C’è qualcuno che può aiutarmi ? Magari è una cavolata …

Carlo

La pagina index che stai chiamando, ovvero:


/hermes/bosoraweb112/b886/ipg.ponzianoinfo/htdocs/risparambio/public/index.php

sta facendo un require alla riga 12 di questo file:


/hermes/bosoraweb112/b886/ipg.ponzianoinfo/htdocs/risparambio/public/../../../../framework/yii.php

Strano che voglia risalire di 4 cartelle per accedere a yii.php

Puoi postare il contenuto del file index.php che stai chiamando?

Comunque in questo caso non si tratta di permessi, ma di file non trovato, perchè l’errore è “no such file” e non “permission denied”.

Ho modificato il file index.php così:

<?php

// change the following paths if necessary

$yii=dirname(FILE)’/framework/yii.php’;

$config=dirname(FILE).’/protected/config/main.php’;

// remove the following lines when in production mode

defined(‘YII_DEBUG’) or define(‘YII_DEBUG’,true);

// specify how many levels of call stack should be shown in each log message

defined(‘YII_TRACE_LEVEL’) or define(‘YII_TRACE_LEVEL’,3);

require_once($yii);

Yii::createWebApplication($config)->run();

php?>

Ma ora mi da questo errore:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /hermes/bosoraweb112/b886/ipg.ponzianoinfo/htdocs/risparambio/public/index.php on line 4

Boh …

Grazie per l’aiuto, comunque

Carlo

Prima della mofica, intendo, index.php era così:

<?php

// change the following paths if necessary

$yii=dirname(FILE).’/../../../framework/yii.php’;

$config=dirname(FILE).’/protected/config/main.php’;

// remove the following lines when in production mode

defined(‘YII_DEBUG’) or define(‘YII_DEBUG’,true);

// specify how many levels of call stack should be shown in each log message

defined(‘YII_TRACE_LEVEL’) or define(‘YII_TRACE_LEVEL’,3);

require_once($yii);

Yii::createWebApplication($config)->run();

Alla riga 4, come indicato dal PHP,


$yii=dirname(__FILE__)'/framework/yii.php';

manca il punto tra la funzione dirname e la stringa successiva, ovvero


$yii=dirname(__FILE__).'/framework/yii.php';

Ho provato anche la tua soluzione, ma niente … allora ho risolto così …:

<?php

// change the following paths if necessary

$yii=’/home/users/web/b886/ipg.ponzianoinfo/framework/yii.php’;

$config=dirname(FILE).’/protected/config/main.php’;

// remove the following lines when in production mode

defined(‘YII_DEBUG’) or define(‘YII_DEBUG’,true);

// specify how many levels of call stack should be shown in each log message

defined(‘YII_TRACE_LEVEL’) or define(‘YII_TRACE_LEVEL’,3);

require_once($yii);

Yii::createWebApplication($config)->run();

php?>

Grazie comunque

Carlo