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

PHP Notice: Undefined variable: http_response_header in common.inc.php on line 125 #40

Closed
weeb0 opened this issue Jul 28, 2011 · 4 comments

Comments

@weeb0
Copy link

weeb0 commented Jul 28, 2011

using latest git version,

I'm getting the message in error_log of apache.

I posted a new topic in bitcoin forum : ( http://forum.bitcoin.org/index.php?topic=32547.msg406460#msg406460 )

@weeb0
Copy link
Author

weeb0 commented Jul 28, 2011

I explored this, and it appear when using the http_response_header in a function, it is necessary to pass the variable as a function parameter.

I changed the function header to :
function place_json_call($object, $url, $username = '', $password = '', &$headers, $timeout = 2,$http_response_header)

and the line calling the function should be like :
$response = place_json_call($request, $row['url'], $row['username'], $row['password'], $headers, http_response_header);

@weeb0 weeb0 closed this as completed Jul 28, 2011
@weeb0 weeb0 reopened this Jul 28, 2011
@alanpearce
Copy link

Duplicate of #14

Find your php.ini and uncomment allow_url_fopen = On or change it to On if it's Off

@weeb0
Copy link
Author

weeb0 commented Jul 28, 2011

I don't agree. The allow_url_fopen is already On (this is validated with phpinfo() ) and doing the changes suggested in my second comment solve the issue.

@alanpearce
Copy link

$http_response_header is a reserved variable when allow_url_fopen = On: you should not create it.

The PHP docs indicate that the syntax is correct and the variable should be defined without explicit declaration

It's likely that the @file_get_contents call failed (line 123), remove the @ and see what errors come up then. You may also need to comment out the error_reporting(E_ERROR | E_USER_ERROR); line in config.inc.php

@weeb0 weeb0 closed this as completed Jul 28, 2011
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