■m

m modifier, Perl regular expressions, 169 M, m parameters, date() function, 232 Macromedia Dreamweaver MX

choosing code editor, 35 magic quotes, enabling, 31 magic_quotes_gpc directive, 31, 69 magic_quotes_runtime directive, 31, 210 magic_quotes_sybase directive, 31 MAGPIE_CACHE_XYZ constants, 372 MagpieRSS, 366-372

aggregating feeds, 370-371 caching feeds, 372 disabling caching of feeds, 372 installing, 366

limiting number of displayed headlines, 371 parsing feeds, 366-368 rendering retrieved feed, 369-370 mail

Zend_Mail component, 454 Mail Exchange Record, DNS, 288 mail() function, 220, 294-295 see also e-mail addl_headers parameter, 295 addl_params parameter, 295 configuration directives, 294-295 force_extra_parameters directive, 295 MTA (Mail Transfer Agent), 295 sending e-mail using PHP script, 295 sending plain text e-mail, 295 sendmail_from directive, 294 sendmail_path directive, 294 SMTP directive, 294 smtp_port directive, 295 Mail package, PEAR, 220, 296-299 installing, 296

sending e-mail attachments, 299 sending e-mail with multiple recipients, 296 sending HTML formatted e-mail, 297 Mail Transfer Agent (MTA), 294, 295 Mail_Mime package, PEAR addAttachment method, 299 description, 296

installing, 296

sending e-mail attachments, 299 sending e-mail with multiple recipients, 296 sending HTML formatted e-mail, 297 maintainability benefits of views, 622 PL/SQL subprogram disadvantages, 634 manual backups, 693 manual, Apache, 11 manual, PHP, 12 markup tags removing markup tags, Smarty, 347 Masinter, Larry, 277 max parameter section function, Smarty, 350 max_execution_time directive, 28, 278, 391 MAX_FILE_SIZE directive, 281 max_input_time directive, 28 maxlength parameter oci_bind_by_name() function, 571 maxlength rule, 256 MAXVALUE option

CREATE SEQUENCE command, 532 MCrypt library, 3 MCrypt package, 403-405 mcrypt_decrypt() function, 404 mcrypt_encrypt() function, 404 MD5 algorithm encrypting data with md5() function, 401 md5() function, 401

file based authentication, 265 one-time URLs, 272 mday value, getdate() function, 234 MDB2 database abstraction layer, 426 MDB2 package, PEAR, 220

SAVEPOINT statement, 599 media failures, 687

advantages of using ARCHIVELOG mode, 691 memory, Oracle datatypes, 485 instance referring to, 481 memory structures, 485

Program Global Area (PGA), 487 Software Code Area, 487 System Global Area (SGA), 486-487 shared and nonshared memory, 485 memory, Oracle Database XE, 469, 476 Memory tool, Oracle Database XE, 497 memory_limit directive, 29, 278, 391

message headers addl_headers parameter, mail() function, 295 setting From field, 294 message parameter, 156, 158 messages getMessage method, Exception class, 159 messages.po file generating binary versions of, 445 translating text, 444 metacharacters escaping shell metacharacters, 214, 397 Perl regular expressions, 170-171 metadata control files, Oracle, 485 data dictionary views, 627 retrieving database metadata, 581-586 SYSAUX tablespace, 514 method overloading, 140 method scopes, 127-129 method_exists() function, 136 methods, 126-129 see also functions abstract methods, 128 addAttachment(), Mail_Mime, 299 addElement(), HTML_QuickForm, 254 addFunction(), SoapServer, 382 asXML(), SimpleXMLElement, 375 attributes(), SimpleXMLElement, 374-375 beginTransaction(), PDO, 440 bindColumn(), PDO, 439 bindParam(), PDO, 433, 434 build(), 244

checking if method available to object, 136

children(), SimpleXMLElement, 376

class behaviors, 119

columnCount(), PDO, 436

Date(), DateTime, 245

declaring, 126

