Team One Tickets & Sports Tours
 

HOWTO: The Soothingly Seamless Setup of Apache, SSL, MySQL, and PHP on Snow Leopard Using Mac Ports

We've shown you how to compile all of these individually. Now we are going to provide an easier method that we have had success with.

Getting Started

--First, you need to Install Xcode

You can install Xcode from your Apple OS Install Disk or you can purchase the latest from Apple's website.


--Install MacPorts

Get the latest version fro OS X (DMG file) from the MacPorts website and follow the installer's instructions.


Make sure all of MacPort's data is up to date before installing any ports:

sudo /opt/local/bin/port -v selfupdate

--Update your system paths

Just so I don't have to keep on typing /opt/local/bin all the time i'm going add that directory to my PATH.

cd ~ echo 'export PATH=/opt/local/bin:/opt/local/sbin:$PATH' >> .profile Now you need to stop the local apache process if it's running.
Go to System Preference -> Sharing -> uncheck the Personal Web sharing.


--Install cUrl and SSL

This part took me about 20 minutes

sudo port install curl +ssl

--Install PHP and APACHE

This part took me about 15 minutes

sudo port install php5 +apache2 +pear

Configure Apache to use PHP module

cd /opt/local/apache2/modules
sudo /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so

Create the php.ini (or you could move one to this spot)

cd /opt/local/etc/php5/ sudo cp php.ini-development php.ini

Open php.ini and add your timezone under Module Settings more than halfway down

sudo nano php.ini date.timezone = "America/Phoenix"

Apache http.conf changes

Add "index.php" here:

  <IfModule dir_module>

    DirectoryIndex index.html index.php

  </IfModule>


Throw these in after all the LoadModules calls

  AddType application/x-httpd-php .php .html

  AddType application/x-httpd-php-source .phps


Open htdocs/index.html and add

  <?php phpinfo(); ?>


Start up Apache and make sure things work

sudo port load apache2

Check the site in your browser now.


--Install MySQL

This part took me about 10 minutes

sudo port install mysql5 mysql5-server

Run script so mysql sets up it's dbs

sudo -u _mysql mysql_install_db5

Start up MySQL

sudo port load mysql5

Set MySql's root password

/opt/local/lib/mysql5/bin/mysqladmin -u root password newpasswordhere

Make thigs more secure because we can

sudo /opt/local/lib/mysql5/bin/mysql_secure_installation

Add MySQL to your PATH

cd ~
echo 'export PATH=/opt/local/lib/mysql5/bin:$PATH' >> .profile

To run MySQL at startup then run this command after the port finishes installing

sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist

Add my.cnf or copy one to /opt/local/etc/mysql5/my.cnf


Add this to my.cnf

  [mysqld_safe]

  socket = /tmp/mysql.sock


Also to remain compatible with other programs that may have been coded to look for the socket file in its original location then add this symbolic link:

sudo ln -s /tmp/mysql.sock /opt/local/var/run/mysql5/mysqld.sock

Restart MySql

sudo port unload mysql5
sudo port load mysql5

--Add some more functionality to PHP

sudo port install php5-curl php5-gd php5-iconv php5-imagick php5-imap php5-mbstring php5-mcrypt php5-mysql php5-pcntl php5-posix php5-soap php5-sockets php5-sqlite php5-xmlrpc php5-xsl php5-openssl php5-http php5-xdebug

sudo port install ZendFramework

Add Zend and ZendX components to your include_path within php.ini

  include_path = ".:/opt/local/www/ZendFramework/library:/opt/local/www/ZendFramework/extra/library"



Feedback or Questions?

If you have any feedback or questions go ahead and email them to phponsnowleopard at teamonetickets dot com and we will try to help you out.


Show Me Tickets In:
SHARE THIS PAGE!
Our Customers Say:

I wanted to thank you for the great tickets to the game. Obviously all of my clients were very happy.

L. Berk

Call Us at 1-800-800-9494

Why Shop Team One?

Our Gurantee

Disclaimer

Team One™ Tickets is a privately owned agency that buys and resells tickets on the secondary market. We are not Ticketmaster, LiveNation, StubHub or the official box office nor are we affiliated with any professional sporting organization, performer, or venue. Our ticket prices reflect the cost of obtaining premium seating and are usually sold above "face value".

Newsletter

Enter your email and we'll send you info on upcoming events, schedules, and great DEALS!

Sign up for Deals!
Team One Tickets Newsletter
Subscribe now and receive great deals via email. We will never spam or sell your info and every email will come with an easy unsubscribe link.
Close