Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 20 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
20
Dung lượng
494,17 KB
Nội dung
APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS 224 the installation instructions of Apache within the appendix, place the file within the APACHE_HOME/htdocs location. Load the .php file using a browser by loading the URL http://localhost/info.php to view the PHP settings your current installed PHP installation is using. You will see an HTML page with the information shown in Figure A–20. Figure A–20. PHP info page Scroll down the page, and review the different configuration settings and modules your current PHP installation is using. You can find a list of modules installed and server settings, as well as the location to the php.ini file loaded within this page. Installing PECL PECL is a PHP extension repository containing some of the best PHP extensions available for PHP developers. They range from encryption to XML parsing, with the complete list of extensions located on its official web site, http://pecl.php.net. The majority of the extensions outlined in this book can be quickly and effortlessly installed using PECL and its command-line tool. Here, we will install PECL on Windows by initially installing PEAR, a package repository for PHP. The initial step to installing PECL is to install PEAR. PEAR, as mentioned before, is a package repository for PHP. To begin installing PEAR, you are required to have PHP installed on your system. By now you should have PHP installed in your PHP_HOME directory. Open a command-line window by typing cmd into the Start->Run… window. Once the window is open, navigate into the directory where you have PHP installed, and type in php go-pear.bat. This will install PEAR as well as PECL for you. If there were no errors during APPENDIX A ■ INSTALLING APACHE, MYSQL, PHP, AND PECL ON WINDOWS 225 installation, PECL should now be installed. To verify the installation, type pecl into the command-line window. You should see the help menu, as shown in Figure A–21. Figure A–21. PECL help menu [...]... as, 101 102 web server choice and, 133 PHP layer, 2 PHP life cycle, 84–86 php. ini file APC settings, 88 eAccelerator settings for Unix, 101 for Windows, 103 modifying for FastCGI, 160 turning on FastCGI within, 150 phpinfo script, 87, 223–224 physical load-balancing appliances, 177 placement of JavaScript, 43–46 popularity of web servers, 133–134 Prefork MPM (Apache web server), 141, 170–171 prefork web. .. using require function, 60 optimized code-consolidating function logic, 79 page counter using APC caching for, 120 using Memcached for, 126 PHP code example, 75 php. ini APC settings, 88 php. ini eA settings for Unix, 101 for Windows, 103 PHP. ini properties, 75 phpinfo script, 87, 223 ■ INDEX Siege URL format structure, 19 urls.txt file, 19 static object serving with AllowOverride directive disabled, 172... also rendering performance; scaling beyond single server memory footprint, 168–170 monitoring applications and, 187–188 optimizing processes in Apache, 170–175 overview, 165–166 real-time access log file analyzer, 166–168 performance tabs (Firebug) Console tab, 30 ■ INDEX Net tab, 32–33 overview of, 28–29 performance- measuring tools See Firebug; Page Speed; YSlow PHP, installing, 222–223 PHP extensions... of web servers, 20 Grade tab (YSlow), 37 GWS web server, usage figures for, 133–134 ■H hardware for web servers, 136 HostnameLookup key, 174 htaccess files, 172 HTTP request/response lifecycle, 3–4 httpd See Apache web server ■I IIS web server, usage figures for, 133–134 image compression, 49–52 image optimization rules (YSlow), 34 InnoDB engine memory usage by, 194–195 pros and cons of, 192–193 tuning, ... 69–71 Opcode caching admin tool (Alternative PHP Cache), 93–95 Alternative PHP Cache, 86–92 eAccelerator, 99 107 overview of, 83–84 PHP life cycle and, 85–86 tools for, 86 240 XCache, 95–99 Opera browser, 42 operating parameters and storage engines, 194 optimization tools, JavaScript for minification, 46–47 for optimization, 42–43 for placement, 43–46 optimizing processes in Apache, 170–175 optimizing responses,... running JavaScript profiler (Firebug) on, 30–31 web servers Apache HTTPD command-line arguments, 138–139 configuration tweaks, 172–176 description of, 137 download links, 210 features of, 132, 144 getting PHP5 and Apache to talk, 223 Installation Wizard, 210 214 installing, 138, 209–215 Monitor icon, 215 multi-processing modules, 140–143 Prefork MPM, 170–171 Project home page, 210 testing Nginx against,... by web servers, 134–136 request/response lifecycle, 3–4 require function vs require_once function, 58–60 resource requests, reducing, 49 response size and benchmarking, 21–22 responses Apache Benchmark, interpreting, 10 importance of optimizing, 27 optimizing with Firebug, 28–33 results for Apache Benchmark connection information, 9 10 overview of, 7 script information, 9 server information, 8 for. .. Download Installer login window (MySQL), 217 download performance, 27 Downloads home page (MySQL), 216 download time, and average length waiting, 27 235 ■ INDEX dynamic Apache modules, adding and removing, 142–143 ■E eAccelerator (eA) description of, 99 installing on Unix, 99 102 on Windows, 103 104 settings, 104 107 encapsulation, 67–68 engineer knowledge and web server choice, 133 engines, Zend, 84–86 See... setting tweaks, 152–153 usage figures for, 133–134 Nginx benchmarking PHP content, 162–163 description of, 153 features of, 133 installing on FastCGI PHP, 160–161 installing on Unix, 153–157 243 ■ INDEX installing on Windows, 157–158 as static web server, 158–159 usage figures for, 133–134 overview of, 131 performance of memory footprint and, 168–170 monitoring applications and, 187–188 overview, 165–166... 170–171 prefork web servers, 137 process-based web servers, 153 Processing Config window (MySQL), 222 ■Q queries, problem analyzing, 204–205 finding, 203–204 ■R readfile() method, fetching data from files using, 64–67 reads in applications, and storage engines, 193 Ready to Install window (MySQL), 218 real-time access log file analyzer See ApacheTop redirection, 33 rendering performance Page Speed and, 39–41 . using APC caching for, 120 using Memcached for, 126 PHP code example, 75 php. ini APC settings, 88 php. ini eA settings for Unix, 101 for Windows, 103 PHP. ini properties, 75 phpinfo script,. 28–29 performance- measuring tools. See Firebug; Page Speed; YSlow PHP, installing, 222–223 PHP extensions installing eAccelerator as, 101 102 web server choice and, 133 PHP layer, 2 PHP. popularity of web servers, 133–134 Prefork MPM (Apache web server), 141, 170–171 prefork web servers, 137 process-based web servers, 153 Processing Config window (MySQL), 222 ■ Q queries, problem