How to setup Neos CMS with Laragon on Windows 11

Setting up Neos CMS 9 using Laragon on Windows 11

No composer manifest file found at ... this is the error I keep getting when installing Neos CMS via Composer. I have detailed it a bit more in the Errors section below.

To solve it, the only solution I found was to install Neos using Docker instead of only Composer. So, I ran Docker and then the following command:

docker run -v %cd%:/app -it --rm composer create-project neos/neos-base-distribution neos

After that, I still got some errors as explained below, but it worked after all.

If you fixed the errors and can see the welcome screen on your local browser, you can now run:

php flow welcome

And this will give you a list of commands to run to configure the installation of Neos.

I tried using the UI setup, but after inserting the setup password, I was stuck on a blank page at setup/login/authenticate and gave up, moving to the terminal.

Now configure the database:

php flow setup:database

And insert your data, which usually are:

  • DB driver: pdo_mysql, but you could also use mysqli
  • Host: 127.0.0.1
  • Database: neos (or the name you used to create your database in HeidiSQL)
  • Username: root
  • Password: (leave empty, just press enter, this is the default on Laragon, otherwise write the password you setup in HeidiSQL)

Now time for the Image Handler:

php flow setup:imagehandler

I would go for Imagick here, but you can choose GD if you prefer.

If you do not have Imagick, you can download php_imagick.dll from PECL and then put the file into your PHP folder:

# Add the php_imagick.dll file here:
C:\Programs\laragon\bin\php\php-8.1.10-Win32-vs16-x64\ext

Now be sure to have the modules enabled in your Laragon on Menu > Preferences > PHP > Extensions.

Eventually try reloading Laragon.

If it still doesn't work (it happened to me also) try modifying your php.ini and enable Imagick there:

# C:\Programs\laragon\bin\php\php-8.1.10-Win32-vs16-x64\php.ini
extension=fileinfo
extension=gd
;extension=gettext
;extension=gmp
extension=intl
extension=imagick
;extension=imap
;extension=ldap

Errors

Here are some errors I encountered during the installation of Neos, hopefully this will be helpful to you:

The system cannot find the path specified

You probably need to set the correct path to PHP in your \Configuration\Settings.yaml file in Neos.

Here is an example:

Neos:
  Flow:
    persistence:
      backendOptions:
        driver: pdo_mysql
        charset: utf8mb4
        host: 127.0.0.1
    mvc:
      routes:
        Neos.Flow: true
      phpBinaryPathAndFilename: 'C:/Programs/laragon/bin/php/php-8.1.10-Win32-vs16-x64/php.exe'
    core:
      phpBinaryPathAndFilename: 'C:/Programs/laragon/bin/php/php-8.1.10-Win32-vs16-x64/php.exe'

Some additional information can be found here: StackOverflow: Neos CMS installation 500 error: Specified path not found

No composer manifest file found at "C:/Programs/laragon/www/neos/Packages/C:/Programs/laragon/www/neos/Packages/Application/Neos.Behat/composer.json".

As you can see by the error message, for some reason the path is repeated two times. Something similar happened to me in Symfony 5, where I found a solution by setting the "runtime" option in composer.json. See the problem on Github: Symfony [Runtime] Fix for Windows when projects are deployed on junctions/symlinks.

With Neos I was not using symlinks, but anyway, I guess it could be something linked to realpath() and Windows.

On Neos I am unable to resolve the issue. The only fix I found was to install via Docker combined with Composer. Just installing with Composer alone always raises this error for me and I have no idea how to solve it yet.

Basically I ran the command:

# Working
docker run -v .:/app -it --rm composer create-project neos/neos-base-distribution neos

Instead of:

# Raises error
composer create-project neos/neos-base-distribution neos

Don't ask me why it works. Actually, even using Docker I encountered other errors (see below) but I managed to solve them eventually.

Could not publish "C:/Programs/laragon/www/neos/Packages/Framework/Neos.Flow/Resources/Public" into resource publishing target "localWebDirectoryStaticResourcesTarget" because the source directory could not be symlinked at target location.

Solution: open a Terminal as Administrator and run the following command:

php flow flow:cache:warmup

If that's not enough, try running these two:

php flow flow:core:compile
php flow flow:cache:warmup

And eventually you can try deleting the folder Data\Temporary in your Neos installation, then run the two commands again.

You are running the Flow CLI with a PHP binary different from the one Flow is configured to use internally.

Flow is running with with PHP "8.1.10", while the PHP version Flow is configured to use for subrequests is "". Make sure to configure Flow to use the same PHP version by setting the "Neos.Flow.core.phpBinaryPathAndFilename" configuration option to a PHP-CLI binary of the version 8.1.10. Flush the caches by removing the folder Data/Temporary before executing Flow/Neos again.

This happened to me after running the database and image handler setups. Of course I did set the PHP version in my Settings.yaml.

You are executing Neos/Flow with a PHP version different from the one Flow is configured to use internally.

This error message could appear right after installing Neos and even, again, after setting up the database settings. Don't ask me why.

Try runnng this command every time you see the error.

php flow flow:core:compile

It should at least fix the problem temporarily.

The specified path to your PHP binary (see Configuration/Settings.yaml) is incorrect or not a PHP command line (cli) version.

Basically you will need to check the phpBinaryPathAndFilename option inside the file Configuration/Settings.yaml.

Warning: require(/Data/Temporary/Development/Doctrine/Proxies\__CG__NeosFlowSecurityAccount.php): Failed to open stream: No such file or directory in \Packages\Libraries\doctrine\common\src\Proxy\AbstractProxyFactory.php line 197

This is likely because you need to clear the cache by using the command:

./flow flow:cache:flush

I hope this will help you solve most of the errors you might encounter!

Leave a comment

All comments will be subject to approval after being sent. They might be published after several hours.

You can just use a random nickname, it is usefull to allow me to at least answer your comments. And if you choose to submit your email, you can receive a notification whenever I reply to your comment.

No comments have been written so far on this article. Be the first to share your thoughts!

*