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
Related
I have issue with Artisan usage on Windows 10 with Xampp.
What have I done:
clone project from git repositiory
run composer install
In directory with project i trying run:
php artisan
but i get errror:
Could not open input file: artisan
But if i run command
php bin/console i get list of command like cache, debug, eloquent... so some tools are there... But none artisan...
How i can add/use artisan into existing project?
Check if artisan file exists in your project root folder. If it does, then you're probably on the wrong folder. If it doesn't exist, you can just download it from the official repo.
To configure an existing project, you'd typically check those things first :
You should goto app/config/database.php check file and verify username and password.
After check in Project Folder vendor folder and composer.json file exist then remove it (that remove old configuration now we going to fresh configuration).
Then after back to command prompt and fire command composer update and that download some dependent file download.
Now Run php artisan serve
I have a problem, I wrote an application but it doesn't work on sub folder. I have to prepare my program to work in sub folders. For example:
127.0.0.1/ - here is my project at the beginning, when I create it, but when someone start in like this:
127.0.0.1/store - then it doesn't work, how to fix it and where do this? Somewhere in config?
I think the setup is wrong, there are different ways to boot laravel on localhost
1. Run the following command from the project root directory
php artisan serve then go to 127.0.0.1:8000
php artisan serve --port=8080 to change the port
2. Access it from localhost by
go to -> xampp(if you're using xampp) -> htdocs
mkdir (create a folder) "store"
then cd into the folder, run the following command
composer create-project --prefer-dist laravel/laravel .
go to -> 127.0.0.1/store/public
Yesterday I've just installed Laravel with Behat on my VM Ubuntu 15.10.
Everything works fine, running the command $ vendor/bin/behat --init successfully created the features/ folder
but today something is weird, when running the $ vendor/bin/behat its saying vendor/bin/behat: line 1: ../behat/behat/bin/behat: No such file or directory
What's inside the vendor/bin/behat file?
This first single line ../behat/behat/bin/behat
accessing the actual location works $ vendor/behat/behat/bin/behat which basically means the file DOES exists
Please note that the issue is the same for the files in vendor/bin like doctrine phpspec etc..
You're having relative path problems. If your current directory contains vendor/ and you execute vendor/bin/behat, then ../behat/behat/bin/behat doesn't exist because it's going one directory up from your current directory, not vendor/bin/. For example:
$ cd $HOME/project
$ vendor/bin/behat
vendor/bin/behat: line 1: ../behat/behat/bin/behat: No such file or directory
That relative path becomes $HOME/project/behat/behat/bin/behat and not $HOME/project/vendor/behat/behat/bin/behat (note vendor present in the second path)
You need to be inside vendor/bin/ when executing behat:
$ cd $HOME/project/vendor/bin
$ behat
...
However, I don't see this being an issue with the latest behat install, line #1 is a well formed shebang. I think you might want to destroy your vendor install, update composer, etc, and reinstall Behat. Those files should not start with relative paths.
EDIT:
According to the composer docs, it creates symlinks to package binaries, as seen in the source code. You can verify this by running ls -l vendor/bin (all symlinks will have a -> pointing to their destination path). It would seem your original php composer.phar require ... was corrupt from the beginning.
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
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.