Collecting Information

Getting PHP composer to work with XAMPP on Arch Linux behind a corporate proxy (goal: install Laravel)

3/ 6/2015 | Comments: 8

It took me quite some tests until I finally found a way to get all those things working together:

  • Arch Linux
  • PHP
  • Composer
  • Laravel (PHP framework)
  • behind corporate proxy server (Squid)

So, in a nutshell, the necessary actions were:

Arch Linux

I'm working on an updated Arch Linux with no PHP, Apache, Composer whatsoever installed by means of Pacman as my goal is to run everything out of the XAMPP box.

Corporate proxy server

I have exported the variables http_proxy and https_proxy as I'm captured behind a proxy server on my work:

export http_proxy=<proxy-ip>:<proxy-port>
export https_proxy=<proxy-ip>:<proxy-port>

So no protocol prefixes for me (http://, https://), simply the plain IP addresses and port numbers.


Download and install XAMPP for Linux:

Usually, this will reside under /opt/lampp after this.


Strangely, there was no cert.pem to be found in my /opt/lampp/share/openssl/ directory, even though this ought to be the case, according to

php -r "print_r(openssl_get_cert_locations());"

So I downloaded this certificate file manually from and saved it in this directory under the name "cert.pem".


I read a lot about these two environment variables:


But I definitely had to unset / delete them to prevent errors.


In order to find the PHP executable on the system, I appended "/opt/lampp/bin" to the exported PATH variable. I did this globally in /etc/profile.


Composer can be downloaded and installed into the XAMPP bin directory like so:

curl -sS | php -- --install-dir=/opt/lampp/bin --filename=composer

As this bin directory is already visible through the PATH variable, PHP and composer are now directly accessible from the command line.

Composer, Laravel and the tricky part

Officially, Laravel can be installed with this command:

composer create-project laravel/laravel --prefer-dist

To get a very verbose output, you can add the option "-vvv" after the composer command. At first, I had an awful lot of problems with this step. But having found out and done all the previous steps at last, I was able to download Laravel.


Otto   4/16/2015

Same scenario as yours, fully solved thanks to your research.

composer_noob   6/29/2015

Thank you ! I could not update composer because of an openssl error. Your explanations about the cert.pem file allowed me to solve the problem quickly.

0x00ff binary options   5/ 9/2022

That is really interesting, You're an overly professional
blogger. I have joined your feed and look forward to in the hunt for more
of your excellent post. Additionally, I have shared your site in my social

авиатор игра на деньги   7/17/2022

Как поднять бабла- авиатор игра наденьги
авиатор игра на деньги

trade binary options   8/27/2022

Have you ever earned $765 just within 5 minutes?
trade binary options

buy discount viagra   10/14/2022

viagra online bestellen schnelle lieferung is purchasing viagra online
legal buy discount viagra buy real viagra online overnight delivery female viagra online order

binary options auto traders managed accounts   11/ 4/2022

Hi! This is my first visit to your blog! We are a team of volunteers and starting a new project in a community in the same niche.
Your blog provided us useful information to work
on. You have done a extraordinary job!

best place to order cialis   11/12/2022

buy cialis from india online generic cialis online tadalafil best place to order
cialis cialis vs viagra legitimate place to buy cialis online

Leave Comment