About phptuts

Author Archive | phptuts
How to Install RAR/UnRAR on CentOS Linux

How to Install RAR/UnRAR on CentOS Linux

The rar and unrar packages are not available from the default yum repositories on CentOS Linux so you will need to install the rpmforge repo to install these packages via yum. Read this article for steps on how to install the RPMforge repository on CentOS Linux. Once installed you can install rar and unrar using […]

Read full story Comments { 0 }
Understanding output of Free command in UNIX/Linux

Understanding output of Free command in UNIX/Linux

Actually this understanding helps when we analyze the systems which going through bad phase of perfromance. [root@localhost ~]# free total used free shared buffers cached Mem: 2073636 1954072 119564 0 4004 1465796 -/+ buffers/cache: 484272 1589364 Swap: 4192956 112 4192844 Show in MB [root@localhost ~]# free -m total used free shared buffers cached Mem: 2025 […]

Read full story Comments { 0 }

Kloxo: can’t connect ftp

If you can’t connect FTP like the picture below: please follow these steps. Step 1: Login into your Kloxo Control Panel Step 2: Goto FTP Config and change “High Port For Passive ftp” to 35000 Step 3: go to Lxguard, click in Connections tab and remove all Step 4: Reboot server If unsuccessful, please follow […]

Read full story Comments { 0 }

RoundCube: how to save a draft email

This tutorial shows you how to use draft emails in RoundCube. If you want to write an email but send it later, you can save it in RoundCube as a draft message. Pre-configuration: Step 1: Click “manage foldes” Step 2: Click in “+” button, type “Drafts” and save it You could create folders: “Sent”, “Junk”, […]

Read full story Comments { 1 }
PHP: retore big MYSQL-database

PHP: retore big MYSQL-database

This tutorial shows you how to restore a big MYSQL-database. Step 1: split MYSQL file into many part We use PHP-script below (ex: split.php) After run this PHP-script, we take a list of many MYSQL files: 1.sql, 2.sql … Step 2: restore MYSQL There are many ways to restore MYSQL, like BIGDUMP, MYSQLDUMPER. Here, I […]

Read full story Comments { 0 }
Change root password MYSQL in Kloxo via SSH

Change root password MYSQL in Kloxo via SSH

Step 1: Login VPS or dedicated server using SSH. Step 2: Open SSH console. Step 3: Use following commands: service mysqld stop mysqld_safe –skip-grant-tables & mysql -u root mysql> mysql> use mysql; mysql> UPDATE user SET Password = PASSWORD (‘yournewpassword’) WHERE User=’root’; mysql> FLUSH PRIVILEGES; mysql> quit; service mysqld start [root@localhost ~]# service mysqld stop […]

Read full story Comments { 1 }

iTunes Basics: Creating playlists and smart playlists

I have been asked “how do you create smart playlists?” so I thought I would begin a new series of iTunes posts; iTunes Basics. I should probably start with an introduction to iTunes, but that will be next. Creating normal playlists A normal playlist allows you to add any song to it. There are no […]

Read full story Comments { 0 }
PHP: How to check if a Polygon is self-intersect?

PHP: How to check if a Polygon is self-intersect?

How to check if a Polygon is self-intersect? Example 1: Result: bool(false) Example 2: Result: bool(true)

Read full story Comments { 0 }
PHP & MYSQL: Determine Auto Increment value of a table

PHP & MYSQL: Determine Auto Increment value of a table

How to Determine Auto Increment value of a table MYSQL Method 1: Code PHP: Result: 84586 #Showing rows 0 – 0 ( 1 total, Query took 0.0009 sec) Method 2: Code PHP: Method 3: Method 4: Method 5: You must increase the value by one. Method 6 (same with method 5): Method 7: Result: CREATE […]

Read full story Comments { 0 }

Manual Translation of a WordPress Theme

Almost of WordPress themes include a language file to make translating to a different language easy. Inside the theme folder wp-content/themes/theme-name/languages , you’ll find a language file named theme-name.pot. Configure WordPress Before translating your theme, you’ll need to make sure WordPress is setup correctly with your locale.  Open wp-config.php and modify the line below, or add it if […]

Read full story Comments { 0 }