Sometimes you need to change column order in a table. If you don’t have access to latest phpmyadmin version (4.0 and above), you don’t have any graphic solution to do this and you’ll have to use an SQL query. First of all, you need to identify the type of field you want to move. It should look like… Read More »
If you need to debug a process in a linux environment, the simplest yet very effective solution should be strace. It can be easily installed with “yum install strace” or “apt-get install strace” depending on the type of Linux you’re on. Here are some usage samples. First of all, if you don’t have a shortcut to strace, you… Read More »
If you have used Hesk before, you must have mentioned that all links that were posted by users at the time of ticlet creation/reply were opening in new tabs. If you decide to update to 2.5.2 (I was using version 2.3 before), you will notice that all links will be opening in the current tab. If you want… Read More »
If you’re getting this error while configuring PHP: configure: error: utf8_mime2text() has new signature You should use a simple solution to resolve this: yum install libc-client-devel.i686 and libc-client-devel.x86_64 This error usually appears when you’re trying to install IMAP support on a 64-bit system.
After another PHP recompilation I’ve started getting the following error while trying to access SSL websites with cURL: 56 SSL read: error:140940E5:SSL routines:SSL3_READ_BYTES:ssl handshake failure, errno 0 What does this mean and how to solve this issue? This means your cURL installation is trying to use the wrong number of SSL protocol. All you need to resolve this… Read More »
If you need to install IMAP support for php on a 64-bit machine, it is not that simple. There are some additional steps you need to follow to make it working. First of all, you may try to reconfigure PHP. If you have Directadmin or any other control panel installed, you might have imap library installed. Just add… Read More »
If you have an array with duplicate values, sometimes you might need to show only non-unique elements. Here is a short code in PHP that will allow you to do this. <? $arr=array_map(“trim”, file(“file.txt”)); $nonuniq=array_unique(array_diff_assoc($arr, array_unique($arr))); ?> This will return unique array of duplicates. If you need to show all duplicated values, use this code. <? $arr=array_map(“trim”, file(“file.txt”));… Read More »
Just wanted to paste a PHP solution for a Paypal refund. It was found on Paypal official site, but I spent some time to get it.
If you need to verify your Paypal account balance for any reason, a simple script will help you to do this. First of all, you need to request API credintials, if you haven’t done this yet. A detailed instruction is available here. Actually interface is a bit different, but it still can be found under “My account” section.… Read More »
Sometimes you might need to include PHP code into HTML pages. For example, you want to include a menu, that is called via PHP in a static HTML page and you cannot rename your files into PHP for many reasons. I will tell you how to do this on a dedicated server and on a shared hosting account.… Read More »