[TIPS] Write print_r() Output To File

When debugging a php application, print_r() or var_dump() often use to display the data inside the variable, usually an array that store many data inside. print_r() is core php function to displays information about a variable in a way that's readable by humans. Not just a variable or an array, we can trace or display protected and private properties of objects in PHP 5.But when the php application is called by the curl or other remote connection (not using a web browser), print_r() won't … Read more...

Things You Can Do With PHP cURL

Curl is a command line tools to transfer data using various protocol. Curl project was released with libcurl, which is a library for curl that can be use in multi programming language. But it is widely use for PHP with PHP Curl library."curl is a command line tool for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP. curl supports SSL certificates, HTTP POST, … Read more...

Keep PHP Process Upon Closed Client Connection

PHP process as default will stop or terminate the process when the client close the connection or process timeout. When user stop the process through browser it will automatically send abort header, and PHP will turn on the abort flag, so the process the currently running will be force to stop. As well as the process timeout met, the PHP will eventually stop the process too.I had one case that i should fire another script with Curl library in PHP. But since the other script took a very long … Read more...

[HowTo] Publish Post Via XML-RPC In WordPress

There are many ways to publish Wordpress blog post. You can publish from the Wordpress admin interface, you can publish via email and also you can publish it via XML-RPC. So what is XML-RPC? XML-RPC is a remote procedure call (RPC) protocol which uses XML to encode its calls and HTTP as a transport mechanism. Which mean we can call the Wordpress procedure remotely. And this will make Wordpress easily integrate with other system.To enable publish via XML-RPC in Wordpress follow these … Read more...

PDO Sqlite3 Not Working In PHP 5.3.3 And WHM/Cpanel 11.26.8

The latest PHP v.5.3.3 doesn't work good with PDO Sqlite3. I am using a VPS (Virtual Private Server) with Centos 5 and WHM/Cpanel 11.26.8. Everything goes fine except there is an error message "undefined symbol: sqlite3_libversion" in all users error_log.I did compile my server with this configuration: Apache v2.2 PHP 5.3.3 PDO and PDO_MySQL enabledThe compile process run without problem and success. But if you notice that, in error_log will show an error message like … Read more...

[HowTo] Install Apache, PHP, MySQL, and PHPMyAdmin on Ubuntu

After a while i haven't write on my blog. Now i'm ready to start writing again. Probably you notice that i changed my theme. Yes i was busy redesign my theme from the start. Anyway i will tell you the story on the next article.Now i want to show you how to install Ubuntu Karmic Koala 9.10 as a perfect server with Apache, PHP, MySql and Phpmyadmin. Since Ubuntu have a great repositories and the magic application called apt-get then it shouldn't be hard to make Ubuntu as a perfect … Read more...

WordPress 2.8.1 Release

Today my wordpress upgraded to new version, version 2.8.1. There wasn't so many change though. But it feels better to upgrade to the newest version.Here is the change log for Wordpress v.2.8.1:Certain themes were calling get_categories() in such a way that it would fail in 2.8. 2.8.1 works around this so these themes won’t have to change. Dashboard memory usage is reduced.  Some people were running out of memory when loading the dashboard, resulting in an incomplete page. The … Read more...

[HowTo] Install ImageMagick/Imagick For PHP On Ubuntu

Installing ImageMagick on Ubuntu with PECL is really simple. But i want to share with you how to install it beside to remind myself someday, if i forget how to install it. ImageMagick is a php library for image processing. But they are not developed just for PHP library only, now they have library for Ruby, Perl, Phyton, etc. You can visit their official website here.Let's continue to how to install ImageMagick/Imagick on Ubuntu:Open your terminal Install php-pear if you don't install … Read more...

[TIPS] Get File Extension Easily in PHP

I want to share a tips for you to get file extension in PHP easily. Before i always use the old way to get the file extension, that is using substring and find the last "." (dot), and get the extension. For those who still doing this, i have a tips for you to get the extension easier.You can use pathinfo, with pathinfo you can get information about a file path, here is the example how to use it:That's it! Thank you for visiting my blog and have a nice day... … Read more...

[HowTo] Install Curl in PHP5 and Apache

This time i want to share with you how to install Curl in PHP5 in Linux Environtment (I'm using Ubuntu 8.10) and using apache web server, but if you have any question to install php-curl in other environment, feel free to contact me of leave any comment, i will glad to help you.Okay, now let's start with check if php-curl is already installed in your server or not.To check it please follow this step:Create a file in your web server (in Ubuntu it would be in /var/www folder), name it … Read more...