Forgive me as I am not a programmer and the programmer that created this is no longer with us. We use GAM to auto create our student email accounts. Yesterday morning, it stopped working. I noticed there was an update recently and I remember being told that it would break if there was a new update. I updated it, successfully, but the issue still remains.
The issue seems to be related to gam running from within the PHP code. I can run gam create user just fine from within the command line, but when running via the script I get an add error...and it's not so much an error as it needs to just "continue." Here's what's in the logs:
Gmail Add Error
array (
'command' => 'C:\gam\gam.exe create user "******" firstname "LIZZBETH" lastname "FERGUSON" password "*****"',
'input' => '',
'stdout' => '
Select the authorized scopes for this token. Include a \'r\' to grant read-only
access or an \'a\' to grant action-only access.
[] 0) Group Directory API (supports read-only)
[] 1) Organizational Unit Directory API (supports read-only)
[] 2) User Directory API (supports read-only)
[] 3) Chrome OS Device Directory API (supports read-only)
[] 4) Mobile Device Directory API (supports read-only and action)
[] 5) User Email Settings API
[] 6) Resource Calendar API (supports read-only)
[] 7) Audit Monitors, Activity and Mailbox Exports API
[] 8) Admin Settings API
[] 9) Groups Settings API
[] 10) Calendar Data API (supports read-only)
[] 11) Audit Reports API
[] 12) Usage Reports API
[] 13) Drive API (create report documents for admin user only)
[] 14) License Manager API
[] 15) User Security Directory API
[ ] 16) Notifications Directory API
[] 17) Site Verification API
[] 18) IMAP/SMTP Access (send notifications to admin)
[] 19) User Schemas (supports read-only)
[] 20) Classroom API
[] 21) Cloud Print API
[] 22) Data Transfer API (supports read-only)
[] 23) Customer Directory API (supports read-only)
[] 24) Domains Directory API (supports read-only)
[*] 25) Roles API (supports read-only)
26) Select all scopes
27) Unselect all scopes
28) Continue
',
'stderr' => 'Traceback (most recent call last):
File "", line 9072, in
File "", line 5048, in doCreateUser
File "", line 804, in buildGAPIObject
File "", line 8905, in doRequestOAuth
EOFError: EOF when reading a line
',
'return' => -1,
As you can see, it seems to be running the initial setup to configure the API's, yet I've already done this. Even when I run that same gam create command from within the command line, it creates the user with no issues. Here's part of the PHP code:
if( ! $studentNew && ! $studentOld ) { // neither account exists, create one
// C:\gam\gam.exe create user firstname lastname password
// C:\gam\gam.exe create user droth firstname "David Lee" lastname Roth password 'MightAsWellJump!'
$output = my_exec( 'C:\gam\gam.exe create user "' . $studentUsername . '" firstname "' . $exStudents[$j]['FIRST_NAME'] . '" lastname "' . $exStudents[$j]['LAST_NAME'] . '" password "' . $studentPassword . '"' ); // send account info to Gmail
if( $output['return'] === 0 ) { // account added
$logfile->showNote( 'Created student Gmail account: ' . $studentUsername . ' for “' . htmlentities( $exStudents[$j]['LAST_NAME'] . ', ' . $exStudents[$j]['FIRST_NAME'] ) . '” (' . $exStudents[$j]['ID_NUM'] . ')' );
$studentNew = array( 'EMAIL_ADDRESS' => $studentEmail, 'LAST_NAME' => $exStudents[$j]['LAST_NAME'], 'FIRST_NAME' => $exStudents[$j]['FIRST_NAME'], 'USER_ID' => $studentUsername );
Any guidance/help would be greatly appreciated!

--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Manager" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/6j2-P8uPJZY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/ab4dd610-7b55-4d8e-926b-1973fea9c11a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/ab4dd610-7b55-4d8e-926b-1973fea9c11a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Manager" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/6j2-P8uPJZY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/4a431a79-7f11-4873-af95-e4d6e297d2ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.