display(), HTML_QuickForm, 254 display(), Smarty, 344 errorCode(), PDO, 430 errorInfo(), PDO, 431 errorMsg(), HTTP_Upload, 283 escape(), 459 exec(), PDO, 432 execute(), PDO, 433, 434 exportvalue(), HTML_QuickForm, 258 fetch(), PDO, 436, 437, 438

fetchAll(), PDO, 438 fetchColumn(), PDO, 438 finalized methods, 129 format(), DateTime, 245 functions compared, 126 GET(), 29, 249

get_class_methods() function, 135

get_config_vars(), Smarty, 355

getCode(), exception, 159

getFiles(), HTTP_Upload, 283, 285

_getFunctions(), SoapClient, 380

getLine(), exception, 159

getMessage(), exception, 159

getProp(), HTTP_Upload, 284

getSubmitValues(), HTML_QuickForm, 258

getter (_get) methods, 125

getting methods of class, 135

getTrace(), exception, 159

getTraceAsString(), exception, 159

handle(), SoapServer, 383

headers(), 296

is_cached(), Smarty, 358

invoking, 127

isValid(), Calendar, 244

isValid(), HTTP_Upload, 283, 285

modify(), DateTime, 246

phoneNumber(), Validate_US, 194

PHP supported method scopes, 129

postalCode(), Validate_US, 194

private methods, 127

process(), HTML_QuickForm, 258

protected methods, 128

public methods, 126, 127

region(), Validate_US, 194

rollback(), PDO, 440

rowCount(), PDO, 433

setAttribute(), PDO, 430

setBaseUrl(), 457

setCellAttributes (), 605

setClass(), SoapServer, 383

setDate(), DateTime, 245

setPersistence(), SoapServer, 384

setRowAttributes(), 605

setter (_set) methods, 125

setTime(), DateTime, 246

ssn(), Validate_US, 194 static methods, 133

validate(), HTML_QuickForm, 257, 258 xpath(), SimpleXMLElement, 376-377 mhash library, 402 mhash() function encryption, 402 key parameter, 403 Microsoft SQL Server, 428 MIME types default_mimetype directive, 32 retrieving information about files uploaded using POST, 59 Zend_Mime component, 454 minlength rule, 256 minutes value, getdate() function, 234 minuteswest value, gettimeofday()

function, 234 MINVALUE option

CREATE SEQUENCE command, 532 mirrors downloading Apache, 10 downloading PHP, 11 miscellaneous category

PHP configuration directives, 28 mkswap command installing Oracle Database XE on Linux, 476 mktime() function, 236

determining days in current month, 241 mm (volatile memory)

storing session information, 321 mod_files.sh script setting session files path, 321 mod_plsql module, 466 mod_rewrite module, Apache, 455 mode parameter, count() function, 103 mode parameter, mcrypt_encrypt() function, 404

model

MVC architecture, 451 Model-View-Controller see MVC modes setting file handling access level, 202 modifiers

Perl regular expressions, 169-170 variable modifiers, Smarty, 345-347 modify method, DateTime class, 246 modifying table rows, OCI8, 578-579 modifying views, 625 modulus (%) operator, 64 Mojavi MVC layer, 452

mon value, getdate() function, 234 monetary representations localized formats, 238 money_format() function, 446 Monitor tool, Oracle Database XE, 497 monitoring see database auditing MONITORING USAGE command turning on index monitoring, 668 month value, getdate() function, 234 MOUNT mode, 692 move_uploaded_file() function, 281 moveTo method, HTTP_Upload class, 283

uploading multiple files, 285 MTA (Mail Transfer Agent), 294, 295 Muffett, Alec, 270 multidimensional arrays, 92 multiple exceptions catching, 161-162 try ... catch block, 157 multiple inheritance, OOP

OOP features not supported by PHP, 140 multiple select boxes, 252 multiplexing control files, 690-691 multiplexing redo log files, 688-690 multiplication (*) operator, 64 multiplication-assignment operator, 64 mutators, 123

MVC (Model-View-Controller), 449-451 breaking application into distinct components, 450 controller, 451

conventional modular directory structure, 456 model, 451

Mojavi MVC layer, 452

PHP framework solutions, 451-453

view, 451

Zend Framework, 453-462

creating Zend Framework-driven Web site, 455-460 MX (Mail Exchange Record) records, 288 getmxrr() function, 291 retrieving MX records, 291 My_Exception class extending Exception class, 160 MySQL

PDO supported databases, 428 safe_mode restrictions, 388 XAMPP as test environment, 10

\n escape sequence, 69 n parameter, date() function, 232 name attribute, $_FILES variable, 59, 279 name directive, session handling, 322 name parameter foreach function, Smarty, 349 insert tag, Smarty, 353 section function, Smarty, 350 Name Server Record, DNS, 288 named parameters prepared statements, PDO, 433, 434 namespaces, OOP

OOP features not supported by PHP, 140 Naming Authority Pointer DNS record types, 288 naming conventions interfaces, OOP, 147 Oracle Database XE tables, 523 Oracle indexes, 663 Oracle triggers, 653 POST variables, 250 NAPTR (Naming Authority Pointer) record type, 288 natcasesort() function, arrays, 107 NATIONAL CHARACTER datatype, ANSI, 522 natsort() function, arrays, 107 NCHAR datatype, Oracle, 517 NCLOB datatype, Oracle, 521 Nebel, Ernesto, 277 nesting functions, 5 Net_SMTP package, PEAR, 220 Net_Socket package, PEAR, 220 Netcraft, 2

network protocol, Oracle Database XE, 469 network-specific functionality, 287-303 calculating network bandwidth, 303 creating port scanner with NMap, 300 creating subnet converter, 301-302 DNS (Domain Name System), 288-291 e-mail, 294-299

establishing socket connections, 292-294 Internet services, 291-292 pinging server, 299-300 testing user bandwidth, 302-303 new keyword, 48, 120 NEW qualifier creating triggers, 655, 656 newline characters converting into HTML break tag, 179 escape sequences, PHP, 69

ignoring, 208 recognizing, 202 NewsController.php searching Web with Zend_Service_Yahoo, 460 NewsIsFree aggregator, 363 next() function, arrays, 100 Next Page link creating paged output, 615 NEXTVAL qualifier, sequences, 533 nl2br() function, 179 N LS_DATE_F ORMAT parameter, 520 NLS_LANG environment variable, 490 NLS_LENGTH_SEMANTICS parameter, 517 Nmap (network mapper) tool, 300 NOARCHIVELOG mode, 691 NOAUDIT command, 559, 561 nocache value, cache_limiter directive, 324 NOMONITORING USAGE command, 668 nonintrusive constraints, 257 nonzero rule, 256 nopunctuation rule, 256 NOT (!) operator, 66 NOT (~) bitwise operator, 67 NOT (~) logical operator error_reporting directive, 152, 153 Not A Number, 518 NOT EXISTS clause, SQL, 609 NOT IN clause, SQL, 609 NOT NULL constraint, 524, 525 Notepad++

choosing code editor, 35 NS (Name Server Record) record type, DNS,

288, 290 NULL character binary data, SQLite, 420, 421 NULL values creating tables, 524, 525 num_args parameter, sqlite_create_aggregate()

function, 422 NUMBER datatype, Oracle, 518-519

CHECK constraint, 519 number_format() function, 446 numbers, localizing, 238, 446-447 Numbers_Roman package, PEAR, 221 numeric datatypes, Oracle, 518-519 numeric rule, 256 numerical arrays, 93 numerical keys, arrays, 91 NVARCHAR2 datatype, Oracle, 517

%o type specifier, 45 o option, PEAR install command, 602 O parameter, date() function, 232 ob_gzhandler() function, 24 Object Browser icon, Oracle, 497 object cloning, OOP, 139, 140-142 clone keyword, 140 clone method, 141 object datatype, 48 type casting, 49 object-oriented programming (OOP) abstract classes, 139, 149 abstract keyword, 128, 149 autoloading objects, 136-137 benefits of OOP, 117-119 class definition and instantiation, 48 classes, 119 clone keyword, 140 constants, 125 constructors, 130-132 destructors, 132-133 encapsulation, 118 extends keyword, 143 features not supported by PHP, 139-140 fields, 120-123 final keyword, 123, 129 general language features, 6 helper functions, 135-136 implements keyword, 147 inheritance, 118, 139, 142-146 instanceof keyword, 134 interfaces, 139, 146-149 key OOP concepts, 119-129 method overloading, 140 methods, 126-129 multiple inheritance, 140 namespaces, 140 new keyword, 48, 120 object cloning, 139, 140-142 objects, 120

