20
Aug

Authorization Headers in Plesk Linux

As Plesk runs nginx on top of Apache, authorization headers may not be passed through by default. 

If this is causing you issues, add the following line to your nginx configuration:

FcgidPassHeader AUTHORIZATION

Just add the line to your fcgi config file i.e. /etc/httpd/conf.d/fcgid.conf on CentOS and restart httpd.

 

Read More
20
May

Laravel and Laracasts

Recently I've been completing a Web Development BSc hons Degree, hence the lack of updates. The degree required the development of a dissertation / final year project. During the project I came across Laravel and Laracasts.

Laravel proved very useful within my project, the use of project dependencies with Composer made certain tasks such as PDF generation and testing much easier through development and with project deployment.

If you haven't tried Laravel yet, I would recommend it, especially if you have any previous experience with CodeIgniter or CakePHP. Laravel is built on symphony and therefore contains many of it's features. The ORM within Laravel helped to turn 8 lines of code into around 2 in many cases throughout development with use of the relationships in models.

If you are looking for somewhere to learn more about Laravel, and more of it's advanced features, I can also recommend Laracasts by Jeffery Way. This can be very useful when starting out with Laravel, and helping to get to grips with tools such as Vagrant a portable and transferable development environment.

Read More
18
Dec

My take on the Google+ PHP Quickstart with PHP Data

So, i've spent the past week or so getting my head around the new Google+ Signin code.

The 10 minute quickstart can be found Here. And while yes it does fancy javascripty things, it took me a while to figure out how to get what I wanted, which was the Google Profile data within PHP. The example does very well at javascript, but if you're looking for some sort of information within PHP that you can store to a database, or use against your existing login system, this quickstarter isn't the greatest of use.

So, this leads me on to getting frustrated, a lot. And getting a bit further, then getting frustrated again.

All I wanted was a unique ID, and an email address from Google so I could use these to authenticate an existing user in a system.
Could i find any documentation on this? Nope.
Most documentation leads somewhere along to https://developers.google.com/+/ or similar, or leads to the OAuth documentation.

Now the OAuth documentation was a great help Not!
I kept getting errors stating I was missing an origin, when after reading the class files, there was no way to set an origin. So anyway, I carried on getting annoyed and kept on trying.

Now, eventually I got there (which I guess you assumed, as I wouldn't want to post on here how I failed at understanding some sample code.. that wouldn't look too great)
And I got somewhere.

I even went to the lovely task of putting how far I got on github https://github.com/ganey/gplus-quickstart-php
I hope it's useful to some people as a starter for getting the information in PHP, rather than getting all bogged down in all the client side bits. The code will need modification, and securing, and shouldn't be use production as is. However it should provide a start for others to work from to get Google+ profile information in PHP which can be used however you want.

Read More
17
Dec

Google Plus Quick Start PHP 500 Error

So, i've started working with the Google Plus O-Auth stuff, which some quick start guides can be found here: https://developers.google.com/+/quickstart/php

It was going rather well initially, then I started getting some 500 errors which weren't appearing in the error log.

Now being an administrator has its benefits, as I went and checked the Apache logs to find the cause of this error.

Right, before you spend forever being tired, getting frustrated and rackin your brain at why it isn't working, think for a moment. 500 Errors are pretty much permission related issues.

The information you need: Change the permissions on your directory.
If your following demo code its this one:gplus-quickstart-php
Put it at a maximum of 555 (chmod 555 gplus-quickstart-php). Voila! Working.

Read More
15
Sep

Centova Cast v3 database Upgrade error on install

If you are receiving database errors trying to install centovacast v3, try the following command and follow the instructions:

/usr/local/centovacast/sbin/uninstall


I was trying this on a new server, and got annoyed after several attempts and just having the installation aborting. I then ran the removal script, and ran the install again. Yay! it started working. Read More