Wednesday, 16 October 2013

Fixing the 403 Error on Mac OS X 10.8 Web Sharing

It seems to become increasingly difficult to get the built-in apache on our Macs to play nicely with virtualhosts...
Following the standard procedure from a numberof forums and support pages, I changed on "AllowOverride None" to "AllowOverride All" in my /etc/apache2/users/USERNAME.conf file, and all of my sites started to be forbidden.
I changed it back and and then changed it only for one site in my httpd-vhosts.conf file, and only that site was forbidden.
After looking at the logs and seeing the problem was with url rewriting and the lack of FollowSymLinks, I went back to the USERNAME.conf file. I switch "AllowOverride None" to "AllowOverride All" and added "Options +FollowSymLinks" on the next line.
Things started working. I came from using xampp on windows and it had a lot of these settings already set server-wide for dummies like me.

Tuesday, 21 May 2013

Adobe Creative Suite for Free (CS2)

This is from a really old post, but it still works and was dead useful when we were ressurecting an old PowerPC G4 Mac.

Don’t get excited, yes it seems to be free but no, it is not the latest version. I have read on multiple Web sites that Adobe is giving away CS2 suite, it seems to be real but the download page reports errors. That may be due to the heavy demand to download overloading the servers. Although it is several generations old, the core feature set of Photoshop will be there, of course you can download the other products in the suite as well.
Keep the following information handy if you are interested in downloading the software:
The download link: CS2 Download
Full suite serial number: 1130-0412-8377-1896-9751-5759
Photoshop CS2′s serial number (Win): 1045-1412-5685-1654-6343-1431
Photoshop CS2′s serial number (Mac): 1045-0410-5403-3188-5429-0639
First heard on PetaPixel

Thursday, 16 May 2013

SagePay Test Card Numbers and Payment Details


Sagepay is one of the most popular online payment processors in the UK. These details come from a couple of support pages and blogs but give you all the detail you should need in one place. Remember to set the url of the test server to test.sagepay.com...

Test Card Details:

Card TypeCard NumberCard ExpiryIssue NumberCV2 ValueAddress NumberPost Code
Visa492900000000612/15N/A12388TE4 12ST
Visa Delta446200000000000312/15N/A12388TE4 12ST
Visa Electron UK Debit491730000000000812/15N/A12388TE4 12ST
Mastercard540400000000000112/15N/A12388TE4 12ST
UK Maestro564182000000000512/150112388TE4 12ST
International Maestro30000000000000000412/15N/A12388TE4 12ST
Solo633490000000000512/15112388TE4 12ST
American Express37420000000000412/15N/A123488TE4 12ST
Japan Credit Bureau356999000000000912/15N/A12388TE4 12ST
Diners Club3600000000000812/15N/A12388TE4 12ST



Additional Details for all cards:
  1. Expiry Date: any date in the future
  2. CV2: 123
  3. Billing Address: 88 (you only have to use this on the first line)
  4. Billing Postcode: 412
  5. 3D Secure Password: password



For Testing Server Only

Please note that there are no card details that will work with their live server setting, all of the above details will only work with the Sagepay test server.

Wednesday, 19 September 2012

Zencart on NGINX: Cannot Login to Admin

This week, we're set up a new server with Ubuntu 12.04 and NGINX. When we put a copy of Zencart on it, everything was great apart from teh admin login, which went into an 'infinite loop' and refused to log us in.

The solution was simple to do, although desperately hard to find - hence its appearence here:

Login to the server as root and edit the /etc/nginx/fastcgi_params file:

