php

Solving RSS Feed error in Codeigniter 2.0

17 Jul , 2011  

There are several commmon error when building RSS Feed in CodeIgniter 2.0. Somehow we made mistakes and here are top list case.

When we got ErrorException [ Parse Error ]: syntax error, unexpected T_STRING, this happen because you have PHP short_tags enabled, which means <? is shorthand for <?php and opens a PHP code block.

To fix this, turn off short_tags in php.ini or code like this :

1
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>

Another problem is Line Number 1, Column 2: <?xml version="1.0" encoding="utf-8" ?>. This usually happen because we close our documents with ?> php tags. In CodeIgniter, we should leave our end of file without using ?>.

So, when you facing another RSS Feed error, try to check your php.ini and use CodeIgniter code behaviour.

,

php

How to fix Codeigniter blank / white page error

17 Jul , 2011  

Sometimes when we developing our Codeigniter application, suddenly it gave us White of Screen or blank page error. To solve this problem, we need to configure our PHP.ini to show error. So, if you using Ubuntu, go to /etc/php5/apache2/php.ini and edit :

1
2
error_reporting = E_ALL | E_STRICT
display_errors = On

More…

,

configuration

Solve blank page URL Rewrite CodeIgniter in Subfolder using .htaccess

17 Jul , 2011  

When we place CodeIgniter as subfolder in localhost environment, it will have some problem with URL rewrite. For example, i have http://localhost/codeigniter. So, if we using default tutorial on CodeIgniter without carefully then it will throw us into “blank page” and without any error.

Configuring Codeigniter for subfolder is easy. Here the steps :

1. Create .htaccess at root instalation folder
More…

,

php

How to use Zend Framework in CodeIgniter 2.0

17 Jul , 2011  

Combine Zend Framework with Codeigniter will give great result and cutting development time. Intergrating Zend Framework into CodeIgniter 2.0 is very easy. First, you download new Zend Framework here . After downloading, unpack it package and get Zend folder. Put this Zend folder into app/libraries in CodeIgniter.

Then, we create Zend libraries :
More…

,

system

How to disable Crontab in WordPress 3.2

17 Jul , 2011  

When page load, WordPress will doing cron stuff. This meaning, every page load by visitors, WordPress always checking what task in cron queque. If you curios how cron is working on WordPress, see this :

1
2
3
4
5
6
7
8
9
10
wp-settings.php:
+requires wp-includes/default-filters.php
-contains the action hook to the function wp_cron()

+requires wp-includes/cron.php
-contains functions that perform cron related tasks, including the wp_cron() function
-above functions make http request to wp-cron.php

wp-cron.php:
-actually does the schedule checking and executes anything as needed.

So, to disable cron in WordPress, you should define DISABLE_WP_CRON in wp-config.php.

1
define('DISABLE_WP_CRON', true);

Credit to : http://wordpress.org/support/topic/wp_schedule_event-events-dont-fire

system

How to disable comments in WordPress 3.2.1

17 Jul , 2011  

Disabling comments in WordPress 3.2 is not different as old wordpress version before. But for new guy at WordPress, it’s confusing. Actually, new WordPress hiding several option like revision, author and discussion which have disable comments feature.

So, before we can disable comments, we should show this menu in our editing Post or Page. Go to top right corner ( When you editing Post or Page ) and click “Screen Options”. There will be several options there. Click on “Discussion”. Then, scroll on bottom page and you will see option for enable / disable comments & trackbacks.

You can also switch on another Screen options like Author, slug, revisions , Excerpts and else.

How to disable comments in WordPress