CodeIgniter and MVC links

01. 12. 2014 at 15:36

Just starting to learn MVC using CodeIgniter and thought I would save links to tutorials, tips and other things that I found useful along my journey.

Here’s a useful tutorial explaining in clear step by step How To Install CodeIgniter on an Ubuntu 12.04 Cloud Server.

How to Install CodeIgniter

My test/training environment is on local with a WAMP set up, and everything explained could still be used.
It covers installation of CodeIgniter (I’d already done that). Configuration of the database config file to be sure the set up connects to your mysql db.
Code snippet to clean up length urls by removing index.php and a bit of htaccess rewrite.

Permalink changes lock you out of WordPress Admin?

13. 02. 2014 at 13:32

I had this problem and couldn’t work out what I’d done wrong

I installed WordPress in a .com/blog directory

It all went well. I could log in to admin and I could see the live blog. Then I went into Settings>Permalinks to change Default to Post Name and then when I saved changes I was directed to the log in page and the log in no longer let me in…and the public side didn’t work either.

If this happens to you it’s likely there’s something wrong with the .htaccess file and here’s a quick fix

delete your current .htaccess in the /blog directory
upload a new blank replacement .htaccess
set chmod permissions to 666
Log in to wp-admin and set permalinks to desired url structure
Return to .htaccess file and set permissions back to 644 for security

It should now work correctly

Hide your email address on Web Pages

12. 02. 2014 at 19:52

The catch 22 of displaying your email address on your web site is that the spammers will soon find it and your inbox will be filled with Viagra, Ugg boots and Penis enlargement emails even if you are a girl!

I have avoided displaying the emaill address in favour of a contact form but it’s not ideal because some visitors would prefer the standard email approach.

I found a really informative tech guy who’s posted a selection of methods sharing code that will Hide your Email Address on Web Pages.

You only need to have a very basic understanding of coding to implement any of these options.

Seo Tips

30. 01. 2014 at 12:46

Some really good myth busting tips and tricks to improve your site SEO. Surprising to read many of the techniques that the SEO gurus have been recommending for years are probably less valid than you think.

Really useful htaccess tips

29. 01. 2014 at 11:57

I was finding how to prevent a page being viewed via a line in the htaccess file and stumbled upon this really good collection of htaccess tips and tricks. I’ve added a few other to my htaccess file.

cURL extension required

25. 09. 2013 at 11:17

I’m installing OpenCart on a localhost WAMP server.

I came across an error at Step 2 of the Pre-Installation stage

opencart-installThe status for Extensions showed a red – against cURL.

After a bit of Google research several options were found.

One was to enable cURL extension by going to the php.ini file and removing the semi colon in front of the line

extension=php_curl.dll

In my case that was already removed so the extension was supposedly enabled

Next check the the localhost index/menu page for loaded extensions.  I noticed that curl was not listed

After checking the php.info page (accessed from localhost index/menu page) details of curl were missing

I then read that I may have the curl extension. Apparently you need the one to match your php install. So I checked my version of php (found on the localhost index/menu page) 5.4.3 and downloaded the equivalent Fixed curl extension from here: http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/
Once unzipped the php_curl.dll file needs to be placed in the ext folder of php. C/wamp/bin/php/php5.4.3/ext

That worked and replaced the red error with the necessary green tick.

double quotes replaced by backslash on mysql update

06. 09. 2013 at 23:01

I had a situation where I had to export a set of records from a MYSQL database on a live site into a copy database on a localhost site. After successfully making the export / import I found all the picture and url links on the WordPress posts broken. Closer inspection relieved that the import had replaced all the necessary double quotes around links, styles, etc had been replaced with backslashes.

 

If you’re in the same position there’s a quick remedy. the following myqsl statement will find and replace

copy it and change the italic parts to match your set up

UPDATE your table name SET your field name = replace(your field name, ‘\\’, ‘\”‘);

 

 appearing in WordPress posts following mysql database import

04. 09. 2013 at 15:08

If you experience the problem of an  appearing in seemingly random places throughout you WordPress posts following a database import you may be able to solved it like I did by commenting out the encoding line in your site’s wp-config file:

Search for

define(‘DB_CHARSET’, ‘utf8?);

and add // to the front:

// define(‘DB_CHARSET’, ‘utf8?);

This should make the Âs disappear.

The name attribute is obsolete

30. 05. 2013 at 17:56

I got this error message using a name anchor tag when trying to validate a page in HTML5

The name attribute is obsolete. Consider putting an id attribute on the nearest container instead.

Here’s the code I had:

<a name=’anchor word’>

the solution is to replace name with id

<a id=’#anchor word’>

Quote ‘ in attribute name error

30. 05. 2013 at 13:54

Quote ‘ in attribute name. Probable cause: Matching quote missing somewhere earlier.

I got the above error when validating a html5 page.

The problem was solved by changing

<meta charset=”UTF-8″ >

to add a closing backspace :

<meta charset=”UTF-8″ />

Hope that helps others with the same problems