Where’s php.ini?
I had a heck of a time hunting down the location of php.ini on my Mac. I needed to set the PHP error reporting setting to ‘true’ for my local installation. Though I much prefer the file system organization of the Mac to Windows, I don’t know it nearly as well. After some digging, I finally found the file. On top of locating it, I had to set the permissions so that I could make the necessary change to the file. Here are the steps:
1) Find PHP5. It’s a pain in the axe. It’s located at /usr/local/php5/lib.
2) Access the parent folder in the finder by typing “/usr/local/php5″ in the dialog at “Go->Go to folder…” menu item.
3) Right click on “lib” and choose “Get Info”.
4) Under “Ownership and Permission”, click on the lock icon.
5) Change the permission so that you now have permission to write to the file. You’ll have to put in your admin password a cupla times.
6) Navigate to the “lib” menu now and find the “php.ini” file. Double click on it and choose “TextEdit” as the application of choice (make it the default app too).
7) Make the necessary changes and…done.
PHP and MySQL on the Mac
I now am needing to learn more about PHP, MySQL, WordPress, and so on. As you may know, this site you’re now reading runs on WordPress software, which, for the most part, I’ve been happy with. But, if I want to add my own customizations or just play around with different ideas to try out on WordPress, running a test site online is not so practical (especially with the pitiful speed of my internet here in China). So, I looked into running WordPress locally on my Mac. I had to hunt down four things to install and configure: Apache, PHP, MySQL, and WordPress. I spent four to five hours downloading, installing, and troubleshooting. In the end, it wasn’t so hard, but pulling all the info together from various websites was quite time consuming. So, I spent 20 minutes this morning culling the important information and distilled how I did it into a five-page document.
You can download the pdf file here.
It sure is nice having this set up locally. It’s incredibly fast (obviously) and as easy as editing and saving files in a basic text editor.
1 comment