Local domains in MAMP PRO – Windows NT 圆4 Select it and restart the application completely.Īfter restarting, PHP versions should appear in the drop-down list next to the domain names. The option we are looking for is CGI Mode. MAMP Pro 4 languages – Windows NT 圆4Ĭhoose the default version according to your preferences, it can even be the newest one. To change the version for individual projects, in the MAMP application, expand the Languages tab, and then PHP. New PHP directory in MAMP application – Windows NT 圆4 Version selection in MAMP For a standard folder on the C: / drive, the path should look something like this: PHP For Windows: Binaries and sources Releases – Īfter downloading, put the contents of the archive into the newly created directory. The latest stable version is available for download at: May be in single digit format like 8.0.8, but 7.6.21 will also be conceit correctly.Īdding a period, comma or suffix like -alpha will prevent the folder from being interpreted correctly. New folder, keeping the phpX.X.X format, where X.X.X is a unique version of the edition we are adding. Unlike previous MAMP releases, there is no need to mess around with Apache configuration files to add / remove new PHP versions.Īll you have to do is add in the directory:: Unfortunately, creators of MAMP rarely update their software for systems from Microsoft, so using new editions requires a little creativity from us. (Note that sudo may again prompt you for the superuser password.)Īfter I made these changes, I just clicked refresh on my browser, and Kohana also began working with MySQL.Creating applications on the latest PHP versions may be necessary for a backend programmer’s work. I couldn't figure out where Kohana gets this location from, so to solve this problem, I created a hard link from this location (where Kohana expected to find the socket) to the real socket, following these steps from within the Terminal: Well, I thought I was finished, but then I learned that the Kohana framework does something else to connect to MySQL, and specifically looks for the MySQL socket as /var/mysql/mysql.sock. There are other ways to do this, but this is an easy one to remember.) Problem #2: Kohana, MySQL, and Mac OS X (Note that on a Mac you can restart Apache by clicking the Apple menu item, then System Preferences., then the Sharing folder, then turn off Web Sharing, and then turn it back on again. fault_socket = /private/tmp/mysql.sockĪfter making these changes I restarted Apache, and hit my initial web page, and saw that my initial PHP problem was fixed, and I thought I was done. You need to find the variable named fault_socket, and set it to point to the location of the MySQL socket on Mac OS X (in my case, Mac OS X 10.5). Hopefully you already know that - it's the same password you're prompted for when you install some applications on your system, like iWork or iLife. (If you haven't used the sudo command before, this command means "superuser do", or more accurately, "Issue the following command as if you were the superuser".)Īlso note that when you issue this command you'll be prompted for the superuser password. Note that you have to use the sudo command to perform this copy action, as the /etc directory is owned by the superuser. Here are the steps I followed to fix this problem: Fortunately there's already a file on Mac OS X you can copy from, so the solution is pretty easy. If you've already created this file for some other reason, you can simple edit it, but in my case I first had to create it. The solution here is to tell PHP where the socket file is located, and you do this by editing the /etc/php.ini file. The way the Mac works, the /tmp directory is actually a symbolic link to /private/tmp, so I thought this might work, but it doesn't. The first problem is that vanilla PHP is looking for the MySQL communication socket as /tmp/mysql.sock, but on my Mac (Mac OS X 10.5) the socket is really located at /private/tmp/mysql.sock. This post tells the story of how I got PHP, MySQL, and Mac OS X to work with each other, and also chronicles the changes needed to make the PHP framework Kohana also work with MySQL on Mac OS X. The problems I had were that PHP - and one of the PHP modules - were configured to look for the mysql.sock socket/file on my Mac in different places. Yesterday I was looking at a PHP application named Gallery that I wanted to use on one of my other blogs, and in the process of testing it out on my Mac I ran into some problems related to PHP, MySQL, and Mac OS X. Update: If you're interested in using PHP and MySQL on Mac OS X, these days I recommend skipping this article and using MAMP, which I describe in my Mac OS X MAMP tutorial.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |