views:

295

answers:

8

Often, when I am developing in PHP, I want to see minor changes instantaneously. This requires me to either FTP to a web server and then refresh, or use a localhost server, both of which(as I understand) are essentially the same thing.

What I would like to know is, is there an IDE or other way to parse PHP output in a dynamic fashion? I guess what I am thinking of is the WYSIWYG pane in some editors able to display code real-time.

I understand the client-server paradigm, but would rather not have to upload the same file 40 times when making changes/error handling/etc.

+5  A: 

You can always just save your files inside your localhost folder. Tools like xampp make running a php server effortless. Open the file in a browser, and whenever you make changes they will instantly be visible without having to copy the files around.

Ian Elliott
This is what he doesnt want to do though. He doesn't want to have to open the browser and refresh each time to see the changes. (i think)
lyrae
Well just my two cents. Any sort of GUI would be equivalent to a browser in this case, except probably lacking in all other areas (lack of javascript/css/html parsing). A browser has all this working already for you.
Ian Elliott
+1  A: 

This probably doesn't come up very often because it's so easy to install a local web server. What is your OS?

Also if your remote web server is accessible by SSH you could learn a screen oriented text-editor (such as the VI editor) and edit the source files on the server.

jjclarkson
Vista. Honestly, I am self-taught in this area and never really understood the significance of a local host. But now that I think of it, if your local host and web host are set up identically you can develop using local host with little worries about the transition?I think I've been living in FTP hell and never asked around for some evangelism
Brian
Yes. It's really easy to set up a server on your computer and it makes the process so much simpler.
Chuck
xampp as mentioned before is probably the easiest way to set up a local web server. If you're worried about compatibility issues with PHP, you can go through the trouble of making sure the same version of PHP is installed locally as is on the server. Although your major compatibility problems will come from the major version changes; PHP4 to PHP5 for instance.
jjclarkson
A: 

You could use the PHP command line, but that displays its output in plain text. You could take that output, save it as an HTML file, and display it with a browser, but I'd think that's more work than just setting up a local web server.

Aptana's PHP plugin has a built-in PHP server, so that's probably close enough to what you want, although I've never used it so I can't directly say anything about it.

musicfreak
+2  A: 

I've heard that ActiveState's Komodo is IDE for php behaving more-less the way you described (at least it has dynamic syntax check, so it has to parse the script locally). Try Komodo Website.

ymir
+1  A: 

I feel the same way, but get around it easily by using an editor/IDE with FTP support. Configure your account, and then edit files locally, but the editor/IDE pushes them to the server when you save them. Notepad++ and PSPad both do this on Windows, and I use Gedit (default Gnome text editor) when on Fedora. A Google search for "FTP text editor" or "FTP IDE" might serve you well.

Chris
Thanks for the tip, I have been meaning to look into Notepad++ for a while now. This seems like as good a time as any!
Brian
A: 

I may be mistaken, but it seems like you want to see changes without having to restore/maximize browser and clicking 'refresh'. So in other words, you want to see results without the inconvenience of having to maximize browser, clicking refresh, the minimizing it to get back to the editor.

As far as i know, there is no IDE that will show PHP code dynamically in real time.

What you may want to do is, if you can, bind it so when you save a document, it automatically loads up a browser and refreshes the page for you.

lyrae
+2  A: 
Byron Whitlock
A: 

Any IDE should notify you of syntax errors (normally with the wavy red underline), which will cut down on a lot of FTP-ing just to find you missed a semicolon.

Even though you say you don't want to use localhost, I would suggest using something like WampServer. The best thing about the latest version is you can install different PHP, MySQL and Apache "modules" and switch between them to mimic any server configuration. For example, "Apache 1.3, PHP 4.2" or "Apache 2, PHP 5.3" etc.

DisgruntledGoat