1. Trang chủ
  2. » Công Nghệ Thông Tin

Plug in PHP 100 POWER SOLUTIONS- P12 ppsx

5 265 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 447,27 KB

Nội dung

C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 21 C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 21 Should you need to access it, the Zend Administration Interface is accessible at http:// localhost:10081, or you can always run /Applications/ZendServer. The first time you use it you’ll be asked to create a password and choose whether to opt into receiving the newsletter. Uninstalling Should you encounter any problems, or decide for any other reason to uninstall the program, issue the following commands to totally remove it, along with any files you’ve modified or added to the installation: /usr/local/zend/bin/zendctl.sh stop rm -rf /usr/local/zend Mac OS X 10.3 Older Macs will generally use the Power PC processor and are therefore incompatible with Zend Server CE. Also, even if you have an Intel Mac, it still won’t work with Zend Server CE unless it is running version 10.4 or higher of OS X. An alternative setup is also available, called MAMP, which will do the job for you, as long as you are running OS X 10.3. To install it, enter http://mamp.info/en/downloads/ into your web browser and, on the right-hand side of the screen, select either the Intel or the PowerPC installer. If you are in doubt as to which processor your Mac uses, choose the Universal Binary (see Figure 1-25). FIGURE 1-25 Downloading the MAMP installer 22 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s 22 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s If you have difficulties accessing the mamp.info web site, you may wish to download the installer from the Source Forge web site at http://sourceforge.net/project/showfiles. php?group_id=121134. The latest version (currently 1.7.2) will show by default, but just click the link entitled “mamp” under the “Package” heading to see all previous ones. Next click the 1.4 link to open up the i386, PPC, and Universal installers for version 1.4.1. Once the approximately 110MB download is complete, unarchive the new zip file using Stuffit Expander (or a similar utility) to create a disk image with the file extension .dmg. Double-click the extracted disk image to mount it, and a window will open up in which you must drag and drop the large MAMP icon into the Applications folder alias (see Figure 1-26). You can now double-click the MAMP program within the Applications/MAMP folder to start the servers. Unless you configure your Mac to do this on each startup, you’ll have to run the MAMP each time you intend to use it. Once it starts, wait a moment and the green lights should appear for both the Apache and MySQL servers (see Figure 1-27). Unfortunately, by default, MAMP doesn’t use standard ports, so you must perform a final configuration task before the system is ready to use. To do this, click the Preferences button in the MAMP window, followed by the Ports tab, and then change the Apache port from 8888 to 80, and the MySQL port from 8889 to 3306. To do this, click Set To Default Apache And MySQL Ports, and then click OK (see Figure 1-28). The two servers will then automatically restart and you may be asked for your password. Once you’ve done this, these preferences will stay in place until you change them. FIGURE 1-26 Drag and drop the MAMP icon into the Applications folder alias. C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 23 C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 23 FIGURE 1-27 After running MAMP, both the MySQL and Apache green lights should appear. FIGURE 1-28 You must configure MAMP to use the correct Apache and MySQL ports. 24 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s 24 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s Everything should now be fully installed, which you can verify by entering http:// localhost/MAMP into a web browser to call up the main configuration page (see Figure 1-29). Document Root The document root (the place where you should store your PHP and HTML files to make them accessible to a web browser) is /Applications/MAMP/htdocs/. If you find you cannot edit or save files into it, you will need to modify the folder’s permission settings. By default, there may not be an index.html file in it, so until you put something there, typing http:// localhost into your browser will simply call up a blank “Index of” directory listing, followed by the server description. FIGURE 1-29 MAMP is now installed and fully configured. C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 25 C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 25 Configuring Error Handling in Zend Server CE Before you move onto the plug-ins, to ensure that PHP will report all errors in Zend Server CE, you need to perform a final configuration step by going to one of http://localhost/ ZendServer on Windows, http://localhost/MAMP on a Mac, or http://localhost:10081 on Linux and entering your password, then selecting Server Setup | Directives | Error Handling and Logging and clicking the On check box for display_errors. And Now You’re Set to Go If you have successfully configured either Zend Server CE or MAMP, you’re now ready to start incorporating the plug-ins from this book into PHP programs running on your web development server. Using the advice given in the following chapter, you’ll learn how you can type them in, copy and paste them, download them from the web site at http://pluginphp. com, or simply include them with a PHP statement. . start incorporating the plug- ins from this book into PHP programs running on your web development server. Using the advice given in the following chapter, you’ll learn how you can type them in, . 25 Configuring Error Handling in Zend Server CE Before you move onto the plug- ins, to ensure that PHP will report all errors in Zend Server CE, you need to perform a final configuration step by going. on Windows, http://localhost/MAMP on a Mac, or http://localhost :1008 1 on Linux and entering your password, then selecting Server Setup | Directives | Error Handling and Logging and clicking

Ngày đăng: 07/07/2014, 08:20

TỪ KHÓA LIÊN QUAN