Solved

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

Posted on 2013-01-31
9
448 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
9 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 84 total points
Comment Utility
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
Comment Utility
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
Comment Utility
any php IDE, like Eclipse, Zend Studio, Bluefish there more check here:
List_of_PHP_editors
0
 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 83 total points
Comment Utility
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 32

Assisted Solution

by:Daniel Wilson
Daniel Wilson earned 83 total points
Comment Utility
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 38

Assisted Solution

by:Aaron Tomosky
Aaron Tomosky earned 83 total points
Comment Utility
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 42

Assisted Solution

by:Chris Stanyon
Chris Stanyon earned 83 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks, let me read your responses.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now