AwsS3Adapter' not found - php

Class 'League\Flysystem\AwsS3v3\AwsS3Adapter' not found (View: /home/ravenan/laravel_app/resources/views/components/user-homepage/user-homepage-active-listings-card.blade.php)
My amazon S3 works perfectly on localhost but when applied on a live host powered by Hostgator, I experience the error above. I have visited a number of threads and followed several instructions such as:
Delete composer.lock
composer require league/flysystem-aws-s3-v3 ~1.0
composer require league/flysystem-rackspace ~1.0
but keep experiencing the same problem. My PHP version on my live host is version 7.3.33 whilst my local host is 7.4.29. Does anyone have a solution?

Related

Laravel 8.74.0 Fresh Site Displaying 500 Error - Only on the Server

I am new to Laravel. I have installed laravel on localhost using: composer create-project laravel/laravel news. Then, server.php to index.php, and copied .htaccess from public to root. However, the installation is displaying laravel default welcome view, successfully.
The pain starts, when I have uploaded it to the server. At first, it's displaying following message:
Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2".
I have added the following lines to the composer.json (in config):
"platform-check": false
and then omposer dump-autoload. By doing this, above message gone, and the page is displaying 500 Internal Server Error.
I have tried every possible solution, still nothing working till now.
Laravel Version: 8.74.0
Server Php Version: 7.4.26
Please help me to solve this issue. If you need any other information, I will provide.
I think it is better to add a php8 version on your local than downgrading your laravel version to 7.
Your Composer dependencies require a PHP version ">= 8.0.2" - tells that your laravel require you to have have php version 8.0.2 or higher.
Try installing a lower version of laravel. For example:
composer create-project laravel/laravel=8.0.* news

Docker image DNS issues

I am trying to build a Docker container for my new project and seem to be getting odd GitHub DNS resolution issues while attempting to run the docker build command.
I can't run the composer install command on my local machine because I have an outdated version of PHP which is why I am attempting to use a container.
Multiple other project on my personal machine don't have an issue installing composer dependences, but when I try and build the Docker Image I get several (but not all) errors for packages that are as follows
- Syncing phar-io/version (3.1.0) into cache
Failed to download slim/psr7 from dist: curl error 6 while downloading https://api.github.com/repos/slimphp/Slim-Psr7/zipball/0dca983ca32a26f4a91fb11173b7b9eaee29e9d6: Could not resolve host: api.github.com
Now trying to download from source
- Syncing slim/psr7 (1.4) into cache
120/120 [============================] 100%The following exception probably indicates you have misconfigured DNS resolver(s)
[Composer\Downloader\TransportException]
curl error 6 while downloading https://api.github.com/repos/phingofficial/phing-composer-configurator/zipball/a151e1804dd4c946969cfb78bed1a0e12f52ad34: Could not resolve host: api.github.com
Is this something I have misconfigured in Docker, the DockerFile, or my Composer JSON?
It appears that this is an issue with my specific version of Docker Desktop for Mac.
DNS resolution fails in Docker for Mac in versions prior to 3.1.0 periodically due to a buggy MacOS API They are using to pass DNS resolution to the guest. The solution is to update to a new version of Docker For Mac.
I've provided a summary of the issue should anyone need resolution in the future. More information can be found here
https://github.com/docker/for-mac/issues/5020

Symfony: Unable to replace alias "swiftmailer.mailer.default.transport.real" with actual definition ""

I've encountered a strange error when installing libraries from composer.
After running 'composer install' and installing all libraries this is what I get in the terminal:
Updating the "app/config/parameters.yml" file
Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
Unable to replace alias "swiftmailer.mailer.default.transport.real" with actual definition "".
Strangely on my MAC dev (mac air, homebrew php and mysql) setup I don't have this issue. However on this machine (windows 10, Yoga 900) when installing the the project from my github repo, I've had this issue.
I can't run 'php bin/console debug:container' without the error occuring again.
Versions:
Symfony 3.0.9
SwiftMailer v5.4.3
I've googled the issue and had no luck finding an answer but found related issues:
https://github.com/symfony/swiftmailer-bundle/issues/59
Error after updating symfony/swiftmailer-bundle to 2.2.5
Any help greatly appreciated, unfortunately I don't have the knowledge to solve this one.
Same issue here, my problem was that I do not set mailer_transport in parameters.yml

Composer: google-api-php-client does not exist in any version

I am trying to install the google-api-php-client on a Windows system (for local testing) using Composer.
But when I run composer require google-api-php-client:2.0#RC in my project directory, Composer states that
The requested package google-api-php-client could not be found in any version, there may be a typo in the package name.
The command I ran is directly from Google's documentation. I've searched both StackOverflow and the rest of the Internet for someone with the same problem but haven't found anyone. However, I was able to install a previous version of another similar Google package (which doesn't meet my needs) so I know that Composer is connecting to the database.
The package is called: google/apiclient
You can check it on the github repository.

AWS with Laravel 4 Missing curl

I'm trying to install aws service provider s3 for laravel 4. (still learning :D) I referred to this: https://github.com/aws/aws-sdk-php-laravel/tree/1.0 and followed the readme.md instructions but I stopped at composer update.
I got this error:
I checked the curl is already enabled in my wampserver. I also followed this: http://amitavroy.com/justread/content/articles/uploading-images-aws-s3-laravel-application but failed. Anyone has idea what to do?

Categories