FriendsOfPHP / Goutte

Goutte, a simple PHP Web Scraper
MIT License
9.26k stars 1.01k forks source link

Goutte client get request not working if Unicode characters in URL #332

Open hsharghi opened 6 years ago

hsharghi commented 6 years ago

Trying to get a web page : http://www.bamilo.com/sclaree-رایحه-مردانه-blac-afghan-35ml-edp-2472932.html

with this code

$client = new Client([
            'curl' => [
                CURLOPT_SSL_VERIFYPEER => false,
                CURLOPT_SSL_VERIFYPEER => false
            ]
        ]);
        $this->parser = $client->request('GET', $url);

Get this error:

PHP Fatal error: Maximum function nesting level of '256' reached, aborting! in /Users/me/Sites/Site/vendor/guzzlehttp/psr7/src/MessageTrait.php on line 180

When url doesn't have any unicode characters in it, it works fine. Like this URL: http://www.bamilo.com/yoobao-16000mah-m16-power-bank-2075403.html

tempo-ruud commented 6 years ago

Did you find a solution? I have the same issue.

hsharghi commented 6 years ago

@tempo-ruud I was getting this error when x-debug was listening. Turning it off resolved the issue in my case.