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

not working under Windows? #2

Open
swen100 opened this issue Feb 29, 2016 · 3 comments
Open

not working under Windows? #2

swen100 opened this issue Feb 29, 2016 · 3 comments

Comments

@swen100
Copy link

swen100 commented Feb 29, 2016

Hi,

i have installed all dependencies and packages as described (i can call php and protoc from commandline; installed all scripts via composer, ...)

But when i call
php .\vendor\bin\protobuf.bat --include-descriptors -i . -o ./src/ ./addressbook.proto
i only get the content of the bat-file in the console:

@ECHO OFF
SET BIN_TARGET=%~dp0/../protobuf-php/protobuf-plugin/bin/protobuf
php "%BIN_TARGET%" %*

What iam doing wrong?

@FabioBatSilva
Copy link
Member

Not really focus on window right now.
If you are willing to sort out the problem and send a PR it will be appreciated.

Worst case scenario you should be able to generate the PHP files in a unix computer
And then use the php classes on windows.

@DrDelay
Copy link

DrDelay commented Aug 3, 2016

Hi, I also tried (see kebabtent/pogoprotos-php#8) getting this to work on Windows.
The problem you describe is not the worst, you can call the script directly, without using the bat-file in vendor/bin, but then it just hangs doing nothing.
I attached a debugger to find it fails (hangs) here. I did some research, but didn't find anything concrete. I guess reading from stdin like that just doesn't work in a Windows environment (found something about missing readline-ext, don't know if it's relevant). It works fine on UNIX anyways, so compiling the protos there is an acceptable solution.

@FabioBatSilva
Copy link
Member

Hi @DrDelay,

I think this is the issue : https://bugs.php.net/bug.php?id=34972
But is probably something that we could work around to get it to work on Windows.

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

No branches or pull requests

3 participants