I am trying to run the command ./yiic migrate in /protected folder of but it is not showing any response.
I have checked all the configuration file including /config/main.php
and other files. They are correctly configured.
Could any body help me to figure it out why it is happening.
You can also use the yiic.php to execute commands, following is how you can use it:
path/to/php protected/yiic.php migrate
If you use xampp then your php path will /xampp/php/php, so you can use:
../../php/php protected/yiic.php migrate
It's was most helpfull for me:
1.Open your root project directory
2.There should be present framework and {projectName} directories
3.Use next command:
php path/to/project/protected/yiic.php migrate
If you install yii successfully
For linux use:
php yii migrate
For windows use:
yii migrate
Related
I would like to install Phinx db migrations in my project, but documentation commands do not work. At first it is impossible to run
php vendor/bin/phinx init
because phinx is not php commant. Ok so I went to bin directory and run phinx.bat but this generated the yaml config file to bin folder not to the root dir as they says in documentation, but to the bin directory. What should I do to get correct installation?
So the problem is I am on Windows and I need to write Windows separator so this command works: vendor\bin\phinx init
I created a project in Laravel 5, on localhost. It works perfectly. I uploaded it on Godaddy using FileZilla and tried to run php artisan command. It didn't work. Just to be sure if there's a problem with composer or Laravel, I created a new Laravel project with same name and tried php artisan command it worked. Then I tried copying just app and database folder into newly created project and tried php artisan command, it stopped working just like before.
Can anyone tell me what is the problem here.
I tried running composer install command in project directory as per one suggestion on stackoveflow, didn't work for me
There probably is something in the app/ or database/ directory that's causing some fatal error and your php configuration is set to not display any errors.
Execute php --ini to find out which ini file is used and then configure it to show errors. After saving the ini file, run php artisan again and fix the error.
Recently I started working with Symfony2. Unfortunately the php app/console commands doesn't work at both my MAMP server as Vagrant server (MAC OSX). I tried to make a bundle with the following command
php app/console generate:bundle --namespace=Vendor/NameBundle
and also tried to fix a problem with
php app/console assets:install web
And both commands returned the following in my terminal:
Could not open input file: app/console
Does someone know how to fix this problem? I AM working at my project directory like: mac/applications/mamp/htdocs/project but it is still not working. I also tried to reinstall a new symfony project but that was not a fix.
I guess my php isn't working at all in my terminal...
So the problem was the version number. Symfony version 3.0 is available now so if you're do not selecting a version number at your project install it will automaticly install version 3.0 instead of 2.7. The new command is:
$ php bin/console generate:bundle --namespace=Vendor/NameBundle
instead of
$ php app/console generate:bundle --namespace=Vendor/NameBundle
Add php to your Path Environment Variable so that you can execute php from the command line
(You may need to restart your computer after step 1) From the command line type: php -version to test whether php has successfully been added to your pathenvironment variable
Depending on the version of Symfony you have, you will need to execute either php app/console or php bin/console where console is a php file inside the app or bin directories in your project root. To check which command to use, look into your project directories, if bin/ directory is present then execute php bin/console as console.php is located in that directory.
From the command line, cd into your project root directory and run the appropriate command as mentioned above. To check whether you are in the correct directory, run the dir command, if all your Symfony project directories: app/, bin/, src/, vendors/ etc. are displayed, then the php app/console (bin/console) ... command should run successfully.
or just create a new 2.8.x symfony project using:
symfony new yourAppName 2.8
instead of:
symfony new yourAppName
(which would create a new 3.x symfony project)
in this way you will be able to use:
php app/console
I installed wamp server and a copy of the Symfony2 framework. I am trying to create a Bundle, using the following command:
php app/console generate:bundle --nampespace=IDP/IDP_Bundle --format=yml
My PHP is in C:/wamp/bin/php/php5.3.10
But when I run the command it says:
could not open input file app/console
Can anyone tell me what is going wrong?
To execute command you should move to root directory of your project in terminal/CMD.
Please note that in version 2.5 some changes has been made so command will not work with app/console
Note: From 2.5 app/console is replaced by bin/console.
Please check here for changes. Also check this for more details about difference.
Dont run the command from the php path.
Add php into your path environment variable
and then cd to the project
C:/wamp/www/yourproject
and then run the command
php app/console generate:bundle --nampespace=IDP/IDP_Bundle --format=yml
It will work
For newer versions of Symfony (2.4.x or newer) use this method on windows to resolve the problem:
Go to project directory e.g. d:/xampp/symfony2-project/ and open composer.json and place this under requires array "symfony/console": "2.4.*#dev". And save the file.
Open command-line and cd to project's directory.
Use this command to let download and install the dependencies: php path/to/composer.phar install. Remember you should be in your project's directory and path/to/composer.phar is the actual path to your composer.phar file.
Now you are all done, just use php bin/console generate:bundle --namespace=Test/PrintBundle --format=yml
Actually You need to be in your project root to run this command and you have to add php directory to your system env path variable.
Add your php directory to the system path variable
cd to the root of your project
I'm use Symfony 3 and the Bundle calendar-bundle.
This error is present in the documentation of: Bundle: https://github.com/adesigns/calendar-bundle
The form correct is:
php bin/console assets:install web
Regards
First check the Environment Variable which is in Advanced system setting -> set path of C:/wamp/www/bin/php and then
run cmd->go to the directory of your project which is in www folder using cd C:/wamp/www/yourproject
use then user php app/console that shows the all command.
Sounds like you (i.e., your user) don't have access to read/execute console. I've never worked with with file permissions on a WAMP stack so I'm not sure what you'll need to do to fix them.
I got the same issue when installing the pear library
my issue was, when downloading the go-pear.phar file, it downloads as the (.txt) extension which i didn't see.
jst change the file extension to .phar and run the code
It is also possible that you have the line :
//umask(0000);
in your /web file, app_dev.php.
If after doing :
php app/console generate:bundle --nampespace=IDP/IDP_Bundle --format=yml
in your project path, you still can not generate your bundle, try uncommenting the unmask line. It worked for me.
I have installed Symfony2 on a Xampp server with PHP 5.3.8 and everything works ok ( the php, the symfony demo page ).
I try to create my own helloWorld, as the tutorial says :
php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml
I go Start->Run->CMD and put that line of code and it gives me back this :
could not open input file : app/console
I put the PHP directory to the System PATH but the problem persists.
To execute command you should move to root directory of your project in terminal/CMD.
Please note that in version 2.5 some changes has been made so command will not work with app/console
Note: From 2.5 app/console is replaced by bin/console.
Please check here for changes. Also check this for more details about difference.
Most probably, you're not in the symfony2 project directory.
start the windows console as you're doing it (Start->Run->CMD)
then move to the symfony2 project root directory with the command cd:
"cd c:\htdocs\path\to\your\symfony2\project"
then run the command from the tutorial
the thing is that the part of the command from the tutorial "app/console" means the path to the "console" script in the "app" directory of the symfony2 project.