print Creating a Scorpio development environment

Setting up on Windows

So you want to play with Windows instead of Linux?

Well, the easiest way is to download and install WAMPServer. This will give you MySQL, Apache and PHP in a nice convenient package and a handy tool that sits in the notification area allowing easy access to the config files and extensions in PHP.

Under this environment it is usually much easier to download Scorpio and deploy it in the WAMP www folder (usually: C:\wamp\www) which saves a lot of path issues. You will need to create a vhosts file and add ensure that requests are routed to the Scorpio /websites/base folder. You can use Tortoise SVN to do the exports.

Database updates / setup can be done using phpMyAdmin which is bundled with WAMP (under linux this can be used for creating databases and users but command line is often just easier as you are there already). Again, you will need to create the various users and ensure they have sufficient permissions.

Finally; the CLI scripts can be run under Windows as there are patch files specifically for this. You will need to add the PHP CLI executable to your environment PATH first otherwise you will not be able to use "php scriptName.php". Do this by going to Start -> Control Panel and then depending on your "view" (I always revert to Classic View) select System. Go to the Advanced tab and select "Environment Variables". Finally locate in the lower panel the line that says "Path" - note that is "path" NOT ClassPath which is something different. Once Path is highlighted, select edit and then append to the existing line (DO NOT REMOVE ANYTHING just add to the end):

;c:\wamp\bin\php\php5.2.6

Note the leading semi-colon - that is required if there is not a semi-colon at the end of the existing entries (which there shouldn't be).

With that done, click OK, OK and OK a third time. You can now open a command prompt by going to Start -> Run (Windows key + R) and typing in: cmd. If you then enter php -i you should get the PHP version information.

Other points to note:

As windows is case-insensitive MySQL can do "funny" things so you need to make a choice whether to use entirely lower-case database / table names or to preserve the case. Bare this in mind if you intend to deploy to a linux system which IS case-sensitive. My preference is to enable case-sensitivity (via the my.cnf file) - though I know a lot of people disagree with this. Which ever you choose to do - be consistent!

If you do opt to lowercase everything within MySQL, the generator script will output some strange results as part of the process relies on CamelCasedTableNames. This will be addressed in a future release.

Alternatively you can run a Linux VM under windows - which is what I like to do as Windows is not particularly good for developing PHP / MySQL sites when deploying to a Linux server (in my humble opinion!).