10 August 2012

Why MAMP is Better Than XAMPP?

Just thought I would post a very quick little point for those working with a local server on a Mac. It's pretty easy to set up the built in server on the Mac and do it that way, but personally I prefer just using a pre-packaged solution.

For years I've been using XAMPP. Not sure why I thought it was better. On Windows it's definitely a great choice. But on OS X it's not. The trouble is XAMPP has not been updated in quite a while on the Mac side. So, you'll be using pretty old versions of PHP and MYSQL. Also, there are lots of glitches with it. For instance, it doesn't correctly set folder and file permissions. You have to set these manually, which is pretty ridiculous.

Anyhow, I just recently switched to MAMP and it's much smoother. Everything is up to date, xdebug worked pretty much out of the box. No trouble with file permissions, and stuff is a lot more current. So, for now, avoid XAMPP on the Mac until they start supporting it properly. MAMP is good. XAMPP not so much.

13 July 2012

php.ini file include_path isn't showing new path

Just a very quick post that might help somebody stuck in the hell of having php.ini not recording your changes to the include_path. Here's some things to check.

1) shut off apache to edit the file.
2) make sure you have permission to edit the file. you might have to change permissions. check to see if you're writing to the file by checking the time the file was last updated.
3) if you've installed pear check to see if pear didn't add something to the php.ini file near the bottom. it's basically another include_path configuration. since there can only be one it will override the one at the top of the file. simply add your changes to the one configuration are and you should be good to go.
4) another thing to check is whether you can write to the file in another configuration option. just throw something down and restart apache and check it. if you can write to the file but just not see include_path then you have another include_path somewhere in the file that's overriding your settings.
5) the other obvious thing is to check to make sure the php.ini file is the one that's being loaded. do this by looking in the phpinfo() file. you can add this to a php file and run it in htdocs or wherever your root is, or in the case of xampp just run localhost and find the phpinfor() on the left bar.

hope this helps.

24 March 2012

Cheapest, most minimal, and best iPad case

My tip is simple. Go to the hardware store and ask for the small felt pads that are used on the inside of cupboard doors. They are very tough, have great adhesion and they will allow you to put the iPad down on most surfaces without worrying about scratching your baby. The bonus is that you can still have a naked iPad. If you're like me, I just slide mine into a laptop compartment of my knapsack when I go out with it.

06 March 2012

Best Way To Implement Basic Version Control While Keeping Important Files In Sync Between Computers

If you're like me and you are using many computers, and even different operating systems, then you will want to know how to keep your important files in sync and safely backed up to the cloud with version control. You can do this all completely free! My basic method is to use Dropbox and Sugarsync to do this, but I will also show you how to use a free cross platform program called Synkron to sync your important files to a USB key for times when you don't have an internet connection.

05 March 2012

How to Configure PHPStorm to Open Php Files in Your Browser in Localhost

How do you get PHPStorm to show your PHP files in your browser by clicking on the little browser icons in the right part of the window or right clicking and opening in your browser. PHPStorm doesn't just do this automatically. You have to configure it, and the configuration is entirely obvious. Here's what you have to do.

I'm assuming you have XAMPP or its equivalent installed and running on your machine. I'm also assuming you dumped your php files in the htdocs directory of XAMPP and that you can view your files in your browser just by typing the address using localhost/yourfile.php. And now you want to be able to open your files from within PHPStorm.

28 January 2012

Cross Platform PHP Development With Or Without An IDE

PHPstorm 3.x
I have a confession. I love a good text editor. At the moment I'm on two platforms: Windows 7 and OS X Lion. I would prefer to use a cross platform solution for web development. That makes most sense. I also love Textmate. But recently I've been flirting with Sublime Text 2, which takes a lot of inspiration from Textmate. But it's cross platform, and pretty awesome.

I'm into PHP development and I've gotten to the point where I need a development tool that can handle proper PHP debugging. I've spent a couple of days reading things on the net and trying various solutions. So far I've checked out Netbeans 7.1, PHPstorm 3.0, Komodo Edit, and Eclipse PTD. I've played with some of these before, but never for a sustained time. All of these IDE's are butt ugly in my opinion. I guess I'm picky. I know, you can get used to ugly coding environments with time. I used to love Windows XP at one time, after all. I'm not going to go into too many details here, but I found that Netbeans 7.1 and Komodo were better than Eclipse. But I think of the IDE's out there for PHP it's hard to beat PHPstorm 3.x. It reminds me of visual studio in a lot of ways, except snappier.