Danh mục

Giải pháp thiết kế web động với PHP - p 5

Số trang: 10      Loại file: pdf      Dung lượng: 504.63 KB      Lượt xem: 11      Lượt tải: 0    
tailieu_vip

Hỗ trợ phí lưu trữ khi tải xuống: 2,000 VND Tải xuống file đầy đủ (10 trang) 0

Báo xấu

Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

GETTING READY TO WORK WITH PHPFigure 2-7. Changing the Apache and MySQL ports 4. Click Set to default Apache and MySQL ports, as shown in Figure 2-7. The numbers change to the standard ports: 80 for Apache and 3306 for MySQL. Click OK, and enter your Mac password when prompted. MAMP restarts both servers.5.If any other program is using port 80, Apache wont restart. If you cant find whats preventing Apache from using port 80, open the MAMP preference panel, and click Reset MAMP ports.6.When both lights are green again, click Open start page in the MAMP Control Panel. This...
Nội dung trích xuất từ tài liệu:
Giải pháp thiết kế web động với PHP - p 5 GETTING READY TO WORK WITH PHP Figure 2-7. Changing the Apache and MySQL ports 4. Click Set to default Apache and MySQL ports, as shown in Figure 2-7. The numbers change to the standard ports: 80 for Apache and 3306 for MySQL. 5. Click OK, and enter your Mac password when prompted. MAMP restarts both servers. If any other program is using port 80, Apache wont restart. If you cant find whats preventing Apache from using port 80, open the MAMP preference panel, and click Reset MAMP ports. 6. When both lights are green again, click Open start page in the MAMP Control Panel. This reloads the MAMP welcome page into your browser. This time, the URL is likely to have :80 after localhost. Because port 80 is the default, the addition of :80 is unnecessary, so it doesnt matter if its missing. The only time you need the colon followed by a number is if you use nonstandard ports. If you were expecting to have to do more, that s all there is to it. The Windows section was longer because of the different options for XAMPP and IIS. If you run into difficulties, the best place to look for help is in the MAMP forum (http://forum.mamp.info/index.php?c=1).Checking your PHP settings (Windows and Mac) After installing PHP, it s a good idea to inspect how it has been configured. In addition to the core features, PHP has a large number of optional extensions. Which ones have been installed depends on the package you chose. XAMPP, MAMP, and the Microsoft Web PI install all the extensions that you need for this book. However, some of the basic configuration settings might be slightly different. To avoid unexpected problems, adjust your PHP configuration to match the settings recommended in the following pages. 21 CHAPTER 2 1. Make sure that Apache or IIS is running on your local computer. 2. If you installed XAMPP or MAMP, click the phpinfo link in the XAMPP or MAMP welcome page. In XAMPP, it s in the menu on the left of the screen. In MAMP, it s in the menu at the top of the browser window. Skip to step 6. If you installed PHP in IIS, continue with step 3. 3. Open Notepad or a script editor, and type the following script: There should be nothing else in the file. 4. Save the file as phpinfo.php in C:inetpubwwwroot. 5. Type http://localhost/phpinfo.php in your browser address bar, and press Enter. You should see a page similar to Figure 2-8 displaying the version of PHP running in your local testing environment followed by extensive details of your PHP configuration.Download from Wow! eBook Figure 2-8. Running the phpinfo() command displays full details of your PHP configuration. 6. Make a note of the value of Loaded Configuration File. This tells you where to find php.ini, the text file that you need to edit to change most settings in PHP. 7. Scroll down to the section labeled Core (in PHP 5.2, it s called PHP Core), and compare the settings with those recommended in Table 2-1. Make a note of any differences, so you can change them as described later in this chapter. 22 GETTING READY TO WORK WITH PHPTable 2-1. Recommended PHP configuration settingsDirective Local value Remarksdisplay_errors On Essential for debugging mistakes in your scripts. If set to Off, some errors result in a completely blank screen, leaving you clueless as to t ...

Tài liệu được xem nhiều: