Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Code Newbie > Submit Tutorials > PHP

Reply
 
LinkBack Thread Tools Display Modes
Old 08-17-2004, 03:28 PM   #1 (permalink)
DavH27
PHP Pilgrim
 
DavH27's Avatar
 
Join Date: Aug 2004
Location: London
Posts: 170
DavH27 is on a distinguished road
Setting up a local test server with BadBlue

ATTENTION: Follow this only if you want t use your computer as a server over the Internet was well without the hefty instal sizes of servers such as Apache.

So you want to learn PHP do you? great! Good choice =D

Already wrote your first script, named the file index.php but when you try and view it - nothing.

Oh dear ... looks like all those millions of boffs all over the Internet forgot to mention that sometimes your computer does not have php viewing enabled on it, so you just can't view your test pages!

Never fear! Davy's here!

1. Installing the local machine client thingy
PHP must usually be served remotely from a server with PHP installed on it already, but seeing as you are just learning PHP and want to test your PHP files without having the purchase hosting, you need to fool your computer into behaving like a remote server and to deliver those files to your browser.

Enter BadBlue
If you go to their website you can downlaod the program for free. Install it. You should know how to do this, if not, shut your computer down and go to your local college to learn how to use a computer first. For beginners. PHP is not for beginner PC users.

2. Installing PHP components
Secondly you need to give your computer the components that a server would normally use in order for our BadBlue software would use to deliver those php pages on a silver browser plater. Luckily for you newbie php developers out there that PHP is Open Source and free. Very cheap to those with problems in believing things are free. No, really.

The components can be found within the BadBlue program itself by following this path within the program:
Click the 'Help' tab.
Under the 'for developers' title, click 'Install PHP'.
Follow the built-in wizard.


Test that PHP works now for local viewing, follow the above path of clicking but for click 'Test PHP' instead of 'Install PHP'.

Setting up BadBlue
Okay so your mostly ready. How do you see your files - you double click your file directly but it doesn't work still - it opens up in notepad / dreamweaver / frontpage / randomProgram.exe

BadBlue allows people to view select files and folders over the Internet direct to your PC but you don't need to worry about this if you just want to test your PHP pages. You don't even need to set up a DNS domain name. Your local IP address is all you need.

Your local address wil always be: http://127.0.0.1/
Click that link.

Whoa see that?!! It loaded straight to the BadBlue startup webpage. But still...it is not helping you veiw your PHP pages. You need to designate the folders you want to view.

Follow this click path within http://127.0.0.1/ :
Click the 'Manage' tab.
Under the 'Sharing Files' title, click 'Setup Folders Tab'.
Fill in the on screen form fields including the virtual folder name and path. Don't change the other settings because you don't know what they mean yet. You do NOT want this folder to be hidden because that would be useless to you!!


Done it? Good. Now try going to http://127.0.0.1/

Still doing the same redirecting thing isn't it? It keep directing you back to the BadBlue startup webpage. This is because you haven't pointed your browser towards the actual folder you've selected to be viewed. Try entering it after the forward slash at the start of http://127.0.0.1/

You should be presented with another BadBlue interface but this time you should be facing the files that are in your designated virtual folder. This would probably be your index.php file you tried viewing before reading this tutorial.

Click the file.

Works now, see? =D

Any queries, comments, quesitons, suggestions or kicks-in-the-pervervial gonzolas, please feel free to contact me in the forums.
__________________
Davy - Programming since 1998 [CV]
Currently working on: n/a
Status: n/a

Last edited by DavH27; 08-23-2004 at 10:56 AM.
DavH27 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 04:52 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting