Archive for the 'Programming' Category

Coda – Error code 37 – “Host Key Changed for…”

Tuesday, July 6th, 2010

Coda error code 37, caused when a site’s ip address changes, and the SSH keys are no longer valid. It can be fixed by connecting with Coda’s Terminal and reading the response. Which will tell you what line on the known_hosts file the old key, that then needs to be deleted, can be found.

Allow PHP to access files but not website visitors

Thursday, April 29th, 2010

Add the following to an .htaccess file, and all .php files under the .htaccess file will not be available via the web:
<FilesMatch "\.php$">
Order deny,allow
Deny from all
</FilesMatch>

The files will be available through PHP though. As PHP is not requesting the files through Apache webserver, rather is it requesting include files via the file system.

webcal link in IE

Monday, March 8th, 2010

webcal links (eg. webcal://www.domain.com/calendar.ics)will only work in Internet Explorer if Outlook 2007 is installed on the users machine. Office 2003 or earlier do not install the support required to make webcal links active.

“This page contains both secure and nonsecure items” IE fix

Tuesday, January 26th, 2010

Use a CGI proxy service on your secure site. Download CGIProxy. Upload to your sites cgi-bin folder (most hosting packages will have that set already). Once uploaded, change the permissions of the ‘nph-proxy.cgi’ file to 755 (rwxr-xr-x) Owner=Read,Write,Excute   Group=Read, No Write, Excute   Everyone=Read, No Write, Execute.
Visit the CGI script on your secure address: https://www.yoursite.com/cgi-bin/nph-proxy.cgi
Type in the address of the non-secure item you’re trying to show on your secure site. Uncheck “Show URL entry form”. Click “Begin Browsing”.
After the page loads, you can copy the address from the address bar, and it will be using your secure address.
Should look something like: https://www.yoursite.com/cgi-bin/nph-proxy.cgi/000000A/http/www.nonsecure-site.com/awesome-page.html
Now paste that address in your site and no more IE warning.

.htaccess tutorial reference and cheat sheet

Thursday, January 21st, 2010

Best reference of all things .htaccess perishablepress