0% found this document useful (0 votes)
36 views55 pages

Get PHP and MySQL Web Development Third Edition Luke Welling Free All Chapters

Welling

Uploaded by

tullycosmezq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views55 pages

Get PHP and MySQL Web Development Third Edition Luke Welling Free All Chapters

Welling

Uploaded by

tullycosmezq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Download the full version of the ebook at

https://ebookgate.com

PHP And MySQL Web Development Third Edition


Luke Welling

https://ebookgate.com/product/php-and-mysql-web-
development-third-edition-luke-welling/

Explore and download more ebook at https://ebookgate.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

PHP and MySQL Web Development Luke Welling

https://ebookgate.com/product/php-and-mysql-web-development-luke-
welling/

ebookgate.com

PHP and MySQL Web development 4th ed Edition Luke Welling

https://ebookgate.com/product/php-and-mysql-web-development-4th-ed-
edition-luke-welling/

ebookgate.com

Professional LAMP Linux Apache MySQL and PHP Web


Development 1st Edition Jason Gerner

https://ebookgate.com/product/professional-lamp-linux-apache-mysql-
and-php-web-development-1st-edition-jason-gerner/

ebookgate.com

The PHP Programming with MySQL The Web Technology Series


The Web Technologies Series 2nd Edition Don Gosselin

https://ebookgate.com/product/the-php-programming-with-mysql-the-web-
technology-series-the-web-technologies-series-2nd-edition-don-
gosselin/
ebookgate.com
Learning PHP MySQL and JavaScript 1st ed Edition Robin
Nixon

https://ebookgate.com/product/learning-php-mysql-and-javascript-1st-
ed-edition-robin-nixon/

ebookgate.com

PHP Mysql For Advanced Learning 3rd Edition Hirdesh


Bhardwaj

https://ebookgate.com/product/php-mysql-for-advanced-learning-3rd-
edition-hirdesh-bhardwaj/

ebookgate.com

PHP MySQL Novice to Ninja 7th Edition Tom Butler

https://ebookgate.com/product/php-mysql-novice-to-ninja-7th-edition-
tom-butler/

ebookgate.com

MySQL PHP Database Applications 2nd ed Edition Brad Bulger

https://ebookgate.com/product/mysql-php-database-applications-2nd-ed-
edition-brad-bulger/

ebookgate.com

PHP MySQL For Dummies 3rd ed Edition Janet Valade

https://ebookgate.com/product/php-mysql-for-dummies-3rd-ed-edition-
janet-valade/

ebookgate.com
00 6728 fm 9/2/04 1:15 PM Page i

“I’ve never purchased a better “I picked up this book two days ago
programming book… This book proved to and I am half way finished. I just can’t put
be the most informative, easiest to follow, it down.The layout and flow is perfect.
and had the best examples of any other Everything is presented in such a way so
computer-related book I have ever that the information is very palatable. I am
purchased.The text is very easy to follow!” able to immediately grasp all the concepts.
—Nick Landman The examples have also been wonderful.
I just had to take some time out to express
“…the Sams book by Welling & to you how pleased I have been with
Thomson is the only one which I have this book.”
found to be indispensable.The writing is —Jason B. Lancaster
clear and straightforward but never wastes
my time.The book is extremely well laid “This book has proven a trusty
out.The chapters are the right length and companion, with an excellent crash course
chapter titles quickly take you where you in PHP and superb coverage of MySQL as
want to go.” used for Web applications. It also features
—Wright Sullivan, President, A&E several complete applications that are great
Engineering, Inc., Greer South Carolina examples of how to construct modular,
scalable applications with PHP.Whether
“I just wanted to tell you that I think the you are a PHP newbie or a veteran in
book PHP and MySQL Web Development search of a better desk-side reference, this
rocks! It’s logically structured, just the right one is sure to please!”
difficulty level for me (intermediate), —WebDynamic
interesting and easy to read, and, of course,
full of valuable information!” “The true PHP/MySQL bible, PHP
—CodE-E, Austria and MySQL Web Development by Luke
Welling and Laura Thomson, made me
“There are several good introductory realize that programming and databases are
books on PHP, but Welling & Thomson is an now available to the commoners. Again, I
excellent handbook for those who wish to know 1/10000th of what there is to know,
build up complex and reliable systems. It’s and already I’m enthralled.”
obvious that the authors have a strong back- —Tim Luoma,TnTLuoma.com
ground in the development of professional
applications and they teach not only “Welling and Thomson’s book is a good
the language itself, but also how to use it reference for those who want to get to
with good software engineering practices.” grips with practical projects straight off the
—Javier Garcia, senior telecom engineer, bat. It includes webmail, shopping cart,
Telefonica R&D Labs, Madrid session control, and web-forum/weblog
applications as a matter of course, and
begins with a sturdy look at PHP first,
moving to MySQL once the basics
are covered.”
—twilight30 on Slashdot
00 6728 fm 9/2/04 1:15 PM Page ii

“This book is absolutely excellent, to “This is a well-written book for learn-


say the least…. Luke Welling and Laura ing how to build Internet applications with
Thomson give the best in-depth explana- two of the most popular open-source Web
tions I’ve come across on such things as development technologies….The projects
regular expressions, classes and objects, are the real jewel of the book. Not only are
sessions etc. I really feel this book filled in a the projects described and constructed in a
lot of gaps for me with things I didn’t quite logical, component-based manner, but the
understand….This book jumps right into selection of projects represents an excellent
the functions and features most commonly cross-section of common components that
used with PHP, and from there it continues are built into many web sites.”
in describing real-world projects, MySQL —Craig Cecil
integration, and security issues from a proj-
ect manager’s point of view. I found every “The book takes an easy, step-by-step
bit of this book to be well organized and approach to introduce even the clueless
easy to understand.” programmer to the language of PHP. On
—notepad on codewalkers.com top of that, I often find myself referring
back to it in my Web design efforts. I’m still
“A top-notch reference for learning new things about PHP, but this
programmers using PHP and MySQL. book gave me a solid foundation from
Highly recommended.” which to start and continues to help me to
—The Internet Writing Journal this day.”
—Stephen Ward
“This book rocks! I am an experienced
programmer, so I didn’t need a lot of help “This book is one of few that really
with PHP syntax; after all, it’s very close to touched me and made me ‘love’ it. I can’t
C/C++. I don’t know a thing about put it in my bookshelf; I must put it in a
databases, though, so when I wanted to touchable place on my working bench as I
develop a book review engine (among always like to refer from it. Its structure is
other projects) I wanted a solid reference good, wordings are simple and straight for-
to using MySQL with PHP. I have ward, and examples are clear and step by
O’Reilly’s mSQL and MySQL book, and step. Before I read it, I knew nothing of
it’s probably a better pure-SQL reference, PHP and MySQL. After reading it, I have
but this book has earned a place on my the confidence and skill to develop any
reference shelf…Highly recommended.” complicated Web application.”
—Paul Robichaux —Power Wong

“One of the best programming guides “This book is God…. I highly recom-
I’ve ever read.” mend this book to anyone who wants to
—jackofsometrades from Lahti, Finland jump in the deep end with database driven
Web application programming. I wish more
computer books were organized this way.”
—Sean C Schertell
00 6728 fm 9/2/04 1:15 PM Page iii

PHP and MySQL


Web Development
Third Edition

Luke Welling
Laura Thomson

DEVELOPER’S
LIBRARY

Sams Publishing, 800 East 96th Street, Indianapolis, Indiana 46240


00 6728 fm 9/2/04 1:15 PM Page iv

PHP and MySQL Web Development Acquisitions Editor


Shelley Johnston
Third Edition
Copyright  2005 by Sams Publishing Development Editor
Scott Meyers
All rights reserved. No part of this book shall be reproduced, stored in a
retrieval system, or transmitted by any means, electronic, mechanical, photo- Managing Editor
copying, recording, or otherwise, without written permission from the pub- Charlotte Clapp
lisher. No patent liability is assumed with respect to the use of the informa-
tion contained herein. Although every precaution has been taken in the
Copy Editor
preparation of this book, the publisher and authors assume no responsibility
Chuck Hutchinson
for errors or omissions. Neither is any liability assumed for damages resulting Indexer
from the use of the information contained herein. Mandie Frank
International Standard Book Number: 0-672-32672-8
Proofreader
Library of Congress Catalog Card Number: 2003099244 Paula Lowell
Printed in the United States of America
Technical Editors
First Printing: October 2004 Sara Golemon
07 06 05 04 4 3 2 1 Chris Newman
Media Specialist
Trademarks Dan Scherf
All terms mentioned in this book that are known to be trademarks or service Design
marks have been appropriately capitalized. Sams Publishing cannot attest to Gary Adair
the accuracy of this information. Use of a term in this book should not be
regarded as affecting the validity of any trademark or service mark. Page Layout
Cheryl Lynch
Michelle Mitchell
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate as
possible, but no warranty or fitness is implied.The information provided is
on an “as is” basis.The authors and the publisher shall have neither liability
nor responsibility to any person or entity with respect to any loss or damages
arising from the information contained in this book or from the use of the
CD-ROM or programs accompanying it.

Bulk Sales
Sams Publishing offers excellent discounts on this book when ordered in
quantity for bulk purchases or special sales. For more information, please
contact
U.S. Corporate and Government Sales
1-800-382-3419
[email protected]
For sales outside the U.S., please contact
International Sales
1-317-428-3341
[email protected]
00 6728 fm 9/2/04 1:15 PM Page v


To our Mums and Dads

00 6728 fm 9/2/04 1:15 PM Page vi

Contents at a Glance
Introduction 1

I Using PHP
1 PHP Crash Course 11
2 Storing and Retrieving Data 57
3 Using Arrays 79
4 String Manipulation and Regular Expressions 105
5 Reusing Code and Writing Functions 129
6 Object-Oriented PHP 157
7 Exception Handling 191

II Using MySQL
8 Designing Your Web Database 205
9 Creating Your Web Database 217
10 Working with Your MySQL Database 241
11 Accessing Your MySQL Database from the Web
with PHP 265
12 Advanced MySQL Administration 285
13 Advanced MySQL Programming 307

III E-commerce and Security


14 Running an E-commerce Site 323
15 E-commerce Security Issues 337
16 Implementing Authentication with PHP and
MySQL 357
17 Implementing Secure Transactions with PHP and
MySQL 379
00 6728 fm 9/2/04 1:15 PM Page vii

IV Advanced PHP Techniques


18 Interacting with the File System and the Server
401
19 Using Network and Protocol Functions 419
20 Managing the Date and Time 439
21 Generating Images 451
22 Using Session Control in PHP 479
23 Other Useful Features 495

V Building Practical PHP and MySQL Projects


24 Using PHP and MySQL for Large Projects 507
25 Debugging 523
26 Building User Authentication and Personalization
541
27 Building a Shopping Cart 579
28 Building a Content Management System 625
29 Building a Web-Based Email Service 657
30 Building a Mailing List Manager 695
31 Building Web Forums 751
32 Generating Personalized Documents in Portable
Document Format (PDF) 783
33 Connecting to Web Services with XML and SOAP
819

VI Appendixes
A Installing PHP and MySQL 867
B Web Resources 889
Index 893
00 6728 fm 9/2/04 1:15 PM Page viii

Table of Contents
Introduction 1

I Using PHP

1 PHP Crash Course 11


Using PHP 12
Creating a Sample Application: Bob’s Auto Parts 12
Creating the Order Form 12
Processing the Form 14
Embedding PHP in HTML 15
Use of PHP Tags 16
PHP Tag Styles 16
PHP Statements 17
Whitespace 18
Comments 18
Adding Dynamic Content 19
Calling Functions 20
Using the date() Function 20
Accessing Form Variables 21
Form Variables 21
String Concatenation 24
Variables and Literals 25
Understanding Identifiers 26
Creating User-Declared Variables 26
Assigning Values to Variables 26
Examining Variable Types 27
PHP’s Data Types 27
Type Strength 27
Type Casting 28
Variable Variables 28
Declaring and Using Constants 29
Understanding Variable Scope 29
00 6728 fm 9/2/04 1:15 PM Page ix

Using Operators 30
Arithmetic Operators 31
String Operators 32
Assignment Operators 32
Comparison Operators 34
Logical Operators 36
Bitwise Operators 36
Other Operators 37
Using Operators:Working Out the Form Totals 39
Understanding Precedence and Associativity:
Evaluating Expressions 40
Using Variable Functions 42
Testing and Setting Variable Types 42
Testing Variable Status 43
Reinterpreting Variables 44
Implementing Control Structures 44
Making Decisions with Conditionals 44
if Statements 44
Code Blocks 45
else Statements 45
elseif Statements 46
switch Statements 47
Comparing the Different Conditionals 49
Repeating Actions Through Iteration 49
while Loops 51
for and foreach Loops 52
do..while Loops 53
Breaking Out of a Control Structure or Script 54
Employing Alternative Control Structure Syntax 54
Using declare 55
Next: Saving the Customer’s Order 55

2 Storing and Retrieving Data 57


Saving Data for Later 57
Storing and Retrieving Bob’s Orders 58
Processing Files 59
00 6728 fm 9/2/04 1:15 PM Page x

x Contents

Opening a File 59
Choosing File Modes 59
Using fopen() to Open a File 60
Opening Files Through FTP or HTTP 62
Addressing Problems Opening Files 63
Writing to a File 65
Parameters for fwrite() 66
File Formats 66
Closing a File 67
Reading from a File 69
Opening a File for Reading: fopen() 70
Knowing When to Stop: feof() 71
Reading a Line at a Time: fgets(), fgetss(),
and fgetcsv() 71
Reading the Whole File: readfile(),
fpassthru(), and file() 72
Reading a Character: fgetc() 73
Reading an Arbitrary Length: fread() 73
Using Other Useful File Functions 74
Checking Whether a File Is There:
file_exists() 74
Determining How Big a File Is: filesize()
74
Deleting a File: unlink() 74
Navigating Inside a File: rewind(), fseek(),
and ftell() 74
Locking Files 76
Doing It a Better Way: Database Management
Systems 77
Problems with Using Flat Files 77
How RDBMSs Solve These Problems 78
Further Reading 78
Next 78

3 Using Arrays 79
What Is an Array? 79
Numerically Indexed Arrays 80
Initializing Numerically Indexed Arrays 80
Accessing Array Contents 81
Using Loops to Access the Array 82
00 6728 fm 9/2/04 1:15 PM Page xi

Contents xi

Arrays with Different Indices 83


Initializing an Array 83
Accessing the Array Elements 83
Using Loops 83
Array Operators 85
Multidimensional Arrays 86
Sorting Arrays 90
Using sort() 90
Using asort() and ksort() to Sort Arrays
91
Sorting in Reverse 91
Sorting Multidimensional Arrays 91
User-Defined Sorts 91
Reverse User Sorts 93
Reordering Arrays 94
Using shuffle() 94
Using array_reverse() 96
Loading Arrays from Files 96
Performing Other Array Manipulations 100
Navigating Within an Array: each(),
current(), reset(), end(), next(), pos(),
and prev() 100
Applying Any Function to Each Element in an
Array: array_walk() 101
Counting Elements in an Array: count(),
sizeof(), and array_count_values() 102
Converting Arrays to Scalar Variables: extract()
103
Further Reading 104
Next 104

4 String Manipulation and Regular


Expressions 105
Creating a Sample Application: Smart Form Mail 105
Formatting Strings 107
Trimming Strings: chop(), ltrim(), and
trim() 108
Formatting Strings for Presentation 108
Formatting Strings for Storage: addslashes()
and stripslashes() 112
00 6728 fm 9/2/04 1:15 PM Page xii

xii Contents

Joining and Splitting Strings with String Functions


113
Using explode(), implode(), and join()
114
Using strtok() 114
Using substr() 115
Comparing Strings 116
Performing String Ordering: strcmp(),
strcasecmp(), and strnatcmp() 116
Testing String Length with strlen() 117
Matching and Replacing Substrings with String
Functions 117
Finding Strings in Strings: strstr(), strchr(),
strrchr(), and stristr() 118
Finding the Position of a Substring: strpos()
and strrpos() 118
Replacing Substrings: str_replace() and
substr_replace() 119
Introducing Regular Expressions 121
The Basics 121
Character Sets and Classes 121
Repetition 123
Subexpressions 123
Counted Subexpressions 123
Anchoring to the Beginning or End
of a String 123
Branching 124
Matching Literal Special Characters 124
Reviewing the Special Characters 124
Putting It All Together for the Smart Form 125
Finding Substrings with Regular Expressions 126
Replacing Substrings with Regular Expressions 127
Splitting Strings with Regular Expressions 127
Comparing String Functions and Regular Expression
Functions 127
Further Reading 128
Next 128
00 6728 fm 9/2/04 1:15 PM Page xiii

Contents xiii

5 Reusing Code and Writing Functions 129


Reusing Code 129
Cost 130
Reliability 130
Consistency 130
Using require() and include() 130
require() 131
Filename Extensions and require() 132
PHP Tags and require() 132
Using require() for Website Templates 133
Using include() 138
Using require_once() and include_once()
138
Using auto_prepend_file and
auto_append_file 138
Using Functions in PHP 139
Calling Functions 139
Calling an Undefined Function 141
Understanding Case and Function Names 142
Understanding Why You Should Define Your Own
Functions 142
Examining Basic Function Structure 142
Naming Your Function 143
Using Parameters 144
Understanding Scope 146
Passing by Reference Versus Passing by Value 149
Returning from Functions 150
Returning Values from Functions 151
Code Blocks 152
Implementing Recursion 153
Further Reading 155
Next 155

6 Object-Oriented PHP 157


Understanding Object-Oriented Concepts 158
Classes and Objects 158
Polymorphism 159
Inheritance 160
00 6728 fm 9/2/04 1:15 PM Page xiv

xiv Contents

Creating Classes, Attributes, and Operations


in PHP 160
Structure of a Class 160
Constructors 161
Destructors 161
Instantiating Classes 162
Using Class Attributes 162
Controlling Access with private and public 164
Calling Class Operations 165
Implementing Inheritance in PHP 166
Controlling Visibility Through Inheritance with
private and protected 167
Overriding 168
Preventing Inheritance and Overriding with
final 170
Understanding Multiple Inheritance 171
Implementing Interfaces 171
Designing Classes 172
Writing the Code for Your Class 173
Understanding Advanced and New Object-Oriented
Functionality in PHP 181
Note: PHP4 Versus PHP5 182
Using Per-Class Constants 182
Implementing Static Methods 182
Checking Class Type and Type Hinting 183
Cloning Objects 184
Using Abstract Classes 184
Overloading Methods with __call() 184
Using __autoload() 185
Implementing Iterators and Iteration 186
Converting Your Classes to Strings 188
Using the Reflection API 188
Next 190

7 Exception Handling 191


Exception Handling Concepts 191
The Exception Class 193
00 6728 fm 9/2/04 1:15 PM Page xv

Contents xv

User-Defined Exceptions 194


Exceptions in Bob’s Auto Parts 197
Exceptions and PHP’s Other Error Handling
Mechanisms 200
Further Reading 201
Next 201

II Using MySQL

8 Designing Your Web Database 205


Relational Database Concepts 206
Tables 206
Columns 207
Rows 207
Values 207
Keys 207
Schemas 208
Relationships 209
How to Design Your Web Database 209
Think About the Real-World Objects You Are
Modeling 209
Avoid Storing Redundant Data 210
Use Atomic Column Values 212
Choose Sensible Keys 213
Think About the Questions You Want to Ask the
Database 213
Avoid Designs with Many Empty
Attributes 213
Summary of Table Types 214
Web Database Architecture 214
Architecture 214
Further Reading 216
Next 216

9 Creating Your Web Database 217


Using the MySQL Monitor 218
Logging In to MySQL 219
00 6728 fm 9/2/04 1:15 PM Page xvi

xvi Contents

Creating Databases and Users 220


Creating the Database 220
Setting Up Users and Privileges 221
Introducing MySQL’s Privilege System 221
Principle of Least Privilege 221
User Setup:The GRANT Command 221
Types and Levels of Privileges 223
The REVOKE Command 225
Examples Using GRANT and REVOKE 225
Setting Up a User for the Web 226
Logging Out as root 227
Using the Right Database 227
Creating Database Tables 227
Understanding What the Other Keywords Mean
229
Understanding the Column Types 230
Looking at the Database with SHOW and
DESCRIBE 231
Creating Indexes 232
A Note on Table Types 233
Understanding MySQL Identifiers 233
Choosing Column Data Types 234
Numeric Types 235
Further Reading 239
Next 239

10 Working with Your MySQL Database 241


What Is SQL? 241
Inserting Data into the Database 242
Retrieving Data from the Database 244
Retrieving Data with Specific Criteria 246
Retrieving Data from Multiple Tables 247
Retrieving Data in a Particular Order 253
Grouping and Aggregating Data 254
Choosing Which Rows to Return 256
Using Subqueries 256
Updating Records in the Database 259
00 6728 fm 9/2/04 1:15 PM Page xvii

Contents xvii

Altering Tables After Creation 259


Deleting Records from the Database 262
Dropping Tables 262
Dropping a Whole Database 262
Further Reading 263
Next 263

11 Accessing Your MySQL Database from the


Web with PHP 265
How Web Database Architectures Work 266
Querying a Database from the Web 269
Checking and Filtering Input Data 270
Setting Up a Connection 271
Choosing a Database to Use 272
Querying the Database 272
Retrieving the Query Results 273
Disconnecting from the Database 274
Putting New Information in the Database 275
Using Prepared Statements 278
Using Other PHP-Database Interfaces 280
Using a Generic Database Interface: PEAR DB 280
Further Reading 283
Next 283

12 Advanced MySQL Administration 285


Understanding the Privilege System in Detail 285
The user Table 286
The db and host Tables 288
The tables_priv and columns_priv Tables
289
Access Control: How MySQL Uses the Grant
Tables 290
Updating Privileges:When Do Changes Take
Effect? 290
Making Your MySQL Database Secure 291
MySQL from the Operating System’s Point of
View 291
Passwords 291
00 6728 fm 9/2/04 1:15 PM Page xviii

xviii Contents

User Privileges 292


Web Issues 293
Getting More Information About Databases 293
Getting Information with SHOW 293
Getting Information About Columns with
DESCRIBE 296
Understanding How Queries Work with
EXPLAIN 296
Speeding Up Queries with Indexes 301
Optimizing Your Database 301
Design Optimization 301
Permissions 301
Table Optimization 301
Using Indexes 302
Using Default Values 302
Other Tips 302
Backing Up Your MySQL Database 302
Restoring Your MySQL Database 303
Implementing Replication 303
Setting Up the Master 304
Performing the Initial Data Transfer 304
Setting Up the Slave or Slaves 305
Further Reading 306
Next 306

13 Advanced MySQL Programming 307


The LOAD DATA INFILE Statement 307
Storage Engines 308
Transactions 309
Understanding Transaction Definitions 309
Using Transactions with InnoDB 310
Foreign Keys 311
Stored Procedures 312
Basic Example 312
Local Variables 315
Cursors and Control Structures 315
00 6728 fm 9/2/04 1:15 PM Page xix

Contents xix

Further Reading 319


Next 319

III E-commerce and Security

14 Running an E-commerce Site 323


Deciding What You Want to Achieve 323
Considering the Types of Commercial Websites 323
Publishing Information Using Online Brochures
324
Taking Orders for Goods or Services 327
Providing Services and Digital Goods 330
Adding Value to Goods or Services 331
Cutting Costs 331
Understanding Risks and Threats 332
Crackers 333
Failure to Attract Sufficient Business 333
Computer Hardware Failure 333
Power, Communication, Network, or Shipping
Failures 334
Extensive Competition 334
Software Errors 334
Evolving Governmental Policies and Taxes 335
System Capacity Limits 335
Deciding on a Strategy 335
Next 335

15 E-commerce Security Issues 337


How Important Is Your Information? 338
Security Threats 338
Exposure of Confidential Data 339
Loss or Destruction of Data 340
Modification of Data 341
Denial of Service 342
Errors in Software 343
Repudiation 344
Usability, Performance, Cost, and Security 345
00 6728 fm 9/2/04 1:15 PM Page xx

xx Contents

Security Policy Creation 345


Authentication Principles 346
Authentication 347
Encryption Basics 347
Private Key Encryption 349
Public Key Encryption 349
Digital Signatures 350
Digital Certificates 351
Secure Web Servers 352
Auditing and Logging 353
Firewalls 353
Data Backups 354
Backing Up General Files 354
Backing Up and Restoring Your MySQL
Database 354
Physical Security 355
Next 355

16 Implementing Authentication with PHP and


MySQL 357
Identifying Visitors 357
Implementing Access Control 358
Storing Passwords 361
Encrypting Passwords 364
Protecting Multiple Pages 365
Using Basic Authentication 366
Using Basic Authentication in PHP 367
Using Basic Authentication with Apache’s
.htaccess Files 369
Using Basic Authentication with IIS 373
Using mod_auth_mysql Authentication 375
Installing mod_auth_mysql 375
Did It Work? 376
Using mod_auth_mysql 376
Creating Your Own Custom Authentication 377
Further Reading 378
Next 378
Another random document with
no related content on Scribd:
As to what he’s done—why, he’s trying to embarrass me, sir! made
up his mind to tie my hands! Says he’s helpless in the power of his
family, who are keeping him prisoner, but he’ll escape and come to
me and be my suppliant—lay his turban at my feet! Escape? yes—
escape the punishment due to him, so he thinks—get me on his
side, come out top dog after all! But I won’t have it. He shan’t come
here and slobber over my boots! If I have to fight, I’ll fight with my
hands free. Tell him I won’t receive him here—won’t see his dirty old
face. He’s to go to his brother Shahbaz, if he goes anywhere, and
stay with him till I send him orders to the contrary.”
“As you please, General.” Richard was writing busily.
Sir Harry came to a threatening stop just behind him. “Well, sir,
what’s wrong? What d’ye mean, sir?”
“In this country it ain’t considered particularly healthy for an
aged relative to entrust his safety to his next heir, General.”
“Oh, that’s it, is it?” Sir Harry laughed loudly. “If he chooses to
resign the Turban to Shahbaz, so much the better. If Shahbaz thinks
fit to exercise a little persuasion, I’m sure I have no objection. I have
done with the canting old dog. Now let his brother deal with him, as
I have no doubt he knows how. Then I’ll make short work of the
rebellious young cubs.”
The letter written by Richard, if less peremptory in its terms
than Sir Harry would have wished, produced the desired effect. Gul
Ali made no further attempt to take refuge with the British, but
turned aside meekly to the camp of his brother, while the unfilial
Karimdâd, from whose violence he asserted that he had fled, took
possession of his fortresses, and announced loudly that he would
hold them against the man who called himself the Bahadar Jang or
any other Farangi in creation. Sir Harry chuckled, and completed his
consolidation at Bori, but it was not his measures that alarmed
Karimdâd. From Shahbaz Khan’s fortress of Bidi came the news
Richard had expected. Gul Ali had resigned the Turban—of his own
free will, it was carefully added—in favour of his brother. The result
was electrical. Karimdâd and his cousins lost no time in quitting the
strongholds they had seized, and fled to Sultankot, far in the desert
—a fortress which was declared and believed by all Khemistan to be
not only impregnable but unreachable for an enemy, owing to the
difficulties of the route and the lack of water. Sir Harry chuckled
again, and with a calmness that staggered his own troops as much
as his opponents, announced that he was going to take Sultankot. It
might be a hundred miles in the desert, but if the Arabit bands could
make the journey, so could trained troops. The fortress might be
impregnable to a native army, but not to Europeans provided with
artillery. Parts of the way might be impassable for heavy guns, but
he would rely on his field-pieces. The wells might be destroyed or
poisoned, vegetation might be lacking, but he would carry water and
forage with him. The route might be unknown, but he would get
guides from Shahbaz Khan, and in case the opportunity might be too
tempting, Shahbaz Khan himself should come too. No smoothing-out
of complications at one blow by allowing the British force to be
overwhelmed in the desert, leaving him undisputed master of
Khemistan! Shahbaz Khan professed unbounded delight in the
honour conferred upon him, but begged the General politely not to
impose upon himself the labour of such a march. He himself would
undertake to reduce Sultankot with his own troops, and bring the
rebellious princelings to heel. But Sir Harry refused to be spared, and
gave his reason openly, though happily not to his prospective ally. It
was just as well that Shahbaz Khan should be convinced of the
ability of British troops to reach and capture any objective whatever
—no matter how distant and difficult,—as a gentle hint that when he
was placed in power he also would find no place of refuge if he
chose to misbehave. The British force, fretting at the leash which
held it inactive after its hard training, was ready to go anywhere and
fight anything, and moved out joyfully from Bori into the desert, to
the number—after the manner of Anglo-Indian armies—of three
thousand fighting men and twenty thousand camp-followers.
Eveleen being what she was, it was natural—though Richard did
not think so—that the prospect of actual fighting should excite her
nearly as much as it did the soldiers. Returning one evening from a
visit to the camp at Bori under Brian’s escort, she burst into her
husband’s dressing-room, where he was trying hard to decide which
of his indispensable campaigning requisites were absolutely
indispensable, and which only relatively so.
“It’s a great sight!” she cried, without troubling to specify what
the sight was—“but terrible, too. I wonder does Sir Harry feel
himself a murderer when he thinks how few of those splendid horses
and men may come back?”
Richard’s lips twitched. Eveleen made it a grievance against him
that he had no sense of humour, but it sometimes seemed to him—
as to other married people with Irish partners—that the accusation
might as fitly apply to the accuser. “You are uncommonly cheering in
your view of our prospects, my dear,” he said.
“But what d’ye think yourself? Is there a chance of success?
Truly, now?”
“Under any other commander, not the faintest chance. Under Sir
Henry—well, he has such a turn for performing the impossible when
he’s said he will, that there may be a hope. But mind you, the
enterprise will either be the most horrible disaster in history, or the
maddest success.”
“And which would you say ’twill be?”
He spoke as though reluctantly. “Well, having had some
opportunity of observing the General, I pin my faith to his madness,
which has more method than the sound mind of most men. I believe
he will succeed—not without loss, of course; precious heavy loss,
perhaps.”
But Eveleen paid no heed to the qualification. Quite
unexpectedly, for he was standing looking meditatively at the floor,
with his arms full of clothes—his servant having discreetly faded
away,—Richard found her head on his shoulder, and heard her
coaxing voice in his ear—
“Ah, then, Ambrose, let me come too!”
“Let you come? Nonsense! certainly not.”
“Ah, now, do!”
“I tell you I won’t hear of it. Am I dreaming, or are you? or is
the General’s madness infectious?”
“Why would you be so unkind? Just think how nice, when you
come tired to your tent after a march, to find your wife waiting to
welcome you, and your slippers warming—no, I suppose it ought be
cooling—eh?”
“In my bath, I suppose—if there was one, or any slippers either.
My dear, don’t be silly. Do you know that we take no baggage with
us after the first day or two? You have no conception of the misery—
the squalor—of an ordinary desert campaign, and this will be far
worse.”
“What horrid words you use!” complained Eveleen softly,
stroking his shoulder-strap. “Didn’t you hear Sir Harry himself telling
how Lady Cinnamond was with Sir Arthur at Salamanca, and even
rode in the charge?”
“That was Sir Arthur’s business, not mine. If I had been the
Duke, I would have cashiered him for allowing it. But perhaps the
unfortunate wretch was sufficiently punished by the anxiety he must
have been in—to say nothing of looking such a fool. And in any case,
war in Europe ain’t like war here. That’s a gentlemanly affair to this.
You stay at home and mind your house.”
“But I’ll only waste your money and bring you to debt and
disgrace. You’ve said so, often. Will you tell me now, am I the sort of
wife to sit on the verandah darning your stockings and dropping salt
tears on them because you’re away, thinking back over the future
and looking forward to the past?—no, I mean it’s t’other way about.
But anyhow, the sort of wife I am is the one that rides knee to knee
with you in the ranks, and takes her turn in keeping watch at night
——”
“And can never keep awake if she tries! Won’t do, my dear. You
must remember you ain’t an Amazon, nor yet Joan of Arc, but the
wife of a British officer in the nineteenth century—a much more
prosaic person. The verandah is your lot, I fear, but we won’t insist
on the darning. I trust I ain’t unreasonable.”
“Unreasonable? The man that insisted on wearing stockings of
my darning would be stark staring mad!” cried Eveleen, with terrific
emphasis. “And will you tell me, Major Ambrose, if you wanted that
sort of wife, why you married me?”
“Oh, pray, my dear, don’t let us have that over again! I gave you
my reason once, and if it don’t satisfy you, I’m sorry, for I have no
other to offer. Now behave like a sensible woman, and make up your
mind to be happy and employ yourself usefully in my absence.
Come!” with a bright idea, “how would you like to buy another horse
and begin to break him in?”
“I’ll remember that!” gloomily, yet with a distinct lightening of
the gloom. “But I warn you, if this is the way you answer me, you
won’t find me asking you another time. I’ll just come.”
“Oh, very well. If I know anything of the General, you’ll find
yourself sent back under escort, after a lecture which will prove to
you once for all that he has a rough side to his tongue, though
ladies don’t often feel it.”
“If you knew anything of me, you’d know you were merely
inviting me to prove you wrong. You’ll see!” He might have been
excused for imagining she had some specific plan in view, but her
mind was roaming vaguely over various possibilities of making
herself disagreeable.
CHAPTER XII.
AN ERROR OF JUDGMENT.

