Recently learning Symfony Framework, downloaded a lot of other people's projects on GitHub, to want to run someone else's project, summed up the following several steps:
First, cloning a copy of the code;
Second, the installation depends on the premise that the composer is installed,
1: Execute $CURL-SS HTTPS in your downloaded project directory://Getcomposer.org/installer | php installation
2: Install dependency: $ php composer.phar install;
Third, check what database is used by other people's projects
1: Open config.yml file,
Doctrine
Dbal:
Driver:pdo_pgsql----Here is the database driver, make sure your php file is already there, no please see my other Boven introduction;
Host: "%database_host%"
Port: "%database_port%"
dbname: "%database_name%"
User: "%database_user%"
Password: "%database_password%"
Charset:utf8
I generally use the PostgreSQL database, so no matter 3,721, I changed to PG database;
2: When you install dependencies will generate a parameters.yml such a file,
Content: (This is my)
parameters:
database_driver: pdo_pgsql ---Here is the database driver
database_host:127.0.0.1--Address
Database_port : null--
database_name:symfony_github --database name (good for creating a new database yourself)
database_user:postgres -User (all your own)
database_password:postgres--Password (all your own)
mailer_transport:smtp
mailer_host:smtp.163.com
mailer_ User: [email protected]
mailer_password:xxx
locale:zh_cn
secret:pleasechangethis
site_name:privatesocial
Site_tagline: ' This is a privatesocial Website '
IV: Execute PHP app/console doctrine:schema:update--force Generate database tables (this will automatically generate database tables based on the entity)
Running the Symfony project on GitHub encountered problems 2