Solved

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

Posted on 2013-01-31
9
459 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
Technology Partners: 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

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 …
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
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 a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

617 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