Beginning PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
WIllBoss
Forum Newbie
Posts: 4
Joined: Tue Sep 16, 2003 5:07 pm
Location: Ireland

Beginning PHP

Post by WIllBoss »

Hi everyone

I am just about to start beginning programming in PHP and I have a question to ask.

Do I need a web server on my own pc to test my scripts out, and if so could you reccommend a easy to configure one and free also.

Thanks in advance
Will
User avatar
mrvanjohnson
Forum Contributor
Posts: 137
Joined: Wed May 28, 2003 11:38 am
Location: San Diego, CA

Post by mrvanjohnson »

Having a web server local does make development quicker and easier. It allows you to customize the configuration to that of your "production" environment. But do you "have to" no, if you have an area to test you scripts that will work, even if it's on your live site.

As far as setting up your own you need to give more information. Personal preference, configure a Linux box and go to town. I gather by your vague question, you probably are a Windows user. For that, I have been using PHPDev lately and enjoy it. Easy install and gives you a lot ( and yes it is free) You can get it here http://www.firepages.com.au/devindex.htm

Enjoy
WIllBoss
Forum Newbie
Posts: 4
Joined: Tue Sep 16, 2003 5:07 pm
Location: Ireland

Thanks

Post by WIllBoss »

Thanks very much for your quick reply. I will download that app straight away.
:)
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

before you go an install it. think about this: what is your deployment environment?



you should make your dev environment miiic that if possible.
WIllBoss
Forum Newbie
Posts: 4
Joined: Tue Sep 16, 2003 5:07 pm
Location: Ireland

Getting confused even before I start

Post by WIllBoss »

Me again

I am in the process of downloading PHPdev. I am not sure what you mean development environment. I am using Windows XP and dont intend running my scripts on the net. I just want somewhere I can mess around with PHP programming without having to upload them to a server. My parents restrict my internet access (dont laugh!! ;) ) so uploading every time I change something is not an option.

"you should make your dev environment miiic that if possible."
What is miiic ???

Will
User avatar
mrvanjohnson
Forum Contributor
Posts: 137
Joined: Wed May 28, 2003 11:38 am
Location: San Diego, CA

Post by mrvanjohnson »

I'm pretty sure he was going for the word mimic there :-)

Judging by your restricitions then PHPDev should do great for you. There will still be a little of a learning curve. In your situation you are going to discover you need to learn a little about no only PHP but Apache and MySQL and how they work.

If I remember they had a pretty good How To either on their site or with the package. If you have problems there are a ton of others out there that can do the same job but PHPDev is a great package.

Some of the others:
PHPTriad - http://sourceforge.net/projects/phptriad/

Last edited by mrvanjohnson on Tue Sep 16, 2003 6:09 pm, edited 1 time in total.
WIllBoss
Forum Newbie
Posts: 4
Joined: Tue Sep 16, 2003 5:07 pm
Location: Ireland

Thanks

Post by WIllBoss »

Thanks mrvan,

I am sure I will be back again and again :)

Will
Unipus
Forum Contributor
Posts: 409
Joined: Tue Aug 26, 2003 2:06 pm
Location: Los Angeles, CA

Post by Unipus »

Check out FoxServ... it might make your life a bit easier when it comes to configuring a PHP server for Windows. It installs PHP, Apache, and MySQL all in one package.
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

yes i did mean mimic.

ie: your development and deployment environments should be as simiilar as possible. most hosts use posix since it is FAR omre stable than windows. if you can, get a second computer and network.

you don't NEED mysql or any other db, but you problaby want one since dbs are MUCH more scalable than files.

what you need is an operating system, a webserver, and php.

what i suggest is to nework your room and have a second computer that you use as a serverthis way you can view on your personal pc and have less of a chance of doing something detrimental to it while learning and developing things in php (and use this server to learn any other scripting language, and programming languages)

if you already know unix/linix then i suggest using that for the server
User avatar
Heavy
Forum Contributor
Posts: 478
Joined: Sun Sep 22, 2002 7:36 am
Location: Viksjöfors, Hälsingland, Sweden
Contact:

Post by Heavy »

I hope this doesn't get too off topic... :oops:
m3rajk wrote:if you already know unix/linix then i suggest using that for the server
I think any unix newbie should go for FreeBSD as a first shot, because FreeBSD is easier to adapt and has documentation available in a greater way than linux does.

Package installation is FreeBSD is also so easy I could kiss it.
This is how I installed PHP on my FreeBSD box:

#cd /usr/ports/www/mod_php4
#make install clean

First a menu popped up, letting me choose what extensions to PHP I wanted to compile into it.
Then when that was finished I just chose [OK] and the download-compile-build-install was performed without my interaction, downloading any dependency related packages, and it was ERROR FREE.

The only thing I had to do when the "make install clean" was finished was:

#apachectl restart

Then it was up running.
Now. Compare that with RPMs or debian packages.

It simply is EASIER. And that is important if someone is new to these systems.

Most important of all:
READ MANUALS. Don't skim through them. You'll miss something important if you skim.
Post Reply