PHP, MySQL....

Started by sukishan, Aug 22, 2009, 07:17 PM

Previous topic - Next topic

sukishan

PHP
As you can see from these first two sections on Apache and Perl, not much is different on OS X, other than a few file locations. It's the same scenario with PHP. You can either install PHP from source, download it from php.net, or you can use a binary install packaged designed especially for OS X.

Apple had noted on the Apple Developer Connection Website that, previous to PHP version 4.3, installing from source could be a little tricky; however, PHP has resolved these issues with the latest release. For those that do prefer the convenience of installing PHP from a binary (.pkg file), Marc Liyanage has a Website that provides a binary of the latest release, which is compatible with both OS 10.2 and the new Panther, 10.3. This can be downloaded here. You will find that the binary offers the convenience of built-in support for numerous configurations, including MySQL (and PostgreSQL), PDF and XML.

MySQL
Getting MySQL onto your system is just as easy! MySQL provides a binary package installer for OS X that can be found here. Just be sure to select the download from the list of Mac OS X Package Installer downloads.

Once it's installed, you can manage MySQL from the Terminal utility with traditional mysql command line actions, or via an add-on tool from third parties. This author uses Webmin (free from webmin.com), which offers browser-based control over not just MySQL, but Apache, Sendmail, and Perl modules, too.

Dynamic Web Serving Ready to Go
As you've seen, getting your Web server up and running is quick and easy on OS X, including the ability to test your scripts and even entire Web applications locally. Below, I've included some closing notes on leveraging Python and CVS on your OS X system.

Installing Python on OS X

Python 2.2 is included in the BSD subsystem of OS X; however, many new open-source applications are using a newer build of Python. There is a MacPython build with special OS X features available here.

Using CVS and OS X

One final reference note for those developers who may be using CVS for source control: OS X has native support for CVS in both single user and multi-user environments. There is an excellent article on using CVS for Web development on the Apple Website. Using CVS does entail some 'under the hood' use of OS X via the included Terminal utility for command line operations.
A good beginning makes a good ending

jac46

MySQL is currently the most popular open source database server in existence. MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. It is named after after developer Michael Widenius' daughter, My. The SQL phrase stands for Structured Query Language

PHP is a general-purpose scripting language originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document.