PHP

Featured
PHP
Technology
Wordpress

How to Change Excerpt Length in WordPress

Function the_excerpt() can be used to show summary of article or post in WordPress. As default, the excerpt length is set to 55 words. We can control this length by adding few lines code in functions.php file inside theme folder. Below is the codes to change excerpt length in WordPress. Open File Manager and open […]

Read More
Featured
Internet
PHP
Technology

How to Update Twitter Timeline Using PHP

Guide on this article can be used to post Twitter using PHP. First of all, download source code from http://phpfashion.com/twitter-for-php. Extract downloaded file to your folder. Example: /public_html/twitter-php/. Then we create index.php file with the following code: The first line is to setup variables: username, password, and message. And the next part is to setup […]

Read More
Featured
PHP
Technology
Tips and Tricks
Tutorial

How to Fix phpFox Error: “Unable to write to temporary folder: /tmp/”

phpFox is social network web-based application which can be used to build online community. I found this error message when installing phpFox: To fix this problem, edit install/include/installer.class.php Find this line: and modify to this: After that, create new folder: Change the folder permission to 777: After that redo phpFox installation http://domain.com/install/index.php And problem will […]

Read More
Debian
Featured
Linux
PHP
Technology
Tips and Tricks
Tutorial

How to Install Memcached on Debian / Ubuntu

Memcached is free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. First of all, install memcached dan php5-memcached packages: and then make sure memcached is running with this command: Restart apache web server: Check php5-memcached module using […]

Read More
centos5
Featured
Linux
PHP
Technology
Tips and Tricks
Tutorial

How to Fix “PHP Warning: PHP Startup: mcrypt: Unable to initialize module” on Centos 5

I found this error message after upgrading PHP 5.1.6 to 5.2.14 The problem happens when there is a mismatch version of php-mcrypt module with php installed in the server. You can check the version using this command line: To fix this error, we have to update php-mcrypt module:

Read More
Featured
PHP
Technology

How to Fix JpGraph Error 25128: The function imageantialias() is not available in your PHP installation.

This error message shown up when I tried to draw chart using JpGraph: To fix the problem, edit file gd_image.inc.php inside JpGraph folder, and disable the line start with JpGraphError::RaiseL(25128); in function SetAntiAliasing: Keywords:jpgraph error 25128jpgraph error: 25128 the function imageantialias() is not available in your php installation use the gd version that comes with […]

Read More
Featured
PHP
Technology
Tips and Tricks
Wordpress

How to Get First Image URL from the Post on WordPress

The following function is used to get first image URL from WordPress post. Paste below function on /wp-includes/functions.php file. Now you can show the image using this syntax:

Read More
Featured
HTML
PHP
Technology
Tips and Tricks
Tutorial

How to Make Image which Can’t Be Cached by Browser

Images as static content on website are usually be cached by browser. Using PHP we can make the image can’t be cached and always loaded from server by putting random number behind the image file. The HTML output will be: The number 1331835943 is generated dynamically by PHP that forces the browser to always load […]

Read More
Featured
PHP
Programming
Technology
Wordpress

How to Fix “PHP Fatal error: Allowed Memory Size of xxx Bytes exhausted…” on WordPress

PHP has a default memory limit of 8MB which is set in php.ini file. If your .php script exceeds more than the limit it will throw “PHP Fatal Error Allowed Memory Size Exhausted”. To settle this problem, you can add one line code in the beginning of your script: or, add in the following code […]

Read More
Debian
Featured
Linux
Open Source
PHP
Technology
Tips and Tricks
Tutorial
Ubuntu

How to Install PHP 5 on Ubuntu / Debian

PHP is a popular web scripting language. This article will show you how to install PHP on Ubuntu / Debian server. 1. First of all, we update repository. 2. Install PHP and Apache web server 3. It’s done. You can put your .php source code at /var/www and access http://your_ip from browser. Now we will […]

Read More