operator overloading, 140 parent keyword, 131 PDO features, 426 PHP 4 features, 2 PHP 5 features, 3, 4 polymorphism, 118 private keyword, 122, 127 properties, 123-125 protected keyword, 122, 128 reflection, 139

self keyword, 134 SQLite, 411

static class members, 133-134 static keyword, 133 this keyword, 121, 122, 134 type hinting, 129 var keyword, 122 object privileges data dictionary views, 553 GRANT command, 551 granting privileges to roles, 553 REVOKE command, 551 securing Oracle Database XE, 551-553 table privileges, 552 view privileges, 553 WITH GRANT OPTION clause, 551 Object Reports icon, Oracle, 498 objects auditing schema objects, 562 oci_fetch_object() function, 574 objects, OOP, 120 see also classes, OOP

checking if method available to object, 136 checking if object belongs to class, 136 constructors, 130-132 destructors, 132-133 getting class of object, 135 getting fields available to object, 135 instanceof keyword, 134 new keyword, 120 type hinting, 129 OCI_ASSOC value, 573 oci_bind_by_name() function, 571 OCI_BOTH value, 573 oci_close() function, 570 inserting table rows, 577 listing page numbers, 618 performing transactions using PHP, 599 oci_commit() function inserting table rows, 577 performing transactions using PHP, 598 script/database failure before, 599 OCI_COMMIT_ON_SUCCESS value, 598 oci_connect() function, 565-567 disconnecting from database, 570 performing transactions using PHP, 597 using database alias for connection strings, 569 using easy connect strings, 567 using full database connection strings, 570 OCI_DEFAULT value, 598, 599

oci_error() function, 587-588 oci_execute() function, 571, 598, 614 oci_fetch_all() function, 574 oci_fetch_array() function, 572, 573 oci_fetch_assoc() function, 574 oci_fetch_object() function, 574 oci_fetch_row() function, 574 oci_field_name() function, 584, 613 oci_field_precision() function, 585 oci_field_scale() function, 585 oci_field_size() function, 584 oci_field_type() function, 584 oci_new_connect() function, 566

disconnecting from database, 570 OCI_NUM value, 573 oci_num_rows() function, 579, 580, 581 oci_parse() function, 571, 614 oci_password_change() function, 588 oci_pconnect() function, 567

disconnecting from database, 570 oci_rollback() function, 598 OCI_RETURN_LOBS value, 573 OCI_RETURN_NULLS value, 573 OCI8 extension, 565-589 configuring PHP to use, 565 counting selected/affected rows, 581 database connection strings, 567, 570

using database alias for, 567 deleting table rows, 579-580 DML commands, 570-581 inserting table rows, 575-577 modifying table rows, 578-579 performing transactions using PHP, 597-599 PHP accessing Oracle database, 466 retrieving and modifying data, 570-581 retrieving database metadata, 581-586 retrieving table rows, 573-575 SAVEPOINT statement, 599 standardization of function names, 565 steps processing SQL statement, 570 using database connections, 565-570 viewing database characteristics, 582-583 viewing table columns, 584-586 viewing user tables, 583-584 octal notation escape sequences, PHP, 69 ODBC (Open Database Connectivity), 426, 428 ODBC Data Source Administrator, 502 ODBC within Windows, 466 offset parameter, strpos() function, 185

offset parameter, strrpos() function, 186 offsets moving file pointer to offset, 210 retrieving current pointer offset, 210 retrieving part of string between, 187 OLD qualifier, creating triggers, 655, 656 ON COMMIT REFRESH privilege, 551 one-time URLs, 272-274

lostpassword.php script, 274 online redo log file multiplexing redo log files, 688, 690 redo log files compared, 688 status of, 689 only_values parameter, ldap_explode_dn()