Life at Sahar after the departure of the expedition was every whit as
dull as Eveleen had known it would be. For a whole week she held
out obstinately against that tempting suggestion of Richard’s that
she should buy another horse—for the sole reason that the
suggestion was his. But involuntarily her mind was noting and
registering the points of possible colts as she passed them, and
when the week was over, she felt—relief mingling with triumph in
having resisted for so long—that the curb of self-restraint might be
relaxed. Perhaps the fact that she had just received a letter from
Richard helped to lighten her spirits, though his letters might best be
described by the term arid, while Brian’s—save for one scrawl on the
back of an old official envelope—were represented by a postscript
added to her husband’s, “Your brother desires his fond love, and will
be certain to write to-morrow.” But Eveleen was aware of her own
deficiencies as a letter-writer, and with unusual fairness, expected no
better from other people.
She was just going to dress for her evening ride, intending to
requisition the escort of one of the subalterns left unwillingly at
Sahar for a visit to a tribal camp not far off, where she had taken
note of a likely-looking steed, when the sound of an arrival outside,
and a masculine voice enquiring for the Beebee, brought her hastily
to the verandah, anticipating a messenger from the front. But it was
Colonel Bayard who ran up the steps to greet her—debonair and
friendly as ever, and with an air of increased cheerfulness which was
almost elation.
“Yes, it is I myself!” he cried, shaking hands so vigorously as
almost to forget to bow. “It’s good to be here again, Mrs Ambrose—I
don’t even regret my lost furlough, though my passage home was
taken for this week. But the delays in getting back from Bombay! I
have been fretting like a war-horse—but not for his reason. I don’t
want to plunge into a battle—far from it. My one desire is to prevent
fighting. It was a horrid blow to hear at the landing-stage that Sir
Henry had actually marched against the Khans, but I trust—I hope—
I may yet be in time to put an end to this lamentable adventure. And
how are you? but I need not enquire—your looks speak for you.
Richard in good health, I trust? but unhappy, I am sure, about this
madness of the General’s. Well, we shall put that right, I hope. I
must start to-night to catch up the force. Can’t be too thankful I am
not a day or two later.”
“Come in, come in!” said Eveleen, when she was allowed to
utter a word, and she led the way, not sorry to turn her face from
him for a moment. A dreadful suspicion was growing upon her that
Colonel Bayard was under a wholly false impression as to the footing
on which he stood and the object for which he had been recalled,
but she could not dash his hopes by saying so. An Englishwoman
might have told him bluntly Sir Harry’s views regarding him, but no
Irishwoman could possibly bring herself to do more than hint at
things in a roundabout way, leaving him to arrive at the truth for
himself, if he could. “After all,” she said, rather nervously, “it might
not have made much difference, d’ye think?”
“Every difference, so long as there has been no bloodshed,
ma’am. If we can only avoid that, I don’t despair of accommodating
the whole matter.”
“Ah, but if you knew the way the Khans have been playing fast
and loose! Nothing will hold them to their engagements. How can
you reach an accommodation?”
“They are puzzled and irritated by treatment they don’t
understand,” he responded eagerly. “But it’s true I don’t know the
precise position of affairs at this moment. That’s why I come to you,
since I hear you had a letter from Ambrose this afternoon.”
“Ambrose believes Sir Harry will reach Sultankot, though not
without loss.”
“But how? and what does he propose to do when he gets
there?”
“His plan is to take his whole force to the edge of the desert, so
they say, and then to mount five or six hundred men on camels and
make a dash across. Two guns he means to carry with him, and
they, he believes, will compel surrender. If not, he’ll storm the place.”
“Madness! midsummer madness!” cried Colonel Bayard
sorrowfully. “Why, he can have no conception even of the number of
camels needed for such a force.”
“There has been difficulty in getting camels, I know. The
contractors have been fined for not bringing enough.”
“Of course! What could Lennox expect? They know the
expedition is foredoomed to disaster, and they will keep their beasts
out of it if they can. And with insufficient transport——”
“I wouldn’t say ’twas insufficient. Brian says”—Eveleen smiled at
the remembrance of the note scrawled on the envelope—“that the
General is reconsidering his high opinion of his dear nice camels now
he sees them at work, and that he’d be sorely tempted to shorten
them all by a neck if it could be done without diminishing their
usefulness. There’s four miles and a half of them, so he says.”
“Four miles and a half? Fifteen feet each? Only fifteen hundred,”
he calculated rapidly. “And the General’s own things must require a
hundred at least—more probably two—and other officers in
proportion. What is there left——?”
“Now there you’re wrong.” Eveleen smiled openly. “Four camels
and no more—that’s the General’s share. A soldier’s tent—his fine
grand one is left here—and everything else to match. And other
people are cut down just the same.”
“This is more and more serious. I had hoped he might be held
back by the inadequacy of his transport, but he may succeed in
actually penetrating into the desert. And there—what with spies and
false guides to lead him astray or into ambushes, and secret
emissaries who will cut the water-skins at night and leave him
destitute, and that dastardly practice of poisoning the wells—why,
we have all the materials for the most shocking disaster that has
ever befallen British arms!”
“But sure he has Shahbaz Khan with him, and he swears he’ll
make him taste all the water first! It’s a pity it wouldn’t be that old
wretch Gul Ali, but Ambrose says he has gone and made himself
scarce again.”
“Made himself scarce? Do I understand Sir Henry was so ill-
advised as to subject the poor old fellow to personal restraint?”
“Not a bit of it! He was staying with his brother Shahbaz—quite
free, and as happy as possible. Sir Harry calls on Shahbaz, and
sends word he’ll pay his respects to Gul Ali to-morrow. But when to-
morrow comes the poor silly old creature is gone, leaving word that
he never really meant to resign the Turban—’twas all a mistake.”
“A mistake! Of course; who could have thought otherwise? He
hoped to placate Sir Henry by submission, and finding, as he must
think, that his malice still pursues him, he withdraws his abdication
and seeks safety in flight.”
“But ’twas all properly written out in his Koran, in the presence
of all the holy men they could get together at Bidi,” persisted
Eveleen. “Shahbaz Khan may have persuaded him to do it, but
having done it, would you say he oughtn’t stick to it? Sometimes I
wonder”—she stopped a moment—“will Shahbaz Khan be making
mischief?”
“It’s possible. I have always thought him a fine fellow, and the
injured rather than the injurer, but if he is hoping to secure the
Turban by favour of the General—— Tell me what you mean, Mrs
Ambrose.”
“Why,” said Eveleen, rather flattered, “I wondered mightn’t he
have got Gul Ali to resign the Turban by telling him his life was in
danger from the General? The old man is silly enough to believe it.
Then when the General says he will be coming to call, Shahbaz
humbugs the old creature with some tale that he’ll take him away
prisoner. Do you see, it’s his interest that the two of them wouldn’t
meet? So the old man gets away—his brother making things easy for
him—and the General thinks worse of Gul Ali than ever, but only
scolds Shahbaz for not keeping better guard over him.”
“You have it! That’s it, I’m convinced, Mrs Ambrose! Shahbaz is
a villain, who is abusing the General’s confidence shockingly. Poor
old Gul Ali has been shamefully treated. As for the General, he must
be blind not to see the whole thing is a hum—but knowing no
Persian, of course—— Well, I am tenfold thankful I came to you. A
lady’s insight will often penetrate where our obtuser minds are at
fault. But now to try and put this wrong right. A dash into the desert
after the General—he must be stopped at any cost in his head long
course——”
“I wonder wouldn’t you find that a little difficult?” suggested
Eveleen. “When Sir Harry has made up his mind—and after thinking
things over so long——”
“Ah, I see you are afraid I may speak too warmly! Nay, you
need have no fear. I have not a word of blame for him. The fault lies
with the delays which kept me from his side when he summoned
me, and forced him, as he no doubt believes, to this rash attempt.
But his is a noble mind. Few men, confronted with such a situation,
would have realised themselves incompetent to deal with it, and
called back to their councils the person they had superseded. Believe
me, he shall know the honour I feel for him. Sir Henry’s march
stopped, then—and Heaven grant it may be before there’s any loss
of life!—I must return hither at once, and make all speed to
Qadirabad. If I can arrive before the Khans, outraged by the
General’s high-handed proceedings, have given orders for a universal
muster and the extermination of the British, all will be well. I am
their friend, and they recognise me as such. Continually, as I came
up the river, messengers have intercepted me, bearing greetings
from their Highnesses, and entreaties to come ashore. But I refused
to land, even at the capital, merely sending a letter of apology to the
durbar, pleading the necessity of consulting with the General before
I could wait upon them. But now”—he was walking up and down,
speaking in short hurried sentences—“I will go to them, and I
humbly trust, take peace with me. They know me and trust me, and
I go to them in complete confidence.”
“It’s quite safe, would you say?” demanded Eveleen, a
stupendous idea seizing her.
“Absolutely. Why not? I assure you you need have no fear for
me, though I know your kind heart.” He smiled at her.
“But I have not. Tell me now, you would take Mrs Bayard with
you if she was here?”
“Undoubtedly.” Colonel Bayard’s voice was valiant.
“Then would you take me?”
“Well, I’m afraid Ambrose might have some slight objection to
that—eh?”
“Oh, if he was going—of course I meant that.”
“Then your presence could do nothing but good, as far as I can
see. But he ain’t likely to be with me, I fear, so I must deny myself
that pleasure as well. Many thanks for all you have told me. Now I
am prepared. Good-bye, good-bye! If I succeed in curbing the
General’s rashness, the credit will be largely yours.”
He was down the steps and off again before Eveleen had done
more than realise he was still labouring under the delusion that he
was the person who counted, and not the General. But her mind was
so full of her new idea that she consoled herself with the assurance
that ’twas not her fault; she had done what she could to put him
right; and if he would only take the truth from Sir Harry’s own lips—
why, he must. Apparently he snatched some sort of meal at the Club
or the Mess-house while his baggage was being cut down to the
General’s Spartan standard, for as she was returning from her ride—
which she took alone after all, because she had plans to think out—
she saw him going on board one of the flat-bottomed boats which
plied across the river. Two men—evidently a servant and an orderly—
were with him, and a camel and two horses were already on board.
She waved him farewell, and rode on towards the landing-stage
where the steamers moored, where she met the very man she
wanted—the captain of the Asteroid. He had seen his vessel warped
out again from the bank and all made snug on board, and was on
his way to sup with his crony, the captain of the Nebula, on shore.
“Then you’ll be waiting here for orders—for days maybe?” she
asked, when she had greeted him.
“That’s so, ma’am—with wood on board, and everything ready
to get up steam at an hour’s notice. Colonel Bayard said he might be
back any day, with orders to go to Qadirabad at once.”
“And did he tell you that if Major Ambrose or my brother was
with him, you were to let me know, because I’ll be coming too?”
“Why, no, ma’am. To Qadirabad—just now?” He looked at her in
astonishment, but Eveleen was not to be cowed by looks. She had
realised that it was almost certain the General would send a member
of his own staff with Colonel Bayard if he let him go to the Khans at
all, and why not Richard or Brian? She looked sweetly at the sailor.
“And why wouldn’t I? Sure it’s just the proof of peace my
presence will be—making it quite certain we have no warlike
intentions. My going can do nothing but good—so the Colonel said
to me himself just now.”
Captain Franks, like other men, was powerless against Eveleen
when she really brought her batteries to bear, but he struggled
gallantly. “You won’t like it much, I’m afraid, ma’am. There’s sure to
be troops on board, and horses—a large escort.”
“I won’t mind—if you’ll pitch me a tent on deck again?”
“As you please, ma’am. But you’ll find it rarely chilly these nights
—not like when you came up from Bab-us-Sahel.”
Eveleen shivered mentally, for she hated cold. Her own first
impulse had been to take a high hand, and remark casually that the
cabin—the only one—would suit her quite well, but it had been
succeeded by another. Richard was always saying, or hinting, that
she was unreasonable. She would show him how wrong he was by
refusing to deprive him and his friend of the comfort—such as it was
—of the cabin, and making martyrs of herself and Ketty on deck.
She smiled heroically at the captain.
“As if I’d mind that! I’ll keep everything packed ready, and be on
board as soon as I get your message.”
Ketty and the old butler could hardly be expected to look at
things from her point of view, and by the tone of the long
conversations she heard going on between them after her orders
were given, she gathered that they objected strenuously to the
proposed journey; but they knew better than to remonstrate with
her, and she ignored their discontent callously. One more letter she
received from Richard, written when the forlorn hope was about to
strike into the desert:—

