Drupal Bootstrap Process

Drupal Bootstrap Process?
Drupal bootstraps itself on every request by going through a series of bootstrap phases. These phases are
defined in bootstrap.inc and proceed.

Configuration Sets global variables used throughout the bootstrap process.
Database Initializes the database system and registers autoload functions.
Variables Loads system variables and all enabled bootstrap modules.
Session Initializes session handling.
Page Header Invokes hook_boot(), initializes the locking system, and sends the default HTTP
headers.
Language Initializes all the defined language types.
Full The final phase: Drupal is fully loaded by now. This phase validates and fixes the input
data.
Processing a Request
The callback function does whatever work is required to process and accumulate data needed to fulfill
the request. For example, if a request for content such as http://example.com/q=node/3 is received, the
URL is mapped to the function node_page_view() in node.module. Further processing will retrieve the
data for that node from the database and put it into a data structure. Then, it’s time for theming.

Requiring Cookies

If the browser doesn’t accept cookies, a session cannot be established because the PHP directive
sessions_use_only_cookies has been set to 1 and the alternative (passing the PHPSESSID in the query
string of the URL) has been disabled by setting sessions.use_trans_sid to 0. This is a best practice, as
recommended by Zend see http://php.net/session.configuration:

URL-based session management has additional security risks compared to cookiebased
session management. Users may send a URL that contains an active session ID
to their friends by e-mail or users may save a URL that contains a session ID to their
bookmarks and access your site with the same session ID always, for example.


When PHPSESSID appears in the query string of a site, it’s typically a sign that the hosting provider
has locked down PHP and doesn’t allow the ini_set() function to set PHP directives at runtime.
Alternatives are to move the settings into the .htaccess file (if the host is running PHP as an Apache
module) or into a local php.ini file (if the host is running PHP as a CGI executable).

IT company in kolkata

Matrix Technologies Pvt. Ltd.8/1C, Chowringhee Lane, Room No. 2E, 2nd flKolkata7000162252 8/29
Media Software61A, S.N.Roy RdKolkata70003424479580
Metalogic Systems Pvt. LtdPlot-J1/1, Block-EP and GP, Sector-V, Salt LakeKolkata7000912452 61/94
MicroPro75C Park StKolkata70001622468009
Millennium Cyberworks13A, Govt. Place(east)Kolkata70006922481910
Millennium Infosystems86, Ballygunge PlaceKolkata70001924402194 24402
MindEdge Solutions#10, 7th fl, 8 Camac StKolkata700017222821061
Mindteck (India) Ltd.SDF Bldg, Module No.529-530, 4th fl, Sec V, Salt LakeKolkata7000912468 3/13
Mohata Softwares Pvt LtdChitrakoot Building, 6th floorRoom No -61, 230 A AJC Bose RoadKolkata70002022834351
Navneet Information Technology Pvt. Ltd.65 and 66, Chitrakoot, A.J.C. Bose RdKolkata7000202400680
Net Always152, S.N. Roy RdKolkata7000384588136
Netcom Solutions29A, Southend ParkKolkata7000294645872
NetguruIndiaE2,E3,E4, Block GP, Sec-V, Salt LakeKolkata7000913573575
Netwatch Online Pvt. Ltd.DL 141 and 143, Sector-II, Salt Lake CityKolkata70009123370275
NGS Solutions Pvt. Ltd.29B, Lake Temple RoadKolkata7000292463 91/92
NIIT Technologies Ltd.6B, Pretoria StreetKolkata7000712282 1708/1533
NIIT Technologies Ltd. (UNIT-II)EM-4/1, Sector-V, Salt LakeKolkata7000913212 5/9
Octagon Software Technologies Pvt. Ltd.1st Floor, South Wing, Plot-X1-16, Sector-V,Block-EP and GP, Salt LakeKolkata700091235749 1/2
Ontrack Systems Ltd.276B, Lake GardensKolkata700045241784 34/35
Optimal Computing Pvt. Ltd.SDF Bldg, 3rd Floor, Module-412, Sector - V, Salt LakeKolkata7000912357 4/7
Paritosh Software and Information Tech. P. Ltd.SDF Bldg, Module 128, Block-GP, Sector-V, Salt LakeKolkata70009123575777
PCL ( Pertech Computers Ltd.)FD 254, Sec-III, Salt LakeKolkata7000913214215
Pecon Software Ltd.835, P Block, New AlipurKolkata70005322100195
Peerless Technologies Ltd.SDF Bldg, Salt Lake Electronic ComplexKolkata7000912473773
Pinnacle Infotech SolutionsS.S.B. Sarani, Bidhannagar, DurgapurKolkata
343 2533250/51
Praxis Softek Solutions Pvt. Ltd.SDF Building, 5th fl, Module 616, Block-GP, Sector-V, Salt LakeKolkata70009123577473
Price Waterhouse Associates (P) LtdY14, Block EP, Sector V, Salt LakeKolkata7000913573384-90
Price Waterhouse Associates (P) LtdSukhSagar, 2/5 Sarat Bose RdKolkata7000204748523
Quint Software SolutionsEC-5, SEC-I, Salt LakeKolkata70006423581574
R J Softwares1, Stephen House, 3rd flKolkata700001
R S Software India LimitedA-2, 234/3A, A J C Bose RoadKolkata70002022475746
RDG Systems27/A, Asutosh Chowdhury AvenueKolkata70001924760478
Rebaca Technologies Pvt. Ltd.J-5, 3rd Floor, Block-EP and GP, Sector-V, Salt LakeKolkata70001923577177
Relate Software Pvt. Ltd.387, New Alipur, Block-GKolkata700053245827 27-30
Research Engineers Pvt. Ltd.E2-4, Block-GP, Sector-VSalt Lake CityKolkata7000912357 3575/3662
Soffront Software Pvt. Ltd.STP-II, 1st Floor (East) Plot -53, Block-DN, Sector-V, Salt LakeKolkata70009123673480
Spear NetworksHB 290, Sec-III, Salt LakeKolkata700091
Standard Sowfware Pvt. Ltd.692B, block-O, New AliporeKolkata70005324008804
Stellar Corporation296-1, Bangur AveKolkata70005525745034
Stesalit Infotech Ltd.25/1, Rustamji StreetKolkata7000192246 7984-87
Stride Technology Pvt. Ltd.4th Floor, SDF Bldg, Module No. 533, Salt LakeKolkata70009130932195
Sumishi Webcom2A, 9E 5th Road, SantoshpurKolkata70007524166023
Sybernet Online138, B.R.B. Basu Road, 2nd FlKolkata70000122434979
Synapse Communications113 Southern AvenueKolkata700029
Sys-Con Engineering53-B, Mirza Ghalib Street 2nd FloorKolkata70001722297214 / 309
Sysmetric (P) Ltd.387, New Alipur, Block-GKolkata7000532407 1212/13/
Atlas Software Technologies (India) Pvt. Ltd.A1-4, Block-EP & GP, Sector-V, Salt LakeKolkata7000912357-4324/25
Avant Garde Software Pvt. Ltd.DA-14, Sector-I, Salt Lake CityKolkata7000642334 5689/5527
Avisere Technology (P) Ltd 1st fl, Kripa Bhawan, Plot-Y20, Block-EP, Sec V, Salt LakeKolkata70009130956688
Avow Labs2, Lalbazar Street, #402Kolkata70000122317612
Axiom Technologies Private Limited 34, Dr Sarat Banerjee Road, 1st FloorKolkata7000292463-9725 / 2474-7501
Azure Software Pvt. Ltd.IA-9, Sector-III, Salt Lake CityKolkata7000912335-8895/96
Bayrise Technologies Pvt. Ltd.3rd fl, DC-27/26, Sector I, Salt LakeKolkata70006423589760
BNK E. Solutions Pvt. Ltd.Infinity, 4th fl,Plot A3, Block GP, Sector V, Salt LakeKolkata7000912357 5194/95
Brainware Consultancy Pvt. Ltd.17B Lake PlaceKolkata70002924663531
BRI Technologies Pvt. Ltd.Module #233, SDF Bldg, 1st fl, Block GP, Sector V, Salt LakeKolkata70009123577219
Brick & Click Technologies Pvt. Ltd.SDF Bldg, 5th fl, #634 & 635, Block GP, Sector V, Salt LakeKolkata70009130944793 / 23572427
CA-TCG Software Pvt. Ltd.BIPPL, Building A, 2nd Floor, Block-EP andGP, Sector-V, Salt LakeKolkata7000912357 5660-65
Cadworld Infosystems Pvt. Ltd.770 Rajdanga Main Road, Rashbehari ConnectorKolkata7001072441-3820
Calkol Software Dev Pvt LtdInfinity Towers I, Block GP, Sector -V, Salt LakeKolkata7000912357 2466/67/6
CapgeminiAsyst Park, GN 37/1, Sector 5, Salt Lake Electronic CityKolkata7000916610 2400
Chabria Infotech209, A.J.C. Bose RoadKolkata7000172280 2304,3375
Cirrusweb Infotech Limited7A Hospital Street, 2nd FloorKolkata70007222376528
CMC Ltd.28, Camac StKolkata7000162373 6151
Cognizant Technology Solutions (CTS)Plot GN-34/3,Sector-V,Saltlake Electronic CompleKolkata70009123573211 / 23573213
Computer Exchange24 Park StKolkata7000162249 7405

XMLHttpRequest-Ajax

To do this, you must understand the three ways of creating an XMLHttpRequest object
• IE 5: request = new ActiveXObject("Microsoft.XMLHTTP")
• IE 6+: request = new ActiveXObject("Msxml2.XMLHTTP")
• All others: request = new XMLHttpRequest()
This is the case because Microsoft chose to implement a change with the release of
Internet Explorer.



The readyState property
Now we get to the nitty-gritty of an Ajax call, which all hangs on the readyState property.
The “asynchronous” aspect of Ajax allows the browser to keep accepting user
input and changing the screen, while our program sets the onreadystatechange property
to call a function of our choice each time readyState changes. In this case, a nameless
(or anonymous) inline function has been used, as opposed to a separate, named function.
This type of function is known as a callback function, as it is called back each time
readyState changes

request.onreadystatechange = function()
{
if (this.readyState == 4)
{
// do something
}
}

What Is a WAMP, MAMP, or LAMP?

WAMP, MAMP, and LAMP are abbreviations for Windows, Apache, MySQL, and
PHP,Mac, Apache, MySQL, and PHP, and Linux, Apache, MySQL, and PHP.
These abbreviations describe a fully functioning setup used for developing dynamic
Internet web

WAMPs, MAMPs, and LAMPs come in the form of a package that binds the bundled
programs together so that you don’t have to install and set them up separately..

If you will be maintaining several projects, at some point you may wish to create all the
directories you will need and the aliases Apache will recognize. An alias is a shortened,
easily recognizable string used to refer to a longer path name, and it doesn’t have to be
the same as a directory name.

Alternative WAMPs
When software is updated, it sometimes works differently than you’d expect, and bugs
can even be introduced. So if you encounter difficulties with EasyPHP that you cannot
resolve, you may prefer to choose one of the various other solutions available on the
Web instead.
You will still be able to make use of all the examples in this book, but you’ll have to
follow the instructions supplied with each WAMP, which may not be as easy to follow
as the EasyPHP guide.
Here’s a selection of the best in my opinion:
• XAMPP: http://apachefriends.org/en/xampp.html
• WAMPServer: http://wampserver.com/en/
• Glossword WAMP: http://glossword.biz/glosswordwamp/

Php tutorial-SYMBOLS

! (logical operator)
!= (comparison operator)
!= (inequality operator)
!== (comparison operator)
!== (non-identity operator)
$result->fetch_assoc() function
$type parameter
% (modulus operator)
% (wildcard character)
%= (combined assignment operator)
& (bitwise operator)
& (reference operator)
&& (logical operator)
+ (addition operator)
+ (plus symbol)
+ (union operator)
++ (increment operator)
+= (combined assignment operator)
, (comma operator)
- (subtraction operator)
— (decrement operator)
-= (combined assignment operator)
. (string concatenation operator)
.= (combined assignment operator)
/ (division operator)
/= (combined assignment operator)
< (comparison operator)
<< (bitwise operator)
<= (comparison operator)
= (assignment operator)
== (comparison operator)
== (equality operator)
== (equals comparison operator)
=== (comparison operator)
=== (identity operator)
?: (ternary operator)
@ (error suppression operator)

Brand Marketing-Publishing Information Using Online Brochures

Nearly every commercial website in the early 1990s was simply an online brochure or
sales tool.This type of site is still the most common form of commercial website. Either
as an initial foray onto the Web or as a low-cost advertising exercise, this type of site
makes sense for many businesses.

A brochureware site can be anything from a business card rendered as a web page to an
extensive collection of marketing information. In any case, the purpose of the site, and its
financial reason for existing, is to entice customers to make contact with your business.
This type of site does not generate any income directly but can add to the revenue your
business receives via traditional means.
Developing a site like this presents few technical challenges.The issues faced are similar
to those in other marketing exercises. A few of the more common pitfalls with this
type of site include
1 Failing to provide important information
2 Poor presentation
3 Failing to answer feedback generated by the site
4 Allowing the site to age
5 Failing to track the success of the site

Testing working using phpinfo()

Let’s install Apache, PHP, and MySQL under a Unix environment. First, you need to
decide which extra modules you will load under the trio. Because some of the examples
covered in this book use a secure server for web transactions, you should install an SSLenabled
server.
For purposes of this book, the PHP configuration is more or less the default setup but
also covers ways to enable the gd2 library under PHP.
The gd2 library is just one of the many libraries available for PHP.We included this
installation step so that you can get an idea of what is required to enable extra libraries
within PHP. Compiling most Unix programs follows a similar process.
You usually need to recompile PHP after installing a new library, so if you know
what you need in advance, you can install all required libraries on your machine and
then begin to compile the PHP module.
Here, we describe installation on an SuSE Linux server, but the description is generic
enough to apply to other Unix servers.
Start by gathering the required files for the installation.You need these items:
n Apache (http://httpd.apache.org/)—The web server
n OpenSSL (http://www.openssl.org/)—Open source toolkit that implements the
Secure Sockets Layer
n MySQL (http://www.mysql.com/)—The relational database
n PHP (http://www.php.net/)—The server-side scripting language
n ftp://ftp.uu.net/graphics/jpeg/—The JPEG library, needed for PDFlib and gd
n http://www.libpng.org/pub/png/libpng.html—The PNG library, needed for gd
n http://www.zlib.net/—The zlib library, needed for the PNG library, above
n http://www.libtiff.org/—The TIFF library, needed for PDFlib
n ftp://ftp.cac.washington.edu/imap/—The IMAP c client, needed for IMAP


Is PHP  Working?
Now you can test for PHP support. Create a file named test.php with the following
code in it.The file needs to be located in document root path, which should be set up,
by default, to /usr/local/apache/htdocs. Note that this path depends on the directory
prefix that you chose initially. However, you could change this in the httpd.conf file:
<?php phpinfo(); ?>

Query Strings

Query string data is very easy for the user to alter, because it ’ s visible and editable within the browser ’ s
address bar. Therefore, query strings should be used only in situations where sending incorrect data
won ’ t compromise security.

You also need to make sure you don ’ t rely on query strings to authenticate users, because people often
send URLs to friends in emails or instant messaging applications. If your URL contains all the data
needed to authenticate a user, and that user sends the URL to a friend, then the friend can pretend to be
them! You ’ ll find that sessions — discussed later in the chapter — are a much better way of authenticating
users.
If you ’ ve worked your way through Chapter 9 , you ’ re already somewhat familiar with the concept of
query strings. You ’ ll remember that you can embed sent form data in a URL by setting the form ’ s
method attribute to get . When the form data is sent to the server.

http://localhost/iscript.php?firstname=Tred & lastname=Fish& ...

the browser adds a query ( ? ) character to the end of the URL, then follows it with each
of the form fields as “name=value” pairs, with each pair separated by an ampersand ( & ).

Passing References to Your Own Functions php

By passing a reference to a variable as an argument to a function, rather than the variable itself, you pass
the argument by reference , rather than by value. This means that the function can now alter the original
value, rather than working on a copy.
To get a function to accept an argument as a reference rather than a value, put an ampersand ( & ) before
the parameter name within the function definition:
function myFunc( & $aReference ){
// (do stuff with $aReference)
}
Now, whenever a variable is passed to myFunc() , PHP actually passes a reference to that variable, so
that myFunc() can work directly with the original contents of the variable, rather than a copy.
Now that you know this, you can fix the earlier counter example by using a reference:
function resetCounter( & $c ) {
$c = 0;
}
$counter = 0;
$counter++;
$counter++;
$counter++;
echo “$counter < br/ > ”; // Displays “3”
resetCounter( $counter );
echo “$counter < br/ > ”; // Displays “0”
The only change in the script is in the first line:
function resetCounter( & $c ) {
Adding the ampersand before the $c causes the $c parameter to be a reference to the passed argument
( $counter in this example). Now, when the function sets $c to zero, it ’ s actually setting the value of
$counter to zero, as can be seen by the second echo statement.
Many built - in PHP functions accept references in this way. For example, PHP ’ s sort() function, which you
met in the previous chapter, changes the array you pass to it, sorting its elements in order. The array is passed
in by reference rather than by value, so that the function can change the array itself.