Class 'Spatie\Analytics\AnalyticsServiceProvider' not found - php

This is duplicate question, I am trying to use spatie/laravel-analytics but in localhost it does not throw this error but on server it shows this error, I'm using shared hosting. Also I've tried other solutions. My versions are:
Laravel 5.4
Analytics 3
PHP 7.1.5
Error :
Class 'Spatie\Analytics\AnalyticsServiceProvider' not found

I've deleted and re-uploaded all files, it does not show this error now!

Related

Trouble with CKFinder + Laravel 8

I did everything according to points 1-5 as indicated in the Readme.MD
https://github.com/ckfinder/ckfinder-laravel-package#configuring-authentication
On site authors say: At this point you should see the connector JSON response after navigating to the <APP BASE URL>/ckfinder/connector?command=Init address. Authentication for CKFinder is not configured yet, so you will see an error response saying that CKFinder is not enabled
I opened link
http://127.0.0.1:8000/ckfinder/connector?command=Init
And have JSON error:
{"error":{"number":110,"message":"Unknown error."}}
Can someone help me? How to find reason of trouble? i google many sites and there is no desicion
Are you using PHP 8+?
For me the issue was a deprecated line in the package itself.
I fixed this error by changing vendor\ckfinder\ckfinder-laravel-package\_connector\ArgumentResolver.php line 65
from
if ($reflectionClass = $param->getClass()) {
to
if ($reflectionClass = new \ReflectionClass($param->getType()->getName())) {
because getClass() is deprecated in PHP 8.0.3, It works fine for me now.
Note: Do keep in mind that it's not good to change things inside the vendor folder!

Laravel - Exception thrown at Guzzle function when running seeder

Running php artisan db:seed throws the following error: GuzzleHttp\Exception\InvalidArgumentException : IDN conversion failed (errors: IDNA_ERROR_EMPTY_LABEL) at vendor/guzzlehttp/guzzle/src/functions.php:384
Never seen this error before and it doesn't appear to be an issue with my seeder syntax.
The partial exception trace is:
1 GuzzleHttp\_idn_uri_convert()
/home/vagrant/code/companion-2.0/vendor/guzzlehttp/guzzle/src/Client.php:220
2 GuzzleHttp\Client::buildUri()
/home/vagrant/code/companion-2.0/vendor/guzzlehttp/guzzle/src/Client.php:113
I'm running commands within a vagrant/homestead environment. Could this be a version incompatibility?
This is an issue with guzzle 6.5.0. See more info here: https://github.com/guzzle/guzzle/issues/2448
Solution: downgrade to version 6.4.1.
Please, try to upgrade to the latest stable version (6.5.2 at the moment). We did our best to consider all possible installation details, so you should not have this error anymore.
If the error still occurs, please report it as a bug here: https://github.com/guzzle/guzzle/issues.
Right now, the best solution is update, the lastest version works fine

Logger does not work anymore after upgrade from Laravel 5.5

Since I've upgraded to Laravel version 5.6 from Laravel version 5.5 my Logger doesn't work properly anymore.
At first I got the following error stack :
laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [] is not defined. at /home/vagrant/Code/grotesmurf/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:181)
which was solved by simply adding the new config/logging.php file that is provided by Laravel 5.6.
But now I'm getting no output from the Logger! I'm simply running \Log::info('hello!') as a tinker command, but it doesn't generate any log output anymore (same for scripts calling the \Log() method).
I've tried different LOG_CHANNEL settings (daily, single, stack), but none of these work.
Hope anyone has ran into this error already and is able to provide me with some suggestions. I have followed the upgrade guide and it doesn't help unfortunately.
Thanks in advance.
P.S. I'm running php version 7.1 & am on ubuntu.
P.P.S. I have cleared all cached config using artisan.
Well I have found the actual problem, we use an adjusted storage_path() method in our application and the new Logger is now using the storage_path() method to generate its path - this caused the log file to be created in a different directory than storage/logs.
i had the same issue, deleting the files in bootstrap/cache solved it.

Magento Fatal Error: Class 'Zend_Log' not found

With a module I added an custom customer attribute.
When a client is logged in and want to edit their account information or want to change their password on frontend the following error comes up:
Fatal error: Class 'Zend_Log' not found in /app/code/community/Amar/Profile/Model/Customer/Attribute.php on line 49
I build this website local and uploaded it to the server.
On the local environment this error is not showing up, this error only showing up on the server.
I think it has to do something with file permissions.
Does anyone have a solution for this?
the problem has been solved.
On the live server there was another PHP version which was not compatible with the extension.
For me a function loadByCode() causes the issue, I have renamed it and it is working fine. We should not use generic method names in custom modules.
The function is in \app\code\community\Amar\Profile\Model\Customer\Attribute.php file.

Call to undefined method sfApplyApplyForm::isCaptchaEnabled

I’m getting a funny error after I deploy a fully working symfony project to my web host (hostgator). Everything works fine on my localhost.
Here’s the error:
500 | Internal Server Error | sfException
Call to undefined method sfApplyApplyForm::isCaptchaEnabled.
Here’s what I’m using:
Symfony 1.4
Doctrine 2.0
sfForkedDoctrineApplyPlugin - for
registering new users with:
sfDoctrineGuardPlugin - for
authentication
I get the error when I click the “Register” link.
Obviously, the form is Captcha enabled. I’ve tried turning it off in config/app settings with no change in error. I’ve also confirmed that my public and private keys are correct and registered... I’ve even updated them with no change in error msg.
A search on Google brings up nothing helpful.
Any ideas about where to begin troubleshooting?
To correct this problem I just copied the isCaptiaEnabled() method from the plugin to the model class where I embedded the plugin form. I believe I had to also copy a couple of other methods over as well. But as soon as I did that, the errors never came back.

Categories