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

HelloWorld-PHP php7.4 error #13

Open
Code-creators-dev-team-iqmerchant opened this issue Sep 15, 2021 · 0 comments
Open

HelloWorld-PHP php7.4 error #13

Code-creators-dev-team-iqmerchant opened this issue Sep 15, 2021 · 0 comments

Comments

@Code-creators-dev-team-iqmerchant
Copy link

Code-creators-dev-team-iqmerchant commented Sep 15, 2021

The below mentioned code works in php8.0

https://github.com/IntuitDeveloper/HelloWorld-PHP

With php7.4, it shows error

Notice: session_start(): A session had already been started - ignoring in /var/www/wordpress/qb-oauth/index.php on line 14

Fatal error: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "QuickBooksOnline\API\Core\OAuth\OAuth2\OAuth2AccessToken" of the object you are trying to operate on was loaded before unserialize() gets called or provide an autoloader to load the class definition in /var/www/wordpress/qb-oauth/index.php on line 37

which corresponds to these functions

'access_token' => $accessToken->getAccessToken(),
'refresh_token' => $accessToken->getRefreshToken(),
'x_refresh_token_expires_in' => $accessToken->getRefreshTokenExpiresAt(),
'expires_in' => $accessToken->getAccessTokenExpiresAt()

(Same folder code with hosted with PHP 8.0 localhost , it works, but with same folder and php7.4, we get above FATAL error)

Workaround: Use php8.0, remove php7.4

URL for testing

https://96-2-10-19-dynamic.midco.net/qb-oauth/

@Code-creators-dev-team-iqmerchant Code-creators-dev-team-iqmerchant changed the title HelloWorld-PHP SSL error HelloWorld-PHP php7.4 error Sep 16, 2021
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

1 participant