4 Replies Latest reply: Apr 23, 2013 2:22 PM by Dave_E_P
Dave_E_P Level 1 Level 1 (30 points)

I've just been asked t set up a new production server using 10.6.8 server.


I've got a clean install of 10.6 Server with the software update completed to 10.6.8.


I have DNS, Open Directory, AFP, SMB & Web services running.


In the web server I have enabled the PHP module *and* checked that this has been uncommented in the httpd.conf file and restarted everything (even tried rebooting) but PHP is still not running.  


What else do I need to do to get PHP running on a clean install?


What (if anything) will I need to do to get MySQL running and talking to PHP?


This is the first time I've had to bring up a production web server using OSX server so sorry if these questions are a little lame. 


We're using MAMP on the development server, but this is for production.

  • 1. Re: PHP / MySQL on Clean Install
    MrHoffman Level 6 Level 6 (12,455 points)

    Assuming php5_module is eanbled in the module list, you'll need to get php.ini created and configured for local requirements from the /etc/php.ini.default default using nano or vim or such, and you need to enable CGI execution for the particular web site in the options tab and add (usually) index.php or such into the list of files in the default list in the general tab of the web site.  You might want server side includes and you probably do not want WebDAV and folder listings.


    Quick write-ups I did a while back here is how to enable php on OS X Server and FWIW, here is how to enable php on OS X client.  The latter has some more details on working with the php.ini file.


    And FWIW and solely to confirm your DNS services are correct — mentioned only because DNS is fundamental to the whole configuration of OS X Server, and getting DNS wrong tends to cause cascading failures in other services and difficulties — launch Terminal.app and issue the following non-distructive diagnostic command:


    sudo changeip -checkhostname


    After some chatter about the local host, that'll then (usually) tell you if DNS is correct or if it needs changes.

  • 2. Re: PHP / MySQL on Clean Install
    Dave_E_P Level 1 Level 1 (30 points)

    Thanks for the reply.  I really appreciate it.  The php.ini file was already there and it seems everything was right all along because some how it all ust started working without me making any more changes.


    MySQL is enabled and I've downloaded myPHPAdmin and installed.  Now I'm confused again because I get the login screen (myPHPAdmin) enter 'root' and the MySQL password and all I get is a blank screen.  There's code in the source but nothing showing on the screen, so I guess at least I'm on to the next step.


    Thanks again

  • 3. Re: PHP / MySQL on Clean Install
    MrHoffman Level 6 Level 6 (12,455 points)

    I don't use phpmyadmin.  (If you do choose to install and use that tool, do not allow remote access into that tool on your web server.)  For these sorts of tasks, I'll generally use the command line, and the Sequel Pro tool can also work nicely for some of these tasks.   Here is some set-up information for Sequel Pro on OS X Server 10.6.

  • 4. Re: PHP / MySQL on Clean Install
    Dave_E_P Level 1 Level 1 (30 points)

    Just wanted to say THANKS fo rthe help and for pointing me to Sequel Pro.   I agree it's a much better tool and is the one we're now using.