“Bayard arrived this evening, and accompanies us,” he


wrote. “I fear he is disappointed by his interview with Sir
Henry. He tells me he called upon you. Surely you might have
taken the trouble to make him aware of his true position
here?”

“Taken the trouble, indeed! As if I hadn’t tried! And when he


wouldn’t listen to a word!” said Eveleen indignantly, and passed on
to another scrawl from Brian, written like the first on the back of a
huge envelope:—

“Don’t quarrel with my stationery,” he said. “The General


has an economy fit on, and has locked up all the writing-
paper, and I must send you a few lines. Why would I always
be writing to you about camels, I wonder? but believe me, I’d
give a year of my life for you to have seen the things that
have left me near dead with laughing at this moment. Three
hundred and fifty men of the Queen’s —th mounted on
camels, two to a camel, and camels and men all strangers to
one another. But they were not mounted long. I give you my
word, the whole country was speckled over with spots of
scarlet and dun, wrestling in every variety of contention, and
whether the language of the soldiers or of the camels was the
worst, I would not like to say. And there was poor old Colonel
Plummer looking at the scene with the liveliest disgust I ever
saw depicted on a human phiz—he was in the Dragoons once,
you may remember. But he plucked up heart and plunged into
the fray, reconciling his men to their mounts, and the camels
to one another, till he got ’em into some sort of order, and he
is now putting his fantastic force through a few simple
evolutions. He’s a great old sportsman—almost as great as my
old lad, who is near bent double with rheumatism when he
crawls out of his little tent to mount his horse, and unstiffens
bit by bit as he rides, till you’d swear he was the model for a
statue of the Duke. A fine set we are, I assure you—with our
camel-men and our two howitzers drawn by camels, and our
detachment of horse to frighten off the desert banditti from
our slow-moving column. We have provisions for a fortnight,
water for four days, our tents—common soldiers’ tents—and
nothing in the world else. Won’t we be a sight to make the
ladies stare when we come through this?”

That was the last news from the column for nearly three weeks,
though messengers still arrived from the main body, which was
encamped about Shahbaz Khan’s fortress of Bidi—thus holding his
family hostage, though this was not stated, in case of any attempt at
treachery on his part. But there was no call to dash into the desert
and rescue Sir Harry and his force, and even the tongue of rumour
was silent in face of his daring move. Then at last there came a
summons from Captain Franks to Eveleen. He had been warned by
an express messenger to start at once for a wooding-station about
thirty miles down the river, there to pick up Colonel Bayard and
Major Ambrose and take them on to Qadirabad. If Mrs Ambrose
wished to go too, would she kindly lose no time? Mrs Ambrose was
at the landing-stage little more than an hour after receiving the
message, and found everything in a bustle, horses being embarked
in flat-bottomed boats, which the Asteroid was to tow, and the
troops to whom they belonged crowded on board the vessel herself.
There did not seem to be an inch of room to spare anywhere.
“Are your horses to go, ma’am?” asked Captain Franks
distractedly, as he welcomed her to her tent, and in the same breath
bade the mate beware lest the lubbers on board that flat should
knock all the ship’s paint off.
Once more Eveleen showed herself triumphantly reasonable.
“No, I’ll borrow,” she said, and told the syces to go back. It was a
very disturbed night that lay before her, for even when the Asteroid
cast off at last, the human cargo squabbled grievously over its
scanty accommodation. But in the morning the trials of the past
hours were forgotten when she was invited up to the paddle-box to
look out over the plain covered with stunted trees which extended
southwards, and watch for the arrival of the envoys. The Asteroid
reached the meeting-place first, and it was not till some hours later
that a moving cloud of dust in the distance heralded the appearance
of mounted men at the far end of the clearing which was due to the
insatiable demands of the steamers for wood. There were three men
perched on camels, looking perilously high up and absurdly unsafe,
and a small body of horse.
“Sure it can’t be them!” cried Eveleen, as the camels knelt and
the three riders dismounted and limped towards the primitive wharf.
“These are blacks—not Europeans.”
“Never seen a European fresh from a desert trip before,
ma’am?” asked Captain Franks jovially. “Look at their hair and eyes,
and you’ll see.”
“It is, it is. And my brother too. Sure it’s a nice little family party
you’ll be carrying this voyage, captain!” and she waved her hand
gaily to the advancing three. They ought to have been pleased when
they recognised the white figure welcoming them from the paddle-
box, but it was quite obvious they were not. Richard Ambrose pulled
up suddenly, and said something to Colonel Bayard, who shook his
head, and Brian gave a subdued yell, and tried to hide behind the
other two.
“I don’t want female society!” he wailed. “I want baths, and
baths, and baths, and clean things, and to lie in the shade with a
cheroot and a bottle of beer and all the saltpetre in Khemistan to
cool it. Why would a man have to talk and behave pretty when he
don’t want to? Major Ambrose, sir”—imitating the General at his
gruffest—“pray why don’t you keep that wife of yours in better
order?”
“My misfortune!” responded Richard briefly, as he came up the
gangway. “No, my dear, pray don’t touch me”—warding Eveleen off
as she ran down to the deck. “I will come to you again presently. At
this moment I am not fit to speak to anybody. I did not expect to
see you—or any lady—on board here.”
“I am to blame, I fear,” said Colonel Bayard, evidently calling to
mind that last conversation. “But I own”—with a gentle reproof
which would have stricken most women to the heart—“I had not
looked to find my anxieties doubled by the honour of Mrs Ambrose’s
company on our expedition.”
“Ah, now, won’t you say the pleasure?” Eveleen called after him,
as the three were met and eagerly welcomed by the officers on
board, and disappeared with them.
“Seems almost as if they weren’t expecting to see you, ma’am,”
said Captain Franks, in a puzzled voice.
“That’s just it. They never thought I’d come. But that only
shows they don’t know me—eh?” said Eveleen cheerfully.
But she did not return to the paddle-box, choosing rather to sit
at her tent-door, on the little piece of deck that was sacred to her
use, in case Richard should be in the same mind when he returned.
Not that she would mind Captain Franks—or any one else hearing
anything he had to say; but if the poor man was determined to
make an exhibition of himself, ’twas kinder to let him do it in private.
It was also kinder, no doubt, to take the initiative in the conversation
when he appeared, that he might have another moment in which to
recover his temper.
“That’s better—a thousand times better!” she was looking at him
critically. “You were quite coffee-coloured—black coffee—just now.
Now y’are tea-coloured, and I suppose the tea will get weaker and
weaker till you have your natural complexion again? And it’s nice to
see you looking respectable and like yourself. Did you—ah, now, did
you really come back in those rags expecting I’d mend them?”
“Not quite such a fool!” snapped Richard. He was really very
angry, that was clear, and any sense of guilt Eveleen might have felt
evaporated promptly. “Is it quite beyond you to understand that I
am exceedingly displeased to find you here?”
“Didn’t I tell you I’d come the next time without asking your
leave? Sure y’ought have known.”
“Perhaps I ought. At any rate, pray believe that if it had been
possible to go back and put you on shore again it should have been
done.”
“But there’s no difficulty in believing that!” innocently.
He restrained himself with an effort. “Can’t you realise that were
you a child, these mad escapades would be viewed more leniently?
But for a female of what should be a discreet age——”
“Discreet?” she snatched the word out of his mouth. “When I
behave the way you’d consider suitable to a female of discreet age
I’ll be dead and gone! Maybe you’ll be satisfied with me then, Major
Ambrose!”
“Not I. I shall be dead long before that,” sardonically, and
Eveleen screamed with laughter. Perhaps it was as well that Brian
came round the tent into the reserved space at the moment.
“Sorry to interrupt your private conversation,” he said, “but
positively there’s nowhere else to go.”
“It’s not private,” cried Eveleen, still overcome with mirth
—“except on Major Ambrose’s part. He’s just made a joke, and he
never will do that when any one else is there, though he knows how
I delight in his jokes. But sit down, Brian boy, and tell me all about
everything, while Ambrose thinks of some more jokes for the next
time we are alone together. Did y’ever get to Sultankot, now?”
“We did,” responded Brian promptly. “But nobody else ever will.”
“Do you tell me that, now? And why?”
“Because we blew it up. I wonder wouldn’t you have heard the
noise at Sahar. Sure we were all bothered in our hearing for days
after.”
“But what a thing to go all that way to capture the place, and
then blow it up! Was the garrison inside?”
“All the garrison there was—which was none. No, ’twas a mighty
fine place for all the young Khans to escape to, and talk big about
what they’d do when they met the General. But when they got his
card, and his message that he proposed to do himself the honour of
paying ’em a visit—why, they were not at home.”
“But tell us now how it happened. Did you see them running
away?”
“Not the least taste of a sight of one of ’em. ’Twas the most
mysterious, queerest thing in the world—Ambrose will tell you so
too”—Richard grunted. “’Twas like coming suddenly on the stage of
a theatre without any actors. There we stood—Sir Harry and the
staff—on the edge of the sandhills. Down below us—like as if ’twas
in a cup, and near enough to touch with your finger—was the
fortress, beautifully built, all the towers and ramparts so clean-cut
you’d say it had only been finished the night before, and the
morning sun shining on it in a sort of romantic way made you think
of something in Scott. There! I meant to ask Keeling what it was—he
knows Scott off by heart—and I forgot. The road down the cliff was
full in sight, and there were the troops moving down into the valley,
the camels’ feet making no sound, the soldiers struck with awe, or
something of the sort. At any rate they were all dumb too, but ’twas
‘Eyes right!’ with every man as he came out of the shadow of the
cliff, as if they were approaching the saluting-point at a review. I
never saw anything like it. And still there was no sound from the
fort, no sign of a human being even, while the troops formed up and
advanced—no answer to our summons. So at last we found the
gates open, the cannon all freshly loaded and primed, huge
quantities of powder, grain enough to feed an army, wells of good
water—and not a soul anywhere! ’Twas like an enchanted place. You
longed for the sound of a bugle to break the spell, even if it meant a
rush of the enemy upon us out of hiding. But there was no enemy to
rush out; they had all made themselves scarce a few hours before,
when they saw we were really coming, and it seemed we had
nothing to do but leave our friend Shahbaz in possession, and come
back. But the General didn’t see it that way. He likes Shahbaz all
right, but he had a shrewd notion that his heart wouldn’t precisely
have been broke if we had all been swallowed up in the desert, and
that he’d be just as well without a strong place like that all to himself
—so difficult to get at, too. So Sultankot was sentenced to be
destroyed, and I will say this for Shahbaz, that he took it like a
sportsman! We had uncommon fun doing the business, for we
plugged shell into the place—just so that we mightn’t have dragged
the guns all that way for nothing—till it reached the powder, and
pop! Shahbaz was as busy as any of us, taking his turn to lay the
gun, and we all shouted and laughed like mad, while the General
stood by, grieving over the place like an old prophet in spectacles,
because it had taken so much trouble to build, and the builder must
have been so pleased with his job. It’s the wonderful old chap he is!
Y’ought have seen him on the way there, Evie—coming straight from
writing his endless letters with his hands all crippled to turning out
Her Majesty’s Europeans to drag the guns up the sandhills that were
too much for the camels. They run ’em up one steep place of a
thousand feet or so in five minutes, all joking and cheering, and old
Harry dashing the briny drops from his manly eyes, and swearing he
loved the British soldier more than any man on earth. Where the
ground was not so steep we used teams of sixty men and fourteen
camels to each gun, and got ’em up like winkin’. The men turned the
least bit rusty on the way back, and I don’t wonder at it, after all
they had gone through,—but he can do anything with ’em. Y’ought
have heard ’em cheer him when he went for a Madras Sapper who
was pretending to make a road for the guns—knocked him down,
took his spade from him and set to work himself, and talked to him
—my word! the fellow was green with fright though he couldn’t
understand a syllable!”
“But why would the men turn rusty?” enquired Eveleen
anxiously, for Her Majesty’s —th was an Irish regiment.
“And why wouldn’t they, with a fortnight of such marches and
such work, and sand to eat and drink and breathe—and very little
else? Why, the dry air cracks your boots so that you carry about with
you a private desert on each foot, and the sand gets between you
and your clothes till you feel your shirt is made of sandpaper! And
talking of your clothes, you may be thankful you and they are well
scoured with sand, for there’s no such thing as a clean shirt. You
turn the one you have on your back inside-out when it gets too
shockingly dirty, and when t’other side has got considerably worse
you turn it back again, and so on till you’re like a set of colliers.”
“Now do you wonder we are the colour of coffee?” demanded
Richard suddenly.
“I wouldn’t be surprised if you were as black as a coal! And no
wonder y’are thin, poor creatures, if sand is all you’ve had to eat!”
“Well, not all,” admitted Brian. “But we calculate that each man’s
teeth have been ground down a quarter of an inch by the sand he’s
chewed with his food—more or less according to his appetite. And
never, never will we get the last of the sand out of our hair till we’re
all bald! D’ye wonder then the General had no difficulty in getting
complaints when he went round hunting for ’em as usual? But he
turned the men round his little finger easily, and they went back to
duty as meek as lambs when he had fired ’em off one of his heroic
orations, full of Assaye and Corunna.”
“Well, but now, what will have been the good of it all?” cried
Eveleen. “You have destroyed a place that was not doing anybody
any harm, and the people that were doing the harm have all
escaped.”
“Don’t say that to Bayard, I beg of you!” said Richard quickly.
“To his mind the one good point of a bad business is that no lives
have been sacrificed.”
“Did I hear my name mentioned?” said Colonel Bayard’s voice,
and he came round the corner of the tent, throwing away the end of
his cheroot as he did so. “May I intrude, Mrs Ambrose? Richard, you
and I must have an explanation; there has been no opportunity
hitherto. You shall do us the honour to judge between us, ma’am.”
Brian rose hastily. “I think, Colonel, you will speak more freely
without me,” he said with some formality. “Any criticism of Sir Henry
Lennox offered in my hearing ’twould be at once my duty and my
pleasure to resent. So I’ll leave you,” and he departed.
CHAPTER XIII.
A LAST EFFORT.

