The PHP page needs to be processed by the WEB server. Therefore, to use PHP for development in Dreamweaver, you need access to a PHP-enabled WEB server and MySQL database. PhpMyAdmin is also very useful, it is MySQL graphics interface. These three components are open source software that you can use to develop, test, and deploy WEB applications. And it's all free.
The Apache Web server and PHP are all preinstalled in Mac OS x. However, they are not enabled by default. Also, a preinstalled version of PHP lacks many useful features, and you need to install and configure MySQL separately. Unless you can easily use the command line in Terminal, it's much easier to install the integrated solution MAMP.
This section describes how to install MAMP on your Mac. Apache Web Server, MySQL, and phpMyAdmin will be installed through an operation.
Tools/Materials
Steps
- 1
Open System Preferences, select Share
Make sure Internet sharing is turned off.
You can continue as long as MySQL is never installed in the system.
- 2
Download the latest version of MAMP.
Install after download is complete.
Open "Applications" and locate the "MAMP" folder,
Double-click Open folder to open "MAMP" program
Pop-up Warning window,
Select "Launch MAMP"
The browser launches and displays a welcome page,
You will find that the URLs in the browser address bar begin with "http://localhost:8888".
": 8888" string after "localhost"
Indicates that the WEB server listens for requests through non-standard port 8888.
Open the MAMP Control Panel and click on "Star Servers"
The green light next to Apache server and MySQL server indicates that both servers are running.
Click Preferences and select Ports from the top of the panel that opens.
The panel shows Apache and MySQL running on ports 8888 and 8889, respectively.
Click Set Web & MySQL Ports to & 3306.
The number is changed to the standard port: Apache is 80,mysql for 3306.
This makes it easier for you to develop with Dreamweaver.
Click "OK" and follow the prompts to type your Mac password.
MAMP will stop and restart both servers.
When the two lights turn green again, click Open Start page.
At this point, the MAMP Welcome page is re-loaded into the browser.
This time, the URL "localhost" has no ": 8888", there is no ": 80"
Because port 80 is the default value, adding ": 80" is not necessary, so it's okay not to add it.
When using a non-standard port, simply use a colon followed by a number.
Click the "Phpinfo" link in the MAMP menu.
You will see a page that shows the PHP configuration information:
At this point, you have successfully installed PHP, MySQL, and PhpMyAdmin.
END
Precautions
- Note: Step 9 is the most likely place to go wrong. If there are any other programs that are using port 80,apache, you will not be able to restart. If so, make sure that the share in step 1 is turned off. Another possibility is that Skype is using port 80. You can change the port in the "Advanced" section of "Skype Preferences"-try to use 42815 as an incoming port.
Install and set up a PHP development environment with MAMP for MAC OS X