I am trying to run laravel project in cPanel.
The problem is that composer runs outside the project root directory but not inside the project having composer.jsonfile.
cPanel returns Killed when i try to run composer as in the image below:
Edit:
Looking on the comments i have tried to run composer --help but still there is Killed issue.
I have upgraded the memory limit to 1024M from custom php.ini file as:
but it is not yet changing in the terminal:
Could it be php configuration issues or some server issues?
Can anyone shed some light on this issue? I can update the question if it is not clear.
It looks like your server runs out of memory when composer is executed thus the error message : Killed.
If you have access to more resources you might try to increase the ram and try again, otherwise you can just composer install on your local machine and upload the vendor folder to get you going for now until you sort the memory issue on your server.
Edit: from the screenshots I noticed that you didn't upload the composer.lock file, you might want to try uploading that file and simply run composer install as it's should require much less memory than composer update (since the dependencies won't be resolved on your live server but simply installed according to the hashes in your composer.lock file).
Related
I've got this error in my laravel 5.2 project who hosted in debian linux
Warning: require_once(/home/u706561288/public_html/sap/vendor/composer/autoload_real.php): failed to open stream: No such file or directory in
/home/u706561288/public_html/sap/vendor/autoload.php on line 5
Fatal error: require_once(): Failed opening required '/home/u706561288/public_html/sap/vendor/composer/autoload_real.php' (include_path='.:/opt/alt/php70/usr/share/pear') in
/home/u706561288/public_html/sap/vendor/autoload.php on line 5
so many forum like stackoverflow tell me to using php artisan "composer update" but
unfortunately my hosting package not available to composer instalation
please tell me how to fix this problem
I suggest that you test these steps
On the Localhost, run these two commands (composer update and composer dump-autoload)
Re-upload the entire project on the server
Also, if the problem is not resolved, you can delete the Vendor folder and the composer.lock file and run the composer install command and Re-upload the entire project again.
When the hosting service or some PC does not allow to install Composer and appears error like in my case, follow these steps:
Delete all laravel project in hosting service. I recommend to use smartftp for good speed file access and tracked action.
Back to our localhost project and run composer install --no-scripts command and then composer clearcache.
Reupload all laravel project.
Don't forget to configure .env file.
I hope this can help with the same problem in future.
I had the same error while back, what I did to solve it was. I delete all the vendor folder from the root project then install it back by executing composer install
delete the Vendor folder and the composer.lock file and run the composer install command and Re-upload the entire project again
this helped me
If anyone still facing the issue after deleting the vendor directory and did composer install try to update your composer by composer selfupdate then do the same install process.
Question:
What kind of permissions should I give to Composer on Windows?
Server information:
Windows 2012 R2
IIS 8.5
Error message:
[RuntimeException]
C:\inetpub\wwwroot/vendor does not exist and could not be created.
Steps that I've tried and thoughts:
I've installed Composer through the .exe file.
I have a composer.json file in C:\inetpub\wwwroot and when I try running composer install or composer update, I get the error message.
I've tried manually creating the vendor folder in the directory, but then it cannot download the package that I have in my composer.json file, giving roughly the same error message, that the package doesn't exist and could not be created.
I've googled the error, and I'm led to believe it's a permissions issue, however, I have installed Composer on another server and installed packages in the C:\inetpub\wwwroot directory without a problem. I've tried comparing security group permissions between the two servers for wwwroot and inetpub, and the permissions were the same. I had someone suggest trying to copy the .json file to My Documents on the server and try running composer install from there, and that worked. Which further indicates it's a permissions issue, but I can't figure out what.
After re-reading another Linux question, I figured out what the problem was. I need to be running Command Prompt as administrator. Now it works.
Please ensure that whether your deployment folder is having composer.lock file or not.' If not please deploy the file there.
I want to using Redis in laravel 5.2 however, I'm getting error such a Class 'Predis\Client' not found, How I can solve it.
First download the REDIS to your system (if you haven't already installed it).
Go to the folder where you have downloaded the redis and run this command:
cd your-redis-folder-name
make
Go to your project directory and install composer:
composer require predis/predis
Go to your .env file and add Queue driver:
QUEUE_DRIVER=redis
use Mail::queue() to send mail via queue. See Doc.
And in your terminal run:
php artisan queue:listen
to send.
Write in console in project folder:
composer require predis/predis
And thats all.
You need to add predis/predis into composer.json for your project. Reference: https://laravel.com/docs/5.2/redis#introduction
Btw, if you are using laravel workers, with ubuntu supervisor and this error will not dissappear even after you did
composer require predis/predis
Then remember kids, that supervisor caches all your php code, once you boot it. So installing predis after you booted supervisor workers (https://laravel.com/docs/5.6/queues#supervisor-configuration), will not make a difference, until you do
sudo supervisorctl stop laravel-worker:*
and then start it again
sudo supervisorctl start laravel-worker:*
I've been stuck on this for an hour or two, on 3 projects in the last year.
we have add composer.json file "predis/predis": "~1.0" help working fine.
I solved the problem just including the use Predis; above class file in app folder.
If you installed predis via composer require predis/predis already.
you can also try to run Redis as a local server, download this and run the run Redis server file
if you still get it use composer require predis/predis
Running composer dump after installing predis/predis package might be necessary
It's easy to just look at the path and filename Examples that exist Most of the path name or autoload file name are not spelled correctly
1-go to https://github.com/predis/predis/tags
2-create folder in host by name redis
3-download predis and upload to your website dir (www) in redis
4- create index.php out of the predis folder(redis)
5- past this code for test in index.php
require 'redis/Autoload.php';
Predis\Autoloader::register();
$client = new Predis\Client();
$client->set('foo', 'bar');
$value = $client->get('foo');
echo $value;
My issue was that I updated the .env file through Envoyer to use redis as the session and cache drivers prior to deploying the composer lock file. This was causing composer install to fail on deployment.
Resolved by changing the session and cache drivers back to file, then deploying the updated composer lock file and running composer install, then updated the session and cache drivers back in the .env file back to redis and redeployed again.
I'm using a Vagrant VM created by Puphpet, running Ubuntu 14.04 for the purpose of developing a Wordpress site. I use Composer to manage PHP dependencies, and Composer is installed automatically as a system service via Puphpet, so there is no .phar file, just an executable Composer file in /usr/local/bin/composer.
I also use PHPStorm as my main IDE, and love its Remote Interpreter feature. So far, PHPUnit is the only feature that supports it, as Composer and PHP Codesniffer requires having a local PHP interpreter installed in order to be used. This kind of defeats the purpose of the Composer/PHP Codesniffer tools within PHPStorm when used with Vagrant. Jetbrains claims they have no plans to add this feature in the near future.
Which leads me to my question- Would it be possible to set up a shared folder to the PHP executable file in my VM, and use that as my Remote Interpreter in the Composer Settings window?
Could I also do the same to my PHPCS executable file path in the Code Sniffer settings panel with PHPStorm?
The only one I wouldn't be able to set up a Shared Folder to is the composer.phar file which is needed to run the Composer tool within PHPStorm, because there is no composer.phar file within my VM, as its just an executable in /usr/local/bin/composer as I described earlier. So would the solution be to download a composer.phar file to somewhere within my host directory? Will this interfere the Composer install on the VM?
*Update: As Sven has explained to me, the Composer file in /usr/local/bin/composer is the composer.phar file. I kind of understood this, but still am not sure if a. PHPStorm will recognize it as such, and b. if creating a shared folder will even work.
I added images of the settings panels so you can understand what I'm talking about.
Thanks, let me know if you need anymore info.
Anything I try to execute in Laravel, even minor files locally gives this message in composer:
[Symfony\Component\Process\Exception\RuntimeException]
The process has been signaled with signal "11".
Using OSX 10.7.5
Any help appreciated, as always.
For example :
composer update
typed in terminal retrieves the error message above
Make sure to check your composer cache folder has the right permissions for all files and folders.
If you ever ran composer as sudo or root then these cache folders could have the wrong root permissions.
Look at all the files and folders inside:
ll ~/.composer/cache/
Make sure you have proper permissions to write files in app/storage directory. And you can always use the following method of installation.
cd /your/app/directory
git clone https://github.com/laravel/laravel.git .
composer install
I got this error due to circular dependency on AppServiceProvider (when 2 services depend on each other). As the error does say much it took me a loooong time figure it out :/
Try:
Reinstall or upgrade PHP (Cli)
Make sure your .composer directory permission
This error message from laravel artisan is caused by Composer command error, you can try the same way from using command like:
composer dump-autoload -o
It should also cause error relating from aristan optimize command which be trigger from post-update-cmd" in composer.json.
In my case, the error is segment fault via Cygwin PHP so that I change to use XAMPP PHP to run it and it worked.
Try to run thin command
composer dump-autoload
I eventually solved this by employing a freelancer who was excellent and very knowledgeable.
First needed to update OSX with Maverick (free) - (I had to change my hard drive to do this!)
Then needed to download xcode
Composer should then function, you may need a new installation of laravel
Hope that helps someone!