Developing web applications with PHP is cool, especially when you have the right
development tools and even with more features added in PHP 5.4. But each time I
left the comfort of Intellisense in Visual Studio to develop PHP applications using
Zend or Netbeans for PHP, I was not always satisfied with those IDEs' code complete
features. Thus, I decided to search for any available plugin that will provide this
feature in Visual Studio.
The result of my search is the PHP IDE plugin for Visual Studio by Jcx.Software
Corp. The plugin installer after installtation automatically adds php code completes
feature into visual studio and some php project templates. The installer can be
downloaded from
http://www.jcxsoftware.com/
It comes with a paid license, but you can download the software and try it for 30
days.
After a successful installation, if you try to create a new project in Visual Studio,
you will notice that PHP project templates have been added to visual studio project
templates dialog.
Thus, you can write your php codes from visual studio with full intellisense support.
Though the plugin from Jcx.Software comes with a web server that you can use to
debug your PHP applications, I wanted to use XAMPP server or IIS. But on installing
XAMPP server it kept competing with IIS on port 80, each time I developed a PHP
application, I had to stop IIS for XAMPP to work. So, I decided to disable XAMPP
and configure the IIS to serve Php pages through CGI.
Configuring IIS to serve PHP pages could be achieved by first downloading the PHP
5.4 Non thread safe zip file from
http://windows.php.net/download and then extract the content to a folder
on your computer, then a handler mapping need to be added to IIS. To do this, open
the IIS manager by clicking the Windows Start Menu button, then select Run and type
"
inetmgr" and click ok.
This will open the IIS manager interface. In the
Connections pane,
at the top left side, select your server node and double click
Handler Mapping.
In the action pane, at the top right side click "
Add Module Mapping..."
This will bring a dialog box, in the Request path textbox type
*.php,
the, then select the module dropdown box and select
FastCgiModule,
In the executable section, click the button to browse to the folder that contains
the extracted files of the php 5.4 that you downloaded to select
php-cgi.exe.
. In the Name textbox, you can type in any name of your choice, then click the "
Request
Restrictions" button to configure the mapping to invoke handler
only if request is mapped to a file or a folder and then Click ok to create the
handler mapping.
Thus, you can build PHP applications from Visual Studio with IIS as the web
server.
Happy PHPing!!!