Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined function posix_getpwuid() for Eclipse IDE or Windows #143

Closed
shakaran opened this issue Jun 30, 2016 · 4 comments
Closed

Undefined function posix_getpwuid() for Eclipse IDE or Windows #143

shakaran opened this issue Jun 30, 2016 · 4 comments
Assignees

Comments

@shakaran
Copy link
Contributor

Trying to load the OAuth2 credendials and running with Eclipse IDE in console:

$oAuth2Credential = (new OAuth2TokenBuilder())
->fromFile()
->build(); 

I get this error, since in the php-cli for Eclipse IDE doesn't exist defined the php function posix_getpwuid:

 PHP Fatal error:  Call to undefined function posix_getpwuid() in somepath/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/ConfigurationLoader.php on line 38

According to http://php.net/manual/es/function.posix-getpwuid.php#82387 in case that the function is not defined (checking with function_exists('posix_getpwuid') ) you can try getenv('USERNAME') or other way, but at least avoid the Fatal Error, even throw a exception. Also for windows php users that function will not be defined at all.

@shakaran
Copy link
Contributor Author

shakaran commented Jul 1, 2016

I forgot to mention that it is experimental branch, (sorry I don't permissions to add Labels to the issue)

@vtsao vtsao self-assigned this Jul 1, 2016
@vtsao vtsao added the beta label Jul 1, 2016
@vtsao
Copy link
Contributor

vtsao commented Jul 1, 2016

Thanks for filing this, will look into it.

@vtsao
Copy link
Contributor

vtsao commented Jul 22, 2016

Fixed in the latest version of experimental:
https://github.com/googleads/googleads-php-lib/tree/experimental

@vtsao vtsao closed this as completed Jul 22, 2016
@shakaran
Copy link
Contributor Author

Thanks @vtsao !! I can see a big diff commit, but it is hard to follow the changes between releases mostly because you are pushing moster commits. Could be possible that you commit in small commits per issue or changes related? I mean follow the standard principle for "Atomic Commits" https://en.wikipedia.org/wiki/Atomic_commit it would be a lot for see the progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants