You can actually tie php in with eclipse for interactive debugging using something like APD or XDebug, I've never done this before as I prefer the more traditional trace method but the PHPEclise package should have enough to get you started.
<br><br>Personally I use both vi and Eclipse for my PHP work, both have their strengths and weaknesses but knowing your way around an editor like vi means that debugging on a remote server is a little less painful.<br><br>
When looking at frameworks be careful you understand what you want from the framework. Something like the Zend Framework would give you the tools and patterns to build a complex homegrown application/ framework whereas other could lock you into a certain style that could be constrianing (although it's worth mentioning that Zend does completely remove this issue).
<br><br>It's worth learning both PHP and Python but pick one for know and grok it before moving on, personally I don't know much Python but it's on my long list of new stuff to learn. With the current state of PHP5 it's a much better language than PHP4 ever was and can do most of the things the other object based scripting languages can do.
<br><br><div><span class="gmail_quote">On 01/12/2007, <b class="gmail_sendername">walt</b> <<a href="mailto:walt@helvatron.co.uk">walt@helvatron.co.uk</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Great! Many thanks. I understand the technology no problem.<br><br>I have apache2 running and it picks up the index.html and displays the test<br>website without any problems. I then installed the PHP5 module (or whatever
<br>its called) and hey presto your sample scripts in index.php worked fine.<br>Ergo php must be kicking in.<br><br>So now to learning the language. There must be oodles of documentation on<br>the web. But I may be picking your brains later in my learning curve if
<br>thats ok.<br><br>BTW: I am atheist with the motto live and let live. So you have no worries<br>on that front. I have read quite a lot about it all and although some of it<br>is well over my head I figured PHP looks like my best bet to start with.
<br>Should I get to point of where I start seeing the advantages of the other<br>technologies I will have no hesitation in using them.<br><br>I will need database access and if frameworks - django can do that I might<br>well switch to that in a few weeks. I'll check it out.
<br><br>Are you going to the meeting (6th December) next week?<br><br>Thanks again, Walter<br><br>-----Original Message-----<br>From: <a href="mailto:watford-bounces@mailman.lug.org.uk">watford-bounces@mailman.lug.org.uk</a>
<br>[mailto:<a href="mailto:watford-bounces@mailman.lug.org.uk">watford-bounces@mailman.lug.org.uk</a>] On Behalf Of Yvan Seth<br>Sent: 01 December 2007 16:49<br>To: <a href="mailto:watford@mailman.lug.org.uk">watford@mailman.lug.org.uk
</a><br>Subject: Re: [Watford] PHP<br><br><quote who="walt"><br>> I usually use just a text editor for HTML and JavaScript which are<br>> very easy to debug in most browsers. I have no idea how PHP does it.
<br>> There must something behind it that interprets and/or compiles the<br>> script.<br><br>PHP is entirely interpreted at the server-side. The usual method being that<br>the web-server internally (typically with a loaded "module") executes the
<br>PHP interpreter over the "page" before sending the final generated HTML to<br>the client. I.e. you have this in index.php on the<br>server:<br><br> <html><br> <head><title>Silly</title></head>
<br> <body><?php echo "Hello World"?></body><br> </html><br><br>A web browser "hits" your page and the server reads the above off disc and<br>runs the PHP engine over it to generate this:
<br><br> <html><br> <head><title>Silly</title></head><br> <body>Hello World</body><br> </html><br><br>Which is then sent to the web browser.<br><br>> I thought an IDE would help understand it more easily.
<br><br>I'm not aware of IDEs for PHP that do much beyond syntax highlighting.<br>Though I rely on vi for all my editing and so I'm pretty clueless when it<br>comes to these GUI critters :)<br><br>> If I use gedit how to I run the script and debug it?
<br><br>Two ways:<br><br>1. a) You have a page with embedded PHP code: index.php<br> b) You have the "php" command, on debian-sarge, for example, this<br> comes from the "php4-cli" package.<br> c) You execute: php
index.php<br> d) This spits out the HTML as it would be sent to the web client.<br><br>That's pretty ugly though (you get a bunch of HTML dumped to the screen).<br>Almost all PHP developers I've seen work with "live" systems:
<br><br>2. a) You have a web server installed with PHP support.<br> b) You put your "index.php" within your web server's document tree.<br> (And edit it in-place.)<br> c) You visit the "index.php
" via the web server with a web browser.<br> (And hit shift-refresh to check things while you edit.)<br><br>This has the advantage of showing you the actual page as rendered, and you<br>can examine the HTML using Firefox's syntax highlighted "view source". Plus
<br>PHP natively generates error messages that render to web browsers. (Also,<br>"tail -f <server-error-log>" is an invaluable tool when developing web<br>apps.)<br><br>You don't have to use your "live" website. Typically you'll run something
<br>like Apache on your local machine and view it from the same machine with<br><a href="http://localhost/blah/...php">http://localhost/blah/...php</a><br><br>> By the way, this is just a 'retirement project' to keep my brains
<br>> occupied and, maybe, create some web applications in the process. I<br>> will need MySQL database connections etc so I thought, after a bit of<br>> research, PHP is just the job. We'll see; I might be better off
<br>> reverting to MS-Access and VB :-(<br><br>Personally I'm not a fan of PHP, but it is easy to learn and start running<br>with. It could also be worth considering "frameworks" like Django<br>(<a href="http://www.djangoproject.com/">
http://www.djangoproject.com/</a>), which makes it easy to build web<br>applications quickly (and I like Python). Of course, this way lies<br>religious wars. There's Perl (with, say, Mason), Ruby (Rails!), etc...<br>
<br>HTH<br>-Yvan<br><br><br><br>_______________________________________________<br>Watford mailing list<br><a href="mailto:Watford@mailman.lug.org.uk">Watford@mailman.lug.org.uk</a><br><a href="https://mailman.lug.org.uk/mailman/listinfo/watford">
https://mailman.lug.org.uk/mailman/listinfo/watford</a><br></blockquote></div><br><br clear="all"><br>-- <br>MCSE is to computers as McDonalds Certified Chef is to fine cuisine.