I am pretty much a html sort of guy and have come back around to the internet after an absence of five or six years, to find things have moved on, and that you need to be able to use this sort of stuff to do Internet marketing properly- article sights, pre made web-sites etc.
I was unable to open these 'pre-made' sights directly in Interent explorer and was only able to get a vague idea of what they looked like by opening them in Dreamweaver- which recognizes php code. I tried to open these sites in a web browser but was told I needed a local server. "How do I do that"? I asked.
So, I had no way to see what the final product would look like until I put it on my 'proper' Internet server - not a very efficient way to do things if you want to change elements around.
After a bit of a hunt around on the Internet I discovered that I needed to set up a testing server on my own computer. It seemed the easy way to do this was to get Apache server , PHP, and my SQL database installed on my machine. As there were no e-books available on this. [Is that a Niche Market?] I took a trip to my local bookstore and came away with something I thought would do the job.
There I was, filled with excitement and new ideas that this would all be nice and easy. But of course, it wasn't. My first problem was that the book told me to get Apache 1.3. But I could only find only find an Apache two download.
A search for 'Apache 1.3 download 'gives the following 'official' site
http://httpd.apache.org/download.cgi -but you have to look closely to find the 'ARCHIVE' file! Which is where the 1.3 versions live. Apparently The PHP people don't think their software works as well on the Apache2 software- probably still being ironed out- but I wanted to do what the book says. Find 1.3 versions here:
http://archive.apache.org/dist/httpd/ -
you'll need to go into the 'Binaries' for the windows download. But from there on its fairly simple. You need to fill in a few info boxes during the set up:
for network domain enter: localdomain
for Server Name enter: localhost
for Administrator email- whatever you want
Also choose to 'run as a service for All users'
So I downloaded this and installed it successfully on my computer. I then got PHP five from the 'official' PHP site -
www.php.net/downloads.php
Click the windows ZIP option: , This is not an 'Auto install' you Unzip the files and then copy them to your C:/ drive;
Make a folder and call it 'php' and copy your php files into it.
There are a number of sites on the web that will tell you which files to 'fiddle' with to make the Apache-MySQL/PHP trio work, but to keep it all in one place I'll sumarise here from my experience:
Once you have PHP installed, you will need to navigate to the back to the Apache Folder httpd file -
C:Apacheconfhttpd.conf
Open it with notepad and find the 'AddModule' section. [Hint: use Control F [windows find] and type 'AddModule'] insert the following lines after the final AddModule command: EXACTLY
#start addition
LoadModule php5_module c:/php/php5apache.dll
AddModule mod_php5.c
AddType application/x-httpd-php .php .phtml
#end addition
the bits with the # will not be recognized. I know this is a bit bamboozling but it was for me too! So don't give up yet.
Next, You will navigate to the Folder contining all the PHP files [should be C:/php] and locate the file labeled
php.ini_recommended
Find the line that says
doc_root =
Change this to read- .
doc_root = "C:Apachehtdocs"
[if there is a # in front of the doc_root command- remove it or it wil only be seen as a comment]
You also need to locate the command
extension_dir = "./" and replace it with
extension_dir = "C:phpext""
The final part of the equation is the MySQL database installation, and here I encountered some problems. As I could only find a copy off my SQL5 instead of four as being suggested in the text.
MySQL 5 installation is pre-packaged, but when I came to the final part of the installation. I encountered a problem. The setup wizard said it could not fully install the database because I did not have TCP permissions on port 3306!!!!
Whaaaaaat....is a port 3306? This one again stumped me, and it was off to the mySQL frequently asked questions. Here, I finally found someone who made sense, and I paraphrase his response for any of you who are having the same problem.
here's what you need to do:
Uninstall MySQL completely, turn the computer off and then run the installer again tick all the boxes along the way.
Go to Windows Firewall. Start - Control Panels - Windows Firewall - Exceptions tab.
Click the "Add Port" button:
Name: mysql
Port: 3306
Click the "Add Program" button.
Browse to where you have installed MySQL ( C:/Programs Files/MySQL/MySQL 5.x.x/bin/mysql )
This seems this seems to satisfy Apache For those using another server you may need to follow the other procedure.
Download the the MySQL Administrator program from
dev.mysql.com or mysql.he.net
Unzip the program and launch "MySQLAdministrator.exe" directly out of the unzipped directory by double clicking on the MySQL Administrator.exe file. put in the following information:
Server host: localhost
Username: root
Password: whatever
Click "OK"
Click on the "Startup Variables" item on the left, then the "Security" tab. Check the checkbox for "Disable grant tables."
Click the "Service Control" item on the left and then the "Start/Stop Service" tab.
Click "Stop Service" -- once the services has stopped, click the button again to start the service.
Thanks to Mike from wimpyplayer.com for the bulk of that info.
So, the outcome I was desiring was partly achieved: I am now able to 'see' a full picture of a PHP webpage in the local browser on my computer- but only when I launch it from 'Dreamweaver' my web editing application, but, only one page at a time - it doesn't act like a proper website, but perhaps that's the next thing for me to learn.
Paul Warren has sinced written about articles on various topics from Web Development, Education and Web Development. Paul Warren is a Wealth Creation Educator and stock trader. You can download Wealth Creation Audio Books and Free Wealth Creation E-books at his site mymillionairebuddy.com . Paul Warren's top article generates over 27100 views. Bookmark Paul Warren to your Favourites.
24 Kiefer Sutherland Season 7 Some may think that he has already done the damage by driving drunk again, but fans should be aware that season 7 of 24 will not be affected by this incident anymore