Colonel Bayard looked after Brian with a sigh. “Your brother is highly
conscientious, ma’am, but I hope I know better than to use
improper language about his chief in his presence. Nor have I
anything worse to say of the General than that I believe from my
soul he had no evil intention in putting me in my present
disagreeable position.”
“Ah, believe me, his one thought was to atone to you for any
slight Lord Maryport might have seemed to offer,” said Eveleen
earnestly. He sighed again, impatiently.
“Then why this strange behaviour on his part? I was upheld by
the consciousness of rectitude, reconciled to the Governor-General’s
unjust treatment by the prospect it gave me of a speedy reunion
with my wife—actually on the point of departure for home. Then I
am summoned back in the most peremptory manner, compelled to
sacrifice my passage and relinquish my hopes. And for what? I
believed, all my friends believed, the Bombay papers proclaimed
their hearty concurrence—that Sir Henry had recognised his own
incapacity for the task allotted to him, and desired the Governor-
General to command my return. There was nothing peculiar in this
save the singularity of such a frank acknowledgment on his part—
which I conceived accorded strictly with the candour of his nature as
I had experienced it,—and it explained the haughty tone of Lord
Maryport’s letter. The assiduous attentions of the Khans on my way
up the river showed that they took the same view, and I made haste
to join Sir Henry and relieve him, as I imagined, from the burden of
a duty unsuited to his talents. What was the reality? I make no
complaint of finding myself second where I was formerly first,
though I own it grated upon me; but in our first interview it was
made clear to me that Sir Henry desired my services purely in a
minor capacity. I was to be nothing but a putli [puppet] in his hands.
Tell me, I beg of you, whether this was his attitude from the first, or
whether he changed towards me when he perceived the delight with
which my return was welcomed?”
He had so obviously decided in his own mind in favour of the
second alternative, that Eveleen and her husband both found it
difficult to answer him. Richard spoke hesitatingly at last. “I tried to
hint at what I believed to be the General’s true state of mind in one
of my letters, you may remember.”
“Did you? It’s possible. But if I noticed it, I set it down to your
habitual caution. But Mrs Ambrose—why did she not warn me three
weeks ago? I made no secret then of the feelings that inspired me.”
“Ah, forgive me!” cried Eveleen, conscience-stricken. “I tried—
indeed I tried—but you would not understand. And how would I tell
you such a thing as that straight out?”
“No, I suppose it would be impossible to an Irish person,” he
spoke as though to himself. “But what I can’t make out is”—with
renewed vehemence—“how Sir Henry can have asked for me,
knowing my views and my friendship with the Khans, and knowing
also that all his intentions were diametrically opposed to the policy I
have consistently pursued?”
“No, there you do him an injustice,” said Richard quickly. “He
had no such intentions—he was as favourably disposed towards their
Highnesses as yourself. You and he were agreed upon the necessity
of forcing them to observe their obligations—but doing so in the
most considerate manner. I give you my word, I believe there has
been too much consideration. Had you been with us instead of at
Bombay, and witnessed the ingenious provocations, the childish
artifices to which the Khans have resorted, as though determined to
tire out our patience, you must have decided, with the General, that
they had exceeded all limits of toleration.”
“‘Et tu, Brute!’” said Colonel Bayard mournfully. “‘Mine own
familiar friend——’”
“Pray don’t think I am alone in this. You have met a good many
of the Khemistan Europeans in these three weeks. Is there one of
them that takes your view of the case in opposition to the
General’s?”
“The General is the disposer of benefits nowadays,” irritably.
“Nay, forgive me—I am unjust. But these youths are all agog for war
—naturally enough; Sir Henry has trained ’em for it. Of course they
rejoice in the prospect of hostilities.”
“Not I. I have seen war in Ethiopia, and know what it means.
Am I likely to wish to bring it upon Khemistan if it can be avoided?
But I tell you plainly, I believe a temporising policy here, pursued
further at the present juncture, would lead to a retreat and a
disaster which, following upon our Ethiopian misfortunes, would lose
us India. The Khans—and especially Gul Ali—have played with us too
long already.”
“I could forgive Sir Henry everything,” cried Colonel Bayard
vigorously, roused by the name, “but his treatment of Gul Ali. To
affect to hold the poor old man to a renunciation extorted from him
by force by that villain Shahbaz Khan is an outrage of which I had
fancied him incapable.”
“But sure he did resign the Turban to Shahbaz!” said Eveleen in
perplexity.
“True—most solemnly,” agreed her husband. “But when he
quitted Shahbaz’s hospitable roof, he saw fit to change his mind, and
declare the renunciation a farce.”
“And no wonder!” cried Colonel Bayard warmly. “When it was
only brought about by the pressure imposed on him by that most
abandoned scoundrel——”
“We have often agreed that Shahbaz was the ablest of the
Khans,” said Richard imperturbably. “You said to me once you saw
no hope for the dynasty but in him.”
“True, but he had not then shown himself in his real—his most
iniquitous colours. To force his innocent and venerable brother to
cede him the Turban by threats——”
“His innocent and venerable brother having failed to rob him of
his heirship by intrigues——” crisply.
“Ambrose, you are hopeless!” cried Colonel Bayard warmly. “The
General has bewitched you. Mrs Ambrose, in your gentle breast I
know I shall touch a chord of sympathy with the aged Prince’s
misfortunes. Listen, I beg of you. I was riding with the advanced
guard from Bidi—where I caught up the force—when we met a
solitary cossid mounted on a camel. He recognised me, and
dismounting, threw himself at my feet, and bewailed the miserable
lot of his master. With the General’s permission I volunteered to seek
out my old friend, and convey to him the assurances of safety and
kind treatment from Sir Henry, which it occurred to me Shahbaz
Khan must have kept back. You had said to me that you suspected
something of the sort, ma’am; do you remember? Well, I found Gul
Ali encamped in the jungle—a few wretched rowties [small common
tents] sheltering the few retainers who remained faithful to him. Our
appearance—your brother accompanied me, by the way—produced
at first the utmost consternation, the fugitives fearing an attack. But
my name restored confidence, and the Prince met and embraced
me, and conducted me into his miserable dwelling. Old and sick,
exposed to the heavy rains—this was the plight of the man I had last
seen enthroned in his palace. Briefly he unfolded to me his brother’s
perfidy. As I expected, Shahbaz had induced him to abdicate by the
strongest assurances of Sir Henry’s hostile disposition towards him. I
pledged him my honour that he was mistaken, and he would fain
have accompanied me there and then to make his submission. But I
knew he would find Shahbaz with the General, and fearing his
timidity might betray him once more, I persuaded him to send his
son—not Karimdâd, of course, but one of the younger ones—and a
nephew instead.”
“That was the mistake!” said Richard sharply. “Had he but met
the General face to face——”
“Easy enough to see where another man has gone wrong.”
Colonel Bayard spoke with some displeasure. “Well, ma’am, sherbet
was served, and we parted with the usual compliments. My one aim
was to lead the young Khans to Sir Henry before they could be
intimidated by Shahbaz. Alas! it did not occur to me that he might
corrupt them instead, though when we met him he embraced them
cordially, and begged a visit after their audience. I took them to Sir
Henry’s tent, where we all sat on the carpet together, since there
were no chairs. The General, who had met the youths very civilly,
addressed them kindly, but with severity—through his Munshi, not
through me—nor did he make the slightest show of consulting me.
Seeing me thus set aside, and reading in his decided tone that he
regarded them as rebels, is it any wonder the young Khans were
seized with alarm? They left his presence—I suggested to him to
show his goodwill by shaking hands with ’em, which he did very
readily—to seek Shahbaz, and I grieve to say they were persuaded
by that villainous plotter to betray their aged parent into his hands.
They saw Shahbaz enjoying Sir Henry’s favour and possessing all the
tokens of power, and in return for his bribes they fell in with his
designs. I despatched a spy to Gul Ali’s camp to mark their return
there, for I feared all was not well, and it was as I feared. They
insisted upon the General’s angry tone and the curtness of the terms
he had used, and declared it as his command that Gul Ali should
surrender himself again to Shahbaz at Bidi. Asked what part I, their
friend, had taken in the interview, they replied that even were I
sincere in my professions—of which they hinted a doubt—it was
clear I was devoid of any power to help. Do you wonder that the
unfortunate old man feared to offer the personal submission for
which Sir Henry had stipulated? Once again he made his escape—
and so unremitting is Shahbaz in his villainy that he even succeeded
in bribing his brother’s Munshi to substitute a defiant message under
his seal for the letter he had despatched in excuse for his non-
appearance. Sir Henry was highly irritated, and lent an ear all the
more readily to the poisonous suggestions of Shahbaz. With a view
of clinching matters, he replied to the letter with a direct refusal to
communicate further with Gul Ali unless he gave effect to his forced
renunciation by recognising his brother as Chief Khan.”
“But sure ’twas the wisest thing he could do!” Eveleen had been
bubbling over for some moments with the desire to speak. “Wouldn’t
you say the unfortunate old creature was silly? He can do no good
for himself or anybody else.”
Colonel Bayard was painfully taken aback. “I didn’t expect this
from you, Mrs Ambrose. Is the unhappy Gul Ali to be branded as a
fool because unfortunate? His misfortunes all spring from the
misdeeds of others.”
“Ah, but do they? Is he able to retain the fidelity of a single
supporter, will you tell me? Has he taken one bit of the advice you
have given him, or kept any single promise he has made? I grant
you he’s unfortunate, but I’d say with all my heart he was incapable
as well!”
“A Daniel come to judgment!” said Richard drily.
“And if he ain’t incapable,” pursued Eveleen, rushing on before
Colonel Bayard could speak, “he’s treacherous, believe me. As
Ambrose says, you don’t know the things he has been doing—
stopping the dâks and attacking our boats on the river, besides the
army he’s been getting together. And when poor Sir Harry sends
word that the army is to be disbanded, all the old horror will do is to
say there’s no army to disband.”
“Precisely. How can he disband an army if he hasn’t got one? I
grant you that in their childish way the Khans have sought to lead
Sir Henry to think they were raising troops, but this was purely
make-believe, designed to deter him from attempting decisive
measures against them.”
“Then they were finely mistaken in Sir Harry! But believe me,
they have been assembling their Arabit hordes for months. We have
heard too much of them to doubt that. Ah, don’t let your kind heart
set you against the General and all of us who see that unfortunate
old deceiver as he really is, and not as you do—an angel with wings
a weeshy bit muddy!”
“I have brought this upon myself, I suppose——” with a pique
he could not disguise. “But don’t be afraid, ma’am. I value my
friends too highly to part company with ’em over a difference of
opinion, and I trust they’ll extend the like compliment to me. This
last effort to preserve the authority of the Khans and prevent
bloodshed I’ll carry through with my whole heart. If it fail, my work
here is done. I am merely, as Sir Henry has more than once
reminded me, a commissioner under a peace treaty, and if there’s no
treaty, I am at liberty to go home.”
“Now why would such a nice man be so unreasonable as all
that?” asked Eveleen mournfully as he left them.
“Why, my dear, ain’t all nice people the same, in your
estimation?” Richard’s tone tried to be jaunty—not very successfully.
“Like yourself? Well, I wouldn’t say quite all—but a good many,
certainly. But sure Bayard will never be able to call Sir Harry
unreasonable after this. Did y’ever see anything like the way he has
given in to him time and again?”
“I own I never thought he had it in him to be so patient. If
Bayard succeeds in persuading the Khans to consult their own
interests and submit, they will have the General to thank, not
themselves.”
“And if they won’t consult their own interests, and will not
submit, there’s not a soul on earth can accuse Sir Harry of dealing
with them hastily.”
“I don’t say that. People can say strange things. But if the
Khans have an anna’s worth of sense in their foolish heads, they will
submit—having stood out to the very last moment.”
“Well, I’m sorry for it!” said Eveleen. “Why, now”—as he looked
at her in amazement,—“have you forgotten I was against the silly
creatures from the first? Ever since Bayard said he had no power to
make them treat the women properly, don’t you know?”
“I had forgotten, certainly. Now I have some faint recollection
——”
“Y’are very flattering!” sharply.
“If you expect me to remember all the contradictory speeches
you make on all sorts of topics, I fear, my dear——”
“When you talk like that, you make me feel I’d do anything—
anything in the wide world—to make an impression, to let you feel
you had to reckon with me.”
“My dear, pray don’t! I assure you it ain’t necessary any longer.”
Whether his alarm was real or pretended she could not distinguish.
“Henceforth your wildest utterances shall be most carefully weighed.
You forget you have already carried out your threat—by presenting
yourself here. If we get through, I promise you won’t find me
disregarding your threats again.”
“You don’t put it very nicely,” she complained. “But tell me now
—d’ye really think we’ll have to fight?”
But apparently Richard repented his freedom of speech. “Not a
bit of it!” crushingly. “What I’m afraid of is that you will be actually
and literally bored to death.”
And not a word more would he say, though Eveleen tried
coaxing and reproaches in turn. Indignant though she was at the
time, however, there were moments, after they had reached
Qadirabad, when she began to feel his prophecy might come true.
Whatever excitement there might be for the men, who rode daily to
the Fort to discuss Lord Maryport’s treaty with the Khans in durbar,
life at the Residency was the very acme of dulness for the woman
left at home. If Eveleen had expected to be able to resume her
former pursuits, she was mistaken. She blamed herself bitterly for
not having brought a horse—difficult though it might have been for
poor Captain Franks to find room for it—for the lack of one played
into the hands of her natural enemies. Any man who prevented, or
sought to prevent, Eveleen from riding when she wished to ride was
a natural enemy, and all the members of the Mission—soldiers and
Politicals alike—were immovably united in the determination that she
should not go outside the walls. The only exception to this rule was
the permission to go out by the water-gate, cross an uninviting tract
of sand which was really part of the bed of the river, but now dry,
and thus gain access to the Asteroid, which lay in a meagre trickle
called a channel. But this excursion was as unsatisfying as the ride
round the garden, which was the only one allowed her—if not quite
so tantalising,—and she did not repeat it. If she was not to sink to
the lowest depths and gossip with Ketty, she must find her interests
in that dreary treaty, which seemed to be debated for hours day
after day, but never signed. Poor Colonel Bayard might have been
the Khans’ bitterest enemy, instead of their most tried and
persevering friend, by the way they treated him. His championship
of their cause—expressed indiscreetly, perhaps, to Gul Ali and his
retainers—was made an excuse, and a perpetually recurring one, for
tormenting him. Was he really in sympathy with the deposed Chief,
whose honours had been so shamefully filched from him? Oh, well, if
he said so, it must be presumed to be true, but Gul Ali had heard
rumours—— And in any case, if he was on the side of the
oppressed, why was he representing their chief adversary, the
Bahadar Jang? Would he show his friendship by getting Gul Ali
replaced in his position of supremacy, and punishing the
presumptuous Shahbaz? Over and over again, by varying paths, the
discussion was led dexterously to this point, at which the harassed
emissary could only reply that he had no power whatever to
interfere with the Governor-General’s decisions; the utmost he could
do would be to urge the expediency of modifying them. This was not
at all what was wanted, and the bald question invariably followed: If
you are a friend, and yet can do nothing to help us, why are you
here? The reply that he had hoped to make submission easier by
entreating instead of imposing it was not at all in accordance with
the Khans’ idea of a friend’s duties.
It almost seemed as though Colonel Bayard might have gone on
indefinitely presenting the treaty, and the Khans talking about it, had
not the spur been applied which the envoy had been dreading. He
had written feverish letters almost daily, entreating the General to
return to Sahar with his force—or at least to remain stationary, and
not pursue the route he had taken on leaving Sultankot, which
would bring him to the river about half-way to Qadirabad. It was the
death blow to his hopes when the news came that not only had Sir
Harry emerged safely on the river bank from the desert, but his
flying column had been joined there by the troops he had left at
Bidi. The effect on the Khans was no less marked. Their Vakils
sealed that very day the pledge which bound them to accept the
treaty.
“Did y’ever see a man look so miserable when he’d got what
he’d been fighting for for a week?” demanded Eveleen of her
husband when Colonel Bayard had brought the draft home—not at
all in triumph—and laid it up in his desk. “You’d say he was sorry
they have signed, instead of glad.”
“I believe you. He don’t know whether to blame Sir Henry most
for his show of force, or their Highnesses for permitting themselves
to be affected by it.”
“But sure they couldn’t have gone on hesitating for ever!”
“He had hopes, I’m certain, of inducing the General to promise
that if they would sign the treaty, Gul Ali should get back his Turban.
Of course Sir Henry has no power to promise anything of the kind—
it rests with the Governor-General, and he will never grant it.”
“Well, if I was poor Bayard, I’d be glad the matter was settled
and out of my hands.”
“Pardon me—not if you were he. You would be more unhappy
than ever, because you had not succeeded in averting the
misfortune. There’s a sort of twist in his mind where his dear Khans
are concerned. To him, they and the General alike are pawns in the
hand of Shahbaz, who is the greatest villain existing, and advises all
to their destruction.”
“But sure they are all dead against Shahbaz!”
“That’s merely another proof of the man’s cunning. Bayard has
persuaded himself that Shahbaz is so steeped in plots he can’t eat
his pillau without some ulterior object, while his poor simple brother
and nephews, beguiled by his subtlety, are innocent lambs asking to
be shorn. Lambs, indeed! much more like wolves, they look to other
people.”
“Then you think there’s danger?” Eveleen’s eyes were sparkling.
“I do think so, and I’ll tell you why. Perhaps it will make you
more contented to stay indoors, as you are told. The city is
swarming with Arabits, whose demeanour is as uncivil as they dare,
though for the moment they are held in check. Through some
extraordinary blindness, Bayard don’t see them—as a danger, at any
rate. Not an armed man in the streets, he writes to the General.
They all have their swords and shields—what does he expect of ’em?
muskets and revolving pistols? Their matchlocks are close at hand, I
haven’t a doubt. And all our spies bring in word of fresh bands—
either concealed at a convenient distance from the city, or pressing
towards it from all quarters. Kamal-ud-din alone, they say, has
assembled ten thousand men, and is approaching by forced
marches. And here are we allowing ourselves to be played with,
while precious time—every day of which augments the Arabit hosts
—is lost!”

You might also like