Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

phpsdk_deps update exception on Windows x64 (empty user agent) #37

Closed
imavo opened this issue Jun 16, 2018 · 2 comments
Closed

phpsdk_deps update exception on Windows x64 (empty user agent) #37

imavo opened this issue Jun 16, 2018 · 2 comments

Comments

@imavo
Copy link

imavo commented Jun 16, 2018

TLDR: phpsdk_deps --update ... step throws exceptions on Win 8.1 x64

I use Windows 8.1 pro x64. Installed Visual-Studio-Community-2017 (v15.7.3) and Git (2.17) from git-scm.com. I also get the same symptom on Windows 7.1 pro. Both are physical machines.

PHP is not installed. I want to build PHP-7.2.6 because I want to compile a non-core extension (build DLL) for php-7.2.6.

I have a problem with the instructions shown in the 'Basic usage example' section of the readme, specifically with the step:

"phpsdk_deps --update --branch master, use phpsdk_deps --update --branch X.Y for a non master branch"

That phpsdk_deps step fails with this message:

$ phpsdk_deps --update --branch master
 
 Fatal error: Uncaught SDK\Exception: Failed to fetch supported branches in C:\php-sdk\lib\php\libsdk\SDK\Config.php:154
 Stack trace:
 #0 C:\php-sdk\lib\php\libsdk\SDK\Config.php(164): SDK\Config::getKnownBranches()
 #1 C:\php-sdk\bin\phpsdk_deps.php(105): SDK\Config::setCurrentBranchName('master')
 #2 {main}
   thrown in C:\php-sdk\lib\php\libsdk\SDK\Config.php on line 154

Before I got the above problem, I ran these commands, successfully:

git clone https://github.com/Microsoft/php-sdk-binary-tools.git c:\php-sdk

cd C:\php-sdk

git checkout php-sdk-2.0.12

phpsdk-vc15-x64.bat

phpsdk_buildtree phpmaster

git clone -b PHP-7.2.6 https://github.com/php/php-src.git

In Config.php line 130 $tmp = $fetcher->getByUri(self::$depsBaseUri . "/series/");
is returning in $tmp a message complaining about empty user agent. An earlier issue mentioned this. I'm using what I think is the latest sdk. phpsdk_version reports 2.0.12

@imavo imavo changed the title phpsdk_deps update step failing on Windows x64 phpsdk_deps update step exception on Windows x64 (empty user agent) Jun 16, 2018
@imavo imavo changed the title phpsdk_deps update step exception on Windows x64 (empty user agent) phpsdk_deps update exception on Windows x64 (empty user agent) Jun 16, 2018
@weltling
Copy link
Member

Thanks for the report. 2.0.12 is not the latest, it's 2.1.5 at this time. This issue was fixed back in winter, AFAIR.

Thank.

@develforever
Copy link

FileOps.php, line 133
curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
works for me.

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

No branches or pull requests

3 participants