How to install symfony2 project existing in github repository to local instance - symfony

I'm having a symfony2 project in github repository. I want to install it to my local instance. I'm using Xampp on Windows 7. How can I achieve it?
Thanks!!

if your using xampp the easiest way is to use symfony build in server.
clone or download the symfony project to your xampp htdocs.
start your xampp and open the shell, (shell button on the right)
locate yourself in the root symfony dir. and type:
php app/console server:run
a local php server should start on http://localhost:8000
i recomment using this because (dev mode is loaded by default).
its faster then a VM because you dont sync files.
you can also add verbose arguments
php app/console server:run -vvv
that way you get more output info when debugging.

Related

Trouble for deploy Symfony 4 on my ftp server

I'm a dev from symfony 3.3 and i would like to have migrate on symfony 4 but everything i try didn't word for having a working build on my ftp server.
I have install composer
Download the demonstration project from symfony with composer
Install apache bundle with composer
I verify the .htaccess and is there in the "public" folder
With my ssh access, i have launch the server: bin/console server:run
after that i go to my domain, go to the public folder
The toobar is loading perfectly but i don't have any css/js loading
I send a screenshot with what i see on my website
I saw a lot of people speaking about the virtual host but i don't have access to the file with my ftp provider, is it necessary to modify this? Everything was working with symfony 3 so i hope i can still use this provider with symfony 4 (hostinger)
One more thing, when i put the bin/console server:run i got this
[OK] Server listening on http://127.0.0.1:8002
don't know if it's normal :)
and when i navigate on my website, there is nothing mark on my ssh console
https://i.gyazo.com/a40d12ce223ca6429cf2987d9bda18c8.png
https://i.gyazo.com/809330cfc89483e99b7b1f704d789a1d.png

Wamp 3.0.6 server can not run Composer and Symfony

Please I need help on this project, I have wamp server to run the project on symphony.Look at the error display on my web browser ,when load the project from wamp server
If I run this code from my command prompt see the results php app/check.php
If I run this code from my command prompt see the results php app/check.php
php app/console server:run
It looks like you also have XAMPP installed on your system, or did at one time.
See the line that says
Configuration file used in PHP : C:\xampp\php\php.ini
^^^^^
I would suggest that you check your Windows PATH. I guess XAMPP might have added it's own PHP version into the PATH.
Alternatively you could uninstall XAMPP, but make sure you back everything up, code/databases etc before you uninstall it.
WAMPServer does not need anything placed on the Windows PATH, and if you do it makes switching versions of PHP far more complicated and prone to mistakes.
Have a look at this answer for how to make the PHP CLI as flexible as WAMPServer when it comes to running PHP code on different versions of PHP from the command line.
It also looks like you have not istalled composer. Follow the instructions on how to instal composed from the error messages. Or have a look at the composer site for help

Launch project symfony in browser [duplicate]