Simply comment out (add # at the beginning of the line) to the line that says:

fastcgi_param SCRIPT_NAME $fastcgi_script_name;

Now restart nginx and you're done!

[UPDATE: you may need to check the lines in your configure.php file from the admin directory - they need to point correctly, without using the PHP_SCRIPT line:


  define('DIR_WS_ADMIN', '/#your admin folder#/');
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_ADMIN', '/#your admin folder#/');

Monday, 30 July 2012

Lose 'Duplicate' and Replace with 'Save As' in Mountain Lion

A great post using keyboard shortcuts and the System Preferences from:
http://www.tuaw.com/2012/07/29/get-save-as-back-on-mountain-lions-file-menu-easily-and-without/



Much rejoicing accompanied the news that Mountain Lion brought back the "Save As..." option (which had been taken away in Lion and replaced with the not-nearly-the-same-thing "Duplicate" command). Unfortunately, Save As was relegated to a sub-menu which could only be seen if you held down the Option key, or you could use the not-very-convenient keyboard shortcut Command+Shift+Option+S.
For some reason, that keyboard shortcut never worked for me, so I decided to remap it using System Preferences.
Since I am never, ever, ever going to use the "Duplicate" item, I decided that I would remap "Duplicate" to something else, and restore Command+Shift+S back to its rightful spot as "Save As..."
I went to System Preferences » Keyboard » Keyboard Shortcuts and selected "All Applications" on the right side. Then I clicked the plus-sign under the right column and added "Duplicate" for "All Applications" to be the keyboard shortcut Command+Shift+Option+D (aka "I am never going to use this shortcut and don't want to press it accidentally").
Then I did the exact same thing, except this time I used "Save As..." for the menu. Note that both "Save" and "As" must be capitalized, and you must use a proper ellipsis character at the end. On a Mac with the US-English keyboard, you can get this by holding down the Option key and typing a semi-colon.
VoilĂ ! This will now work in every Mac application which has a Duplicate and/or Save As... menu. If an app does not have one of those menus, it will just ignore the keyboard assignment. You could also assign this for specific apps if you only want to use it in certain apps.
An unexpected but very pleasant side effect of making this change is that OS X makes the "Save As..." menu item visible again even without holding down the Option key.
Before (no Save As... visible):
After (welcome back old friend!):
Quite frankly, I think I would have paid $20 for this alone.
If you don't mind Apple's suggested keyboard shortcut for Save As... but would like it to show up on the menus, all you have to do is rename the Duplicate menu item (as described above). Once that was renamed, the "Save As..." menu item appeared. I only added the custom keyboard shortcut for that because I wanted it to respond to Command+Shift+S as it had always done before Lion.
Update: Great tip from 'rbascuas' in the comments: if you remap "Duplicate" to "Shift+Command+Option+S" then "Duplicate" will be hidden (until you hold down the Option key) and "Save As..." will still be shown. That is even better because then I don't even have to see the Duplicate command, unless I want to use it, which I never will.

Friday, 25 May 2012

Panic 2 - The best web editor/creator for Mac - install and configure with SVN

If you've been waiting for the best web editor for MACs, its available now - Panic's Coda 2. There are some fantastic new features, including a MYSQL feature that seems to do everything I used Navicat for - this alone is worth the price.

Configuring Coda to work with SVN is fairly straight forward. I've copied this code from :



http://www.midwinter-dg.com/permalink-how_to_use_subversion_version_control_with_coda_on_the_mac_2010-11-18.html


mainly as it works well but the site its on is almost unreadable.
For those of you who don't know, Subversion is a version control system. Basically it enables you to track all changes to a project. It gives added security and control to the integrity of your work enabling you to compare a document with any previously saved version, and revert to, or merge different versions of a document.
Coda for MacIn this tutorial I will show you how to set up Subversion to work with Coda on the Mac. Coda from Panic Inc. is my app of choice when it come comes to web development on the Mac — it may not do everything, but it does a lot and it makes working with Subversion a cinch!
1.First you need to get yourself a copy of Subversion. Go tohttp://www.open.collab.net/downloads/community/ and download the latest binaries, then install. (the installer will install Subversion to: /opt/subversion/bin/svn).
terminal.app2.The next thing you need to do is create a repository. The repository is where all of your versioned data will be stored. You can locate it anywhere you like, personally I have mine in my home directory, where I also have the directory that is the root level of my localhost server. To create the repository, you need to access the command line. Open a terminal window and navigate to your chosen location (in my case: cd/Users/duncan/) and then create the repository: svnadmin create SVNrep - this will create a repository in the home folder called SVNrep.
3.OK, now that SVN is installed and you've created a repo, you need to configure it. In the Finder, open the directory 'conf' that resides inside your repo. (in this case/Users/duncan/SVNrep/conf/). Using a text editor, open the files svnserve.conf and passed. In svnserve, you need to uncomment and amend the following lines:
anon-access = none

auth-access = read

password-db = passwd

realm = My Repo
Save and close this file, then add a line to the passwd file to set your username and password, for example:
myusername = mypassword
Then save and close the passwd file.
4.Now to add your project to the repo - again, this will be done using the command line. Again, I'm assuming that you have many sites on the go, and each is sitting in a separate folder on your server - let's say you have one called 'my_great_site'. To add this to the repo type the following:
svn import my_great_site file:///Users/duncan/SVNrep/my_great_site -m "Initial import"
The path will be different for you depending on where you have put your repo and what you have called it.
5.Now you can delete you site as its safely stored in the repo (OK, you don't want to delete it, just move it out of the root level of your server and archive it somewhere).
6.To work on your site, you need to checkout a 'working copy' from your repository (terminal again!). Type the following:
svn checkout file:///Users/duncan/SVNrep/my_great_site Webserver/my_great_site-SVN
As before you may need to adjust the paths depending on A. where you repository is (in this case: /Users/duncan/SVNrep, and where your server root is:/Users/duncan/Webserver/ ). The final -SVN is not necessary, it's just my way of visually marking the project as being under version control.
Coda preferences
7.OK, now the project has been checked out, it's time to update your site settings in Coda. First, open the preferences - Coda > Preferences... and click on the 'Files' tab. Enter/opt/subversion/bin/svn into the 'Subversion Tool Path:' field, then close the preferences.
8.Nearly done, now it's time to update your site settings in Coda. Open the 'Sites' tab and click on the 'i' icon for your site. (pic). If you added -SVNto your checked out copy (or called it something different entirely, you will need to adjust the 'Local URL:' and 'Local Root:' fields). Now scroll down to the bottom, and expand the 'Source Control' section. Check the 'Enabled' checkbox and then enter you username and password that you set up in stage 3. If the Repository URL is not already set, close the sites panel and open it again. If it's still not set you may need to add it manually - in this case it would be:file:///Users/duncan/SVNrep/my_great_site
Coda sites panel
9.That's it - your site is now under source control, check out the 'Managing Files With Source Control' section of the Coda Help files - enjoy!

Thursday, 22 March 2012

Paying Online for School Trips

One fo the sites we look after is the school website where the children go:


http://www.longfleet.poole.sch.uk


A new link went on today - http://www.scopay.com/longfleet. It even gets a nice little logo - but the simple idea is to let people pay for the school trips online. Does that mean we have even fewer excuses now?