Solved

What do I need to run PHP code on my machine?

Posted on 2013-01-31
9
458 Views
Last Modified: 2013-02-03
I'm an ASP.Net/SQL Server developer. I want to look at code that's been written in PHP and MySQL. I have Windows 2007.

What do I need to run, develop and debug PHP code?  I think I need an Apache server but can do I need a Mac for all this?

Thanks
0
Comment
Question by:Camillia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 84 total points
ID: 38839926
1. Install IIS 7.5

Windows 7 Home Premium/Basic/Starter:
IIS 7.5

Windows 7 Professional/Enterprise/Ultimate:
IIS 7.5

2. Install PHP
PHP

3. Add CGI to IIS
On the taskbar, click Start, and then click Control Panel.
In Control Panel, click Programs and Features, and then click Turn Windows Features on or off.
Expand Internet Information Services, then select CGI, and then click OK.

CGI

That's it :)

you can follow this guideline as well:
Installing PHP on IIS 7.5 Windows 2008 or Windows 7
0
 
LVL 7

Author Comment

by:Camillia
ID: 38839941
in ASP.Net/C#, I open the code in Visual Studio. What platform do I need to open the PHP cide and debug/compile?
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 38839952
any php IDE, like Eclipse, Zend Studio, Bluefish there more check here:
List_of_PHP_editors
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 83 total points
ID: 38839997
If what you want to do is simulate a true PHP driven site, then you should install a complete stack and admin tools with: http://www.wampserver.com/en/ 

That gives you PHP, mysql, apache in a single packages and the whole thing istalls in minutes. It also comes with phpmyadmin to manage the database, and you can install modules and combine different versions of the pieces to exactly match the production environment you are developing for.

Cd&
0
 
LVL 32

Assisted Solution

by:Daniel Wilson
Daniel Wilson earned 83 total points
ID: 38840006
To expand on what sedgwick said, PHP is interpreted rather than compiled.  PHP IDE's like he listed are nice, but any text editor can work.

As for debugging, don't expect to set breakpoints and trace through.  You will debug by getting extra output with echo, print_r, var_dump, etc.

You may additionally want to check out firephp and firebug.
0
 
LVL 39

Assisted Solution

by:Aaron Tomosky
Aaron Tomosky earned 83 total points
ID: 38840010
Even more realistic than xampp or wamp is a virtual lamp machine. Get vmware player (or virtualbox) both free, and check out turnkeylinux.org for ready to run virtual machines (also free)
0
 
LVL 43

Assisted Solution

by:Chris Stanyon
Chris Stanyon earned 83 total points
ID: 38840155
Easiest (1 click install) and Cheapest (Free) - WampServer

Look into xdebug for debugging. Some IDEs will use this for breakpoints / debugging etc, but start off with PHP native 'debugging' tools - echo / var_dump / print_r etc. Consider firePHP for fireBug to allow console output - silently debug without messing up layout!

To properly setup your environment, look into name based virtual hosts in windows. Allows you to set up as many domain names on your system as you need, rather than the default 127.0.0.1 (localhost). You'll need to edit httpd.conf, httpd-vhosts.conf and the windows HOSTS file.
0
 

Assisted Solution

by:NickHITSL
NickHITSL earned 84 total points
ID: 38840191
Personally I have found that XAMPP works really well, it is simple to install and gives you the Apache server, PHP and mysql with optional filezilla and some other bits, you can switch those off if you want to.

If you are running it on the same machine as IIS you need to take care which web server claims and listens for port 80. Generally if I am developing ASP.NET I switch off the apache server and if I am developing PHP I switch of IIS.
0
 
LVL 7

Author Comment

by:Camillia
ID: 38840887
Thanks, let me read your responses.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question