How can I debug my php code?

Remotely coding PHP without FTP

  • I like to code my PHP scripts on my Windows machine in TextPad, then upload them to the server to test/debug them. But constantly FTPing files while debugging is the pits. What's the answer? Install PHP locally? Break down and learn to use vi? What's a programmer to do? What would you do?

  • Answer:

    learn vi. Admiteddly, its difficult at first, but a breeze once you get the hang of it.

vraxoin at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

Install PHP to work with IIS webserver, this gets rid of having to install Apache. If you need a DB, install MySQL. I like using http://www.scintilla.org/, it has color coding and code tips, which keeps me from visiting the PHP.net site whenever I forget in what order I'm supposed enter varaibles.

linux

Since seanyboy can't seem to stop talking about it, I downloaded WebDrive, and it really seems to be the thing I was looking for, for the short term at least. Once my linux-fu improves, I'll probably set up my own local development server and develop directly to that, then upload finished sites when I'm done.

vraxoin

Whoops on the email editor thing. Posting too early, etc. Text editor is what I meant. Regarding textpad, I was thinking of notepad I guess. I don't know much about the actual application textpad. If it has scripting that is decent then there is probably a way to incorporate the ftp process into it. Ftp is an exceptionally simple protocol, I've implemented it in a variety of scripting languages at one time or another. Someone has probably already done it for textpad if it's possible and easy. Should be pretty easy to write a shell script to do the same thing, also. Make an icon on the desktop linking to it, and just click that when you have an update. rsync is great for this (and comes with cygwin, which is a unix-like environment for windows). If I am working on large chunks at once (i.e. not a lot of tiny edits) I often just use CVS for this kind of thing. Commit on the dev box, update on the server. I have this bound in emacs to a single keystroke so no big whoop. This has the added benefit of tracking changes. But, like I said, it's slow and annoying if you're, say, adjusting the location of some image pixel by pixel or something.

RustyBrooks

Why no, I wasn't. Thank you for bringing that to my attention. Allow me to clarify: UW Pico (tm)? I love UW Pico (tm)...

cdavis

My web host supports http://us3.samba.org/samba/samba.html. In windows, I map a network drive right to the ftp site. Then I work on the file right on the server in TextPad.

jpoulos

Install PHP on your machine. It was an arse for me to do under XP (but a breaze on 98 for some reason). Try phpdev if you get problems. Use Samba if at all possible. Slightly OT, but I loathe Dreamweaver. It's better than it was, but it's HTML is very random. I'd rather hand code so I use Edit+.

twine42

Right, but the fact that people don't use other products doesn't mean the main product is a monopoly, does it? The definition of a monopoly is a company having exclusive control over a commercial activity. In contrast, Adobe has left the format of EPS, PS, and PDF VERY open. Anyone who wants to can make a reader or writer for them, and many people have. There are a half dozen readers for unix. libpdf is a library for creating PDFs that has hooks in every major programming language. Yes, adobe has a "lock" on it in the sense that everyone uses it -- but it's because their products are *good*, not because they stifle competition unfairly. If you don't like adobe for generating and reading PDFs there are lots of other programs, most of them work very well.

RustyBrooks

Whoops, wrong thread.

RustyBrooks

Seconds on UltraEdit. It's what I switched to from TextPad after finding built-in FTP abssolutely imperative.

billsaysthis

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.