I have installed composer in windows platform. But when am trying to install the composer.phar through this command,
php -r "readfile('https://getcomposer.org/installer');" | php
it's giving me this error-
Warning: readfile(https://getcomposer.org/installer): failed to open
stream: A connection attempt failed because the connected par ty did
not properly respond after a period of time, or established connection
failed because connected host has failed to respond. in Command line
code on line 1.
The internet configuration is OK. Please help. Am going through a hell of time...installing Laravel .
Had also some problem with the installation.
At the end I used the installer:
https://getcomposer.org/Composer-Setup.exe
Installing with installer
That line just pulls and outputs a file that contains a PHP script that will actually install Composer, thats why it is piped to PHP in the end of the line.
If readfile doesn't work, you can simply download the file with your browser by saving the file from https://getcomposer.org/installer then execute it from the folder where you downloaded:
cat ~/installer | php
Assuming that you downloaded it to your home ~ folder with the name installer.
Manual installation
It also worth mentioning that this installer just makes a few checks after it copies the actual composer.phar file, that you can download by yourself from the bottom of the download page, with the link named: Latest Snapshot
Thats all. By downloading that file you technically "installed" Composer. Just go to the folder where you downloaded it and you can start to use it:
php composer.phar
I the solution above didn't work for me. So I found another way for time being to make things moving. So, I used Larapack. I know that's like running away from problems but it worth it for now. As I move on, I will find a way round.
Thanks a lot guys for your help.
Related
Trying to view a local website:
"Uncaught Error: Class 'ComposerAutoloaderInite0e6765..etc' not found in /Users/{ username }/Sites/{ sitename }/htdocs/vendor/twig-autoload.php".
So on into Terminal to do composer dump-autoload. (It worked the first time I did it).
I now get this message:
"The 'git' command requires command line developer tools. Would you like to install the tools now?" (It asks for Xcode)
I click No.
Terminal tells me the file command has been run OK, but no...
Repeating the dump autoload with -vvv reveals the truth:
Failed to initialize global composer: Composer could not find the config file: /Users/{ username }/.composer/composer.json
Searching about, the only things I've found on the composer error seem to be related to Lavarel.
info:
Composer is installed in /Sites/{ sitename }/vendor/
Composer version: 1.10.6
So what I'd like to understand:
Why is composer trying to initialise a 'global composer'? Does it think the locally installed one is global, or could there be another Composer it's trying to default to?
How do I tell composer where the json file is?
What should I do about the xCode message, if anything?
I've reinstalled composer (and Twig - the only package I'm using - seems overkill for one package, but trying out alternatives didn't end well).
The site is now back running (locally).
Still have the issue of xCode request from Terminal, but that's for another question.
So the answer seems to be: Reinstall composer and packages.
I've got this error in my laravel 5.2 project who hosted in debian linux
Warning: require_once(/home/u706561288/public_html/sap/vendor/composer/autoload_real.php): failed to open stream: No such file or directory in
/home/u706561288/public_html/sap/vendor/autoload.php on line 5
Fatal error: require_once(): Failed opening required '/home/u706561288/public_html/sap/vendor/composer/autoload_real.php' (include_path='.:/opt/alt/php70/usr/share/pear') in
/home/u706561288/public_html/sap/vendor/autoload.php on line 5
so many forum like stackoverflow tell me to using php artisan "composer update" but
unfortunately my hosting package not available to composer instalation
please tell me how to fix this problem
I suggest that you test these steps
On the Localhost, run these two commands (composer update and composer dump-autoload)
Re-upload the entire project on the server
Also, if the problem is not resolved, you can delete the Vendor folder and the composer.lock file and run the composer install command and Re-upload the entire project again.
When the hosting service or some PC does not allow to install Composer and appears error like in my case, follow these steps:
Delete all laravel project in hosting service. I recommend to use smartftp for good speed file access and tracked action.
Back to our localhost project and run composer install --no-scripts command and then composer clearcache.
Reupload all laravel project.
Don't forget to configure .env file.
I hope this can help with the same problem in future.
I had the same error while back, what I did to solve it was. I delete all the vendor folder from the root project then install it back by executing composer install
delete the Vendor folder and the composer.lock file and run the composer install command and Re-upload the entire project again
this helped me
If anyone still facing the issue after deleting the vendor directory and did composer install try to update your composer by composer selfupdate then do the same install process.
I have installed composer on Centos 7 virtualbox with PHP 5.6.27. I will show the commands that I have used and the issues that I am now having. I should first say that all of these commands have worked on previous installations.
Okay so for starters here is what I used to install composer.
curl -sS https://getcomposer.org/installer | php
Followed by
mv composer.phar /usr/local/bin/composer
Now I am trying to install laravel via the commands listed below.
composer global require "acacha/adminlte-laravel-installer=~3.0"
Up to this point all of the commands listed above have successfully worked.
Now here is the current problem. When I try to run the following command I get an error.
laravel new laravel-with-admin-lte
-bash: /root/.composer/vendor/bin/laravel: No such file or directory.
I have tried a whole set of remedies for this message but it cannot find the .composer directory. Can anyone tell me where the correct .composer directory is and how I can modify it so that it looks to the proper location to finalize this installation?
I appreciate any solutions that you can provide me. I have struggled with this for two days straight and have googled everything under the sun. Hopefully, someone on here has had a similar solution with a valid resolution.
Put an alias to the freshly installed Laravel installer in your user configuration .bashrc:
nano ~/.bashrc
And place this inside the file:
alias laravel='~/.config/composer/vendor/bin/laravel'
And run the following to make sure your bashrc profile is reloaded:
source ~/.bashrc
laravel new project
download as superuser
download installer
sudo composer global require "laravel/installer=~1.1"
setting up path
export PATH="~/.composer/vendor/bin:$PATH"
check laravel command
laravel
I had the same problem, so I changed the directory.
This is the directory where your bash was created: /root/.config/composer
enter image description here
but when excute the laravel command, the system search en the directory : bash: /root/.composer/vendor/bin/laravel:
enter image description here
So, just you need to change the address /root/.config/composer/vendor to /root/.composer/vendor.
PD. sorry I am learning english, so it is a little bad.
I recently discover OpenShift and look exactly what I needed. Now I'm trying to running a simple symfony3 project on it. I create an application with this cartridge (since I need php 5.5), successfully installed after waiting some minutes ,and then upload a symfony project from my local laptop to the created www folder. Now I'm lost on how to activate composer to install and update vendors.
I read this link, and as it say I create an empty file called use_composer in the marker folder. Then I login with a putty client, go to my project folder(app-root/runtime/repo/www/symfony/), but executing composer install on it give me 'composer: command not found'. I'm sorry if it's a newbie question, but in fact I'm not a linux user. Maybe I need to restart the application or something.
Any help will be appreciated.
I find an answer from this article
Execute curl -s https://getcomposer.org/installer | php -- --quiet --install-dir=$OPENSHIFT_DATA_DIR
Now you can call composer like this php $OPENSHIFT_DATA_DIR/composer.phar update
Anything I try to execute in Laravel, even minor files locally gives this message in composer:
[Symfony\Component\Process\Exception\RuntimeException]
The process has been signaled with signal "11".
Using OSX 10.7.5
Any help appreciated, as always.
For example :
composer update
typed in terminal retrieves the error message above
Make sure to check your composer cache folder has the right permissions for all files and folders.
If you ever ran composer as sudo or root then these cache folders could have the wrong root permissions.
Look at all the files and folders inside:
ll ~/.composer/cache/
Make sure you have proper permissions to write files in app/storage directory. And you can always use the following method of installation.
cd /your/app/directory
git clone https://github.com/laravel/laravel.git .
composer install
I got this error due to circular dependency on AppServiceProvider (when 2 services depend on each other). As the error does say much it took me a loooong time figure it out :/
Try:
Reinstall or upgrade PHP (Cli)
Make sure your .composer directory permission
This error message from laravel artisan is caused by Composer command error, you can try the same way from using command like:
composer dump-autoload -o
It should also cause error relating from aristan optimize command which be trigger from post-update-cmd" in composer.json.
In my case, the error is segment fault via Cygwin PHP so that I change to use XAMPP PHP to run it and it worked.
Try to run thin command
composer dump-autoload
I eventually solved this by employing a freelancer who was excellent and very knowledgeable.
First needed to update OSX with Maverick (free) - (I had to change my hard drive to do this!)
Then needed to download xcode
Composer should then function, you may need a new installation of laravel
Hope that helps someone!