Home arrow PHP arrow Page 3 - Installing PHP Under BadBlue Web Server
PHP

Installing PHP Under BadBlue Web Server


In this article, Jayesh walks us through the process of installing the BadBlue web server and the PHP interpreter.

Author Info:
By: Jayesh Jain
Rating: 4 stars4 stars4 stars4 stars4 stars / 3
February 24, 2003
TABLE OF CONTENTS:
  1. · Installing PHP Under BadBlue Web Server
  2. · What is BadBlue?
  3. · Installing PHP Interpreter
  4. · Conclusion

print this article
SEARCH DEVARTICLES

Installing PHP Under BadBlue Web Server - Installing PHP Interpreter
(Page 3 of 4 )

Download Windows binary for the latest version of PHP. Once you've downloaded it, unzip it into a C:\, rename the folder to "php".

Open the PHP.INI-DIST file from C:\PHP folder, locate the following line:

;cgi.force_redirect = 1

We need to uncomment this line and change the setting to 0 as shown below to run PHP under BadBlue, do the necessary changes and save the file as php.ini in your windows folder (C:\windows on my computer).

cgi.force_redirect = 0

Configuring BadBlue for PHP

Open your favorite browser, in the address area type http://localhost/ to open the BadBlue welcome page, click on hyperlink Help from the options available below the BadBlue logo in the browser. You can also type in the address http://localhost/help.htm to open that page. Hereís a snapshot of this screen.

Screenshot


In the help screen look in the developer support section and click on the hyperlink PHP installation wizard which shall open the PHP Wizard - Step 1 of 3 window, click next to go to step 2 enter the location of php.exe in this screen eg: c:\php\php.exe.

Screenshot


Click next to reach step 3 and click finish to complete the configuration.

Manual Configuration Instructions

If you would like to configure BadBlue for PHP manually, open the ext.ini file (usually in the directory c:\program files\badblue\pe) and adding the following lines:

[SERVICES]
extension1=php,c:\php\php.exe
extension2=php3,c:\php\php.exe
extension3=php4,c:\php\php.exe


Note: Make sure that the path to PHP.EXE is correct and donít forget to save the file.

Restart the BadBlue server to reflect the changes.

Testing PHP Under BadBlue

Open the browser, in the address area type the http://localhost/ to open the BadBlue welcome page, click on hyperlink Help from the options available below the BadBlue logo in the browser.

In the help screen go to the developer support section and click on the hyperlink Test PHP support, which shall open the Test PHP Support window. If PHP is correctly installed and configured, you should see today's date and time displayed in that browser window. You can also type in the address type http://localhost/testphp.php to open that test page.

Screenshot


Alternately you could open your favorite text editor and create a text file and type the following in it

<?php
  phpinfo();
?>


phpinfo() is a PHP function which outputs a large amount of information about the current state of PHP. This includes information about PHP compilation options and extensions, the PHP version, server information and environment, the PHP environment, OS version information, paths, master and local values of configuration options, HTTP headers, and the PHP License.

Save this file as test.php in C:\Program Files\BadBlue\PE\ (your default BadBlue Web root folder).

Open your browser and type http://localhost/test.php in the address bar, click Go to see if you see output like the screen below to make sure PHP in configured and running properly.

Screenshot


If the source code appears in the browser and not the output we are expecting, then PHP has not been properly installed or BadBlue does not recognizes PHP files, please make sure you have followed the instructions properly.

Configuring Web Server

To change the document root folder (default is the folder where BadBlue is installed), open the ext.ini file in the BadBlue directory and add the following lines:

[SERVICES]
DOCROOT=C:\myfolder\wwwroot


To change the default page (default is index.htm) use the following setting in ext.ini:

[SERVICES]
HOMEPAGE=index.php


Every time you start the server, the web server opens the browser window to turn this feature off use the following setting in ext.ini:

[CUSTOMIZE]
autobrowser=0


Every time you start the server, the web server opens the server window to minimize this window use the following setting in ext.ini:

[CUSTOMIZE]
autominimize=1


Note: Always make sure you restart the server to reflect the changes made to ext.ini file.
blog comments powered by Disqus
PHP ARTICLES

- Removing Singletons in PHP
- Singletons in PHP
- Implement Facebook Javascript SDK with PHP
- Making Usage Statistics in PHP
- Installing PHP under Windows: Further Config...
- File Version Management in PHP
- Statistical View of Data in a Clustered Bar ...
- Creating a Multi-File Upload Script in PHP
- Executing Microsoft SQL Server Stored Proced...
- Code 10x More Efficiently Using Data Access ...
- A Few Tips for Speeding Up PHP Code
- The Modular Web Page
- Quick E-Commerce with PHP and PayPal
- Regression Testing With JMeter
- Building an Iterator with PHP

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials