arrays continued multidimensional associative, 20–21 $PS_BIN, 597 $PS_OPT, 597 $retArray, 44 return value defining, 43–45 $valueList, 50 $values, 49–50 askForConfirmation() method, 547 askform.conf script, 688–690 ask.php script, 562–563 associative arrays $ACCOUNT_TYPE, 614 $ALERT, 596 $APACHE_INFO, 614 argument list order, 46–47 debugging, 89 $fields, 50 $fieldType, 112 key=value pairs, 46–47 $params, 46–47 $SYSTEM_INFO, 614 authenticate() function, 126, 133 authentication access control method, 24 information shielding, 60 intranet requirement, 66–67 intranet system, 203 login application, 131–133 Web server-based, 739–744 Authentication() function, 126 authorization access control method, 24 intranet requirement, 67 authorize() function, 116, 119 authorize() method access reporter application, 231 admin access reporter application, 233 calendar manager application, 349–350 campaign execution application, 543 campaign manager application, 540 campaign reporting manager application, 548 category manager application, 379 daily logbook manager application, 236 document details application, 280 document index display application, 278 document publisher application, 277 document view list application, 282 e-campaign user interface application, 528 help application, 421 indexing application, 420 list manager application, 530 message manager application, 537 MOTD manager application, 229 resource manager application, 385 resource tracking application, 386 search manager application, 391 survey execution manager, 491 survey form manager, 488 survey list manager, 487 survey manager, 486 survey report manager, 493 tell-a-friend form manager application, 452 tell-a-friend message manager application, 455 tell-a-friend subscriber application, 458–459 URL manager application, 532 user preference application, 237 user tip application, 237 Web forms submission manager application, 681 author’s material, CD, 753–754 auth.sql script, 146–147 auto_prepend_file directive, 814 autovars_free.php script, 33–35 B bad_autovars.php script, 30–31 bad_screen.html script, 56 bad_uploader.php script, 745 bad_upload.html script, 744 bad_whois.php script, 26–28 836 Index 549669 Index.qxd 4/4/03 2:42 PM Page 836 bang line, command-line interpreter, 561 banner_printed variable, 87–88 banners, printing, 87–88 bench1.php script, 714–716 bench2.php script, 716–718 benchmarking ApacheBench tool, 722–723 bad loop avoidance, 718–722 code, 714–718 PHP applications, 714–723 better_whois.php script, 28–29 BIND domain manager, makezone utility, 641–658 blocks nesting, 10–11 template defining, 9–11 buffer_debugging() method, 117 buffering, PHP application output, 723–725 buffers content printing, 89–90 debug messages, 89–90 buffer_str variable, 87 built-in access controls, PHP applications, 4, 24 business-logic, intranet requirement, 69 C cache APC (Alternative PHP Opcode Cache), 735 jpcache, 727–729 opcode techniques, 734–736 PEAR, 729–734 PHP applications, 727–736 PHPA (PHP Accelerator), 735–736 Zend tools, 736 calc.php script, 14–17 calc2.errors script, 20–21 calc2.php script, 18–20 calendar event manager application, intranet calendar manager, 350–352 calendar manager application, intranet calendar manager, 348–349 calendar manager database, tables, 336–337 Campaign class, 521 campaign execution application, e-campaign system, 541–543 campaign manager application, e-campaign system, 538–541 campaign manager application, e-mail survey system, 476 campaign reporting application, e-campaign system, 547–549 campaign reports, e-campaign system, 554 Category class, 251–255, 298–301 Category() constructor method, 251 category manager application, Internet Resource Manager system, 374–379 Category() method, 251, 298 CATEGORY table, IRM database, 360 category-based document organization, intranet document publisher, 247–248 CD applications, 754–755 author’s material, 753–754 chapter files, 753 eBook version Secure PHP development, 755 intranet application installation, 238–240 system requirements, 753 troubleshooting, 755 central authentication, intranet requirement, 66–67 central authentication database access testing, 146 user table fields, 147 variables, 146 central authentication system application flow diagrams, 121–124 database, 146–147 login application, 127–137 logout application, 138–145 Web server farm logins, 149–155 central contact database, intranet contact manager, 293–296 Index 837 549669 Index.qxd 4/4/03 2:42 PM Page 837 central contact-manager application, intranet system, 204 central event-calendar application, intranet system, 204 central login interface, forgotten-password link, 201 central user authentication, intranet system, 203 central user management system admin user support, 157 forgotten-password request form, 168 forgotten-password recovery app, 194–202 form status display, 168 menu display, 168 password modifying, 168 password recovery support, 158 password reset, 168 password reset request e-mail, 168 root user support, 157 user add/modify form, 168 user administration application, 168–190 User class, 158–167 user interface templates, 168 user password application, 190–194 user password support, 158 chapter files, CD, 753 char variable, 49 checkInput() method, 169 checkPassword() method, 190, 197 checkRequiredFields() function, 112 child servers, Apache 2.0 directives, 794 chmod command, 821 chown command, 822 class.Authentication.php script, 124–126 class.DBI.php script, 70–74 class.Debugger.php script, 85–87 class.Errorhandler.php script, 81–83 classes abstract PHP application, 91–108 AccessControl, 444–446 ACL, 665–666 ActivityAnalyzer, 213–217 authentication, 124–126 Campaign, 521 Category, 251–255, 298 class.PHPApplication.php, 70 Contact, 302–307 DataCleanup, 666–667 DataValidator, 667–669 Doc, 255–258 e-campaign system, 516–523 e-mail survey system, 479–484 error handler, 81–84 Event, 337–343 Form, 436–441 FormData, 672–674 FormSubmission, 669–672 Internet Resource Manager system, 362–368 intranet contact manager, 297–307 intranet document publisher, 250–259 IntranetUser, 217–218 IrmResource, 364–368 List, 516–518 loading, 115 Message, 207–213, 368, 442–444, 519–520 naming conventions, 41–43 online help system, 404–415 Report, 522–523 Survey, 479–480 SurveyForm, 482–483 SurveyList, 480–482 SurveyReport, 484 SurveyResponse, 483–484 tell-a-friend system, 435–446 Template, 9 Unsubscription Track, 522 URL, 518–519 URL Track, 521–522 User, 158–167 validation, 36 Validator, 36 Vote, 699–701 Web forms manager, 664–674 838 Index 549669 Index.qxd 4/4/03 2:42 PM Page 838 class.PHPApplication.php class, 70 class.PHPApplication.php method, 108–111 class.PHPApplication.php script, 91–108 class.sampleApp.php script, 116, 118–119 class.User.php script, 161–167 cleanup, versus validation, 35 cleanupData() method, 671 cleanup_lower() method, 667 cleanup_ltrim() method, 667 cleanup_none() method, 666 cleanup_rtrim() method, 667 cleanup_trim() method, 667 cleanup_ucwords() method, 666 cmd_options.php script, 564–566 colors, debug information display, 87 combo lists, user interface, 55–58 command-line interpreter arguments, 563–568 bang line, 561 output display, 560–561 path, 560 standard input reading, 562–563 command-line PHP utilities command-line interpreter, 560–568 CPU load monitor, 595–605 geo location finder tool, 583–587 hard disk usage monitor, 587–595 reminder tool, 569–583 commands chmod, 821 chown, 822 cp, 822–823 find, 823–824 grep, 823 head, 824 Linux file/directory, 821–831 ln, 824–825 locate, 825 ls, 825–826 mkdir, 826 mv, 826 passwd, 28–29 pwd, 827 rm, 827–828 sort, 828–829 stat, 829 strings, 829 tail, 830 touch, 830 uniq, 830–831 comma-separated value (CSV) files, e-mail survey system, 474 comments, design/implementation documents, 59 compiling Apache 2.0, 784 Apache support tools, 784–785 compression, PHP application output, 725–726 compress.php script, 726 computeCheckSum() method, 545, 546–547 Concurrent Version System (CVS), application development, 61–62 configuring, phpMyAdmin, 771–772 confirmMessage() method, 227 connect() method, 76 connections, database, 76 Console_Getopt::getopt() function, 567, 635 constants DEBUG, 39 DEFAULT_ACCOUNT_TYPE, 614 DEFAULT_SYMLINK_USER_TO_WEBSITE, 614 DEFAULT_TEMPLATE, 642–643 error_reporting directive, 816 global, 13–14 LANGUAGE, 20–21 NAMED_CONF, 642 $TEMPLATE_DIR, 614 USER_REMINDER_DIR, 570 ZONE_DIR, 642 ZONE_TEMPLATE_DIR, 642 Index 839 549669 Index.qxd 4/4/03 2:42 PM Page 839 constructor methods AccessControl(), 444 ACL(), 665 Category(), 251 DataCleanup(), 666 DataValidator(), 667 Doc(), 255–256 EcampaignList(), 516 EcampaignMessage(), 519–520 EcampaignReport(), 522 EcampaignTrack(), 522 EcampaignUnsub(), 522 EcampaignURL(), 518–519 Form(), 436 FormData(), 672 FormSubmission(), 669 Help(), 405 IrmCategory() class, 362–363 IrmResource(), 364–365 Message(), 442 Response(), 259 SURVEY(), 479 SURVEYFORM(), 482 SURVEYLIST(), 481 SURVEYREPORT(), 484 SURVEYRESPONSE(), 483 User(), 158 Vote(), 699 contact category manager application, intranet contact manager, 313–317 Contact class, 302–307 contact manager application, intranet contact manager, 317–323 Contact() method, 302 contents Apache virtual host configuration, 617–618 caching, 727–734 jpcache, 727–729 convert() method, 236 cp command, 822–823 CPU load monitor alert conditions, 596–597 configuration file, 596–597 e-mail template, 604 functions, 603–604 installation, 605 createCampaign() method, 539 createSurveyDriver() method, 485 createSymLink() function, 636 cron daemon, Linux/UNIX systems, 569 crypt() function, 169 CSV (comma-separated value) files, e-mail survey system, 474 CSV data exporter application, Web forms manager, 682–683 customizable messages, PHP applications, 4, 14–21 CustomLog directive, 802 CVS (Concurrent Version System), application development, 61–62 D daemons, cron, 569 daily logbook manager application, intranet system, 236 data exporting from database, phpMyAdmin, 778–780 inserting into database, phpMyAdmin, 775–776 querying from database, MySQL, 768–770 querying from database, phpMyAdmin, 777–778 removing from database, MySQL, 770 removing from database, phpMyAdmin, 778 updating in database, MySQL, 770 uploading in database, phpMyAdmin, 778 data entry error dialog box, Web forms manager, 691 data fields, e-campaign system, 515–516 data input, combo lists, 55–58 database abstraction, class.DBI.php script, 70–74 840 Index 549669 Index.qxd 4/4/03 2:42 PM Page 840 . Page 838 class.PHPApplication .php class, 70 class.PHPApplication .php method, 108–111 class.PHPApplication .php script, 91–108 class.sampleApp .php script, 116, 118–119 class.User .php script, 161–167 cleanup,. command, 822 class.Authentication .php script, 124–126 class.DBI .php script, 70–74 class.Debugger .php script, 85–87 class.Errorhandler .php script, 81–83 classes abstract PHP application, 91–108 AccessControl,. 69 C cache APC (Alternative PHP Opcode Cache), 735 jpcache, 727–729 opcode techniques, 734–736 PEAR, 729–734 PHP applications, 727–736 PHPA (PHP Accelerator), 735–736 Zend tools, 736 calc .php script, 14–17 calc2.errors