PHP Bible Chapter 3 Getting Started with PHP
PHP Bible Chapter 3 : Getting Started with PHP ________________________________________________________ PHP Bible, 2 nd Edition 1 Wiley and the book authors, 2002
Summary n n n Deciding to outsource or self-host Finding the right ISP Avoiding common hosting pitfalls Installing PHP Choosing a PHP development tool ________________________________________________________ PHP Bible, 2 nd Edition 2 Wiley and the book authors, 2002
Hosting vs. DIY n The ISP option Ø Ø Remote hosting is a popular option since many companies offer PHP-enabled websites ISP may handle hardware, software (& upgrades), Inter. NIC registration, IP addressing, DNS, Mail servers, bandwidth, power (including backup), backups, & security Must play by their rules, may not be configured optimally for your needs, other applications may not be available, may not allow “objectionable” content, may not allow unsolicited mailings (configuration may not allow the website to e-mail some people who visit the site), limited hardware/software configurations, may limit bandwidth, limited disk space. Primary problem: lack of control for QOS ________________________________________________________ PHP Bible, 2 nd Edition 3 Wiley and the book authors, 2002
Hosting vs. DIY n Self-hosting Ø Ø Ø n Collocation (or colocation/colo) Ø n Price of connectivity continues to drop More fun? Greater control of configuration for optimization or adding special features. Many ISPs may not allow you to run a server off your Internet connection You have no-one to blame but yourself if things go wrong Maintain most control of your equipment, but since it’s located at the ISP, you don’t need to worry about power & bandwidth Dedicated server Similar to collocation, except the ISP owns the hardware, you just “rent” it. ________________________________________________________ Ø PHP Bible, 2 nd Edition 4 Wiley and the book authors, 2002
Installing PHP n Prerequisites: Ø Ø Ø n Need a server or workstation with enough RAM Unix or Unix variant (e. g. Linux, x. BSD), Mac OS X, or Windows (not recommended for production) Working, dedicated Internet connection PHP-supported web server (Apache, IIS, Netscape) PHP-supported database server (if necessary) All applications used by PHP must be installed prior to beginning the installation of PHP Go to http: //www. php. net/manual/en/installation. php for specific installation instructions for your OS and web server ________________________________________________________ PHP Bible, 2 nd Edition 5 Wiley and the book authors, 2002
Development tools n n No plush development environment with wizards and drag-anddrop icons and built-in graphics manipulation (don’t use Front. Page for writing PHP). Zend Studio ($195) is a dedicated application development environment for PHP (free version available). Ø Ø Will allow you to run scripts without uploading them to the server and viewing them in your browser. Can step through the code line-by-line to figure out where your errors may exist Homesite ($95) is an HTML editor which provides syntax highlighting for PHP n Emacs (free) is a code editor which may be difficult to learn to use but has many options for different types of code (http: //ftp. gnu. org/gnu/windows/emacs/) n Other editors located at http: //phpeditors. linuxbackup. co. uk/ ________________________________________________________ n PHP Bible, 2 nd Edition 6 Wiley and the book authors, 2002
- Slides: 6