I'm learning Yii and having trouble getting TrackStar running on FreeBSD with Apache. If anyone knows what magic dust to sprinkle on Apache, please let me know.
I started with a zip download of the full trackstar/ app from Winesett's trackstar repo on GitHub (using it with yii-1.1.13 instead of YiiRoot/ in the repo). The code on GitHub has the code from the book errata, compared to the chapter code in the download bundle. I tested locally first (Windows XAMPP 1.8.1, PHP 5.4.7, MySQL 5.5.27), then moved to a FreeBSD server.
At first locally, yiic and phpunit didn't behave as expected, but it was my fault. I edited trackstar/index.php to use yii-1.1.13, but forgot to also edit trackstar/protected/yiic.php and trackstar/protected/tests/bootstrap.php (and for completeness, also trackstar/index-test.php).
Also, I also didn’t understand that “yiic shell” is intended to be run from the application root (i.e. trackstar), as is expects the application’s index.php in the current working directory.[/i]
2. I had to change truncateTABLE to delete in two migration scripts to eliminate errors migrating down (MySQL 5.5+ can't truncate InnoDB tables with foreign keys).
3. TrackStar now runs, but you can't login because there are no users in the database. I manually added "User One" and "User Two" users via SQL as per the book (ebook p.123).
4. Now I can login now as either "User One" or "User Two", but there are errors creating new projects (there are new projects being created in tbl_project though). Running "yiic rbac" fixes the project creation errors.
Now, I can not only login but also create projects, issues and comments, and assign users to projects. TrackStar rocks!
5. Next, I copied TrackStar from Windows/XAMPP to a FreeBSD server (PHP 5.4.10 MySQL 5.5.30) with yii-1.1.13. I had to change the connection string in main.php and console.php from host=127.0.0.1 to host=localhost for the migration scripts to run, and the main page to load.
6. The TrackStar main page now loads, but navigating with the menu results in a 404 error "The requested URL /usr/local/www/trackstar/index.php was not found on this server.". Is this related to URL rewriting? Is my Apache trackstar.conf file misconfigured?
casper# cat /usr/local/etc/apache22/Includes/trackstar.conf Alias /trackstar "/usr/local/www/trackstar" <Directory "/usr/local/www/trackstar"> Options Indexes FollowSymlinks +Includes AllowOverride All Order allow,deny Allow from all </Directory> casper#