Hello everybody!
I have an error when I trying to install Sylius, I follow this topic: http://sylius.readthedocs.org/en/latest/guide/installation.html
The first step it's OK. I choose all the default parameter but I when I try this command there are an error: $ php app/console sylius:install
"Trying to get property of non-object TranslatableListener.php"
It's the first time I use Sylius, if you can help me!
Thanks for all!
Jeroen
@pjedrzejewski you need to register translation bundle and component on packagist!
hello arnod can you explain more how to register this bandle plz and where with some code plz?
t'kx
WIth these steps I got to install sylius:
1) Open console and write (without character $): $ composer create-project -s dev sylius/sylius
2) When it finish, write the correct values in the parameters. They will be save into the sylius_name_project/app/config/parameters.yml, so you can change them later. In my case, the first parameters take the next values:
sylius.database.driver: pdo_mysql
sylius.database.host: 127.0.0.1
sylius.database.port: 3306
sylius.database.name: sylius
sylius.database.path: null
sylius.database.user: (Your database user, normally root)
sylius.database.password: (Your database password)
sylius.mailer.transport: smtp
sylius.mailer.host: 127.0.0.1
sylius.mailer.port: null
sylius.mailer.user: null
sylius.mailer.password: null
sylius.secret: EDITME
sylius.locale: en_US
sylius.currency: USD
The next parameters you can clic Intro. You can change it later. And notice that you don't need to create the database: sylius generate it automatically.
3) Go into your project directory from the console: $ cd your_sylius_project. Write again in console: $ php app/console sylius:install.
4) After that, try to enter in you sylius from your browser, using localhost/.../your_sylius/project/web/app_dev.
5) Probably there will be errors about permission. Read the files that you need to grant privileges and, again, from the console write: $ sudo chmod 777 -R your_sylius_project/path_to_the_file/file or simply $your_sylius_project/path_to_the_file/
It's not exactly the solution of your problem, but maybe solve it.
i solve problem with installing under ubuntu with lower version of php and import it under windows
Installing Sylius is a pain in the ass.
Stuck on:
Step 2 of 4. Setting up the database.
Creating Sylius database for environment dev.
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] No such file or directory' in /Users/siesqo2/Documents/my-tests/sylius/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43
Stack trace:
#0 /Users/siesqo2/Documents/my-tests/sylius/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(43): PDO->__construct('mysql:host=loca...', 'root', 'root', Array)
#1 /Users/siesqo2/Documents/my-tests/sylius/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php(45): Doctrine\DBAL\Driver\PDOConnection->__construct('mysql:host=loca...', 'root', 'root', Array)
#2 /Users/siesqo2/Documents/my-tests/sylius/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(360): Doctrine\DBAL\Driver\PDOMySql\Driver->connect(Array, 'root', 'root', Array)
#3 /Users/siesqo2/Documents/my-tests/sylius/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): Doctrine\DBAL\Connection->connect()
#4 /Users/siesqo2/Documents/my-tests/sylius/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(3 in /Users/siesqo2/Documents/my-tests/sylius/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 103
iMac-van-Jeroen:sylius siesqo2$ php app/console sylius:install
I'm using MAMP Pro and the parameters.yml are:
sylius.database.driver: pdo_mysql
sylius.database.host: localhost
sylius.database.port: 8888
sylius.database.name: sylius
sylius.database.path: null
sylius.database.user: root
sylius.database.password: root
sylius.mailer.transport: smtp
sylius.mailer.host: 127.0.0.1
sylius.mailer.port: null
sylius.mailer.user: null
sylius.mailer.password: null
I've tried different host and port values and nothing seems to work. Even tried to fill in the path parameter, no success.
Can somebody please help me. I've searched on the internet and I see that everybody seems to be stuck on the installer.
This doesn't look like a problem with the installer but with your configuration/MySQL socket.
Can you try changing the database host to 127.0.0.1. Did you perhaps use another custom bind-address for MySQL?
Maybe try other solutions of: http://stackoverflow.com/questions/6259424/troubleshooting-no-such-file-or-directory-when-running-php-app-console-doctri
I'm on a Mac, using MAMP PRO, which helps to set up a virtual server and phpmysql.
These are the values that I'm using for all my Symfony2 installs:

I execute:
app/console sylius:install
But then the installer is always stuck on step 2:

What I've already tried, but isn't working:
sylius.database.host to 127.0.0.1 but that isn't working at all. When I try that, step 2 freezes. What also is the case in any Symfony2 install
sylius.database.port to 3306, gives same result as the one above.sylius.database.path to null, since the value I filled in is actually the path to the socket.Can anybody help me with a solution?
I suppose it's your database configuration problem not Sylius.
Please post this question on StackOverflow - it is the official support channel for Sylius. Since it's database issue tag your question with "doctrine" maybe someone will be able to help you! http://stackoverflow.com/questions/tagged/doctrine
@michalmarcinkowski I had similar problem with default configuration on Vagrant box (on Mac) that comes with Sylius, but couldn't find time to check it deeper unfortunately...
Maybe trivial question, do you have this class in vendors? Have you tried composer install?
test your database connection with small script... and for best dev install try debian and transfere your sql data to your prefered os
Found a solution for MAC users with MAMP (PRO)
In your app/config/config.yml add unix_socket
doctrine:
dbal:
driver: %sylius.database.driver%
host: %sylius.database.host%
port: %sylius.database.port%
dbname: %sylius.database.name%
user: %sylius.database.user%
password: %sylius.database.password%
charset: UTF8
unix_socket: "%sylius.database.unix_socket%" # only when using MAMP
And add it into your ```app/config/parameters.yml
# This file is auto-generated during the composer install
parameters:
sylius.database.driver: pdo_mysql
sylius.database.host: localhost # by default MAMP uses localhost
sylius.database.port: 8888 # by default MAMP uses 8888
sylius.database.name: sylius # your own database name you've created in MAMP phpmyadmin
sylius.database.path: null
sylius.database.user: root
sylius.database.password: root # this is the default MAMP password
sylius.database.unix_socket: /Applications/MAMP/tmp/mysql/mysql.sock # only when using MAMP
Recently i came across this problem, and the solution was behind phpmyadmin, the server was running on port 8888 but the phpmyadmin had 8889 port. When you set your .env file, first, check the phpmyadmin config MAMP/bin/phpMyAdmin/config.inc.php, and set the port used by phpMyAdmin.
DATABASE_URL=mysql://username:pass@localhost:8889/your_db_name