■h

H, h parameters, date() function, 231 handle method, SoapServer class, 383 handling errors see error handling handling files see file handling hard coded authentication, 264-265 hardware access

Oracle Database XE security, 537 hash mark referencing configuration variables, Smarty, 355

hashing encrypting data with md5() function, 401 mhash() function, 402 mhash library, 402 header() function, 263 header.phtml file defining Zend views, 459 headers auto_prepend_file directive, 31 message headers, 294, 295 output_buffering directive, 23 sending HTTP header to browser, 263 headers method sending e-mail with multiple recipients, 296 headlines limiting number displayed, MagpieRSS, 371 help command, PEAR, 224 help option, SQLite, 408 helper functions, 135-136 class_exists(), 135 get_class(), 135 get_class_methods(), 135 get_class_vars(), 135 get_declared_classes(), 135 get_object_vars(), 135 get_parent_class(), 135 interface_exists(), 136 is_a(), 136

is_subclass_of(), 136 method_exists(), 136 heredoc (<<<) syntax, 69 hexadecimal characters, 165 hexadecimal notation, 69 highlight.bg directive, 27 highlight.comment directive, 27 highlight.default directive, 27

highlight.html directive, 28 highlight.keyword directive, 27 highlight.string directive, 27 highlight_file() function, 27 history, PHP, 1-4

HMAC (Hashed Message Authentication

Code), 403 home page, 501 accessing, 460 defining Zend views, 458 Oracle Database XE, 464 horizontal tab escape sequences, PHP, 69 host attribute dns_get_record() returning, 290 hosting company permission installing PEAR, 223 hosting providers, Web, 36-38 HOSTNAME variable, $_ENV, 60 hostnames getting hostname of computer, 567 hours value, getdate() function, 234 HS_ADMIN_ROLE role, 555 HS_XYZ tables, accessing, 555 htaccess file modifying PHP configuration directives, 21 referencing Zend Framework components, 455 Web host restrictions placed on, 37 HTML

converting into plain text, 183 converting newline characters into, 179 converting special characters into, 180 converting strings to and from, 179-183 customized conversion of deprecated tags, 182

