I ended up running into a problem with the requirements that Magento Enterprise Edition had on my development machine. It required mhash, and it wasn’t built into MAMP Pro. The company behind MAMP hasn’t released a new version for about a year now, so it appears they aren’t developing it anymore. I did a little digging, and everything I found involved recompiling PHP, and I really didn’t want to mess with that, so I looked into some other packages that would already have it included. It looks like XAMP and ZendServer were my best options, and I decided to go with ZendServer and see how it worked since I had heard of Magento running on ZendServer, and since I’m using Zend Studio for my IDE, I figured why not.
The beauty of using MAMP Pro was that it had a simple GUI interface that allowed me to quickly add new sites for development, restart the services, and since it ran as an application it was simple to only have running when I needed it so it wasn’t taking up additional resources on my system at other times. Basically MAMP Pro saved me a lot of time when it came to setting up a new site as I just typed in a domain name, and browsed for where I wanted the web root path, then hit a button and restarted it all.
The install of ZendServer went pretty smooth, but once it was installed I found a lot of configuration issues that I needed to change in order to use ZendServer the way I was using MAMP Pro for simple and quick development sites running locally. After searching all over the place trying to find an answer for one thing, and then researching another I decided to document everything I went through and posted it up on the Zend Forum. (Magento EE Dev Environment Setup)
Login to ZendServer admin and set password
Login to phpmyadmin and set root password
change username and group in /usr/local/zend/apache2/conf/httpd.conf
- CODE:
User myusername
Group mygroupname
I know I had MAMP Pro setup to run under my username, and I think this had to do with permissions when I go and modify all the files it made it easier to work with if everything was running under the same username. I imagine there are some security implications to this, but since my local network is firewalled, and I don’t leave ZendServer running when I’m out of the office, I don’t think I’m at much risk here.
uncomment virtual hosts include in /usr/local/zend/apache2/conf/httpd.conf
- CODE:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
I wanted to be able to run multiple sites from my system using virtual hosts like I have in MAMP Pro
change port and virtual hosts in /usr/local/zend/apache2/conf/extra/
- CODE:
NameVirtualHost *:80<VirtualHost *:80>
DocumentRoot "/Users/myusername/Sites/mage1"
ServerName mage1.local<Directory "/Users/myusername/Sites/mage1">
Options Includes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>ErrorLog "logs/mage1.local-error_log"
CustomLog "logs/mage1.local-access_log" common
</VirtualHost><VirtualHost *:80>
ServerName mage2.local
DocumentRoot "/Users/myusername/Sites/dhstyles"<Directory "/Users/myusername/Sites/dhstyles">
Options Includes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>ErrorLog "logs/mage2.local-error_log"
CustomLog "logs/mage2.local-access_log" common
</VirtualHost>
The directory references were in my MAMP Pro configuration so I copied them over into here. I also set the directory path to be in the user space so it’s easier to manage my site’s code with Zend Studio and other applications.
comment the skip-networking in /usr/local/zend/mysql/data/my.cnf
- CODE:
#skip-networking
For some reason network connectivity is disabled by default, and you have to uncomment this line in order to enable it again. This will allow Magento and other database tools such as Navicat to connect to the MySQL installation.
edit /etc/hosts file for DNS resolution
- CODE:
127.0.0.1 mage1.local
127.0.0.1 mage2.local
Adding entries to the hosts file will allow you to do DNS resolution in the browser and allow the named virtual hosts to work properly.
restart
- CODE:
zendctl.sh restart