Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [Symfony][Symfony2]Instalacja symfony 2 na hostingu
Forum PHP.pl > Forum > PHP > Frameworki
borpaw
Czy ktoś instalował może symfony 2 na hostingu lh.pl lub jakimś innym podobnym?

Ustawiłem php na wersje 5.4 co powinno wg dokumentacji wystarczyć

odpalam przykładowo linkiem http://mojadomena.pl/app.php i dostaje taki komunikat:

Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /public_html/Symfony/app/cache/prod/classes.php on line 5340

O co może chodzić?
Turson
A angielski znasz?
borpaw
Ustawiłem 'UTC' na sztywno ale dalej mam problem uruchamiam link http://mojadomena.pl/app.php i mam komunikat forbiden 404

Subdomene mam ustawioną na symfony/web

Co to może być tym razem?
toffiak
A możesz podać link do tej strony ?
Pierwsze pytanie: czy cokolwiek jest na tej stronie ?
Drugie: co się stanie gdy użyjesz app_dev.php i odkomentujesz blokadę dla ip w pliku app_dev.php ?
borpaw
Usunołem blokade na localhost z app_dev.php i tam znowu czepia się o timezone 'UTC' widze ze plików gdzie to jest używane jest kilkadziesiąt nie da się tego jakoś ustawić w jednym miejscu?

nie mam dostępu do php.ini bo to hosting
Pyton_000
No to napisz do nich niech Ci ustawią
patryczakowy
Spróbuj w .htacces dodać wpis

php_value date.timezone "Europe/Warsaw"
borpaw
Zrobiłem coś takiego i ruszyło na app_dev.php ale na app.php mam forbiden podpowiedzcie czemu?


use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
public function registerBundles()
{
date_default_timezone_set('UTC'); //TUTAJ!!!

$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
);

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}

return $bundles;
}

public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
}
}
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.