The plan was for me to install it on my laptop this afternoon and then go through a tutorial or two. I already have it running on my office PC (Linux Mint) in a VirtualBox virtual machine, but I prefer to use my laptop for development, since (a) it's faster than my somewhat antiquated office PC and (b) it's portable. Also, I'll be working with one or more of our IT people, who are all slaves to Windows. My laptop dual-boots Windows 7, so I figured I'd use the Win 7 side as my development environment.
As someone (Napoleon?) once said, the first casualty in every battle is the plan. It took me 4.5 hours just to install on my laptop. I don't need a virtual machine to run AppFlower under Windows, just a LAMP stack (give or take the "L"), and their website gives detailed instructions on how to install AppFlower to work with WampServer (a.k.a. WAMP), a very nice way to load an Apache-MySQL-PHP development stack on Windows. I already had WAMP installed and running correctly with other applications, so this would be easy, right?
Almost. All the configuration bits seemed to go smoothly until the last step, which is to run a Symfony configuration script via the PHP command line interface. There were a couple of hiccups here:
- the script turned out to be a bash script, which Windows had no idea how to handle (solution: find the php.exe file in the WAMP directory hierarchy -- it's not added to the system command path -- and run it explicitly against the setup script); and
- prior to running the script, I was told to tweak a setting in the php.ini file that might otherwise cause AppFlower some problems -- but there are actually two php.ini files, one in the Apache directory and one in the PHP directory (solution: once I realized this, I tweaked both the same way).
Well, no point in spending another four hours recounting where that first four hours went. Bottom line, nothing I did prevented the APPCRASH, so I finally gave up on WAMP, uninstalled it, and installed the Windows version of XAMPP. The instructions for installing AppFlower under WAMP also work, with minimal modification, for installing it under XAMPP. Some of the changes are quite minor (WAMP's control panel gives you a direct route to edit Apache's httpd.conf file, while in XAMPP I had to find it and open it manually in an editor). The only sticking point -- and this is strictly a consequence of my brain being fried by the time I got to it -- was that the virtual host set up in Apache for the AppFlower Studio app did not work. This was a copy/paste operation (copy the Apache directives from the instruction page, paste into httpd.conf. Well, with WAMP it's copy/paste. With XAMPP it's copy/paste/edit, because (duh!) the paths are different (C:\wamp\www becomes C:\xampp\htdocs, assuming you use the default installation paths for both). Interestingly (to me), AppFlower Studio will not open without the virtual host declaration. (I thought I could just give an explicit path to it in the URL. No such luck.) If I have to do this again (heaven forfend!), this page will hopefully remind me to fix the virtual host declaration.
So I seem to be up and running now, albeit too late to touch the tutorial today. XAMPP seems to be using a more recent version of PHP than WAMP was; perhaps that explains php.exe not crashing on the Symfony script, or perhaps it's something entirely different.
Oh, yes, note to self: the user name and password for both AppFlower Studio and the SeedControl demo that it comes with are both 'admin' ... which is not well documented, to put it mildly.
Update: Part of the AppFlower installation process is to add a VirtualHost directive to XAMPP's Apache configuration, so that the "host" name studio.local (which I mapped to 127.0.0.1 in the laptop's host file) points to the AppFlower web directory. This worked, but too well: it masked XAMPP's own document root, to the point that the built-in administration interface was hidden. The explanation is found in Apache's instructions for name-based virtual hosts. To avoid masking the original root, I need to add a second VirtualHost directive, using the original server name (in my case, localhost), point it to the original document root, and put it ahead of the one for AppFlower. (The AppFlower installation documents neglect to mention this.)
Update #2: I also need to insert a NameVirtualHost directive in httpd.conf, ahead of the first VirtualHost directive. Otherwise, the first VirtualHost (localhost for me) masks the second one (studio.local).
Update #3: Apparently, when installing on XAMPP and WAMP, AppFlower Studio needs to be told where to find the PHP executable. I fixed that, but I'm still getting error messages on most operations. They may be harmless, since the allegedly errant operation seems to have worked (possibly after manually refreshing the web page).
Update #4: I've given up on AppFlower with XAMPP/WAMP and may be having some success with VirtualBox (next post).