Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-01-31
9
Medium Priority
?
463 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:
Meir Rivkin earned 336 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:Meir Rivkin
ID: 38839952
any php IDE, like Eclipse, Zend Studio, Bluefish there more check here:
List_of_PHP_editors
0
Industry Leaders: 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 332 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 332 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 332 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 44

Assisted Solution

by:Chris Stanyon
Chris Stanyon earned 332 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 336 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

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!

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
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.
Suggested Courses

885 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