I have downloaded and extracted the ZendSkeletonApplication as said in the
http://framework.zend.com/manual/2.2/en/user-guide/skeleton-application.html
Now when the try installing the zftool by follwing the document
1.http://framework.zend.com/manual/2.1/en/modules/zendtool.introduction.html
when typed
composer require zendframework/zftool:dev-master
i got Error:
No command 'composer' found, did you mean:
Command 'compose' from package 'mime-support' (main)
composer: command not found
So tried Manual installation
Extracted and placed as said in manual
i have installed the ZFTool here:
/var/www/ZendSkeletonApplication/vendor/ZFTool
This also says Error:
zf.php: command not found
Not sure what else is creating problem.
Can you guys, please provide with a step by step way of installing zftool
Place yourself in the root of the project
On Linux run command find -name zf.php just to find the location of the file under your project.
If you find it - mine was under vendor/bin, run the following command:
php vendor/bin/zf.php create module Test
This command will create the Test Module.
Related
I have executed the following command on windows command prompt
folder path >php composer.phar install
Getting Error
Could not open input file: composer.phar
Your command is trying to use composer which is not installed. It is not used to install composer. You have to install it using one of methods stated here:
https://getcomposer.org/doc/00-intro.md
The other option is that your path to composer file is wrong, which can also be fixed by following documentation.
I am Using my own Machine Kali Linux 2.0 Debian x64 . Now, i have Installed Laravel in my directory structure like
/opt/lampp/htdocs/learning-larvel/
Inside the Learning-laravel folder i have Installed my Laravel files, and also i installed composer. So when i go to http://127.0.0.1/learning-laravel/public . I see a See a White Screen and in Between it is written "Laravel 5", which means the Laravel GUI Setup is fine.
Now, to create a new file for Laravel, when i open my Terminal and type
laravel new xyz
then it gives me a error which says bash: laravel: command not found
Now, how can i fix the error.. I have researched about it by setting PATH to bashrc. But i am not getting it fixed right. Additionally when i type in my command composer -version then also it says bash: composer: command not found but i have Installed composer on the folder learning-laravel itself.
I could also see files like composer.phar there in /opt/lampp/htdocs/learning-larvel/
Any help would be extremely thankful.
As the composer official getting started page points out:
There are in short, two ways to install Composer. Locally as part of
your project, or globally as a system wide executable.
if you wanna do composer -- or laravel -- in command line, you wanna install them globally.
Check out the following links:
https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx
https://laravel.com/docs/4.2#install-laravel
I encountered the same problem. Apparently, the composer exists in path ~/.config/composer/vendor/bin when running as super user. Therefore, replacing the paths which were described above by this, and it should work. Hope it helps.
I am trying to int Zend framework 2. I aready have xampp running. I followed the steps on this answer. How ever when I visit the url I specified I get the following descriptive error:
Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to load ZF2. Run php composer.phar install or define a ZF2_PATH environment variable.' in C:\xampp\htdocs\ZendSkeletonApplication\init_autoloader.php:51 Stack trace: #0 C:\xampp\htdocs\ZendSkeletonApplication\public\index.php(18): require() #1 {main} thrown in C:\xampp\htdocs\ZendSkeletonApplication\init_autoloader.php on line 51
as the exception states. I went on to run the command php composer.phar install
and nothing happens. nothing displays on th cli to showing anything being installed. and when i run again application i get the same error. Where else can I look and check for errors. Thanks
I am using PHP Version 5.6.8
So what worked for me. I began again from scratch following the tutorial here
Then I still got a "could not open input file: composer.phar" when I ran the command: php composer.phar install
so according to "www.softanalyst.com/zend-2-framework-installation-with-xampp/#comment-883" I need to run the following command:
php -r "readfile('https://getcomposer.org/installer');" | php
which I did and it all worked.
open up your terminal and move To your project using the cd project directory
one type dir composer.phpr and try this one dir composer.json if both file listed than do the next step otherwise download the composer in current directory and run the following command as bellow.
php composer.phar install this comman will install all required dependency from the composer.json file. it will take time as depend on internet speed.
once it's complete than try this link for further steps.this link also having how To install composer And skeleton application.
Github
Twitter
this is giving me a headache. Simply trying to install laravel 4.
So, installed composer fine and it runs correctly. The issue is that when i tryed to install laravel i was recieving this error:
- laravel/framework v4.2.9 requires php >=5.4.0 -> no matching package found.
So, I checked the PHP version that terminal was using and using:
which php
gave me the usr/local/bin location and then php -v showed that was 5.3 php.
So, following some instructions I edited the .bash_profile.save so that the path was now:
alias composer='php ~/composer.phar'
export PATH=/Applications/MAMP/bin/php/php5.5.14/bin:$PATH
^R
I then ran:
source ~/.bash_profile.save
And then again which php.
This showed the correct path BUT... when trying to use composer i recieved this error:
Could not open input file: /Users/me/composer.phar
So now im stuck. Is it because of the alias composer line? Where should that now be pointed?
Thanks, just want to get on with laravel... :)
You need to have composer in that directory below
mv composer.phar /usr/local/bin/composer
And not in your user account's root
Just get this composer.phar in the composer web site and put it in the same place where you have composer.json; this is all you need.
https://getcomposer.org/download/1.2.0/composer.phar
Running:
MAMP 2.0.5
PHP 5.3.6 (bundled with MAMP)
Mac OS X Lion 10.7.2
My goal is to get the Codeception testing framework to work and use within my MAMP project. I'm following the instructions here on how to install it.
Pear is installed and working fine. I am able to get Codeception installed with these commands:
$ pear channel-discover codeception.com/pear
$ pear install codeception/Codeception
Once installed when I try to run the codecept commands I get the following error:
Warning: require_once(Codeception/autoload.php): failed to open stream: No such file or directory in /usr/bin/codecept on line 12
Fatal error: require_once(): Failed opening required 'Codeception/autoload.php' (include_path='.:') in /usr/bin/codecept on line 12
I think that the issue is caused by either:
A conflict between MAMP's PHP installation in the one bundled with OS X
An issue with the include_path in my php.ini or somewhere else
Also of interest
When I run the $ phpunit command from inside my project folder I get -bash: phpunit: command not found but if I run it as $ /Applications/MAMP/bin/php/php5.3.6/bin/phpu
nit it works just fine.
I would expect there to be a codecept file in /Applications/MAMP/bin/php/php5.3.6/bin/ but there isn't - there is however a Codeception folder in /Applications/MAMP/bin/php/php5.3.6/lib/php
I've tried a few different ways to install it, and I guess one of the ways installed Codeception in Lion's copy of php (as opposed to MAMP's) - so I do have a codecept file in /usr/bin/ as well as the Codeception folder in /usr/lib/php/pear/
For reference:
PHP lives here: /Applications/MAMP/bin/php/php5.3.6/bin/php
Pear lives here: /Applications/MAMP/bin/php/php5.3.6/bin/pear
PHPUnit lives here: /Applications/MAMP/bin/php/php5.3.6/bin/phpunit
Any Help? Suggestions?
Thanks to Davert's help - I was able to confirm that this is a conflict with MAMP's copy of PHP and Lion's built-in copy of PHP. To solve the issue I created a new php.ini file in /etc that was a duplicate of php.ini.default and changed the include_path to /Applications/MAMP/bin/php/php5.3.6/lib/php
I think the problem is: your PEAR command was executed from bundled PHP. So your primary MAMP PHP libraries in (/Applications/MAMP/bin/php/php5.3.6/bin/pear) were not updated. I suggest you should find the second PEAR were the Codeception was exctually stored. And add path to it into 'include_path' in php.ini.
Yes, PEAR is quite buggy. In next releases a Composer installator will be added.
Also, you can try to use Phar executable.
In this case a Codeception should be executed with:
php codecept.phar
One solution that worked for me was to edit /Applications/MAMP/bin/php5.3/bin/codecept and replace /usr/bin/php at the first line by /Applications/MAMP/bin/php5.3/bin/php