Solved

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

Posted on 2013-01-31
9
456 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
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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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 38

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert html page to a php post email form automatically? 10 53
PHP: Query an Sqlite3 Datatbase return in JSON 6 48
php convert date format 3 21
PHP Syntax Error 4 25
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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…
The viewer will learn how to dynamically set the form action using jQuery.

785 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