Master today's best practices for succeeding with PHP 5.5 and MySQL 5.6 web database development! Long acknowledged as the clearest, most practical, and most down-to-earth guide to PHP/MySQL web development, the brand-new Fifth Edition of ""PHP and MySQL Web Development""fully reflects the latest ve
PHP and MySQL Web development, fourth edition
β Scribed by Thomson, Laura; Welling, Luke
- Publisher
- Addison-Wesley
- Year
- 2009
- Tongue
- English
- Leaves
- 472
- Edition
- 5th printing
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Master today's best practices for succeeding with PHP 5.5 and MySQL 5.6 web database development! Long acknowledged as the clearest, most practical, and most down-to-earth guide to PHP/MySQL web development, the brand-new Fifth Edition of ""PHP and MySQL Web Development""fully reflects the latest versions of PHP and MySQL. Maintaining the approach that has made this book so successful through, Luke Welling and Laura Thomson add extensive new coverage of security, cloud and mobile development, and using the PEAR repository's massive resources. Part I offers a crash course in using PHP, including data storage/retrieval, arrays, strings, regular expressions, code reuse, objects, and error/exception handling. Next, walk through designing, creating, accessing, and programming MySQL databases. Part III turns to e-commerce, adding extensive new coverage of web security, plus up-to-the-minute discussions of authentication and secure transactions. A full section of advanced PHP techniques addresses everything from networking and filesystem interaction to image generation and session control. The authors conclude with primers on real-world development and debugging, followed by ten start-to-finish case studies, from authentication to content management, personalized PDFs to web services and Web 2.0 apps.
β¦ Table of Contents
Cover......Page 1
Table of Contents......Page 8
History of Unix......Page 28
Along Came Linus: Introduction to Linux......Page 30
Overview of Operating Systems and Kernels......Page 31
Linux Versus Classic Unix Kernels......Page 33
Linux Kernel Versions......Page 35
Before We Begin......Page 37
Using Git......Page 38
The Kernel Source Tree......Page 39
Building the Kernel......Page 40
Configuring the Kernel......Page 41
Minimizing Build Noise......Page 42
A Beast of a Different Nature......Page 43
No libc or Standard Headers......Page 44
GNU C......Page 45
Small, Fixed-Size Stack......Page 47
Conclusion......Page 48
The Process......Page 50
Process Descriptor and the Task Structure......Page 51
Allocating the Process Descriptor......Page 52
Storing the Process Descriptor......Page 53
Process State......Page 54
The Process Family Tree......Page 56
Copy-on-Write......Page 58
Forking......Page 59
The Linux Implementation of Threads......Page 60
Creating Threads......Page 61
Kernel Threads......Page 62
Process Termination......Page 63
Removing the Process Descriptor......Page 64
The Dilemma of the Parentless Task......Page 65
Conclusion......Page 67
Multitasking......Page 68
Linuxβs Process Scheduler......Page 69
I/O-Bound Versus Processor-Bound Processes......Page 70
Process Priority......Page 71
The Scheduling Policy in Action......Page 72
Scheduler Classes......Page 73
Process Scheduling in Unix Systems......Page 74
Fair Scheduling......Page 75
Time Accounting......Page 77
Process Selection......Page 79
The Scheduler Entry Point......Page 84
Sleeping and Waking Up......Page 85
User Preemption......Page 89
Kernel Preemption......Page 90
Real-Time Scheduling Policies......Page 91
Scheduler-Related System Calls......Page 92
Yielding Processor Time......Page 93
Conclusion......Page 94
Communicating with the Kernel......Page 96
APIs, POSIX, and the C Library......Page 97
Syscalls......Page 98
System Call Performance......Page 99
Denoting the Correct System Call......Page 100
Implementing System Calls......Page 101
Verifying the Parameters......Page 102
System Call Context......Page 105
Final Steps in Binding a System Call......Page 106
Accessing the System Call from User-Space......Page 108
Why Not to Implement a System Call......Page 109
Conclusion......Page 110
Singly and Doubly Linked Lists......Page 112
Circular Linked Lists......Page 113
Moving Through a Linked List......Page 114
The Linux Kernelβs Implementation......Page 115
Manipulating Linked Lists......Page 117
Traversing Linked Lists......Page 120
Queues......Page 123
Creating a Queue......Page 124
Obtaining the Size of a Queue......Page 125
Example Queue Usage......Page 126
Maps......Page 127
Allocating a New UID......Page 128
Looking Up a UID......Page 129
Binary Trees......Page 130
Binary Search Trees......Page 131
Self-Balancing Binary Search Trees......Page 132
What Data Structure to Use, When......Page 135
Big Theta Notation......Page 136
Time Complexity......Page 137
Conclusion......Page 138
Interrupts......Page 140
Interrupt Handlers......Page 141
Top Halves Versus Bottom Halves......Page 142
Interrupt Handler Flags......Page 143
An Interrupt Example......Page 144
Writing an Interrupt Handler......Page 145
Shared Handlers......Page 146
A Real-Life Interrupt Handler......Page 147
Interrupt Context......Page 149
Implementing Interrupt Handlers......Page 150
/proc/interrupts......Page 153
Disabling and Enabling Interrupts......Page 154
Disabling a Specific Interrupt Line......Page 156
Status of the Interrupt System......Page 157
Conclusion......Page 158
8 Bottom Halves and Deferring Work......Page 160
Why Bottom Halves?......Page 161
A World of Bottom Halves......Page 162
Implementing Softirqs......Page 164
Using Softirqs......Page 167
Implementing Tasklets......Page 169
Using Tasklets......Page 171
ksoftirqd......Page 173
The Old BH Mechanism......Page 175
Implementing Work Queues......Page 176
Using Work Queues......Page 180
The Old Task Queue Mechanism......Page 182
Which Bottom Half Should I Use?......Page 183
Disabling Bottom Halves......Page 184
Conclusion......Page 186
9 An Introduction to Kernel Synchronization......Page 188
Why Do We Need Protection?......Page 189
The Single Variable......Page 190
Locking......Page 192
Causes of Concurrency......Page 194
Knowing What to Protect......Page 195
Deadlocks......Page 196
Contention and Scalability......Page 198
Conclusion......Page 199
Atomic Operations......Page 202
Atomic Integer Operations......Page 203
64-Bit Atomic Operations......Page 207
Atomic Bitwise Operations......Page 208
Spin Locks......Page 210
Spin Lock Methods......Page 211
Other Spin Lock Methods......Page 213
Spin Locks and Bottom Halves......Page 214
Reader-Writer Spin Locks......Page 215
Semaphores......Page 217
Counting and Binary Semaphores......Page 218
Creating and Initializing Semaphores......Page 219
Using Semaphores......Page 220
Reader-Writer Semaphores......Page 221
Mutexes......Page 222
Completion Variables......Page 224
BKL: The Big Kernel Lock......Page 225
Sequential Locks......Page 227
Preemption Disabling......Page 228
Ordering and Barriers......Page 230
Conclusion......Page 233
11 Timers and Time Management......Page 234
The Tick Rate: HZ......Page 235
Advantages with a Larger HZ......Page 237
Disadvantages with a Larger HZ......Page 238
Jiffies......Page 239
Internal Representation of Jiffies......Page 240
Jiffies Wraparound......Page 241
Hardware Clocks and Timers......Page 243
The Timer Interrupt Handler......Page 244
The Time of Day......Page 247
Using Timers......Page 249
Timer Implementation......Page 251
Busy Looping......Page 252
Small Delays......Page 253
schedule_timeout()......Page 254
Conclusion......Page 257
Pages......Page 258
Zones......Page 260
Getting Pages......Page 262
Getting Zeroed Pages......Page 263
Freeing Pages......Page 264
gfp_mask Flags......Page 265
kfree()......Page 270
vmalloc()......Page 271
Slab Layer......Page 272
Design of the Slab Layer......Page 273
Slab Allocator Interface......Page 276
Single-Page Kernel Stacks......Page 279
High Memory Mappings......Page 280
Temporary Mappings......Page 281
Per-CPU Allocations......Page 282
Per-CPU Data at Compile-Time......Page 283
Per-CPU Data at Runtime......Page 284
Reasons for Using Per-CPU Data......Page 285
Picking an Allocation Method......Page 286
Conclusion......Page 287
Common Filesystem Interface......Page 288
Filesystem Abstraction Layer......Page 289
Unix Filesystems......Page 290
VFS Objects and Their Data Structures......Page 292
The Superblock Object......Page 293
Superblock Operations......Page 294
The Inode Object......Page 297
Inode Operations......Page 298
The Dentry Object......Page 302
The Dentry Cache......Page 303
Dentry Operations......Page 305
The File Object......Page 306
File Operations......Page 307
Data Structures Associated with Filesystems......Page 312
Data Structures Associated with a Process......Page 313
Conclusion......Page 315
14 The Block I/O Layer......Page 316
Anatomy of a Block Device......Page 317
Buffers and Buffer Heads......Page 318
The bio Structure......Page 321
I/O vectors......Page 322
The Old Versus the New......Page 323
I/O Schedulers......Page 324
The Job of an I/O Scheduler......Page 325
The Linus Elevator......Page 326
The Deadline I/O Scheduler......Page 327
The Anticipatory I/O Scheduler......Page 329
The Noop I/O Scheduler......Page 330
Conclusion......Page 331
Address Spaces......Page 332
The Memory Descriptor......Page 333
Allocating a Memory Descriptor......Page 335
Virtual Memory Areas......Page 336
VMA Flags......Page 338
VMA Operations......Page 339
Lists and Trees of Memory Areas......Page 340
Memory Areas in Real Life......Page 341
Manipulating Memory Areas......Page 342
find_vma()......Page 343
find_vma_intersection()......Page 344
mmap() and do_mmap(): Creating an Address Interval......Page 345
Page Tables......Page 347
Conclusion......Page 349
Approaches to Caching......Page 350
Cache Eviction......Page 351
The address_space Object......Page 353
address_space Operations......Page 355
The Buffer Cache......Page 357
The Flusher Threads......Page 358
History: bdflush, kupdated, and pdflush......Page 360
Avoiding Congestion with Multiple Threads......Page 361
Conclusion......Page 362
Device Types......Page 364
Hello, World!......Page 365
Building Modules......Page 367
Generating Module Dependencies......Page 369
Loading Modules......Page 370
Managing Configuration Options......Page 371
Module Parameters......Page 373
The Device Model......Page 375
Kobjects......Page 376
Ktypes......Page 377
Interrelation of Kobjects, Ktypes, and Ksets......Page 378
Managing and Manipulating Kobjects......Page 379
Reference Counts......Page 380
sysfs......Page 382
Adding and Removing kobjects from sysfs......Page 384
Adding Files to sysfs......Page 385
The Kernel Events Layer......Page 388
Conclusion......Page 389
Getting Started......Page 390
Debugging by Printing......Page 391
Loglevels......Page 392
The Log Buffer......Page 393
Oops......Page 394
kallsyms......Page 396
Asserting Bugs and Dumping Information......Page 397
Magic SysRq Key......Page 398
gdb......Page 399
Using UID as a Conditional......Page 400
Using Statistics......Page 401
Rate and Occurrence Limiting Your Debugging......Page 402
Binary Searching with Git......Page 403
When All Else Fails: The Community......Page 404
Conclusion......Page 405
Portable Operating Systems......Page 406
History of Portability in Linux......Page 407
Word Size and Data Types......Page 408
Special Types......Page 411
Explicitly Sized Types......Page 412
Data Alignment......Page 413
Structure Padding......Page 414
Byte Order......Page 416
Page Size......Page 418
Processor Ordering......Page 419
Conclusion......Page 420
The Community......Page 422
Switch Statements......Page 423
Spacing......Page 424
Braces......Page 425
Line Length......Page 426
Comments......Page 427
Typedefs......Page 428
Structure Initializers......Page 429
Submitting Bug Reports......Page 430
Generating Patches......Page 431
Generating Patches with Git......Page 432
Conclusion......Page 433
Bibliography......Page 434
A......Page 438
B......Page 440
C......Page 441
D......Page 442
F......Page 445
H......Page 447
I......Page 448
K......Page 450
L......Page 451
M......Page 453
O......Page 455
P......Page 456
R......Page 459
S......Page 460
T......Page 464
U......Page 465
V......Page 466
Z......Page 467
π SIMILAR VOLUMES
Master today's best practices for succeeding with PHP 5.5 and MySQL 5.6 web database development! Long acknowledged as the clearest, most practical, and most down-to-earth guide to PHP/MySQL web development, the brand-new Fifth Edition of ""PHP and MySQL Web Development""fully reflects the latest ve
This is my 2nd book regarding php and mysql. My first one got stolen a while back. Anyways, This is a great resource for those who want to create php dynamic and interactive web pages. The codes are good but ive seen better. With this book, You could start making php in no time at all. Samples are i
This is my 2nd book regarding php and mysql. My first one got stolen a while back. Anyways, This is a great resource for those who want to create php dynamic and interactive web pages. The codes are good but ive seen better. With this book, You could start making php in no time at all. Samples are i
Get this if you want to learn PHP and MySQL, very solid examples and easy to follow.