I'd like to begin learning more about Drupal and PHP. I don't know PHP or any other programming really, although I've done some work with VBA to create some macros and user forms in Word. So, I'm seeking some suggestions about a recommended setup to learn PHP, specifically, how it's used to run Drupal modules and themes.

I'm going to set up the development environment on a WinXP pro laptop. I've set up a WAMP before, but it was a few years ago and I used Kevin Yank's book "Build your own database driven website using PHP and mySQL." Unfortunately, I never got much past the "Hello world" stage. Now Drupal has me wishing I'd applied myself more, but that's water under the bridge. Anyway, I assume the first thing I need to do is set up a WAMP, but which version of Apache, MySQL and PHP should I install to work with Drupal 4.7?

Also, I'm leaning towards PHPEclipse as my choice for a code editor, but would welcome advice about whether that's a good choice or not, and if not, what other Free editors I should consider.

And of course, as I prepare to begin digging deeper into Drupal, any other advice, tips or suggestions would be most welcome.

Roger

Comments

styro’s picture

instead on individually installing Apache / PHP / MySQL etc. It's up to you and what you want to achieve. Install them separately if you want to learn more and get some more control. If you don't mind some bloat try XAMPP.

With your Apache configs I find using virtual hosts for each site a good idea.

Get some source control stuff too - I recommend using subversion with TortoiseSVN as a GUI for the first time user.

Editors are just personal preference, but Eclipse is a fairly large app. You may prefer something lighter weight on a laptop.

Later on you can stick Debian on an old PC to simulate a hosting environment better ;)

--
Anton
New to Drupal? Please read this
Also: Forum posting tips

pulsifer’s picture

I'd recommend Apache 3.x, MySQL 4.1.x and PHP 4.x. These are not the latest versions--the latest version are Apache 2.x, MySQL 5.x and PHP 5.x. However, If you move your site to a typical LAMP host, these are the versions they are likely to offer. Some may offer MySQL 4.0.x instead of MySQL 4.1.x.

For example, a survey of three current LAMP hosts where I have accounts:

Operating system Linux
Kernel version 2.6.9-22.0.2.ELsmp
Apache version 1.3.34 (Unix)
MySQL version 4.1.14-standard
PHP version 4.4.2
PERL version 5.8.7

Operating system Linux
Kernel version 2.6.11.12-grsec
Apache version 1.3.34 (Unix)
MySQL version 4.0.25-standard
PHP version 4.4.2
PERL version 5.8.4

Operating system Linux
Apache version 1.3.34 (Unix)
MySQL version 4.1.14-standard-log
PHP version 4.3.11
PERL version 5.8.7

Also important are what modules and configuration options they have set for each program. For example, some hosts have Apache mod_rewrite (needed for drupal clean url's), some don't. Some offer MySQL transactional (InnoDB) and in-memory tables, some don't. PHP has even more variety of modules and configuration options, too many to easily list. The standard distribution should be a good place to start though.

Good luck installing all this stuff. Its an all day project the first time you do it, and by day two or three, you'll probably delete everything and start over :-)

motosaurus’s picture

you say you dont know any language. well fine, in that case crawl before you walk-
the standard advice is to do just as little setup as you can to be able to write something interesting. That would be access to an Apache-PHP server.

setting up Apache-PHP-MySQL is a pain on Windows, and anyway you aren't ready yet.

so I advise two things: set up a minimal Apache and PHP
or
spend $7/mo and get a hosting service that provides them (ssh access helps a lot, but its rare)

if you have a spare ( f.i. PII PIII 256meg ) box, you could also set up ubuntu or debian or fedora on it with everything you need. But even thats hard the first time.

get some good books, most people like O'Reilly, and the online PHP site is terrific.

start learning basic stuff: arrays, variables, functions, html

HTH

John
http://jpfisher.net

mfredrickson’s picture

If you're not afraid of a UNIX command line (note the ssh comment in the previous message), I might suggest http://nearlyfreespeech.net

Pay-as-you go hosting, so you don't have to drop the measly $7 a month, with command line access. They aren't stingy on mysql (you get your own process with a root user, so you can do all the admin yourself) which is also nice.

I use them to host a few projects and again. No frills, but few bills (wow, I'm a poet).

For reference, I put $10 in my account in November; I have $7.20 left.

-M

liquidcms’s picture

well maybe it is.. but compared to linux.. too funny..

as far as setting up php, ap, mysql - i have it on my xp laptop, my xp devel station and my 2003 server... i was new to all this a couple yrs ago when i started... but don't recall having any problems with it

i do stumble upon the odd posting where people say add .so's to apache though in linux.. something about rebuilding.. you have got to be kidding.. in windows.. just remove the comment before the line...

actually on my server i even have both IIS and Apache running... Apache routes ASP domains to IIS (neat trick) so now i can run asp, php, or whatever...

but there are a few linux things that are always nice to have.. cron, grep, even awk on rare occasions... so occasionaly nice to have cygwin installed if you are running windows.

KSA213755’s picture

I decided to give xampp a go. Got it installed, and running. Extracted Drupal 4.7b5 to a folder in htdocs. Created MySQL database. Performed the edits to settings.php.

Then went to http://localhost/drupal47b5 and got the page inviting me to create the first user account. But when I click on "create the first account" I get a 404 error.

I'm guessing there's some additional setup that I overlooked, either in the httpd.conf file or php.ini, but I've googled drupal.org and so far haven't found the source of this problem.

Roger

KSA213755’s picture

I messed up the base url path statement in settings.php which was causing the problem.

Roger

liquidcms’s picture

- get Firefox 1.5 with JS console and debbuger

- get a PHP Editor and debugger like phpED (not free - but i would die without it), phpEDIT, etc

- of course, as listed above: php, mysql, apache (hopefully you would already have those)

- get CVS client like winCVS or maybe there is something better ???

- some sort of CSS validation tool is nice; i know of one for IE that works quite well - if you plan on doing template customization - but ya likely dont need to start there.

sadly, however, Drupal doesn't play nice with a lot of debuggers and validation tools - @imports and abs urls, htaccess doing rewrites, etc.

should be a pretty decent start.

good luck.

Vidarls’s picture

You should try out uniform server (http://www.uniformserver.com/)
It's kind of plug and play xamp enviroment. I run it as a development enviroment on my xp laptop.
Just remember that it runs PHP 5 as default. But you can easily change it to php 4 by installing their php4 plugin.

-Olegu
http://www.zbz5.net/

KSA213755’s picture

Thanks to all the above for their suggestions about how to get started with a development environment. I'm looking forward to getting setup so I can begin learning some PHP.

Roger