In the Introduction we have discussed that PHP is a general-purpose
scripting language that specially suits Server Side development. Therefore, it
needs a web server where PHP codes could run.
Basically there are two primary ways for adding PHP to a web
server – as a native web server module, and as a CGI executable. PHP has a
direct module interface which is supported by many web servers including Apache, Microsoft IIS. If PHP has no
module support for a web server, it can always be used as a Common Gateway Interface (CGI); in that case, the web server is configured to use
PHP's CGI executable to process all requests to PHP files
PHP configuration file namely ‘php.ini’ can be configured in numerous
way to affect the PHP functionalities in different environment. Details about
the php.ini, I will be uploading in my next tutorial.
So now we are clear that for a test bed for our PHP code we need to look
for web server where we can test our PHP code.
Options to Test PHP Code
1. Testing the
code on the online free web servers which supports PHP.
2.
Installing the
PHP code of your local system.
So, now we shall discuss the
second approach which is “Installing web server in local system”
Out of numerous methods and options available for different OS and
configurations, I will be discussing about installing a mini web server in my
local system through ‘wamp’ or ‘xampp’
Here I am going to deal with ‘Xampp’
XAMPP for Windows provides an easy to install
Apache-MySQL-PHP-PERL-PEAR framework. XAMPP saves time and effort and provides
the software support for web frameworks like Drupal, Joomla, Moodle, or
wikiMedia on any Windows PC.
1.
Just visit to site : http://www.apachefriends.org/
2.Choose your version of Operating system and download the compatible Xampp
Framework.
Simply follow the instructions during the installation and your
installation will be on its way.
Once installed, open Xampp control panel and click the service you want
to start something like below
Once you start the apache service, just open the page in your browsers
as shown in the screenshot below, if you have made no errors during installation
then you too can see the page.
Now as you can see we have now installed our mini web server in our system
we are ready to write our PHP code and with a test bed ready.
Hope you liked the article, in case of any queries you can write to me
Email @rs414059[at]gmail.com
See you Readers!!
With another interesting topic of PHP in our next article…..
0 comments:
Post a Comment