Nette na wedosu Server Error 500
- vosy
- Člen | 532
Ahoj, vim ze to tu bylo probrano Xkrat ne nejak se neorientuju
nahral jsme na hostin wedosu soubory z localu.
Do hlavni slozky jsem nahral app, libs, log, temp
a do slozky www jsem nahral vlastne public soubory.
je to vlastne stejny strom ktery mam na localu.
ale po zadani url adresy mi NETTE vypise
Server Error
We're sorry! The server encountered an internal error and was unable to complete your request. Please try again later.
error 500
- MartinitCZ
- Člen | 580
Příšte zkus hledat odpověd je hned na první straně!!
https://forum.nette.org/…-nette-wedos#…
- vosy
- Člen | 532
JA viiiim ale jsem asi LAMA.
strom webu
http://nette.vosy.cz/obr1.png
http://nette.vosy.cz/obr2.png
www/.htaccess
# Apache configuration file (see httpd.apache.org/docs/current/mod/quickreference.html)
# disable directory listing
#Options -Indexes
# enable cool URL
<IfModule mod_rewrite.c>
RewriteEngine On
# RewriteBase /
# prevents files starting with dot to be viewed by browser
RewriteRule /\.|^\. - [F]
# front controller
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(pdf|js|ico|gif|jpg|png|css|rar|zip|tar\.gz)$ index.php [L]
SetEnv NETTE_HTACCESS ok
</IfModule>
# enable gzip compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript application/javascript application/json
</IfModule>
www/index.php
// Uncomment this line if you must temporarily take down your site for maintenance.
// require '.maintenance.php';
// Let bootstrap create Dependency Injection container.
$container = require __DIR__ . '/../app/bootstrap.php';
// Run application.
$container->application->run();
app/bootstrap.php
<?php
// Load Nette Framework or autoloader generated by Composer
require __DIR__ . '/../libs/autoload.php';
$configurator = new Nette\Config\Configurator;
// Enable Nette Debugger for error visualisation & logging
//$configurator->setDebugMode(TRUE);
$configurator->enableDebugger(__DIR__ . '/../log');
// Specify folder for cache
$configurator->setTempDirectory(__DIR__ . '/../temp');
// Enable RobotLoader - this will load all classes automatically
$configurator->createRobotLoader()
->addDirectory(__DIR__)
->addDirectory(__DIR__ . '/../libs')
->register();
// Create Dependency Injection container from config.neon file
// $configurator->addConfig(__DIR__ . '/config/config.neon');
// $configurator->addConfig(__DIR__ . '/config/config.local.neon', $configurator::NONE); // none section
$configurator->addConfig(__DIR__ . '/config/config.neon');
$configurator->addConfig(__DIR__ . '/FrontModule/config/config.neon');
$configurator->addConfig(__DIR__ . '/AdminModule/config/config.neon');
$container = $configurator->createContainer();
Nette\Forms\Controls\CheckboxList::register();
return $container;
app/router/RouterFactory.php
<?php
use Nette\Application\Routers\RouteList,
Nette\Application\Routers\Route,
Nette\Application\Routers\SimpleRouter;
/**
* Router factory.
*/
class RouterFactory
{
/**
* @return Nette\Application\IRouter
*/
public function createRouter()
{
// if (isset($_SERVER['NETTE_HTACCESS'])) { // FastCGI
// $router[] = new Route('index.php', 'Homepage:default', Route::ONE_WAY);
// $router[] = new Route('<presenter>/<action>[/<id>]', 'Homepage:default');
// } else {
// $router[] = new SimpleRouter('Homepage:default');
// }
$router = new RouteList();
//ADMIN
$router[] = $adminMenu2Router = new RouteList('Admin:Menu2');
$adminMenu2Router[] = new Route('admin/menu2/<presenter>/<action>/<id>',
array(
'action'=>'default',
'id'=>NULL
));
$router[] = $adminRouter = new RouteList('Admin');
$adminRouter[] = new Route('admin/<presenter>/<action>/<id>',
array(
'presenter'=>'LoginBoard',
'action'=>'default',
'id'=>NULL
));
// FRONT
// $router[] = $frontRouter = new RouteList('Front:JakNaTo');
// $frontRouter[] = new Route('jak-na-to/<presenter>/<typ>',
// array(
// 'presenter'=>'JakObjednat',
// 'action'=>'default',
// 'typ'=>NULL
// ));
$router[] = $frontRouter = new RouteList('Front');
$frontRouter[] = new Route('<presenter>/<action>/<id>',
array(
'presenter'=>'Homepage',
'action'=>'default',
'id'=>NULL
));
return $router;
}
}
stale
error 500
:(
diky
- Rampus
- Člen | 39
vosy napsal(a):
dal jsem na wedos uplne cisty sandbox nette uvodni strana nabehla, pokud jsem jsem pridal presenter za url
/zkouska tak se zobrazila bila stranka
a kdyz jsem udela upravu htaccess a bootstrapu tak mam zase 500 Error
A co máš v logu? Tam se ti musí uložit přoč je Error 500
- vosy
- Člen | 532
[2013–12–08 22–43–45] Fatal error: Call to a member function getRouter() on a non-object in /data/web/virtuals/57286/virtual/app/bootstrap.php:22 @ http://www.investicni-radce.cz/ @@ exception-2013–12–08–22–02–17–92cb3effcb34a31fb50c95b9f5c634db.html
takze problem s $router = $application->getRouter();
postupoval jsem dle
https://forum.nette.org/…-nette-wedos#…