I used to have cygwin with PHP installed and working, but the hard drive on which was installed crashed catastrophically. Cygwin was just about the only thing that hadn't propagated to my backup yet, so I lost it, and, unfortunately, PHP doesn't seem to be available for cygwin anymore :(

Something I realized, however, was that cygwin is completely self-contained and portable just by copying the cygwin folder. Would anyone care to share a copy of their cygwin folder with PHP installed?

Or, perchance, maybe someone can point me in the right direction to get PHP installed on cygwin? All the results I've found are out-of-date info and no longer working.

2 Answers 2


I don't believe Cygwin proper ever included PHP, but the Cygwin Ports project (which "provides Cygwin binary and source packages for a large variety of programs and libraries") lets you install PHP via the regular Cygwin installer (basically by telling the installer to use a Cygwin Ports mirror, instead of a regular Cygwin mirror, as the download site). Instructions for this are at http://sourceware.org/cygwinports/.

  • 1
    I just tested it with the latest Cygwin installer, and PHP is definitely not in the repositories. Commented Apr 8, 2013 at 1:26
  • 1
    @JeroenBaert: I don't know what you mean. If you mean that PHP is not in the default Cygwin repositories, then -- sure, that's a given. (The OP said it, I said it, there's no need to comment and say it.) If you mean that it's not in the repositories of the Cygwin Ports project, then you're simply mistaken: it's in the PHP category, with the name "php: PHP Hypertext Processor". I tried it myself. You must have done something wrong when following the instructions.
    – ruakh
    Commented Apr 8, 2013 at 2:25
  • @ruakh: I looked around for a repository with PHP, but all of the ones that I found were dead. Did you find one working? Could you point me to it? Commented Apr 8, 2013 at 4:04
  • 1
    @user1940006: My answer links (twice!) to such a repository. Did the instructions not work for you?
    – ruakh
    Commented Apr 8, 2013 at 4:06
  • Ugh ... sorry, it's late my reading comprehension goes down teh tubez :| Commented Apr 8, 2013 at 4:08

Another valid option is using XAMPP, for an Apache / PHP / MySQL stack that runs on windows. Just extract & run, I always use this for a quick test deployment:


  • I suppose that would work, but I also would like to have other Linux utilities at my disposal. Commented Apr 8, 2013 at 4:06
  • if you installed xampp/wamp you can put the path to the php.exe into your environment variables and cygwin will be able to access it as well
    – Populus
    Commented Nov 29, 2013 at 20:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .