Facing problems while installing Laravel v4.2 on windows 7 - php

I am facing problems while installing Laravel on windows 7.
I am using Xampp and installed composer, added the path in the system variable. But when I run "composer install", I found this problem...
Composer could not find the config file
C:\ProgramData\ComposerSetup\bin To initialize a project, please
create a composer.json file as described in the
http://getcomposer.org/, "Getting started section"
I don't know what I have to do now. Please help.
Thanks in advance.

Try curl -sS https://getcomposer.org/installer | php or php -r "readfile('https://getcomposer.org/installer');" | php for a clean install.
If nothing works download this.
You can download Putty to run this commands.
(Make sure your XAMPP or whatever program you are using is running!)

Related

How to install/use Composer without SSH

guys I have a shared hosting and I can't use SSH or call shells with php (shell_exec),for security reasons, I can't upgrade my server for money problems...But i need to install Composer, and work with an SDK for finish my project?Is there any way to install/use composer without SSH? I have read about install Composer offline, and then upload the contents on the server, but i don't think that this work...
Thanks for read! Hope that you all'll have a nice day!
As You Said You Want to Install Composer Without SSH then
In that case you Have to install it in your local system than after you can easily upload it using FTPand its Works if your host is supported !!
Steps For Shared Hosting Using FTP::
First Download Php Shell From Here: http://phpshell.sourceforge.net/
In PHPShell's config.php Add User & alias:
php = "php -d suhosin.executor.include.whitelist=phar"
Login to PHPShell & Type: curl -sS https://getcomposer.org/installer | php
After Successfully installed, Just Run Composer: php composer.phar

Install Composer without curl (local)

I have to run a Laravel Project on a customers Server, Mcrypt is already installed but I can't run "composer install" because composer is missing. Problem here is, that I can't run
curl -sS https://getcomposer.org/installer | php
because I don't get a connection to other server "outside".
So does anybody know, if I can save the file local and upload it with FTP and run it?
Already tried to save the /installer as a file and run it with "asdf | php" but it didn't work. I also downloaded the composer.phar file but how do I run the .phar file?
Thanks!!
Downloading the composer phar file as you have done is a sufficient alternative.
Usage:
php composer.phar command
Docs: https://getcomposer.org/doc/01-basic-usage.md
However, I am fairly sure composer depends on curl, at least as far as updating/installing packages goes. So if you're intending to use those features you'll need curl anyway.*
*citation needed.
edit:
I am currently looking through the composer source and I can't yet find a reference to curl. It appears to use stream_context_create, and the manual page for that method doesn't mention curl either. So maybe it'll work without curl...

Php update (Package 5.5-frontenddev is already installed)?

I am trying to update my Php to 5.5 on a mac (by pasting "curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5" into terminal). The download starts but gives the following message before the downloads stops:
Package 5.5-frontenddev is already installed at version 5.5.5-20131020-233829. You wanted to install version 5.5.5-20131020-233829.
Is there anyway around this as I really need 5.5 in order to continue with my course!
Thank you in advance for any help.
Margate
You should be able to delete the packager registry log and just try the command again, making sure you have removed the relevant folders from /usr/local/php5-*.
The file is located at:
/usr/local/packager/registry.log

Update composer dependencies from command line

I am currently working with symfony2 and I want to launch to download the libraries I need. I know the command in linux is "$ ./composer.phar update --dev" however when I run this in windows it prompts whether I should open the file with the windows explorer or not. I currently have composer.phar installed on windows but I am having trouble launching it. How would I be able to update my symfony2 folder with the dependencies I need. Thank you.
In CMD:
php C:\ProgramData\ComposerSetup\bin\composer.phar self-update
The problem is that Windows don't know how to open .phar files. You need to execute them using php interpreter php composer.phar update and the php interpreter(php.exe) must be accessible on PATH.
You could use command php -v to check if your php is accessible from command line.
Go to C:\ProgramData\ComposerSetup\bin\composer.phar
In CMD write php composer.phar (update) or (self-update)
1: Open cmd
First go to your work directory like if you have wamp then c:/wamp/www.
Then enter composer if you can see list of composer command then its good.
Now type "composer self-update".
5: Next you can see the process.
This worked for me on my Centos server
sudo -u nginx php composer.phar update

composer and php installation conflict for laravel 4 artisan

hi i start working Laravel 4, i have finished the installation process with composer, but when try to use artisan it always give a message
Laravel requires the Mcrypt PHP extension
i have checked with php_info() it shows me Mcrypt PHP extension is enabled, after searching on web i have found some solutions, if i apply those then composer stops working viceversa . i am using XAMPP for development if i use which php command in terminal it show me path /usr/bin/php but my development php is in /Applications/XAMPP/xamppfiles/bin, i have extend the $PATH using .bash_profile
export XAMPP_PHP=/Applications/XAMPP/xamppfiles/bin
export PATH="$XAMPP_PHP:$PATH"
after this artisan start work great but composer stops its working if i type composer command in terminal it show ???? output, now i want composer, php and artisan work perfect just looking for good settings
I solved this problem with a workaround. Instead of changing the $PATH variable, on /usr/bin/ I created a symbolic link to XAMPP's PHP:
cd /usr/bin/
ln -s /Applications/XAMPP/xamppfiles/bin/php phpx
'phpx' is the name I gave to run php on XAMPP (pick the name you prefer - obviously it needs to be different than 'php'). This way I can run artisan using 'phpx' (XAMPP version) which has mcrypt. For example:
phpx artisan key:generate
And if you need to run composer, you run php (mac version):
php composer.phar install
It's a workaround, I'm not proud of it, but it's working.
The best solution would be to install mcrypt on your mac (use this tutorial), mysql and use mac's php. But as a lot of developers (including me) still rely on XAMPP, this workaround may be enough for testing.
If it outputs ???? it most likely means you have detect_unicode = On in your php.ini. This must be off because it breaks phar files.

Categories