displaying special HTML characters (&, ", ', <, >), 181

embedding PHP code in Web pages, 39-42 highlight.html directive, 28 removing HTML and PHP tags, 183 sending HTML formatted e-mail, 297-298 strip_tags() function, 398 stripping HTML and PHP tags from input, 207 translating HTML into text, 182 translating text into, 182 uploading files via, 277 HTML_Common package, PEAR, 602 HTML_QuickForm class, PEAR, 253-259 addElement method, 254 creating form, 254-258

display method, 254 exportvalue method, 258 getSubmitValues method, 258 installing, 254 process method, 258 processing form values, 258 using auto-completion, 258-259 validate method, 257, 258 validating form input, 255-258 enforcing filters and rule, 257-258 using filters, 255 using rule, 256-257 HTML_Table package, PEAR, 601-607 creating clearer row output, 605-606 creating table, 603-605 creating table from database data, 606-607 installing, 602

overriding table styles with CSS and, 605 HTMLDOC, 213 htmlentities() function, 180 character sets supported, 180 sanitizing data, 250, 398 htmlspecialchars() function, 181, 398 HTTP

sending HTTP header to browser, 263 session handling, 319 uploading files via, 277-278 Zend_HTTP_Client component, 454 HTTP authentication, 261-262 safe_mode restrictions, 388 HTTP listener port, 473 HTTP session handling, 337

PHP 4 features, 2 HTTP_AUTHORIZATION variable,

$_SERVER, 263 HTTP_REFERER variable, $_SERVER, 58 http_response_code parameter, header()

function, 263 HTTP_Upload class, PEAR, 283-285 installing, 283

languages (foreign) supported, 283 retrieving file properties, 284 retrieving information about uploaded files, 284

retrieving value of single property, 284 uploading files with, 283-284 uploading multiple files, 285 HTTP_USER_AGENT variable, $_SERVER, 58 httpd.conf file, Apache denying access to some extensions, 394 installing Apache/PHP on Linux, 13

installing Apache/PHP on Windows, 14, 15 modifying PHP configuration directives, 21 testing PHP installation, 18

i i modifier, Perl regular expressions, 169 I, i parameters, date() function, 231 i18n see internationalization IBM DB2, 428

ICU (International Components for

Unicode), 12 ident parameter, openlog() function, 155 IDENTIFIED parameter

CREATE ROLE command, 556 CREATE USER command, 540 identifiers, PHP, 51-52

valid and invalid identifiers, 52 IDLE_TIME parameter resource-control profile options, 547 if function, Smarty, 348 if statement, PHP, 70

else/elseif statements, 71 IF-THEN- ... - END IF statement, PL/SQL, 639-640

ignore_repeated_errors directive, 154 ignore_repeated_source directive, 154 ignore_user_abort directive, 27 IIS

enabling IIS on Vista, 16 installing IIS and PHP on Windows, 15, 16 PHP authentication and, 263 reasons for installing, 9 unsuitable versions of Windows for, 16 IMAP extension, PHP, 19 IMAP server, authenticating against, 226 IMP_FULL_DATABASE role, 555 implements keyword, OOP, 147 implicit COMMIT/ROLLBACK statements, 594 implicit_flush directive, 24 implode() function, 185

importing data from spreadsheet CSV files, 681 importing data, Data Load, 681-685

column/table name format options, 683 import type options, 681 results and status, 684 source and destination options, 682 source format options, 682 IN keyword, PL/SQL

declaring parameter's purpose, 637 integrating subprograms into PHP applications, 646

IN OUT keywords, PL/SQL, 637 in_array() function, 97 include directive inserting table rows, OCI8, 577 include() function, 31, 32, 33, 77-79, 89 include() statement, Smarty, 352 include_once() function, 79, 89 include_path directive/parameter, 33 fopen() function, 202, 203 including PEAR packages within scripts, 226 installing Smarty, 342 readfile() function, 208 referencing Zend Framework components, 455 include_php function, Smarty, 354 increment (++) operator, 65 INCREMENT BY option

CREATE SEQUENCE command, 532 INDEX object option, 562 INDEX object privilege, 551 index.php file creating Zend front-end controller, 456 index.phtml view defining Zend views, 458 index.tpl template's application logic, 344 IndexController.php creating Zend controllers, 457 indexed arrays creating arrays with array() function, 93 indexes

CREATE ANY INDEX system privilege, 549 creating and maintaining, 531-532 domain indexes, 669 using bitmap indexes, 532 using B-tree indexes, 531 indexes, Oracle see Oracle indexes index-organized table type, B-tree index, 662 INDEXTYPE clause, CREATE INDEX

statement, 670 info command, PEAR, 224 inheritance, OOP, 118, 142-146 abstract classes, 149 class inheritance, 143-144 constructors and inheritance, 145-146 description, 139 extends keyword, 143 multiple inheritance, 140 ini_set() function, 21 init.ora file, 487, 488 initialization parameter files, 487 initialization parameters, 487-488

input delimiting, 214

escaping shell metacharacters, 214 sanitizing user input, 213 input/output functions safe_mode restrictions, 388 INSERT object option, 562 INSERT object privilege, 551 INSERT statement events firing triggers, 652 naming conventions for triggers, 653 OCI8 steps processing, 571 insert tag, Smarty, 352 insert_banner() function, 353 insert_location.php, 575 insert_name() function, 353 inserting table rows, OCI8, 575-577 install command, PEAR, 225, 602

Calendar package, 242 Install Wizard, 470 installations

MagpieRSS, 366 MCrypt package, 403 PDO (PHP Data Objects), 427 PEAR, 222-223

HTML_QuickForm, 254 PEAR packages, 225-226 HTML_Table package, 602 Validate package, 399 Smarty templating engine, 342 SQLite, 407-408

Web host support for third-party software, 38 Zend Framework, 454-455 installing Apache and PHP

downloading Apache and manual, 10, 11 downloading PHP and manual, 11, 12 on Linux, 12-13 on Windows, 13-15 testing PHP installation, 17-19 installing IIS and PHP on Windows, 15-16 testing PHP installation, 19 installing Oracle Database XE, 464, 469-480 creating user accounts, 479-480 installation prerequisites, 469-470 on Linux, 474-478

configuring Oracle and PHP, 478 downloading installation files, 476 kernel parameters, 475

Linux distributions, 475 performing installation, 477-478 prerequisites, 475-476 required packages, 475 swap file space, 476 system privileges, 476 on Windows, 470-474

configuring Oracle and PHP, 474 downloading installation files, 470 PHP code to test Oracle connectivity, 474 prerequisites, 470 post-installation tasks, 479 instance failures, 688 instance recovery redo log files, 485 instanceof keyword, OOP, 134 instances, Oracle server, 481

database and instance metadata, 583 databases compared, 582 querying database and instance characteristics, 582 retrieving information about, 582 instantiation abstract classes, OOP, 149 class instantiation, 120 constructors, 130 integer datatype, 46 type casting, 49 type juggling, 50 integers type specifiers for, 45 Interbase, 428

interface_exists() function, 136 interfaces, OOP, 146-149

abstract classes or interfaces, 149 caution using class members, 146 checking if interface exists, 136 description, 139 encapsulation, 118 general syntax for implementing, 147 implementing multiple interfaces, 148 implementing single interface, 147 implements keyword, 147 naming conventions, 147 internationalization, 441 country and language code combinations, 442 i18n abbreviation, 441 translating Web sites with Gettext, 442-446 translation files, 442

Internet services, 291-292 default ports for, 291 getservbyname() function, 292 getservbyport() function, 292 retrieving port number's service name, 292 retrieving service's port number, 291 interoperability, 362 INTERVAL datatype, Oracle, 521 INVALID schema objects dropping users, 543 Invalid_Email_Exception class catching multiple exceptions, 161, 162 invoking functions, 81-82 IP address based authentication, 268-270 authenticating using login pair and IP address, 269 IP addresses, domain names and, 288 IP spoofing, 270 IPv4 Address Record, DNS, 288 IPv6 Address Record, DNS, 288 is equal to (==) operator, 66 is identical to (===) operator, 66 is not equal to (!=) operator, 66 is_a() function, 136 is_array() function, 95 is_cached method, Smarty, 358 is_name() function, 51 is_subclass_of() function, 136 is_uploaded_file() function, 280 is_xyz functions, 51 ISAPI support, 3 isolation, transactions, 592 isset() function, 264 isValid method

Calendar package, PEAR, 244 isValid method, HTTP_Upload class uploading files, 283, 285 isValidXyz methods

Calendar package, PEAR, 244 item parameter foreach function, Smarty, 349 iteration, PL/SQL, 641-643 iv parameter, mcrypt_encrypt() function, 404

Java support, 3

JavaScript embedding into Smarty template, 353 JDBC (Java Database Connectivity), 426 Jones, Paul M., 452

JSON (JavaScript Object Notation) Zend_Json component, 454

KDE desktop environment starting SQL*Plus session on Linux, 491 kernel parameters installing Oracle Database XE on Linux, 475 key() function, arrays, 99 key parameter foreach function, Smarty, 349 key parameter, mcrypt_encrypt() function, 404 key parameter, mhash() function, 403 keys arrays, 91

creating unique keys, 532 FOREIGN KEY constraint, 528 PRIMARY KEY constraint, 526-527 keywords highlight.keyword directive, 27 keywords, OOP abstract, 128, 149 clone, 140 extends, 143 final, 123, 129 implements, 147 instanceof, 134 new, 48, 120 parent, 131 private, 122, 127 protected, 122, 128 public, 121, 127 self, 134 static, 133 this, 121, 122, 134 var, 122 krsort() function, arrays, 108 ksort() function, arrays, 108

L, l parameters, date() function, 231

l10n see localization labels goto statement, 76 language features, PHP, 4, 5-7 language options category

PHP configuration directives, 22-25 languages (foreign)

country and language code combinations, 442 HTTP_Upload class, PEAR, 283

translating Web sites with Gettext, 442-446 setting desired language within scripts, 445-446

using gettext() to support multiple languages, 443 last access time, retrieving, 200 last changed time, retrieving, 200 last modified time, retrieving, 201 last-in-first-out (LIFO)

order of element removal, 96 layers, database abstraction, 425 LC_MESSAGES directory, 443 LC_XYZ localization categories, 237 LD_LIBRARY_PATH environment variable, 490 LDAP (Lightweight Directory Access Protocol) access to LDAP server, 306 beginning LDAP, 306 binding to LDAP server, 307-308 closing LDAP server connection, 308-309 connecting to LDAP server, 306-307 counting retrieved entries, 312 deleting LDAP data, 314-315 error handling, 316-317

converting LDAP error numbers to messages, 316 retrieving most recent error message, 317 retrieving most recent error number, 317 inserting LDAP data, 313-314 online resources, 306 retrieving LDAP data, 309-311

putting result set into array, 310-311 retrieving specific entry, 311 searching for one or more records, 309 searching for LDAP data, 309 Secure LDAP (LDAPS), 307 sorting LDAP records, 312 updating LDAP data, 314 using LDAP from PHP, 306-317 working with Distinguished Name, 315-316 converting DN to readable format,

315-316 loading DN into array, 316 ldap_add() function, 313 ldap_bind() function, 308 ldap_close() function, 309 ldap_connect() function, 306 ldap_count_entries() function, 312 ldap_delete() function, 314 ldap_dn2ufn() function, 315 ldap_err2str() function, 316 ldap_errno() function, 317

ldap_error() function, 317 ldap_explode_dn() function, 316 ldap_get_entries() function, 310-311 ldap_mod_add() function, 313 ldap_mod_del() function, 315 ldap_mod_replace() function, 314 ldap_modify() function, 314 ldap_read() function, 311 ldap_rename() function, 314 ldap_search() function, 309 ldap_set_option() function, 307 ldap_sort() function, 312 ldap_start_tls() function, 307 ldap_unbind() function, 308 LDAP_XYZ error codes, 317 LDAPS (Secure LDAP), 307 left_delimiter attribute changing Smarty default delimiters, 356 length parameter, fwrite() function, 209 Lerdorf, Rasmus, 1, 5 less than (<) character displaying special HTML characters, 181 htmlentities() function translating, 398 less than (<) operator, 66 less than or equal to (<=) operator, 66 letters capitalizing first letters, Smarty, 345 lettersonly rule, 256 libaio package, 475 libraries class libraries, helper functions, 135 function libraries, 89-90 general language features, 5 license agreement installing Oracle Database XE on Windows, 470 licensing restrictions, 7 licensing, SQLite, 407

Lightweight Directory Access Protocol see LDAP

LIKE clause, Oracle indexes, 669

lines getLine method, Exception class, 159 link tag using CSS in conjunction with Smarty, 356 links

CREATE DATABASE LINK privilege, 549 creating paged output, 615 Linux alert log location, 499 configuring PHP at build time on, 19 double dot notation, 504

downloading SQL Developer tool, 505 enabling Gettext extension, 442 installing Oracle Database XE, 474-478 installing Oracle Database XE client, 503 installing PEAR on, 222 required Linux environment variables, 490 running SQL commands using XE home page, 492 using SQL*Plus on, 489-492 list command, PEAR, 224, 602 list() function, 94

rendering code more readable, 414 returning multiple values, 86 literal statement, Smarty, 353

using CSS in conjunction with Smarty, 356 loading data

Data Load/Unload icon, 498 LoadModule directive installing Apache and PHP on Linux, 13 installing Apache and PHP on Windows, 14 LOB (large object) datatypes, Oracle, 521 local variables variable scope, PHP, 54 locale parameter, setlocale() function, 237 localeconv() function, 447 localization, 441

country and language code combinations, 442 creating localization repository, 443 l10n abbreviation, 441 localizing dates, numbers, and times, 446-447

translating Web sites with Gettext, 442-446 translation files, 442 localization strings, 237 localized date and time displaying, 237-240 setlocale() function, 237 strftime() function, 238 location parameter, SoapClient constructor, 379 locations, auditing, 558 LOCATIONS table, 572

developing APEX applications, 507, 509 LOCK object option, 562 log files see also error logging alert log, 499

error messages in syslog, 154 error messages in text file, 154 error_log directive, 153 multiplexing redo log files, 688-690

redo log buffer, 487 setting maximum log line length, 154 Zend_Log component, 454 LOG_CRON facility, 155 log_errors directive, 153 log_errors_max_len directive, 154 LOG_USER facility, 155 LOG_XYZ error logging options, 155 LOG_XYZ priorities, 156 logic separating business from presentational logic, 339 logical operators, 65 logical operators (AND/OR/NOT)

error_reporting directive, 152, 153 logical storage structures, Oracle, 482-484 LOGICAL_READS_PER_CALL parameter, 547 LOGICAL_READS_PER_SESSION parameter, 547, 549

login page, Oracle Database XE, 479

login parameter, SoapClient constructor, 379

logins auditing successful/unsuccessful logins, 561 automatically logging in returning users,

328-330 events firing triggers, 652 FAILED_LOGIN_ATTEMPTS parameter, 546 limiting number of consecutive failures, 544 user login administration, 270-274 long datatype, Oracle, 516, 517 long raw datatype, Oracle, 516 loop parameter section function, Smarty, 350 LOOP-END LOOP construct, PL/SQL, 641 looping statements, PHP, 72-77 alternative syntax, 71 break statement, 76 continue statement, 77 do...while statement, 73 for statement, 74 foreach statement, 75 goto statement, 76 while statement, 73 loops, PL/SQL

EXIT/EXIT-WHEN statements, 641-642 FOR-LOOP, 643

LOOP-END LOOP construct, 641 WHILE-LOOP, 642 loose typing, 5 lostpassword.php script one-time URLs, 274

lower character class, 165 lowercase converting string to all lowercase, 177 ltrim() function, 190 Lucene library

Zend_Search_Lucene component, 454

Was this article helpful?

0 0

Post a comment