title: How do I install php-cgi? I tried MacPort, Package and everything else but none works
body: <p>I am trying to install php-cgi on my macbook (Yosemite 10.9.3) because the PhpStorm IDE keeps coming back to me "php-cgi not found" when i try to open things in browser. I tried to use a newer version of php interpreter because the current version is 5.4. But I can only find the packages in the php.net site but I have no clue how to install it. I also tried to download homebrew but again have no clue how to start there. I tried to use MacPort to install a fastcgi by using this line: 
  sudo port install php5 +fastcgi</p>
  
  <p>But it returns this: </p>
  
  <pre><code>---&gt;  Dependencies to be installed: autoconf213 gawk gettext expat libiconv ncurses readline m4 perl5 perl5.16 gdbm bzip2 gsed libtool libxml2 xz zlib mhash pcre libedit pkgconfig
  
  ---&gt;  Fetching archive for expat
  ---&gt;  Attempting to fetch expat-2.1.0_0.darwin_13.x86_64.tbz2 from http://packages.macports.org/expat
  ---&gt;  Attempting to fetch expat-2.1.0_0.darwin_13.x86_64.tbz2.rmd160 from http://packages.macports.org/expat
  ---&gt;  Installing expat @2.1.0_0
  ---&gt;  Activating expat @2.1.0_0
  Error: org.macports.activate for port expat returned: Image error: /opt/local/bin/xmlwf already exists and does not belong to a registered port.  Unable to activate port expat. Use 'port -f activate expat' to force the activation.
  Error: Failed to install expat
  Please see the log file for port expat for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_expat/expat/main.log
  Error: The following dependencies were not installed: autoconf213 gawk gettext expat libiconv ncurses readline m4 perl5 perl5.16 gdbm bzip2 gsed libtool libxml2 xz zlib mhash pcre libedit pkgconfig
  To report a bug, follow the instructions in the guide:http://guide.macports.org/#project.tickets
  Error: Processing of port php5 failed
  </code></pre>
  
  <p>I run a self-update with the MacPort already (version 2.3.0). Can anyone help out? Thank you so much! </p>
  
  <p>P.S. For PhpStorm, I am forced to use the built-in web server when i try to view the code in the browser. If anyone got a way to do that without their built-in server, that would be great too. I have a zend server installed already.</p>
  
  <p>P.S. I am using NetBeans now. But I guess it is good to make sure I get things like this settled while I am working on other things.</p>