Norwegian Characters in CodeIgniter and Editor

I had a problem with Norwegian characters today. I found that my editor’s encoding was set to iso-8859-1, so I needed to change it to UTF-8. I kept the following in config.php in CodeIgniter.

$config['charset'] = "UTF-8";

Then I needed to retype all the Norwegian characters in the editor.

I set all database [...]

Changing DocumentRoot from /var/www to /home/myname/www

This is a quick tip to change your document root in Ubuntu. If you are using github, it is a bit troublesome to work in /var/www directory. You need to type ‘sudo’ each time or change to super user. But if you change your localhost document root to your home directory, you don’t [...]

Sending email from localhost using MSMTP with gmail

If you are using Ubuntu and having a problem or setting up sending email from localhost, you can use Msmtp. In this article I go through how to install msmtp and create some hml and php files to test it. Furthermore I will explain how to set up email config for BackendPro which is a control panel for CodeIgniter.
You will see how easy to set it up.

 

Continue reading Sending email from localhost using MSMTP with gmail

Windows in VM Virtualbox on Ubuntu, localhost and base url of CodeIgniter

Following up from the previous Aha moment post, this is Aha moment 2 and I am accessing localhost on Ubuntu from Windows 7 in VM Virtualbox. I have VM Virtualbox on Ubuntu 10.10 and I installed Windows 7 in this virtualbox. If I tried to access localhost on Ubuntu from a browser in [...]

Windows XP in VMware on Windows 7, localhost and base url of CodeIgniter

Well I had a aha moment today, so I thought I should share this. I know that the title is a bit confusing.

There are times still I have to use Windows. And there are times when you have to develop for IE7. My set up for this is using IE 7 [...]

Zend Framework on Codeigniter: Youtube

youtube3
This post is about how to use Zend Framework on Codeigniter to show Youtube videos.
Continue reading Zend Framework on Codeigniter: Youtube

How to implement Zend Framework with Codeigniter

Download Files

There are quite few posts how to use Zend framework in Codeigniter.

  1. Beyond Coding
  2. Freakauth
  3. Phil’s post

However none of them worked on my XAMPP. I thought there might be some who are struggling to use Zend frame work on Windows. Here is how I did.

Here you can read why they don’t work with Windows.

Adding Zend Framework

Here you can read how to add Zend Framework. And I use this structure for this post.

You need to create a folder ../system/contrib/ and add Zend folders in this folder.

../system/ contrib/ Zend/ Acl/ Acl.php Amf/ Amf.php ...

Create a file system/application/helpers/zend_framework_helper.php and add the following.
Continue reading How to implement Zend Framework with Codeigniter

Path problems with Codeigniter on Windows

I posted how to implement Zend Framework here. However I had a problem with Window’s path when I was trying it.

I have found a couple of things about paths in Windows when I am using Codeigniter.
As all know that Windows uses \ for the path. For example, C:\xampp\htdocs\codeigniter\system\contrib. Linux uses / for the path. For example, /home/1/o/mywebsite/www/codeigniter/system/.

If you are using XAMPP or WAMP for your web development, you might have a problem with this difference.
Continue reading Path problems with Codeigniter on Windows

Codeigniter shopping cart v1.0 code updates

I added the following article to Codeigniter wiki today

You can find a newer version here.

Download Files

Background and Credits

I learnt Codeigniter from a book “Professional Codeigniter” by Mr. Thomas Myer.

I started learning PHP six months ago and read a couple of good books about PHP and I had basic knowledge but not practical experience of PHP.

Professional Codeigniter was delightful to read. I have learnt a lot from the book. I highly recommend the book if you are a beginner like me and want to learn CI in practical ways.

Especially I enjoyed it in three ways.
1. There are some bugs which could not make it for the final edition. But I am glad that it did not make it. Because fixing these taught me more than I expected. I used the book forum, CI forum and Stackoverflow to solve the problems.

2. Reading a book which teachs you how to create one applicatoin, in this case is shopping cart, is the best way for me to learn PHP and CI.

3. While I was reading the book, I wanted to change the application in my way. And this was again good learning for me.

I recommend the book and read through it to understand fully.

I obtained a permission from the author and I’d like to add my version of updated code here.
Continue reading Codeigniter shopping cart v1.0 code updates

How to use Codeigniter captcha plug-in Part 2

DOWN LOAD
In the previous post I wrote a basic method how to use captcha plug-in with Codeigniter.
Today I am going to write a simple but practical newsletter subsciption page using captcha.
We will use CI’s form_validation class.

ci_captcha

Please read the previous post to customize it.
You need to create a folder called captcha as the same level as system.
Continue reading How to use Codeigniter captcha plug-in Part 2

Page 1 of 212