Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 11
  1. #1
    Utente bannato
    Registrato dal
    Dec 2011
    Messaggi
    46

    [Symfony2.0]Si può anche vedere l’applicazione nell’ambiente “prod”

    sto eseguendo un altra procedura



    Si può anche vedere l’applicazione nell’ambiente “prod”, visitando:

    http://localhost/app.php/hello/Ryan

    Se si ottiene un errore, è probabilmente perché occorre pulire la cache, eseguendo:

    php app/console cache:clear --env=prod --no-debug
    app_dev.php mi restituisce il template +il template padre
    app.php no....non capisco perchè

    inizialmente anche app.php mi restituiva hello ryan, ma poi ho pulito la cache con
    php app/console cache:clear --env=prod --no-debug
    ed è sparito......


    non capisco perchè

  2. #2
    Utente bannato
    Registrato dal
    Dec 2011
    Messaggi
    46
    perchè non mi fa veder ein ambiente prod??

    Codice PHP:
    <?php

    require_once __DIR__.'/../app/bootstrap.php.cache';
    require_once 
    __DIR__.'/../app/AppKernel.php';
    //require_once __DIR__.'/../app/AppCache.php';

    use Symfony\Component\HttpFoundation\Request;

    $kernel = new AppKernel('prod'false);
    $kernel->loadClassCache();
    //$kernel = new AppCache($kernel);
    $kernel->handle(Request::createFromGlobals())->send();

  3. #3
    Utente bannato
    Registrato dal
    Dec 2011
    Messaggi
    46
    nessuno lo sa.....

  4. #4
    Utente di HTML.it L'avatar di garakkio
    Registrato dal
    Dec 2011
    residenza
    Roma
    Messaggi
    480
    in casi estremi, prova a cancellare tutta la cache a mano

  5. #5
    Utente bannato
    Registrato dal
    Dec 2011
    Messaggi
    46
    fatto ma non va, in ambiente prod non mi visualizza nulla......

  6. #6
    Utente bannato
    Registrato dal
    Dec 2011
    Messaggi
    46
    puo' essere perchè qualcuno mi disse di saltare questo pezzo??

    Impostare i permessi

    Un problema comune è che le cartelle app/cache e app/logs devono essere scrivibili sia dal server web che dall’utente della linea di comando. Su sistemi UNIX, se l’utente del server web è diverso da quello della linea di comando, si possono eseguire i seguenti comandi una sola volta sul proprio progetto, per assicurarsi che i permessi siano impostati correttamente. Cambiare www-data con l’utente del server web e tuonome con l’utente della linea di comando:

    1. Usare ACL su un sistema che supporta chmod +a

    Molti sistemi consento di usare il comando chmod +a. Provare prima questo e, in caso di errore, provare il metodo successivo:

    rm -rf app/cache/*
    rm -rf app/logs/*

    sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit " app/cache app/logs
    sudo chmod +a "tuonome allow delete,write,append,file_inherit,directory_inherit " app/cache app/logs

    2. Usare ACL su un sistema che non supporta chmod +a

    Alcuni sistemi non supportano chmod +a, ma supportano un altro programma chiamato setfacl. Si potrebbe aver bisogno di abilitare il supporto ACL sulla propria partizione e installare setfacl prima di usarlo (come nel caso di Ubuntu), in questo modo:

    sudo setfacl -R -m u:www-data:rwx -m u:tuonome:rwx app/cache app/logs
    sudo setfacl -dR -m u:www-data:rwx -m u:tuonome:rwx app/cache app/logs

    3. Senza usare ACL

    Se non è possibile modificare l’ACL delle cartelle, occorrerà modificare l’umask in modo che le cartelle cache e log siano scrivibili dal gruppo o da tutti (a seconda che gli utenti di server web e linea di comando siano o meno nello stesso gruppo). Per poterlo fare, inserire la riga seguente all’inizio dei file app/console, web/app.php e web/app_dev.php:

    umask(0002); // Imposta i permessi a 0775

    // oppure

    umask(0000); // Imposta i permessi a 0777

    Si noti che l’uso di ACL è raccomandato quando si ha accesso al server, perché la modifica di umask non è thread-safe.

  7. #7
    Utente bannato
    Registrato dal
    Dec 2011
    Messaggi
    46
    questo è il file prod.log

    codice:
    [2011-12-12 15:38:04] request.ERROR: Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /pp.php/hello/Ryan" (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\EventListener\RouterListener.php line 83 [] []
    [2011-12-12 15:44:07] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-12 15:44:07] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []
    [2011-12-12 15:44:16] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-12 15:44:16] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []
    [2011-12-12 15:44:17] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-12 15:44:17] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []
    [2011-12-12 15:44:17] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-12 15:44:17] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []
    [2011-12-12 15:44:21] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-12 15:44:21] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []
    [2011-12-12 16:02:00] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-12 16:02:00] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []
    [2011-12-12 16:04:34] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-12 16:04:34] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []
    [2011-12-12 16:08:47] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-12 16:08:47] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []
    [2011-12-12 16:40:29] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-12 16:40:29] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []
    [2011-12-12 17:04:56] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-12 17:04:56] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []
    [2011-12-12 17:06:28] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-12 17:06:28] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []
    [2011-12-13 08:49:38] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-13 08:49:38] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []
    [2011-12-13 08:49:44] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-13 08:49:44] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []
    [2011-12-13 08:53:34] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-13 08:53:34] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []
    [2011-12-13 08:53:40] request.CRITICAL: InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist. (uncaught exception) at D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\vendor\doctrine-common\lib\Doctrine\Common\Annotations\FileCacheReader.php line 43 [] []
    [2011-12-13 08:53:40] request.CRITICAL: Exception thrown when handling an exception (InvalidArgumentException: The directory "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/prod_new/annotations" does not exist.) [] []

  8. #8
    Utente bannato
    Registrato dal
    Dec 2011
    Messaggi
    46
    un altra domanda come svuoto la cache manualmente?

  9. #9
    Utente bannato
    Registrato dal
    Dec 2011
    Messaggi
    46
    tra l'altro quando eseguo questo comando
    php app/console cache:clear --env=prod --no-debug

    mi da come risposta


    Unable to write in the "D:\Programmi\EasyPHP-5.3.8.1\www\Symfony\app/cache/pro
    d_new" directory




    cache:clear [--no-warmup]

  10. #10
    Utente di HTML.it L'avatar di garakkio
    Registrato dal
    Dec 2011
    residenza
    Roma
    Messaggi
    480
    Hai un problema di permessi.
    Purtroppo la documentazione copre l'argomento solo per sistemi Linux/Unix.
    Io, d'altronde, non metto mano su windows dal 2001, ma ci provo: se riesci ad aprire la cartella cache da amministratore, cancella tutti i file e le cartelle che ci trovi dentro.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.