laravel composer update returns RuntimeException: phpseclib - php

I have a laravel 4.1 modular system and when I try to add a package to system and update using composer's "composer update" command in console, I get the following error:
[RuntimeException]
Could not completely delete /var/www/panel.uygulamam2.com/vendor/phpseclib/phpseclib, aborting.
Why do I get phpseclib error?

Check the permission over vendor folder and make sure your current user is the owner

Related

Adding LaravelAdmin To Laravel 8 project Gone Wrong

I want to use LaravelAdmin so I tried running the command composer require encore/laravel-admin at my Laravel 8 project.
Then I keep getting this error at the terminal:
Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+DESKTOP-MB1VP3M+2022-10-22+1844 to retrieve a token. It will be stored in "C:/Users/PV/AppData/Roaming/Composer/auth.json" for future use by Composer. Token (hidden):
So I tried defining a key for myself in Github (Personal access tokens (classic) with repo checkbox turned on) and ran this command:
composer config --global --auth github-oauth.github.com [key]
Then I tried one more time to download Laravel Admin but another error came up:
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
[RuntimeException]
Failed to execute git clone --mirror -- "https://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:x-oauth-basic#github.com/doctrine/cache.git" "C:/Users/PV/AppData/Local/C
omposer/vcs/https---github.com-doctrine-cache.git/"
Cloning into bare repository 'C:/Users/PV/AppData/Local/Composer/vcs/https---github.com-doctrine-cache.git'...
fatal: unable to access 'https://github.com/doctrine/cache.git/': OpenSSL SSL_connect: Connection was reset in connection to github.com:443
So what on earth is going wrong here?
I'm really confused now, please help me to solve this issue... thanks.

Error when trying to install laravel/create a laravel project on windows via composer

I want to create a new project using Laravel.
From the documentation, I downloaded Composer using its Windows executable installer.
I have already set the path to: C:\Users\marti\AppData\Roaming\Composer\vendor\bin
**I created the vendor\bin directory
From the command prompt, the command "composer" works.
I tried to install Laravel using the laravel installer and it gives me an error also with the create-project command.
I have tried both methods even with administrative privillages but still there is an error.
Using Laravel Installer:
[ErrorException]
file_put_contents(C:\Users\marti\AppData\Roaming\Composer\vendor\bin): failed to open stream: Permission denied
Using create-project method:
[InvalidArgumentException]
Composer could not find the config file: C:\Users\marti\AppData\Roaming\Composer\vendor\bin
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting S
tarted" section
PLEASE HELP!
Error when using laravel installer
Error when using create-project method
I deleted the Composer path variable, changed directory to read "C:>" and ran the command "composer global require laravel/installer"
Try requiring Laravel installer from composer composer global require laravel/installer then simply make a new laravel project laravel new {PROJECT_NAME}
Composer(for windows), as of build v1.10.13 does not require you to manually set then env path variable.
You dont have to change or add anything in the composer installation directory or to environment path variable.
If you have done so, then do the following
Re-install composer.
Run composer in a new cmd window, to see if its is installed properly.
Run composer create-project --prefer-dist laravel/laravel <your project name> and now your project should be set up properly.

Composer update - website stopped working

I updated the Composer using cmd window and got these errors:
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Darryldecode\Cart\CartServiceProvider' not found
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
[RuntimeException]
Error Output:
The website is not online yet, and I'm running it using xampp.
Now, when i'm trying to access my web site through localhost, I get this error:
FatalErrorException in ProviderRepository.php line 146:
Class 'Darryldecode\Cart\CartServiceProvider' not found.
In the app.php file I have:
Darryldecode\Cart\CartServiceProvider::class,
in the Application Service Providers, and:
'Cart' => Darryldecode\Cart\Facades\CartFacade::class,
in the aliases.
Any ideas on how to get the website back?
Thanks!
Tty this steps
Temporary remove
Darryldecode\Cart\CartServiceProvider::class,
And
'Cart' => Darryldecode\Cart\Facades\CartFacade::class,
Type command
composer update
And then add this class
Because when you update composer he try to find this path before adding in your project, After updating your composer this class added in your folder

Can't Setup Laravel Project Using Composer

I try to setup a laravel project using composer with this command
composer create-project laravel/laravel blog "5.1.*"
But i got following error:
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
[RuntimeException]
Error Output: PHP Warning: require(/home/iwan/blog/bootstrap/../vendor/aut
oload.php): failed to open stream: No such file or directory in /home/iwan/
blog/bootstrap/autoload.php on line 17
PHP Fatal error: require(): Failed opening required '/home/iwan/blog/boots
trap/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pea
r') in /home/iwan/blog/bootstrap/autoload.php on line 17
Does anybody know how to fix this ?
Thank you
Actually, the project is created but the dependencies are not installed so open your terminal/command prompt and run following commands:
cd blog
composer install
Also, if you want then, you may install the Laravel installer so you can create a new project using something like the following:
laravel new Blog
This is a little bit faster. So to install the installer you need to run the following command from the command prompt/terminal:
composer global require "laravel/installer=~1.1"
Once you install the installer you may then run laravel new someproject from the terminel to create a new project with all the dependencies (According to Documentation).
Note: Check this and this as well if needed.

Where is the Vendor module in YII Initializr?

I have installed YII Initializr module and YII framework is in my PHP Include path.
But as soon as I run mysite/frontend/www/index.php,
I get this error:
Warning: require(./../../common/lib/vendor/autoload.php): failed to open stream: No such file or directory in D:\xampp\htdocs\yiiinit\frontend\www\index.php on line 12
Fatal error: require(): Failed opening required './../../common/lib/vendor/autoload.php' (include_path='.;D:\xampp\php\PEAR') in D:\xampp\htdocs\yiiinit\frontend\www\index.php on line 12
Please help.
Here are the steps to generate vendor autoload.php file.
Step 1. Create account on https://github.com and go into setting => Personal access tokens i.e. https://github.com/settings/tokens
Step 2. Generate github access token.
Step 3. Now open command prompt (cmd) and go into the folder where yii installed and run command => composer update (Note:- there should be a composer.json file).
Step 4. cmd require Token form your side now copy token generated in step 2 and paste it in cmd.
Step 5. Yii2 Frameworke installed successfully now browse web/index.php
Missing /vendor/autoload.php file is generated automatically by composer after package installation.
You must first install composer (sell documentation). Then run
php composer.phar install
or if installed globally
composer install
in the directory where composer.json file is located
With experience it seems that composer does not download the vendor folder with a slow internet connection. If composer returns any error when installing the basic application try downloading it manually and then work from there possibly composer failed to generate the folder.
Here is a link to the basic yii2 app: https://github.com/yiisoft/yii2/releases/download/2.0.11/yii-basic-app-2.0.11.tgz
1 Create/Sign in into github account.
2 Go to Profile>>Settings>>Personal access tokens (OR) click on this https://github.com/settings/tokens.
3 Click on Generate new token
4 Select the appropriate scopes and click Generate token.
5 Copy the the token Key and past it in composer when the composer want you the Token(like: Token (Hidden):)
Now it will enter into the installation process.
if you are using composer,
install mbstring for your PHP version and run composer install again

Categories