Trouble with installation

Notice: This thread is very old.
mst3kroqs
Member | 1
+
0
-

Greetings –

I have followed the installation documentation in the wiki to the letter, and ran into some problems.

My environment is:

Windows 7
WampServer 2.1, which provides:

  • Apache 2.2.17
  • PHP 5.3.5
  • MySQL 5.5.8

After unpacking Nette Framework 2.0-beta for PHP 5.3, as instructed I run the requirements checker script and all seems well (I am just missing the memcache extension, but no other warnings).

Now I try to run sandbox, and now get an Nette\InvalidStateException warning:

Class ‘Model’ not found.

Call stack:

...\libs\Nette\common\Configurator.php:173 source ►  Nette\DI\ContainerBuilder-> addDefinition (arguments ►)

...\app\bootstrap.php:26 source ►  Nette\Configurator-> loadConfig (arguments ►)

...\www\index.php:15 source ►  require (arguments ►)

Highlighted source from bootstrap.php is line 26:

19:    Debugger::enable();
20:
21:
22:    // Load configuration from config.neon file
23:    $configurator = new Nette\Configurator;
24:    $configurator->container->params += $params;
25:    $configurator->container->params['tempDir'] = __DIR__ . '/../temp';
26:    $container = $configurator->loadConfig(__DIR__ . '/config.neon');  // this is the highlighted line
27:
28:
29:    // Setup router
30:    $router = $container->router;
31:    $router[] = new Route('index.php', 'Homepage:default', Route::ONE_WAY);
32:    $router[] = new Route('<presenter>/<action>[/<id>]', 'Homepage:default');
33:

Any ideas?

Jan Tvrdík
Nette guru | 2595
+
0
-

The latest Nette beta build seems to be broken. It can be fixed by forcing RobotLoader to be registered before the config is loaded and removing its declaration in config.neon.

// Load configuration from config.neon file
$configurator = new Nette\Configurator;
$configurator->container->params += $params;
$configurator->container->params['tempDir'] = __DIR__ . '/../temp';
$configurator->container->getService('robotLoader'); // forces RobotLoader to be registered
$container = $configurator->loadConfig(__DIR__ . '/config.neon');
Dana89
Member | 1
+
0
-

Ahoj, Jan,
mam stejny problem,
a chapu tvoje reseni,
jenze nevim, kam to mam zkopirovat do jakeho souboru?
diky za pomoc.
Dana.

voda
Member | 561
+
0
-

@Dana89: into the bootstrap.php file

22
Member | 1478
+
0
-

in English pls. That code is part of bootstrap.php

Maekoboss
Member | 36
+
0
-

Hello i had the same problem. I edited the content of config.neon and bootstrap.php as u described but after that i have got Page Not Found – error 404. Could u pls help me?

Jan Tvrdík
Nette guru | 2595
+
0
-

Do you use sandbox or is it your own application? Is this error generated by Apache or by Nette?

Maekoboss
Member | 36
+
0
-

Its just fresh sandbox. When i putted it on a webhosting i got the Class Model could not be found exploit. I fixed it as u described at config.neon and at bootstrat too and after that i got the 404 error generated from Apache. I use Onebit, htacces should be active but at checker it says the are not. I tried to rename the .htacces at www folder but nothing happend. Could u give me some advice?

Jan Tvrdík
Nette guru | 2595
+
0
-

Try to run index.php directly, e.g. http://example.com/index.php or http://example.com/www/index.php.

dj
Member | 1
+
0
-

Could the developers get a fix to the app so that the sandbox and example files work on a new installation on a webserver (mine are on Debian and Ubuntu boxes)? Couldn't you set the log and temp folders to write access on these examples so the user doesn't have to do each manually? It is such a waste of time to try to explore the Nette Framework when you have to troubleshoot the basic startup examples from the developers of the project. The Requirements Checker assures me that my server configuration meets the minimum requirements for Nette Framework and then nothing works as it should. VERY disappointing!

David Grudl
Nette Core | 8218
+
0
-

Sorry, the archive “Nette Framework 2.0-beta” contained the wrong version, now it was supposed to work.