[SOLVED] Setting up a new site leads to a 500 internal server error

No, I haven’t used this resource in my package. When I search for the string “Neos.Demo” in my package I found nothing:

$ cd Packages/Sites/MY.Seiten
$ grep -r -i ‘Neos.Demo’ ./
$

When I search for “My.Seiten” I got several hits:

$ grep -r -i 'MY.Seiten' ./
./composer.json:    "name": "my/seiten",
./composer.json:            "package-key": "MY.Seiten"
./Resources/Private/Content/Sites.xml: <site name="mysite.de" state="1" siteResourcesPackageKey="MY.Seiten" siteNodeName="seiten">
./Resources/Private/TypoScript/Root.ts2:           templatePath = 'resource://MY.Seiten/Private/Templates/Page/Default.html'
./Resources/Private/TypoScript/Root.ts2:           templatePath = 'resource://MY.Seiten/Private/Templates/Page/Default.html'
./Resources/Private/TypoScript/Root.ts2:           templatePath = 'resource://MY.Seiten/Private/Templates/Page/Default.html'
./Resources/Private/TypoScript/Root.ts2:           templatePath = 'resource://MY.Seiten/Private/Templates/Page/Default.html'
$

I 'm sure something is wrong with the database. But I haven’t any clue how can I solve it.

I have still the same problem. I am not able to create a (empty) site using Neos CMS LTS Version 2.3.8 at Domain-Factory. Can someone help?

Meanwhile I tried another way to get a working Neos. I drop all tables from the database and afterwards I executed the following command:

$ ./flow doctrine:migrate

I got an exception:

