![]() If that's the case then you will either have to provide the path mappings for this project (Preferences | Languages & Frameworks | PHP | Servers) or you will have to serve the project from non-symlinked location (e.g. To make utterly sure you are editing the right php.ini file, use the following steps: Create a new. You have to remember that xdebug only works with final/resolved paths while PHP/PhpStorm works with paths as is. In MAMP, each php version has it's own php.ini file. Right now I think that it could be because of symbolic link somewhere in the path (really depends on your setup: where you keep your actual projec and from where Apache serves them). ![]() did you managed to make it work via browser or not?ġ) Full path to the file you are trying to debugĢ) What is the path to that file as seen by MAMP/ApacheĤ) Please provide xdebug log for such unsuccessful debug session: ĥ) Please also provide xdebug section of the phpinfo() output captured via browser Yes - this is a CLI debug - it does not use web server of any kind. PHP Web Application or PHP Built-in Web Server as is suggested in the official tutorials. ![]() (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.And then everything seems to work but it doesn't seem like I am using 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: To point PHP where to find the VPHP module do the following. 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. PHP, and MySQL 64 WEB DEVELOPMENT SOLUTIONS Tweaking PHP. 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. MAMP ports, if you later wish to use the default Apache installed on OS X, as found under the. 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. I am not sure how to change it in MAMP Pro but on the free version you just go to Preferences -> Apache -> Document Root. 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 |