Silex'i ilk defa kullanıyorum. Her şey yerel olarak gelişirken iyi çalışır. Her şeyi üretim sunucusuna yükledikten sonra, parametrized yollar artık çalışmıyor.Silex yönlendirmesi bulunamadı
Herhangi bir fikrin var mı?
Üretim yapılandırmalarını bir yerde eksik mi?
Dosya izinlerini bir yerde eksik miyim?
alıyorum bu iki istisna:
NotFoundHttpException: No route found for "GET /prevendita/hello/sadfasdf"
in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 92
at RouterListener->onKernelRequest(object(GetResponseEvent))
at call_user_func(array(object(RouterListener), 'onKernelRequest'), object(GetResponseEvent)) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php line 164
at EventDispatcher->doDispatch(array(array(object(Application), 'onEarlyKernelRequest'), array(object(SessionServiceProvider), 'onEarlyKernelRequest'), array(object(RouterListener), 'onKernelRequest'), array(object(LocaleListener), 'onKernelRequest'), array(object(Application), 'onKernelRequest')), 'kernel.request', object(GetResponseEvent)) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php line 53
at EventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php line 110
at HttpKernel->handleRaw(object(Request), '1') in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php line 73
at HttpKernel->handle(object(Request), '1', true) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/silex/silex/src/Silex/Application.php line 509
at Application->handle(object(Request)) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/silex/silex/src/Silex/Application.php line 484
at Application->run() in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/web/index.php line 49
Ve:
<?php
require_once __DIR__.'/../vendor/autoload.php';
use Teatro\Models\Reservation;
use Teatro\Models\ReservationsSeat;
use Symfony\Component\Validator\Constraints;
use Symfony\Component\Form\FormError;
$app = new Silex\Application();
$app['debug'] = true;
$app->register(new Silex\Provider\TwigServiceProvider(), array(
'twig.path' => __DIR__.'/../views',
));
$app->register(
new Silex\Provider\UrlGeneratorServiceProvider()
);
$app->register(
new Silex\Provider\SessionServiceProvider(), array(
// 'session.storage.options' => array('name' => 'test')
)
);
$app->register(
new Silex\Provider\FormServiceProvider()
);
$app->register(
new Silex\Provider\ValidatorServiceProvider()
);
$app->register(new Silex\Provider\TranslationServiceProvider(), array(
'translator.messages' => array(),
));
$app->register(
new Silex\Provider\SwiftmailerServiceProvider()
);
$app->get('/prevendita/hello/{name}/', function ($name) use ($app) {
return "Hello $name!";
})->bind('hello_name');
$app->get('/prevendita/hello', function() use ($app) {
return "Hello!";
})->bind('hello');
$app->run();
Geliştirme sunucu PHP 5.4 yerleşiğine web sunucusu Üretim sunucusudur:
ResourceNotFoundException:
in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php line 81
at UrlMatcher->match('/prevendita/hello/sadfasdf') in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcher.php line 30
at RedirectableUrlMatcher->match('/prevendita/hello/sadfasdf') in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/silex/silex/src/Silex/LazyUrlMatcher.php line 51
at LazyUrlMatcher->match('/prevendita/hello/sadfasdf') in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 78
at RouterListener->onKernelRequest(object(GetResponseEvent))
at call_user_func(array(object(RouterListener), 'onKernelRequest'), object(GetResponseEvent)) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php line 164
at EventDispatcher->doDispatch(array(array(object(Application), 'onEarlyKernelRequest'), array(object(SessionServiceProvider), 'onEarlyKernelRequest'), array(object(RouterListener), 'onKernelRequest'), array(object(LocaleListener), 'onKernelRequest'), array(object(Application), 'onKernelRequest')), 'kernel.request', object(GetResponseEvent)) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php line 53
at EventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php line 110
at HttpKernel->handleRaw(object(Request), '1') in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php line 73
at HttpKernel->handle(object(Request), '1', true) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/silex/silex/src/Silex/Application.php line 509
at Application->handle(object(Request)) in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/vendor/silex/silex/src/Silex/Application.php line 484
at Application->run() in /var/www/vhosts/teatrodellamemoria.it/httpdocs/assets/modules/prevendita/web/index.php line 49
Bu kodudur PHP 5.3 CentOS
.htaccess dosyaları temelde aynıdır. Üretim env olarak , çakmaktaşı uygulama belge kökünün bir alt klasör içine prevendita yüzden Sen yazdım benim çakmaktaşı app
Yığınları yapıştırabilir misiniz? – Florent
İkinci özel duruma göre, rota eşleşmiyor. Belki rotalarını yapıştırabilirsin? – Florent
sorunu yerel olarak aynı dosya mükemmel çalışıyor.Bunun yanında rota statik ise üretimde mükemmel çalışır. Rotaya bir parametre eklerseniz rota bulunamadı. – user1170896