Composer portable mode? - composer-php

help me please:
My case
I have a manually mounted WAMP server using separate packages on drive E:
I did this, so that when I format my computer, I do not have to install it again.
For now everything works very well and little by little I have been making changes in the configurations to make tests.
Today I learned that there is "composer" which allows to manage dependencies for PHP projects.
I downloaded it and installed it (which is very easy).
My question
When formatting my computer and "reactivating" my WAMP, do I need to reinstall composer? Or can I use it as if it were portable?

Composer is just a collection of PHP files, conveniently tied together in one file with the .phar file format (and probably with or without .phar extension). You should be able to either install Composer again, or download that Phar file again if it got lost.

Related

Install composer in Windows server without internet access

I was trying to install Composer in a windows server, where there was obsoletely no possibility to get internet access due to permission issues. I was unable to do it. So please do suggest any ways to that possible.
Instead of downloading the file composer.phar you need to find a different way to transfer it to the computer in question.
Next to the file composer.phar that computer needs to provide the PHP executable (with a couple of extensions: phar, iconv and json). Recommended is as well the zip extension. Additionally the system should provide at least the unzip and 7z utilities, I'd also recommend the git utility.
Offline systems are often managed. Contact your manager on how to obtain information with whom you need to talk to discuss on how to transfer files to that system and who is responsible for that and which steps are required to do so (review process, deployments etc.).
Composers Homepage is: https://getcomposer.org/
PHPs Homepage is: https://php.net/

Where Can I Directly Download Laravel Dependency Folders/Files from without using composer

For some reason, composer cannot work on my PC and wamp also (for now) so I downloaded the laravel zip folder, "laravel-master.zip".
I unzipped and uploaded this folder to my online production server but I noticed that I do not have the vendor folder. It was not included in the laravel-master folder.
So my question is... from where can I get the vendor folder (and any other folders/files) so I can manually add them to my laravel installation?
I will follow the same logic as the other saying. It is useless (and this is not recommended) to copy the vendor files because they are updated frequently and not stored.
the problem is that without composer, it will be difficult to work with Laravel (not only for class loading, but also unable to share your project later).
To use composer with WAMP, you probably forgot to specify during the installation, the php.exe WAMP to use. Located in C:\wamp\bin\php\phpx.y.z.
Here are two links that will help you achieve this. (You can uninstall your composer before to start from scratch)
Question and Answer about use composer in WAMP
Video about install composer and use it in WAMP
Then you just might be in the root of your project a composer update.

PHP-Composer, locally installed, remote installation need?

This is a very simple question and I think that there will be someone who will mark me down for this, but I developed in PHP / CakePHP on my local Ubuntu system, and then install / ftp my code to my hosting company.
With CakePHP which is only PHP code, there is nothing to install, you have to set-up DB connections e.c.t but that is simple stuff but I have just come across PHP Composer, looks very easy to use and install locally.
My question is does it need to be re-installed on my hosting server, e.g once the code / php archive file is loaded into my project and its all working do I need to re-install it via SSH / curl, if so this might not be usable has I would not have access to my server to install it as root but it is only downloading code archive PHP file for use then would this work?
Sorry again for the newbe question but I can not seem to find a simple answer to my question.
Many Thanks
Glenn.
No, you'll be able to run Composer locally and then ftp the result to the target server. This is the preferred setup, because otherwise you'd need a shell on the remote server, or some replacement, and that could mean less security, or it is even impossible with most shared hosting.

how to manually install npm package or node.js with full setup?

I am a php developer. For easy installation of php+apache+mysql there is WAMP, xampp, etc.
my internet connection is bad quality. and unable to use npm install. i want download a single setup file that installs node.js, socket.io, expressjs and etc
I am not aware of any package similar to WAMP for Node.js. Nonetheless, you can grab Node.js Windows installer from here: http://nodejs.org/#download. Please note that the only embedded tool is npm.
If you can not use npm directly, getting all the dependencies will be a real mess. Most of the packages you will need (socket.io and express for example) in turn have multiple dependencies.
Anyway, it is still possible to use npm from manually downloaded files. Look at http://npmjs.org/doc/install.html for more informations.
You can download packages manually at http://search.npmjs.org. There is no single setup that downloads any possible configuration of npm packages, you would have to download them one at a time but that should be able to grab them even on a very slow connection.
The other option would be to grab them directly from their GitHub location since that's where most of them are hosted. You could sync the source using git and then install them. That should also work on a slow connection.

Updating php version on windows with apache

I wonder what I should be carefull of updating PHP on Windows(with Apache). My current version is 5.2.9-2
My php folder is simply under C:\php
If I simply download and unzip the new version, 5.3, which is a little more significant than going from 5.2.8 to 5.2.9, I'm thinking I need to be carefull not to overwrite some files.
I'm thinking 5.3 will have some changes in the .ini file. My .ini file allready has some modules activated and such, but if I leave the old .ini file, I might have some incompatibilities.
So, what incompatibilities and other risk do I need to look out for? I don't have any experience updating this, and I fear I might loose things and will just end up having to delete and make a clean install and then edit everything again, which is painfull.
Don't do it on a live environment until you've tested.
Php 5.3 contains enough changes/new stuff that i would be wary of either issues with the server config, as you've suggested, but also enough that I'd want to test my app to check it still worked correctly under 5.3 as well.

Resources