Have an error on every page using AnchorCMS - php

I am using AnchorCMS and I am getting the same message on every page:
Uncaught Exception
Undefined offset: 6
Origin
on line 90
Trace
#0 [internal function]: System\Error::shutdown()
#1 {main}
I have already seen this post but it does not fix the problem in a "clean" way (it's just a workaround I think).

Related

Fatal error: Uncaught Error: Call to undefined function apply_filters() in /public_html/wp-includes/error-protection.php:119

I want to transfer one wordpress website. After transfer I update old domain to new domain in wordpress files and database also by code. When I am trying to open website, this error is display.
Fatal error: Uncaught Error: Call to undefined function apply_filters() in /home/myserver/public_html/wp-includes/error-protection.php:119 Stack trace: #0 /home/myserver/public_html/wp-includes/error-protection.php(83): wp_is_fatal_error_handler_enabled() #1 /home/myserver/public_html/wp-settings.php(64): wp_register_fatal_error_handler() #2 /home/myserver/public_html/wp-config.php(86): require_once('/home/myserver...') #3 /home/myserver/public_html/wp-load.php(37): require_once('/home/myserver...') #4 /home/myserver/public_html/wp-blog-header.php(13): require_once('/home/myserver...') #5 /home/myserver/public_html/index.php(17): require('/home/myserver...') #6 {main} thrown in /home/myserver/public_html/wp-includes/error-protection.php on line 119
I replaced wp-settings.php file with latest file from wordpress. Any help will be apriciated. Thanks in advance.

Why I get this message when I open my wordpress site (how to solve it)?

Undefined constant "‘FS_METHOD’" in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-config.php:98 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-load.php(50): require_once() #1 /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-login.php(12): require('/Applications/X...') #2 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-config.php on line 98
The error says that it is looking for the constant FS_METHOD and fails to find it. This is something you can set in your wp-config.php - I would try and set it as explained here: https://warptheme.com/wordpress-tutorials/update-wordpress-directly-without-using-ftp/
Kind regards,

Can I replace my Wordpress function.php?

I keep getting this error and IDK php can I replace the whole file somehow?
Fatal error: Uncaught Error: Call to undefined function get_template_directory() in /home/campbel/public_html/wp-includes/functions.php:8580 Stack trace: #0 /home/campbel/public_html/wp-settings.php(98): require() #1 /home/campbel/public_html/wp-config.php(91): require_once('/home/campbel/p...') #2 /home/campbel/public_html/wp-load.php(37): require_once('/home/campbel/p...') #3 /home/campbel/public_html/wp-blog-header.php(13): require_once('/home/campbel/p...') #4 /home/campbel/public_html/index.php(17): require('/home/campbel/p...') #5 {main} thrown in /home/campbel/public_html/wp-includes/functions.php on line 8580
The best course of action is to update or reinstall your WP. Don't forget to create a backup copy before you do anything (including the database).

Google API php quickstart listFiles() 500 Internal Error

I tried the Example CLI PHP code from Google. The listFiles() method throws a 500 Internal Error from Google's servers, as shown in the stack trace:
bash-4.2$ php test.php
PHP Fatal error: Uncaught exception 'Google_Service_Exception' with message 'Error calling GET https://www.googleapis.com/drive/v2/files?maxResults=10: (500) Internal Error' in /home/ben/.../vendor/google/apiclient/src/Google/Http/REST.php:79
Stack trace:
#0 /home/ben/.../vendor/google/apiclient/src/Google/Http/REST.php(44): Google_Http_REST::decodeHttpResponse(Object(Google_Http_Request))
#1 /home/ben/.../vendor/google/apiclient/src/Google/Client.php(556): Google_Http_REST::execute(Object(Google_Client), Object(Google_Http_Request))
#2 /home/ben/.../vendor/google/apiclient/src/Google/Service/Resource.php(195): Google_Client->execute(Object(Google_Http_Request))
#3 /home/ben/.../vendor/google/apiclient/src/Google/Service/Drive.php(1783): Google_Service_Resource->call('list', Array, 'Google_Service_...')
#4 /home/ben/.../test.php(78): Google_Service_Drive_Files_Resource->listFiles(Arra in /home/ben/.../vendor/google/apiclient/src/Google/Http/REST.php on line 79
I deleted the saved credentials and tried again. That did not help:
bash-4.2$ php test.php
Open the following link in your browser:
https://accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri=urn%3A
ietf%3Awg%3Aoauth%3A2.0%3Aoob&client_id=...&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.metadata.readonly&access_type=offline&approval_prompt=auto
Enter verification code: ...
Credentials saved to /home/ben/.credentials/drive-php-quickstart.json
PHP Fatal error: Uncaught exception 'Google_Service_Exception' with message 'Error calling GET https://www.googleapis.com/drive/v2/files?maxResults=10: (500) Internal Error' in /home/ben/.../vendor/google/apiclient/src/Google/Http/REST.php:79
Stack trace:
#0 /home/ben/.../vendor/google/apiclient/src/Google/Http/REST.php(44): Google_Http_REST::decodeHttpResponse(Object(Google_Http_Request))
#1 /home/ben/.../vendor/google/apiclient/src/Google/Client.php(556): Google_Http_REST::execute(Object(Google_Client), Object(Google_Http_Request))
#2 /home/ben/.../vendor/google/apiclient/src/Google/Service/Resource.php(195): Google_Client->execute(Object(Google_Http_Request))
#3 /home/ben/.../vendor/google/apiclient/src/Google/Service/Drive.php(1783): Google_Service_Resource->call('list', Array, 'Google_Service_...')
#4 /home/ben/.../test.php(78): Google_Service_Drive_Files_Resource->listFiles(Arra in /home/ben/.../vendor/google/apiclient/src/Google/Http/REST.php on line 79
I searched through the github issues and stackoverflow questions tagged google-api-php-client, but did not find any clues. I logged into the developer console and clicked Logs, which resulted in the text
Failed to load.
Any ideas how to get more detailed information about 500 errors from Google?
try adding this to the beginning of the code in the file calling Google Drive API
date_default_timezone_set('America/New_York') //change timezone you want
Also make sure, folder permission inside the google drive is set.

hybridauth - codeigniter - php - fetal error on redirect url

i am using HybridAuth library for social logins.
everything is working perfectly on localhost.
and it was working on my hosting server too but now i am getting this errors suddenly:
when i tried with google:
Fatal error: Uncaught exception 'Exception' with message 'User profile
request failed! Google returned an error: exception 'Exception' with
message 'The Authorization Service has return: ' in
/home/moviesaints/public_html/dev/application/third_party/hybridauth/Hybrid/thirdparty/OAuth/OAuth2Client.php:82
Stack trace: #0
/home/moviesaints/public_html/dev/application/third_party/hybridauth/Hybrid/Provider_Model_OAuth2.php(114):
OAuth2Client->authenticate('4/P-5SuqvrU0DDy...') #1
/home/moviesaints/public_html/dev/application/third_party/hybridauth/Hybrid/Endpoint.php(175): Hybrid_Provider_Model_OAuth2->loginFinish() #2
/home/moviesaints/public_html/dev/application/third_party/hybridauth/Hybrid/Endpoint.php(56):
Hybrid_Endpoint::processAuthDone() #3
/home/moviesaints/public_html/dev/application/third_party/hybridauth/index.php(15):
Hybrid_Endpoint::process() #4
/home/moviesaints/public_html/dev/application/controllers/user/hauth.php(298):
require_once('/home/moviesain...') #5 [internal function]:
HAuth->endpoint() #6 /home/mov in
/home/moviesaints/public_html/dev/application/third_party/hybridauth/Hybrid/Auth.php
on line 147
and when tried with facebook:
Fatal error: Uncaught exception 'Exception' with message
'Authentication failed! Facebook returned an invalid user id.' in
/home/moviesaints/public_html/dev/application/third_party/hybridauth/Hybrid/Providers/Facebook.php:91
Stack trace: #0
/home/moviesaints/public_html/dev/application/third_party/hybridauth/Hybrid/Endpoint.php(175): Hybrid_Providers_Facebook->loginFinish() #1
/home/moviesaints/public_html/dev/application/third_party/hybridauth/Hybrid/Endpoint.php(56):
Hybrid_Endpoint::processAuthDone() #2
/home/moviesaints/public_html/dev/application/third_party/hybridauth/index.php(15):
Hybrid_Endpoint::process() #3
/home/moviesaints/public_html/dev/application/controllers/user/hauth.php(298):
require_once('/home/moviesain...') #4 [internal function]:
HAuth->endpoint() #5
/home/moviesaints/public_html/dev/system/core/CodeIgniter.php(359):
call_user_func_array(Array, Array) #6
/home/moviesaints/public_html/dev/index.php(202):
require_once('/home/moviesain...') #7 {main} Next exception
'Exception' with message 'Authentic in
/home/moviesaints/public_html/dev/application/third_party/hybridauth/Hybrid/Auth.php
on line 147
I have tried following solutions but still facing the same problem:
hybridauth-php-facebook-returned-an-invalid-user-id
hybridauth-facebook-returned-an-invalid-user-id
laravel4-hybridauth-facebook-authentication-failed-facebook-returned-an-invalid
Github Solution
Google group Solution
Help please, It will be appreciated.
I'm not sure this is true or not but after I was able to get my installation working I still could not get Facebook to work, no matter how hard I tried. My guess is that the SDK files used by Hybridauth for Facebook are deprecated. Facebook released new versions and quite a reworked SDK recently. That could be why there seem to be a lot of people suffering from issues with the Facebook provider right now.

Categories