A friend asked me what he should use to write PHP in. Never having done any of this stuff, I had no idea, except that maybe Geany or Kate would work.
What do you guys use?
Also, he is setting up Linux for the first time. I recommended Mandriva to him, as being more familiar than some of the alternatives. But if he wants to run his PHP, once he has written it, what does he need to install? I am guessing that Apache would work, but is there something simpler and lighter for him to get started on?
Peter
On Mon, Aug 16, 2010 at 06:18:46PM +0100, Peter Alcibiades wrote:
A friend asked me what he should use to write PHP in. Never having done any of this stuff, I had no idea, except that maybe Geany or Kate would work.
What do you guys use?
Also, he is setting up Linux for the first time. I recommended Mandriva to him, as being more familiar than some of the alternatives. But if he wants to run his PHP, once he has written it, what does he need to install? I am guessing that Apache would work, but is there something simpler and lighter for him to get started on?
Apache is so universal that, although it has everything *including* the kitchen sink, it's generally easy to install and works straight away so I'd recommend going for apache.
I run Ubuntu Server on my 'server' system here at home with the default LAMP set up provided as a package by Ubuntu and it 'just works'. I occasionally find something I run that needs another module or whatever but installing that with synaptic is all that's required generally.
Even getting virtual servers and stuff like that working is pretty easy, just a little bit of editing in /etc/apache2 and you're away.
Peter Alcibiades wrote:
A friend asked me what he should use to write PHP in. Never having done any of this stuff, I had no idea, except that maybe Geany or Kate would work.
What do you guys use?
Also, he is setting up Linux for the first time. I recommended Mandriva to him, as being more familiar than some of the alternatives. But if he wants to run his PHP, once he has written it, what does he need to install? I am guessing that Apache would work, but is there something simpler and lighter for him to get started on?
Install the LAMP stack, install cake PHP (http://cakephp.org/) and Eclipse (http://www.eclipse.org/) [but only is he's going to use a 'Doze box to develop on. Eclipse is goodness though...]
Job done!
Cheers, Laurie.
PS.
http://www.php-editors.com/review/ http://www.linuxdocs.org/HOWTOs/PHP-HOWTO-9.html
On 16/08/10 18:49, Laurie Brown wrote:
Install the LAMP stack, install cake PHP (http://cakephp.org/) and Eclipse (http://www.eclipse.org/) [but only is he's going to use a 'Doze box to develop on. Eclipse is goodness though...]
I looked at CakePHP previously, although didn't take it very far, and have just started looking again.
For all the time I've spent looking at frameworks I'm sad to say I've never really "got it". I understand the basic principles of MVC, but reading any of the framework websites reads more like a marketing speech (to me) than anything I can get my head round. For example, from cakephp.org:
CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. Using commonly known design patterns like MVC and ORM within the convention over configuration paradigm, CakePHP reduces development costs and helps developers write less code.
So, what should I use it for??
For example, suppose[1] that I am going to take over an existing static website that belongs to a local charity. I want to reskin it, and move the content into something that I can let other members of the charity work on it. In other words, I want a CMS, but I really do not want Joomla or Wordpress or .... - they have far too much functionality and are far too complicated for my target audience. I'm quite capable of writing my own CMS but I'm lazy - do I go for a framework?
Then, suppose I decide to add a shopping cart to the site. Do I stick with the framework?
I'm inclined towards PHP generally, and already use the Smary template engine so anything that understands that would be good. What is a good framework to get started with?
I think I tend to get scared off when I suddenly find my simple "hello world" test website has a dozen directories and files in each and I don't know what any of them really do.....
[1] This is true: I am about to do this. The existing website is http://www.peterboroughlions.org.uk
On 16 August 2010 18:18, Peter Alcibiades palcibiades-first@yahoo.co.uk wrote:
A friend asked me what he should use to write PHP in.
His favourite text editor.
On 16 Aug 18:18, Peter Alcibiades wrote:
A friend asked me what he should use to write PHP in. Never having done any of this stuff, I had no idea, except that maybe Geany or Kate would work.
What do you guys use?
Also, he is setting up Linux for the first time. I recommended Mandriva to him, as being more familiar than some of the alternatives. But if he wants to run his PHP, once he has written it, what does he need to install? I am guessing that Apache would work, but is there something simpler and lighter for him to get started on?
Depends on if it's for a quick and dirty setup or for production deployment. If it's for quick and dirty and is a locked down to own machine style setup, with no other users etc, then using apache2 and mod_php is probably the quickest and easiest method - however, this locks you in to using the prefork mpm which is (frankly) pants.
For production deployments, you'd be looking more at apache2 + mod_fcgid + php5-cgi, and setting the user for the fastcgi daemon as something that *isn't* the main web server user.
For very small local development it might be worth looking at using lighttpd with the fastcgi module, and using php in fastcgi mode.
As for which editor/IDE to use, that really is a matter of user preference, personally I use vim for everything, but apparently several people can't get thier head around a mode-based editor...
I'm not sure what kate's PHP syntax support is like these days, but it used to be flaky at best, so, with that in mind, I'd be thinking {x,}emacs, jedit or (as has been suggested) eclipse.
Cheers,
On 16 August 2010 18:18, Peter Alcibiades palcibiades-first@yahoo.co.uk wrote:
A friend asked me what he should use to write PHP in. Never having done any of this stuff, I had no idea, except that maybe Geany or Kate would work.
What do you guys use?
How about bluefish?
Jenny
On 17 August 2010 11:17, Jenny Hopkins hopkins.jenny@gmail.com wrote:
How about bluefish?
Yep, I'd second that. I found Bluefish rather good for lightweight PHP development. If you get into anything heavier you're probably better off with Eclipse or summat. Or vim ;)
It's been some years since I've used Bluefish but I'd imagine it's only improved in that time.
Beers, Steve