how to install the PHP dependency management tool Composer

387 views
Skip to first unread message

FuGO James

unread,
Jul 24, 2014, 2:42:14 AM7/24/14
to google-iden...@googlegroups.com
Hi, who can tell how to do this step?

Install the PHP dependency management tool Composer, and the dependent libraries used by this quick-start?

where to do this below ?
cd php
-quickstart-app
curl -s https://getcomposer.org/installer | php
php composer.phar install
php -S localhost:8000 routing.php

Jack Greenberg

unread,
Jul 24, 2014, 10:45:38 AM7/24/14
to google-iden...@googlegroups.com

Hi,

Thanks for the email and apologies the instructions aren't completely clear.

What type of machine are you developing on (Mac/windows/Linux)? Looks like we only listed the mac/Linux commands there, but we should be able to post the steps for windows too.

Best,
Jack

--
Jack Greenberg
Google Inc.

--
You received this message because you are subscribed to the Google Groups "Google Identity Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-identity-t...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jin Liu

unread,
Jul 24, 2014, 1:32:53 PM7/24/14
to google-iden...@googlegroups.com
The PHP Composer installation guide on Windows can be found at https://getcomposer.org/doc/00-intro.md#installation-windows. We will update the quickstart instructions moments later.

Thanks,
Jin

spot...@gmail.com

unread,
Apr 7, 2015, 10:19:00 PM4/7/15
to google-iden...@googlegroups.com
This is exactly the step I am having problems with.  I can do everything else but this.
I do my 'local' work on my Windows PC, and FTP any files to my (Linux) server.
This appears to be the one step that requires logging in to my server using terminal software and running something.

If Google would just supply the correct bundle of files that I could upload, that would solve it.
I have already created the custom files, and even gotten the toolkit mostly working.
At first, I got a message like "Fatal error: Class 'Gitkit_Client' not found in /home/blah/public_html/identity/index.php on line 22", so I started manually putting in "include" statements.  After about five+, I figured I could either keep going and write an "include" statement for every other php file, or try to figure out this one step.

The original question above was never answered.  Where do you put php-quickstart-app?  I assume it is inside the project folder.
What does the "curl" statement do?
What do the other statements do?
If something messes up my PHP, I am really in trouble.

This statement:
"Under the hood, Composer installs Google Identity Toolkit PHP helper functions and Google API PHP client library."
..is essentially the same as saying "magic happens".
I would really like to know what is going on before I try to run anything that I don't understand.
Every other step is clear and I had no problems.  This is the only thing I can't dissect.

spot...@gmail.com

unread,
Apr 8, 2015, 12:29:57 PM4/8/15
to google-iden...@googlegroups.com
I am now trying to go down the prescribed path.
I don't see any mention of if this needs to be run as root, so I am going to try to run this as a regular user, since that seems safer.
I found in the Composer documentation that it just copies some files into my project directory, so I am OK with that.  So, I ran the curl step and that ran successfully.
But now I try to run the "php composer" step, and get an error "The artifact repository requires PHP's zip extension".
I am not finding any results in Google search about this error.
How do I resolve this?

Even better, can anyone just simply zip up all the files needed for this project and upload them?

spot...@gmail.com

unread,
Apr 8, 2015, 1:30:50 PM4/8/15
to google-iden...@googlegroups.com
FYI: I have PHP 5.5.19, and PHP Info says that "ZIP-based phar archives" are enabled, which seems like the closest thing to what it is asking for.

spot...@gmail.com

unread,
Apr 8, 2015, 10:59:58 PM4/8/15
to google-iden...@googlegroups.com
Apparently, I didn't have *the* Zip extension for PHP, so I recompiled PHP and added it.

Now, I get this error: "git was not found, check that it is installed and in your PATH env."
I can tell that /usr/local/cpanel/3rdparty/bin/ (where git is located) is not in the Apache Path.
I found mod_env, but it says it can't be used in Apache 2.2, which is what I have.

How can I add /usr/local/cpanel/3rdparty/bin/ to my Apache path?

Jin Liu

unread,
Apr 9, 2015, 12:12:38 AM4/9/15
to google-iden...@googlegroups.com
Probably the source code of Google Identity Toolkit PHP library is helpful to you. It relies on the Google API client.

spot...@gmail.com

unread,
Apr 9, 2015, 12:58:42 PM4/9/15
to google-iden...@googlegroups.com
I finally figured out how to add a directory to the PATH environment variable.
Something like this:

export PATH=$PATH:/new/path/here/

So, now I'm working through the rest of the process.

rohit potdar

unread,
Apr 12, 2016, 2:11:33 PM4/12/16
to Google Identity Toolkit
I am having the same issue. My website is hosted on yahoo server , and there is no way for me to run some command to fetch lib files.
If I can get the set of files to be uploaded as library that will solve all the problems.
If anyone has the solution, you are most welcome.
Reply all
Reply to author
Forward
0 new messages