function, 316 OOP see object-oriented programming open development, 7 open source software, 6 open_basedir directive, 26, 391 opendir() function, 210 opening files, 202 OpenLDAP, 306 openlog() function, 155 operands, 62 operating systems

Oracle Database XE security, 536 system level program execution, 215 operator overloading

OOP features not supported by PHP, 140 operators arithmetic operators, 63 assignment operators, 64 associativity, 62, 63 bitwise operators, 67 comparison operators, 66 decrement (-- ) operator, 65 equality operators, 66 expressions, PHP, 62 increment (++) operator, 65 logical operators, 65 precedence, 62, 63 string operators, 64 table of operators, 62 type casting of, 49 optimization see performance option parameter, openlog() function, 155 optional arguments, 84 options parameter

SoapClient constructor, 379 SoapServer constructor, 382

OR (I) bitwise operator, 67 OR (I) logical operator error_reporting directive, 153 OR (II) operator, 66 OR REPLACE clause, PL/SQL

CREATE OR REPLACE VIEW statement, 625 modifying/replacing subprograms, 644 stored procedures, 637 Oracle, 463-467

authenticating user against Oracle database, 267 custom Oracle-based session handlers,

333-337 database options, 463-466 developer and client-side tools, 466 other Oracle products, 466 PDO supported databases, 428 pseudo-columns, 607 ROWNUM variable, 607 server memory datatypes, 485 shared and nonshared memory, 485 TO_DATE function, 520 troubleshooting, 499-500 Oracle architecture, 481-488

initialization parameters, 487-488 memory structures, 485-487 database buffer cache, 486 Program Global Area (PGA), 487 redo log buffer, 487 shared pool, 487 Software Code Area, 487 System Global Area (SGA), 486-487 storage structures, 482-485 blocks, 483 control files, 481, 485 datafiles, 484 extents, 483

logical storage structures, 482-484 physical storage structures, 484-485 redo log files, 481, 485 schemas, 483 segments, 483 tablespaces, 483 Oracle AS (Oracle 10g Application Server), 466 Oracle data dictionary see data dictionary Oracle Database XE, 463-465 administration home page, 464 administrative interface, 469 Application Express interface, 464 automatic performance monitoring, 464 backup and recovery, 687-696

connecting to, 489-492 constraints, 525-528 creating and viewing triggers, 653 creating indexes, 664 creating table from Oracle data, 606-607 database connections, 565-570 datatypes see Oracle datatypes defining environment variables, 489 developing APEX applications, 506 disk space requirement, 469 executable file storage, 485 exporting data, 675-680 formats for, 676

specifying format of text output, 678 Flashback Query feature, 464 home page, 501, 506, 677 importing data, 680-685

spreadsheet data CSV files, 681 indexes, 531-532

installing Oracle Database XE, 464, 469-480 creating user accounts, 479-480 installation prerequisites, 469-470 on Linux, 474-478 on Windows, 470-474 post-installation tasks, 479 installing Oracle Database XE client, 501-503 Linux client, 503 Windows client, 502-503 logical storage structures, 482-484 login page, 479 memory (RAM), 469 network protocol, 469 OCI8 extension, 565-589 operating system security, 536 Oracle Text, 465

physical storage structures, 484-485 PL/SQL subprograms, 633-647 Program Global Area (PGA), 487 Real Application Clusters database, 465 retrieving and modifying data, 570-581 retrieving database metadata, 581-586 running SQL commands using home page, 492

running SQL*Plus from command line, 489-492

securing Oracle Database XE, 535-563 connecting to database, 538 database auditing, 558-563 database authentication, 537-539 database authorization methods, 544-558 external elements to secure, 536-537

object privileges, 551-553 profile management, 544-549 roles, 553-558 system privileges, 549-550 user accounts, 540-544 sequences, 532-533 Software Code Area, 487 SQL Developer tool, 464 starting Oracle Database XE, 494-495 stopping Oracle Database XE, 494, 495-496 system architecture, 469 System Global Area (SGA), 486-487 tables adding columns, 530 creating, 523-524

creating by querying another table, 529 dropping, 531

dropping table columns, 530 modifying table characteristics, 529-531 renaming, 530

renaming table columns, 530 setting column defaults, 529 table names, 523 tablespaces creating new tablespace, 515-516 default installation tablespaces, 513 tablespace types, 513-515 transactions, 591-600 troubleshooting in Oracle, 499-500 using Application Express (APEX), 506-510 using Oracle utilities, 496-499 Administration icon, 497 Application Builder icon, 498 Data Load/Unload icon, 498 Generate DDL icon, 498 Object Browser icon, 497 Object Reports icon, 498 Recycle Bin icon, 498 SQL icon, 498 Utilities icon, 498 using PHP to access, 510 using SQL command line, 504 using SQL Developer, 504-506 using SQL*Plus on Windows, 492 viewing all initialization parameter values, 488 views, 621-631

treating views as tables, 623 XML DB, 465

Oracle datatypes, 516-522

ANSI supported datatypes, 522 BFILE, 521

BINARY_DOUBLE, 518, 519 BINARY_FLOAT, 518, 519 BLOB, 521

built-in datatypes, 516-522 CHAR, 517

character datatypes, 516-518

CLOB, 517, 521

DATE, 519, 520

datetime datatypes, 519-521

INTERVAL, 521

LOB, 521

LONG, 517

long/raw/long raw datatypes, 516 NCHAR, 517 NCLOB, 521 NUMBER, 518-519 numeric datatypes, 518-519 NVARCHAR2, 517 ORDXyz datatypes, 516 ROWID, 522 TIMESTAMP, 519, 520 UROWID, 522 VARCHAR, 517 VARCHAR2, 517 Oracle Enterprise Edition, 465 Oracle extension

PHP accessing Oracle database, 466 Oracle functionality for PHP see OCI8 extension Oracle indexes, 661-673 bitmap indexes, 663 B-tree indexes, 662 CREATE INDEX statement, 663 creating Oracle Text index, 669 creating/dropping/maintaining indexes,

663-667 default type, 662 DROP INDEX statement, 663 effect of dropping, 661 Explain function, 664 index types, 661-663 LIKE clause, 669

monitoring index usage, 668-669 naming convention, 663 Oracle Text index, 669-672 specifying indexed columns, 667 too many indexes, 668 WHERE clause, 669

Oracle Install Wizard, 470 Oracle Internet Directory (OID)

using alias for service_name parameter, 567 Oracle Personal Edition, 466 Oracle PL/SQL subprograms see subprograms,

PL/SQL Oracle Standard Edition, 465 Oracle Standard Edition One, 465 Oracle Text index, 669-672 Oracle Database XE, 465 Oracle triggers, 649-660 AFTER triggers, 650-651 BEFORE and AFTER triggers compared, 651 BEFORE triggers, 650 business logic and, 650 creating, 652-656 events causing trigger to fire, 652 leveraging triggers in PHP applications,

658-660 modifying/deleting, 657 naming conventions, 653 using integrity constraints instead, 652 viewing, 656-657 oracle user account operating system security, 536 ORACLE_HOME environment variable, 490 ORACLE_SID environment variable, 490 OracleXE.exe, 470 OracleXEClient.exe, 470, 502 orapwd command creating or recreating password file, 538 ORDER BY clause tabular_output() function sorting results, 612 views using, 622, 624 ORDXyz datatypes, Oracle, 516 ORM (object relational mapping) solution, 6 ORN (Oracle Technology Network), 470 Orte, Monte, 341 OUT keyword, PL/SQL

declaring parameter's purpose, 637 integrating subprograms into PHP

applications, 646 stored functions, 644 output see also query results creating clearer row output with

HTML_Table, 605-606 echo() statement, 44 outputting data to file, 209

outputting data to Web browser, 43-46 print() statement, 43, 44 printf() statement, 44 sorting output, 612 sprintf() statement, 46 tabular_output() function, 610-612 output_buffering directive, 23 output_handler directive, 24 overloading constructors, 132 method overloading, 140 operator overloading, 140 overriding final scope, 123

Was this article helpful?

0 0

Post a comment