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 variable http_response_header in FileGetContents #42

Closed
ronnylt opened this issue Feb 10, 2012 · 5 comments
Closed

Undefined variable http_response_header in FileGetContents #42

ronnylt opened this issue Feb 10, 2012 · 5 comments

Comments

@ronnylt
Copy link

ronnylt commented Feb 10, 2012

Notice: Undefined variable: http_response_header in vendor/buzz/lib/Buzz/Client/FileGetContents.php line 49

@kriswallsmith
Copy link
Owner

This is one of those magic variables php sets after you call file_get_contents()… not sure why it's not there for you. What version of php are you running? Are you able to access http pages using file_get_contents()?

@ronnylt
Copy link
Author

ronnylt commented Mar 23, 2012

php -v
PHP 5.3.8 with Suhosin-Patch (cli) (built: Nov 15 2011 15:33:15)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Xdebug v2.1.2, Copyright (c) 2002-2011, by Derick Rethans

@ronnylt
Copy link
Author

ronnylt commented Mar 23, 2012

I just switched to the \Buzz\Client\Curl() client, so I did not get the error any more.

Thanks for replying to the issue.

@docteurklein
Copy link

same here, using php 5.5.18 in the CLI environement.

php -r " var_dump(file_get_contents('http://php.net'));"

works just fine.

EDIT: I forgot to say my urls actually are filesystem urls.
I surely badly use the FileGetContents adapter, my goal is to mock a real http response.

@Nyholm
Copy link
Collaborator

Nyholm commented Mar 17, 2018

Closing because of inactivity.

@Nyholm Nyholm closed this as completed Mar 17, 2018
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

4 participants