Starting PHP page 1. Setting up a development system.
Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
|
Welcome to the real PHP world :)
I want to learn php as quick as possible. What do I need to do? First things first.. You need to set up a development system. So you can start writing scripts and test them. In this first part you will learn how to set up an windows pc to become a php development studio :). Steps to be taken:1. Installing IIS for windows XP pro 2. Installing mysql 3. Installing PHP 5 for windows 4. Installing html-kit (I like this editor) 5. Links (using Apache instead of IIS, Dev system on MAC OS) 1 Why in the name of God do you use IIS? Ok why IIS on windows XP pro and why not Apache? IIS is not free and not so secure! All true but the main reason for this is because IIS is easy to set up on a windows machine. It is already there J. It has enough licenses to use it with a single client (the developer) and because it is a development system you will use IIS only from the local host. You won’t need security then right? So how to set it up? Easy. Just go to start->configuration panel (cp) -> add/remove software. Press the third icon on the left (add windows programs) and then check Internet information services. Follow the wizard (place you winXP cdrom in the cdrom drive) and your ready. really that easy? yeah. You will find a folder inetpub under you system drive (mostly c:) in this inetpub folder you will find wwwroot. And in this folder you can make new folder for each website you create. You can view your site by opening up a browser (firefox for example) and fill in the address bar http://localhost/<map name> (Don’t forget to create an index.html page in this folder.) 2 Installing mysql Go to http://dev.mysql.com/downloads/mysql/5.0.html scroll down until the windows versions. You’ll see 3 versions available. The windows essentials version, the windows version and a version without an installer. Choose the windows version. After downloading it install the mysql server. Use all the default values for less problems J. 3 Installing PHP First of all download the windows version of PHP 5 from www.php.net/downloads. Download the .exe and the .zip package. Execute the exe version. If it asks you where to install choose c:\php. This is the best place to install php. When it is done IIS is completely configured to use PHP. The only thing you need to check now is if you wanne use index.php as a default page. If so you need to add this to the documents. Go to control panel in windows, choose administrative tools and choose Internet information server IIS. Expand the tree and right click on the computer icon (your computer name). Choose properties and go to the tab documents. Press Add and type in index.php. Press OK and your ready. Now lets install some extensions. First of all unzip the zip version of PHP. Copy all the files to the c:\php folder. Or the folder you installed php to. Just overwrite all files. You will have a lot more dll’s and folders now. These are external extensions like mysql link, gd library, imap etc… You can configure php now to use these extensions. Lets install GD library as an example. Go to c:\windows and find php.ini. Open this one in notepad. Find the following line: extension_dir = "./". the “./� to “c:\php\ext\�. This is the path to your extension folder where php_gd2.dll is located for example. Now to active this php_gd2.dll find “Windows Extensions� in the php.ini file. You’ll get a list of extensions with a ; before it. This means it is not installed. Remove the ; from each extension you wanne install. In this case change ;extension=php_gd2.dll to extension=php_gd2.dll Mysql: To get mysql work with php we need to do a few more steps. There is a special dll file that needs to be available for the system root. You can choose copying this file to the root or adding the path to the file in the windows path vars. The last solution is the best way to do this. The file we are talking about is libmysql.dll and is located under c:\php. So go to configuration panel, system, advanced tab and press the button Environment variables. In the lower list highlight the path and press edit. DO NOT DELETE ANY CONTENT IN THIS LINE !!!. Just add ;c:\php\ to it. press OK and your done. 4 HTML-kit Last but not least. We need an html editor. I like html-kit. Go to http://www.chami.com/html-kit/ download the software and install it. 5 Other ways instead of my example: useful for windows, Mac OS, Linux and Solaris http://www.apachefriends.org/en/xampp.html Some links to set up php on MAC OS: http://developer.apple.com/internet/opensource/php.html http://www.entropy.ch/software/macosx/php/
|
Sponsored Links:
Unified Communications: Thoughts, Strategies and Predictions
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com




print: 

Recent comments
1 day 18 min ago
1 day 1 hour ago
1 day 5 hours ago
1 day 8 hours ago
1 day 11 hours ago
1 day 11 hours ago
1 day 12 hours ago
1 day 13 hours ago
1 day 14 hours ago
1 day 14 hours ago