Exception #1355480641 in line 137 of /kunden/xxxxx_xxxxx/Neos/neoscms/Data/Temporary/Production/Cache/Code/Flow_Object_Classes/TYPO3_Setup_Step_DatabaseStep.php
: Failed loading /usr/local/php5/ZendOptimizer.so:  /usr/local/php5/ZendOptimizer.so: undefined symbol: zend_opcode_handlers
Fatal error: Cannot use $this as parameter in /kunden/xxxxx_xxxxx/Neos/neoscms/Packages/Libraries/ocramius/proxy-manager/src/ProxyManager/GeneratorStrategy/Eval
uatingGeneratorStrategy.php(68) : eval()'d code on line 340
27 TYPO3\Flow\Core\Booting\Scripts::executeCommand("typo3.flow:doctrine:migrate", array|18|, FALSE)
26 TYPO3\Setup\Step\DatabaseStep_Original::postProcessFormValues(array|8|)
25 TYPO3\Setup\Controller\SetupController_Original::postProcessStep(array|8|, TYPO3\Setup\Step\DatabaseStep)
24 TYPO3\Setup\Controller\SetupController_Original::TYPO3\Setup\Controller\{closure}(TYPO3\Form\Core\Model\FinisherContext)
23 TYPO3\Form\Finishers\ClosureFinisher_Original::executeInternal()
22 TYPO3\Form\Core\Model\AbstractFinisher::execute(TYPO3\Form\Core\Model\FinisherContext)
21 TYPO3\Form\Core\Runtime\FormRuntime_Original::invokeFinishers()
20 TYPO3\Form\Core\Runtime\FormRuntime_Original::render()
19 TYPO3\Setup\Controller\SetupController_Original::indexAction(1)
18 TYPO3\Setup\Controller\SetupController::indexAction(1)
17 call_user_func_array(array|2|, array|1|)
16 TYPO3\Setup\Controller\SetupController::Flow_Aop_Proxy_invokeJoinPoint(TYPO3\Flow\Aop\JoinPoint)
15 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
14 TYPO3\Flow\Security\Aspect\PolicyEnforcementAspect_Original::enforcePolicy(TYPO3\Flow\Aop\JoinPoint)
13 TYPO3\Flow\Aop\Advice\AroundAdvice::invoke(TYPO3\Flow\Aop\JoinPoint)
12 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
11 TYPO3\Setup\Controller\SetupController::indexAction(1)
10 call_user_func_array(array|2|, array|1|)
9 TYPO3\Flow\Mvc\Controller\ActionController_Original::callActionMethod()
8 TYPO3\Flow\Mvc\Controller\ActionController_Original::processRequest(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
7 TYPO3\Flow\Mvc\Dispatcher_Original::initiateDispatchLoop(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
6 TYPO3\Flow\Mvc\Dispatcher_Original::dispatch(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
5 TYPO3\Flow\Mvc\DispatchComponent_Original::handle(TYPO3\Flow\Http\Component\ComponentContext)
4 TYPO3\Flow\Http\Component\ComponentChain_Original::handle(TYPO3\Flow\Http\Component\ComponentContext)
3 TYPO3\Flow\Http\Component\ComponentChain_Original::handle(TYPO3\Flow\Http\Component\ComponentContext)
2 TYPO3\Setup\Core\RequestHandler::handleRequest()
1 TYPO3\Flow\Core\Bootstrap::run()

The same exception was thrown when I tried to call the setup using webinterface. Only the table “flow_doctrine_migrationstatus” was created after executing the setup or the migration command.
Any help would be appreciated.

It seems nobody can help me.
I have asked the support of the provider DomainFactory regarding the failed loading of ZendOptimizer. They told me I should create a special php.ini for the domain and drop the entry for the Zendoptimizer.


I did it and now I got the same exception but without an additional exception log file. Again: I deleted all tables from the database and on the next step I executed the following command which was canceled with a fatal error :

$ ./flow doctrine:migrate
Fatal error: Cannot use $this as parameter in /kunden/xxxxx_xxxxx/Neos/neoscms/Packages/Libraries/ocramius/proxy-manager/src/ProxyManager/GeneratorStrategy/EvaluatingGeneratorStrategy.php(68) : eval()'d code on line 340

Is anybody here who has an idea how I can solve this problem?

How did you install Neos on the server?

I think this error comes from you having a different version of PHP on the system composer install was executed and this system…

Hi Christian, maybe you are right. Actually I did not know it. The provider DomainFactory has offered a pre-installed version Neos CMS LTS Version 2.3.8 which I have selected.
After the installation the Neos.Demo package was available and working. Up to now I was not able to create a new package or site.

I am pretty sure it’s something about the PHP version. What does php -v say and can you find out what version of the ocramius/proxy-manager is installed?

The version of php-cli is pretty old:

$ php -v
PHP 4.4.9 (cgi) (built: Jan 29 2015 09:34:44)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

When I call php7 I get the version 7.0.20:

$ php7 -v
PHP 7.0.20 (cgi-fcgi) (built: Jun 23 2017 09:43:50)
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
(14:13:33) [Neos]

But php version which I use for the domain is 7.0.20


The changelog Packages/Libraries/ocramius/proxy-manager/CHANGELOG.md is telling me that the version 2.0.1 has been installed.
Using the mydomain.de/setup I am able to perform the first steps before I get still the same exception:

Exception #1355480641 in line 137 of /kunden/xxxxx_xxxxx/Neos/neoscms/Data/Temporary/Production/Cache/Code/Flow_Object_Classes/TYPO3_Setup_Step_DatabaseStep.php:
Fatal error: Cannot use $this as parameter in /kunden/xxxxx_xxxxx/Neos/neoscms/Packages/Libraries/ocramius/proxy-manager/src/ProxyManager/GeneratorStrategy/EvaluatingGeneratorStrategy.php(68) : eval()'d code on line 340
27 TYPO3\Flow\Core\Booting\Scripts::executeCommand("typo3.flow:doctrine:migrate", array|18|, FALSE)
26 TYPO3\Setup\Step\DatabaseStep_Original::postProcessFormValues(array|8|)
25 TYPO3\Setup\Controller\SetupController_Original::postProcessStep(array|8|, TYPO3\Setup\Step\DatabaseStep)
24 TYPO3\Setup\Controller\SetupController_Original::TYPO3\Setup\Controller\{closure}(TYPO3\Form\Core\Model\FinisherContext)
23 TYPO3\Form\Finishers\ClosureFinisher_Original::executeInternal()
22 TYPO3\Form\Core\Model\AbstractFinisher::execute(TYPO3\Form\Core\Model\FinisherContext)
21 TYPO3\Form\Core\Runtime\FormRuntime_Original::invokeFinishers()
20 TYPO3\Form\Core\Runtime\FormRuntime_Original::render()
19 TYPO3\Setup\Controller\SetupController_Original::indexAction(1)
18 TYPO3\Setup\Controller\SetupController::indexAction(1)
17 call_user_func_array(array|2|, array|1|)
16 TYPO3\Setup\Controller\SetupController::Flow_Aop_Proxy_invokeJoinPoint(TYPO3\Flow\Aop\JoinPoint)
15 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
14 TYPO3\Flow\Security\Aspect\PolicyEnforcementAspect_Original::enforcePolicy(TYPO3\Flow\Aop\JoinPoint)
13 TYPO3\Flow\Aop\Advice\AroundAdvice::invoke(TYPO3\Flow\Aop\JoinPoint)
12 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
11 TYPO3\Setup\Controller\SetupController::indexAction(1)
10 call_user_func_array(array|2|, array|1|)
9 TYPO3\Flow\Mvc\Controller\ActionController_Original::callActionMethod()
8 TYPO3\Flow\Mvc\Controller\ActionController_Original::processRequest(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
7 TYPO3\Flow\Mvc\Dispatcher_Original::initiateDispatchLoop(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
6 TYPO3\Flow\Mvc\Dispatcher_Original::dispatch(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
5 TYPO3\Flow\Mvc\DispatchComponent_Original::handle(TYPO3\Flow\Http\Component\ComponentContext)
4 TYPO3\Flow\Http\Component\ComponentChain_Original::handle(TYPO3\Flow\Http\Component\ComponentContext)
3 TYPO3\Flow\Http\Component\ComponentChain_Original::handle(TYPO3\Flow\Http\Component\ComponentContext)
2 TYPO3\Setup\Core\RequestHandler::handleRequest()
1 TYPO3\Flow\Core\Bootstrap::run()

Thanks for your help so far.

Neither of the mentioned PHP versions is an actual CLI binary, which you should have for Flow and Neos. So you should figure out where your hoster has an actual PHP CLI binary (eg. PHP 7.0.24 (cli) (built: Oct 17 2017 00:34:37) ( NTS )) from my local system.

AFAIK DomainFactory has CLI binaries of PHP available under this scheme:

  • /usr/local/bin/php5-LATEST-CLI
  • /usr/local/bin/php7-70STABLE-CLI

etc.

So you need to specify that path in your Settings as Neos.Flow.core.phpBinaryPathAndFilename

Yes, I am able to call the binary /usr/local/bin/php7-70STABLE-CLI:

$ /usr/local/bin/php7-70STABLE-CLI -v
PHP 7.0.20 (cli) (built: Jun 23 2017 10:20:38) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies

(be aware I use Neos 2.3.8) I changed the setting in file
neoscms/Packages/Framework/TYPO3.Flow/Configuration/Settings.yaml

phpBinaryPathAndFilename: ‘%PHP_BINDIR%/php7-70STABLE-CLI’

But I got the same exception.
Maybe I have to change this setting in some other files as well?

avoid the %PHP_BINDIR% at this place, since this is used to locate the CLI binary from the SAPI binary. Use the full path in the setting. Afterwards, you might at most need to flush the cache.

Unfortunately without success.
I executed the following commands:

$ ./flow flow:cache:flush 
$ ./flow flow:cache:flush --force
$ FLOW_CONTEXT=Production ./flow flow:cache:flush 
$ FLOW_CONTEXT=Production ./flow flow:cache:flush --force

I used a new browser instance, but I’ve got still the same exception. Only one empty DB table was created (flow_doctrine_migrationstatus). I wondered a little bit: the (old) settings for the DB were still available in the setup form. (it was not removed by flushing).

you might even need to call the ./flow command prefixed with the PHP CLI binary.

It doesn’t help. Calling the ./flow command like this:

$ /usr/local/bin/php7-70STABLE-CLI ./flow  flow:cache:flush
$ FLOW_CONTEXT=Production /usr/local/bin/php7-70STABLE-CLI ./flow  flow:cache:flush

has the same effect. I can find several settings with the right reference to the php-binary:
Even in the first line of the flow script: #!/usr/local/bin/php7-70STABLE-CLI

in neoscms/Configuration/Settings.yaml:

phpBinaryPathAndFilename: /usr/local/bin/php7-70STABLE-CLI

The DB configuration is stored inside the Settings.yaml, which is not flushed for good reasons :slight_smile:

Anyway, I just out of curiousity installed the Neos 2.3 LTS on our DF account and the installation went really smoothly, it also already added the phpBinaryPathAndFilename to settings automatically so even the command line tool worked :smiley:
So somewhere down your path a few things must have gone off road and now cause a lot of pain unfortunately :confused: Let’s try to get that solved!

I then further followed your steps from the first post, and after importing the new site (without the resource clean&publish, node repair) I also ended up with the exception about the Neos.Demo package.

What I then did however, was just flush the cache, rebuild it and then I could correctly log into the Neos backend again start working on that site.
export FLOW_CONTEXT=Production ./flow flow:cache:flush --force ./flow flow:core:compile && ./flow doctrine:compileproxies && ./flow flow:cache:warmup

I always do the warmup with the below three commands because I occasionally had the proxy compilation fail and then things would not work. With this line things always work out correctly.

So maybe it’s better to just restart all over instead of trying to fix the broken setup?

Hi Alexander, thanks for your great support.

Yes I thinks so too. I will try it tomorrow.

Almost solved :wink:
I started from the scratch and I followed your instruction and finally I was able to log into the backend - Thanks again for your support.
After few seconds four errors were displayed:

Anyway I build a new page with some content - I was happy.
Later I recognized that I am not able to publish any content to the homepage. I was able to add elements to the Content Collection of the homepage (in the Structure Tree), but this content could not be published and was not displayed in the backend.
As you can see in the picture

The headline was displayed in “Structure Tree” but not in the “content canvas” nor in the “Property Inspector”.
Do you have an idea how can I solve this?
I don’t believe this is important: but for your info: I defined a siteName with an umlaut (ä).
./flow kickstart:site My.Seiten meinärger.info

I found some other errors in the configuration:

The first three are in the default Settings.yaml that DF provides, but I’m not sure what they’re supposed to do, since there are no such settings in Flow Resource Management. You can just remove those lines, as they will currently not take any effect anyway.

   resource:
      publishing: null
      fileSystem: null
      mirrorMode: copy

As for the other three, those are from the Flowpack.Neos.FrontendLogin package and the messages basically tell that they use the old format for the requestPatterns setting. This still works, so the messages can be safely ignored. If you want to get rid of them, overwrite the Settings for those three requestPatterns in your global Settings.yaml to match the description here:
http://flowframework.readthedocs.io/en/3.3/TheDefinitiveGuide/PartV/ChangeLogs/330.html#id26

Thanks for these hints. I was able to fix all six errors in the configuration. The other four problems “Error loading inspector” are still existing. I will open another thread because I believe the problem about inspector editor is a different one and I mark this thread here as SOLVED.
Here a summary about the solution for all others who have got similar problems using Neos 2.3.8 at DomainFactory:

  1. After installation drop the Neos.Demo site and create a new one
./flow site:prune
./flow package:delete Neos.Demo
./flow kickstart:site MY.Seiten mysite.de
./flow site:import MY.Seiten
  1. Flush the cache, rebuild it
export FLOW_CONTEXT=Production
./flow flow:cache:flush --force
./flow flow:core:compile && ./flow doctrine:compileproxies && ./flow flow:cache:warmup
  1. After that you are able to log into backend and you will see 6 errors in the configuration:
Settings.TYPO3.Flow.resource.publishing -> This property is not allowed here, check the spelling if you think it belongs here.
Settings.TYPO3.Flow.resource.fileSystem -> This property is not allowed here, check the spelling if you think it belongs here.
Settings.TYPO3.Flow.resource.mirrorMode -> This property is not allowed here, check the spelling if you think it belongs here.
Settings.TYPO3.Flow.security.authentication.providers.Typo3SetupProvider.requestPatterns.controllerObjectName -> expected: type=dictionary, null found: type=string
Settings.TYPO3.Flow.security.authentication.providers.Typo3BackendProvider.requestPatterns.Flowpack\Neos\FrontendLogin\Security\NeosRequestPattern -> expected: type=dictionary, null found: type=string
Settings.TYPO3.Flow.security.authentication.providers.Flowpack.Neos.FrontendLogin:Frontend.requestPatterns.Flowpack\Neos\FrontendLogin\Security\NeosRequestPattern -> expected: type=dictionary, null found: type=string

For solving these errors the configuration must be fixed:
Error 1-3: can be solved by simple dropping the following lines from ./neoscms/Configuration/Settings.yaml

resource:
      publishing: null
      fileSystem: null
      mirrorMode: copy

Error 4: Fix the configuration in ./neoscms/Packages/Application/TYPO3.Setup/Configuration/Settings.yaml

          Typo3SetupProvider:
            provider: 'FileBasedSimpleKeyProvider'
            providerOptions:
              keyName: 'SetupKey'
              authenticateRoles: ['TYPO3.Setup:SetupUser']
            requestPatterns:_
              'TYPO3.Setup:controllerObjectName':_
                pattern: ControllerObjectName_
                patternOptions:_
                  controllerObjectNamePattern: 'TYPO3\Setup\Controller\.*|TYPO3\Setup\ViewHelpers\Widget\Controller\.*'
            entryPoint: 'WebRedirect'
            entryPointOptions:
              uri: 'setup/login'

Error 5-6: Fix the configuration in ./neoscms/Packages/Plugins/Flowpack.Neos.FrontendLogin/Configuration/Settings.yaml

  Flow:
    security:
      authentication:
        providers:
          'Typo3BackendProvider':
            requestPatterns:
              'Flowpack.Neos.FrontendLogin:NeosBackend':
                pattern: Flowpack\Neos\FrontendLogin\Security\NeosRequestPattern
          'Flowpack.Neos.FrontendLogin:Frontend':
            provider: 'PersistedUsernamePasswordProvider'
            requestPatterns:
              'Flowpack.Neos.FrontendLogin:NeosFrontend':
                pattern: Flowpack\Neos\FrontendLogin\Security\NeosRequestPattern
                patternOptions:
                  matchFrontend: true

After changing this configuration you have to clear the cache and rebuild it:

export FLOW_CONTEXT=Production
./flow flow:cache:flush --force
./flow flow:core:compile && ./flow doctrine:compileproxies && ./flow flow:cache:warmup

I am not sure whether this configuration is made in the right way (for Neos 2.3.8). I just copied and adapted it from Neos 3.2. Anyway the 6 errors were not displayed any more :wink:
The remaining issues can be tracked here: Some editors of inspector cannot be loaded after a fresh installation