I have installed Lampp on my linux system, and I am learning symfony2, while trying to create the schema with symfony2 command
php app/console doctrine:schema:create
I am getting the following error message:-
PDOException “could not find driver”
I also uncomment this line extension=php_pdo_mysql.dll in php.ini file
I tried to look and google my issue but couldn't resolve my problem. when i run php -m command i am getting the following result:-
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/mysql.so' - /usr/lib/php5/20090626+lfs/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/mysqli.so' - /usr/lib/php5/20090626+lfs/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/pdo_mysql.so' - /usr/lib/php5/20090626+lfs/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mbstring
mhash
openssl
pcntl
pcre
PDO
----
----
Is there a way i can remove this issue ?
In Ubuntu, write in the console
sudo apt-get install php5-gd php5-mysql
and it will work
Hope you are running your project in localhost. In your project folder app/config a file named parameters.ini , Make sure that your Mysql database connection cofiguration is correct. If you are using mysql See database_driver=pdo_mysql is its driver.
Below is an example.
database_driver = pdo_mysql
database_host = localhost
database_port =
database_name = databasename
database_user = msqlusername
database_password = mysqlpassword//if not make blank
mailer_transport = smtp
mailer_host = localhost
mailer_user =
mailer_password =
locale = en
secret = ThisTokenIsNotSoSecretChangeIt
Hope it helps you.
You need to have a module called pdo_mysql.
Look for the following in phpinfo() output,
pdo_mysql => PDO Driver for MySQL, client library version => 5.1.44
to install pdo_mysql you need to do this:
pecl install pdo
pecl install pdo_mysql
and then add the following to your php.ini file:
extension=pdo.so
extension=pdo_mysql.so
brew install php70-pdo-pgsql
in case you installed php7 on mac with brew and, change php version according to what you have installed.
if you are using XAMPP then in php.ini file line no 897(depends on version),
;extension=php_pdo_pgsql.dll
uncomment it , then it appears like below
extension=php_pdo_pgsql.dll
in php.ini file line no 897, then restart XAMPP.
There are two PHP versions installed in my server PHP 5.6 and PHP 7
When I run the command php app/console doctrine:schema:update I have the error : [PDOException] could not find driver
I resolve this error by specifying the PHP version:
php5.6 app/console doctrine:schema:update
Looks like your install is missing the .so files it needs to implement the mysql connection. If you're using a package management system to install PHP then make sure you've installed all the necessary submodules (in this case I think you'll need mysql-dev, and the various PHP PDO modules), though such dependencies should have been resolved for you by the package manager.
If you didn't go through a package manager, then you'll have to compile the required .so files from source.
I had the same problem and for me, it was having multiple PHP versions.
So specifying the full address of the PHP solved the problem.
Adding to Jaspreet Chahal's answer.
When installing PDO as a shared module, the php.ini file needs to be updated so that the PDO extension will be loaded automatically when PHP runs. You will also need to enable any database specific drivers there too; make sure that they are listed after the pdo.so line, as PDO must be initialized before the database-specific extensions can be loaded. If you built PDO and the database-specific extensions statically, you can skip this step(Source).
What I mean is, it should look something like this -
extension=pdo.so should be placed before the extensions of the different database drivers.
Maybe you forget to install doctrine/dbal
composer update
composer require doctrine/dbal
if it didn't work go to your php.ini (according to current version)
and remove ";"
;extension=pdo_mysql.so

Symfony in wamp error: Could not open input file: ⌠E:\wamp\bin\php\php5.5.12\symfony÷

I just installed symfony in my wamp according to the tutorials in below websites
http://uniapple.net/blog/?p=298
http://uniapple.net/blog/?p=298
all had finished without any error. But after finished all, when give the command symfony in cmd, it shows the below error.
Could not open input file: ⌠E:\wamp\bin\php\php5.5.12\symfony÷
and i couldn't figure it out. Please help..
Thank u in advance
If you are trying to use the Symfony console, you need to be in CMD and go to your project root:
cd C:\Sites\project
Before you try any commands, please make sure PHP is in your PATH variable.
Then to do commands in symfony you need to do:
php app/console command:action
//for example, do a cache warmup - choose your environment
php app/console cache:warmup --env=[dev|prod]
Is this what you mean when you want to use Symfony in cmd?

Change CLI's php

Im working with Symfony2. Im trying to execute the following command:
php app/console doctrine:database:create
The problem is that I get the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20090626/apc.so' - dlopen(/opt/local/lib/php/extensions/no-debug-non-zts-20090626/apc.so, 9): image not found in Unknown on line 0
Could not create database for connection named <comment>symfony</comment>
could not find driver
APC is already installed, since the Symfony/web/config.php was OK, what I realised is that the version of php from CLI is different from the one Apache is running.
The one Apache is running has APC installed, so I would like CLI to run that same php, How can I do that?
in my case deleting the version that macports installed was enough to have CLI and Apache run the same PHP.
And that's:
sudo port uninstall php5

Resources