I am trying to get my head around how to install composer. Really confusing!
I have downloaded the windows installer and during the installation was asked to locate "php.exe". Does that mean I need to have a local server (Wamp) installed?
Lets say I manage to install composer on my PC. How do I get it to work on my web host? Do i copy files there or do I need to install composer on web host as well?
Composer requires php executable, but not webserver. So installing php from php site is sufficient. However, if you plan to develop or run php applications on your computer, you would prefer to install full stack (eg wamp) right away.
Composer is needed only to install and update dependencies, once you do it, all are just files, and you transfer them as you transfer other files to your webhost. So copy, no need to install composer on web host.
Related
I am attempting to install phpspreadsheet via composer on my Mac running macOS 10.15. I know that this version of macOS doesn't have the php zip extension so composer isn't installing the library.
The thing is, the library is going to wind up on a server that does have the zip extension. So, I really don't need for the zip extension to be on my Mac. I just need the library installed so I can upload the vendor folder to the server.
How can I get composer to install it and ignore the extension check? I don't have access to a shell on the server the site runs on so I can't install directly there.
You use the option --ignore-platform-reqs.
Be aware that the zip extension is also directly used for installation. If that fails, Composer will try to install the deps by cloning the repositories, but you would need to at least have git installed on the dev machine.
The docs.
I am new to web development and I tried to install Symfony to my Laptop.. I have already installed fallowing softwares.
Windows 8 ( 64x )
wamp Server 2.4 (includes php5.4.12 & mysql5.6.12)
MySql Server 5.6 (This is not useless but I have installed)
I added C:\wamp\bin to path in System Variable
When I was trying to install Symfony I had to download Composer first So I downloaded Composer-Setup.exe from here
Then I run the wamp Server and went to PHP Extensions then Enabled php_curl and php_openssl also.
I did run Composer-Setup.exe file and selected Do not install shell menus and continued.
set C:\wamp\bin\php\php5.4.12\php.exe as the path to php.exe file
Finally I got following Composer Download error message
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl
Have I done wrong steps ? How can I solve this issue. Please help me to solve this and install Symfony 2.6 with wamp server 2.4 in Windows 8.
Note: This method does not use the composer but is equally effective
First ensure that PHP is available to your Path environment/system variable, if not add it.
Once you have added php to your environment variable restart your computer and open cmd and cd to your web root directory (project directory)
In cmd run the following:
$php -r "readfile('https://symfony.com/installer');" > symfony
This will download a file named symfony into your project directory (i.e. directory from where cmd is run)
Install the latest version of symfony as follows:
$php symfony new my_project_name
OR
Install/use the most recent version in a specific branch say 2.8
$php symfony new my_project_name 2.8
OR
Install/use specific version version within a specific branch
$php symfony new my_project_name 2.8.3
Note: steps 4, 5, or 6 will take some time, depending on your Internet speed to download Symfony
Is there a specific reason you want to install a WAMP stack? In my experience it's much easier and flexible to use Vagrant to provision a virtual machine with the right specs
Portable: just run vagrant up on another machine, wait a few minutes, and you're done
Allows you to keep the configuration of your developer's machines and the target server the same
Fixing a broken package just requires you to run vagrant up --provision later
Many packages like composer are written more with *Unix-systems in mind and will be easier to maintain and install.
Simply put, configuring an entire server directly on your machine is tedious work and isn't longer necessary. The Vaprobash project is a good example of how to get started
I tried to install Phabricator on windows 8 with WAMP Apache Server.
As per the below link I installed Arcanist and confirmed with the comment
arc -v
https://secure.phabricator.com/book/phabricator/article/arcanist_windows/
Next I try to access the Phabricator page on my localhost, I can see only the .sh for Linux, Nothing for windows. Please guide me if you installed successfully on windows.
http://localhost/phabricator/scripts/install/
Use below steps to setup phabricator/arc cli on windows box.
Download & Install Git Bash.
It needs PHP, if you don't have PHP installed on machine then you use XAMP or WAMP. Find the installation directory for PHP and set system path for that.
Open command prompt and test the php installation by writing php command. If it does not show any error then you can skip step-4.
In case of MSVCR100.dll missing error. download the exe file from here: http://www.microsoft.com/en-in/download/details.aspx?id=30679 and install it.Once again test php installation.
Use Git Bash to do following:
Clone below repos somewhere:
git clone https://github.com/phacility/libphutil.git
git clone https://github.com/phacility/arcanist.git
Again update system path similar to step 3 and add there : <path>\arcanist\bin
Test arc help command in Git Bash.
Install Phabricator server certificate using arc install-certificate command.
Add an editor by following https://secure.phabricator.com/book/phabricator/article/arcanist_windows/
You cannot install Phabricator on Windows. However, you can install it on a Virtual Box such as Oracle VM VirtualBox which is free. Once you have VirtualBox, you need to create a Virtual Ubuntu there. After installing Ubuntu on VirtualBox you can install Phabricator there, on Ubuntu, by following the instructions.
If you need more help with details and whatnot, I will gladly help you.
The Phabricator server does not support Windows. See the Install Guide:
To install the Phabricator server software, you will need an operating system ... which is not Windows. ... [T]he server software does not run on Windows. It does run on most other operating systems, so choose one of these instead:
I am using XAMPP 1.8.1.
I need to write code with PHPUnit.
When I try to install PEAR using command prompt, I get the message below:
Are you installing a system-wide PEAR or a local copy?
Could some one suggest which option I should use?
Thanks in advance.
PEAR is usually installed system-wide. The benefit of this is that the various packages can be reused between different projects.
One reason why you might install a local copy of PEAR is that the administrator[s] of the server you are installing on might be reluctant to install additional packages or upgrade existing ones.
By performing a local install of PEAR you can choose the location of where the PEAR installer places the packages/PEAR code that you install.
So, another reason for installing local, even multiple, copies of PEAR is to have separate installs for each project you might be working on, though using Composer in this scenario is much more common place.
Naturally if you do install a local copy of PEAR then you will need to adjust your include-path accordingly.
I want to install PEAR on PHP 5, so I can use Spreadsheet_Excel_Writer.
I don`t know how to install it on my ISP nor my personal MacBook.
Thoughts for both?
The PEAR Manual has a quite extensive list of instructions on how to install the PEAR manager on Windows, *NIX and Mac OS X. The manual also has a section on installing PEAR remotely, for example using FTP. Following those instructions, you should be able to install PEAR (nearly) anywhere. :)
From the command line, do this:
pear install Spreadsheet_Excel_Writer
You can also download the package directly here without using PEAR: http://download.pear.php.net/package/Spreadsheet_Excel_Writer-0.9.1.tgz. It's pretty easy to use if you have the script located anywhere within your include path.
For your personal computer, using the "pear" script that ships with most PHP distributions is a good idea.
For shared hosting, you can
Track your dependencies manually, and copy all the appropriate files to the server yourself
With pear installed, do "pear install -R/my/root_dir -a Spreadsheet_Excel_Writer". This will install the package and all dependencies to the specified root directory. Copy this installation to your webhost.
You should also have a look at "pear help" and "pear help install".
You can't install pear to your isp's core. But you can install the individual files from pear's site and upload them to your host:
http://pear.php.net/package/Spreadsheet_Excel_Writer/download