Jump to content

Fatal Error


hackalive

Recommended Posts

Questions should be clear and concise, leaving 0 margin for doubt.

 

The reason you are getting no response is:  No One Knows What You Are Talking About!

 

1. Brief statement of what you are desiring to do.

2. Any code that is relative to the problem.

3. How the output is different than what is desired.

 

Follow those steps, and you will get replies.

Link to comment
https://forums.phpfreaks.com/topic/260463-fatal-error/#findComment-1335026
Share on other sites

Using this oAuth library https://github.com/elbunce/oauth2-php

Running authorize.php and clicking "yep" button

System is returning Fatal error: Uncaught {"error":"invalid_client","error_description":"No client id supplied"} thrown in A:\public\lib\OAuth2.php on line 837

Reason it is returning that and not doing as it should is because line ~830+

	if (!isset($inputData)) {
		$inputData = $_GET;
	}
	$input = filter_var_array($inputData, $filters);

is returning no value.

 

If you manually set values (on line 835+)


	$input["client_id"] = "0123456789ab";
	$input["redirect_uri"] = "http://www.google.com.au";
	$input["response_type"] = "code";

it works as it should.

 

Hope this now makes senese :)

Link to comment
https://forums.phpfreaks.com/topic/260463-fatal-error/#findComment-1335029
Share on other sites

  • 9 months later...

I had the same problem.

The problem is that in authorize.php starting on line 53, it is listed

 

<form method="post" action="authorize.php">
<?php
print_r($auth_params);
foreach ($auth_params as $key => $value) : ?>
<input type="hidden"
name="<?php htmlspecialchars($key, ENT_QUOTES); ?>"
value="<?php echo htmlspecialchars($value, ENT_QUOTES); ?>" />
<?php endforeach; ?>
Do you authorize the app to do its thing?
<p><input type="submit" name="accept" value="Yep" /> <input
type="submit" name="accept" value="Nope" /></p>
</form>

 

And

name="<?php htmlspecialchars($key, ENT_QUOTES); ?>"

is missing echo, so it should be:

name="<?php echo htmlspecialchars($key, ENT_QUOTES); ?>"

and then the values do get passed and it works out.

Link to comment
https://forums.phpfreaks.com/topic/260463-fatal-error/#findComment-1410019
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.