I want to install intervention/image package on my web server i had installed on my localhost , and i want to install it on my web server , Can I Install Laravel 4 package without using Composer? because i don't have acces to use command prompt on my web server.
How are you installing Laravel and the other dependencies already?
Just install it locally like normal then copy your vendor directory along with the rest of your project to your host.
it's possible for you to just upload your vendor directory with ftp, but I wouldn't advise it to you.
Couple of reasons:
You don't want to upload your dev-dependencies, so you would have to handpick which folder to upload - everytime you want to update your dependencies
Uploading over ftp is very slow, so that might take a long time
You don't get the latest versions of the dependencies (which could resolve some security issues)
You wouldn't get any warning if some package isn't compatible with your environment.
I suggest you to use a host that gives you CLI, or even better that can directly run composer when you push up your files, as hannesvdvreken said, fortrabbit (Disclosure: i work there).
If you are running PHP on a shared host without composer you still have some options left:
Install composer on the server in the same folder as your project,
Upload composer.phar to your server,
Change your hosting provider (try fortrabbit),
Upload your vendor folder from your local computer to your server. (Last resort)
Yes you can download it via LaraPack. It provide you ready-to-use Laravel instalation, so you don't have install it with Composer. It also gets weekly update.
Related
I have deployed a Laravel app in a shared host. I want to install package twilio and I get an error while installing using composer.
I think I cannot modify php.ini since I haven't given rights to edit php.ini file (cPanel).
Can you please suggest a way to get through this?
I managed to get through this by installing twilio in local server and then push all the modified files to the remote server. I had to manually merge the changes to the files in config folder. But it worked though it was a tedious task.
I am new to composer and would like to know how do you guys deploy a project to the production server using composer?
In deploying, would composer also push the dependency packages needed to the server?
Would/ Can composer build the application with minification process?
I think the current best practice is to not run Composer on the target production server. The regular process of deploying a web application usually requires several independent steps, and Composer is only suitable for some of them, regardless of what people make it do additionally.
You mention minification, and I would add the process of pulling in JavaScript dependencies in general. This is no domain for Composer. It has been done in the past to offer Composer packages that contain Jquery, but this requires additional work to put Jquery in the right directory afterwards, adding the need to run post install scripts or add installers that need configuration. I guess the right way to do it would be to use Bower for this.
So the deployment would be at least a three step process.
Use composer to install PHP dependencies.
use bower to install JavaScript dependencies.
Use rsync, SFTP, SCP or FTP(S) to move all the files to the server.
Any optimization steps would be done prior to moving the files onto the server inside the deployment script.
And if anything fails during the collection of dependencies, be it an unsuspected downtime of Github, or your deployment server running out of disk space, you don't end up with a halfway deployed new website version. You can stop the deployment script before syncing if anything is missing or gone wrong.
yes, composer install get all dependencies in your test server, check it, if everything work ok, then sync all the files to your production server, which can save you from the unexpected problem running composer install on your production server.
other way is to sign all the files from your test server after composer install, then use composer install to get all dependencies in your production server, sign the files, now you must check two signs separately generated in test and production server, if it match, congratulations, the deploy is ok.
I am currently trying to install Omnipay into my Codeigniter project. I am stuck on windows because I do not have ssh access to the box where this needs to run on. So far I have gotten a new directory in the project root that is named "vendor" and it contains a lot of empty directories referring to Symfony (for what reason is beyond me).
Then I get a runtime exception that I need to enable the openssl extension in my php to download the necessary files and this is where I am stuck at. I don't run WAMP on my computer and I just use the php.exe I downloaded to work with netbeans.
Isn't there an easier way to get omnipay to run? Like just download the files from somewhere and plug them into my project like normal? It seems to be an aweful lot of headache to get a simple library to run in my CI project.
Please forgive my ignorance towards composer but I currently see no benefit of using it for this particular project.
You can "just download" the files here: https://github.com/omnipay/common/archive/master.zip
The problem is, Omnipay depends on Guzzle (an HTTP library), and Guzzle depends on some Symfony components. So you will spend the rest of the day downloading dependencies and making sure you have all the necessary files. That is the problem Composer solves for you.
I don't have any experience running Composer on Windows, but I would start here:
http://getcomposer.org/doc/00-intro.md#installation-windows
Using the Installer
This is the easiest way to get Composer set up on your machine.
Download and run Composer-Setup.exe, it will install the latest
Composer version and set up your PATH so that you can just call
composer from any directory in your command line.
Once you have Composer installed, you should simply be able to make a file named composer.json in your project root, with the following contents:
{
"require": {
"omnipay/omnipay": "~2.0"
}
}
Then use the Command Prompt and cd to your project's directory, and run composer update to download the Omnipay files and all their dependencies.
I'd like to know if I can install or use the Laravel PHP framework on any web server without using Composer (PHP package/dependency manager) every time?
I would like to be able to drop my app on to any web server (like a shared server without access to the command line).
If I run composer install the first time (locally), then all the dependencies should be present, correct?
Then, I should be able to drop it onto any server with all of the files (including the vendor directory)?
If you really wanted to, you could do all the work that Composer does manually, but you definitely should not. Installing Composer is easy, it's just a matter of getting the composer.phar file and running commands on it.
You do not need to run Composer on your server as well as locally, once you run composer install or composer update your project will have all its dependencies available and you can just upload it straight to your server.
You cannot install laravel local without composer in your project.
On this site you can download everything what you can download also with the composer build tool. But you do not need a composer installation. Of course laravel is also present there: https://php-download.com/package/laravel/laravel
If you have shared server and you are not able to install composer and run cmd to install a new package or update an existing package.
You can one thing by installing composer on your local machine and install(ex composer require package/name) or update(ex composer update package/name) all the packages, then upload your vendor directory on the server with your code. it will work for you same as in your local environment.
NOTE: I strongly recommend that you should use the Laravel with the composer, it is an important part of laravel and you can try to convince your client to provide a server that supports laravel. Please check the link below and you can find the server requirements. https://laravel.com/docs/5.5#installation
If you don't want to use composer on server then you will have to run composer install/update and download all the libraries locally and then manually upload all those files on the server i.e. Vendor Directory.
In-Case of shared hosting where you can't connect to server with shh there you might have to do that but it will take lot of time to upload all the files on server so I would recommend that you should composer and then download the libraries through composer install/update.
Yes, you can install all project dependencies via composer in your localhost first, and then transfer all the files via FTP to your actual website.
Just download the zip file from github and upload to your htdoc and voilĂ it will work for you
I have an environment in Amazon (Container Type: 64bit Amazon Linux running PHP 5.4) and I follow this instructions to deploy Symfony2 applications: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_PHP_symfony2.html.
All is working properly but my problem is that Amazon automatically update and download the dependencies of my project (composer.json) when I deploy, but I don't want this issue because some updates can crash the application and I want to controll this.
There is a choice? I'm thinking to delete the vendor folder from my gitignore file(UPDATE: I tried this and didn't work, :-()...
this should work? Which is the best way?
Thanks a lot!
You can control the version that gets download with composer.
http://getcomposer.org/doc/01-basic-usage.md#package-versions
It runs composer.phar install on every deploy. If you put your composer.lock file into your repository and don't change it, nothing will be installed on your server. Beside that if you want to update your dependencies, first install them on your local/deployment machine and if everything is fine push your composer.lock file as well.