Category Archives: PHP

Install LAMP Server using command line

Hello Linux Lovers! The acronym LAMP is derived from first letters of Linux, Apache HTTP Server, Database MySQL, and Language PHP, Perl or Python. We already have shown you how to install LAMP on many platforms. So we can say that LAMP is a combination of operating system and open-source software stack.
Lets start the LAMP setup procedure:
1. To install LAMP run the below command:

sudo apt-get install lamp-server^

2. Run the following commands to setup user for your apache server, add permission & enable some modules:
sudo usermod -a -G www-data YOUR_USER_NAME

sudo chgrp -R www-data /var/www

sudo chmod -R g+w /var/www

sudo apt-get install php5-curl

sudo a2enmod rewrite

Loop Through Folders with glob() of PHP

There are some times when we need to get entire list of objects (files and directory) in an specific director. In that case We need to loop through that directory to implement our necessary action. Basically I am used to include php helper files to framework. This would require a relatively large snippet of code […]

Create image thumbnail using PHP

Hi, Today I am going to write about a simple PHP script that enable your php project to resize image according to mentioned measurment. You may also create proportionate size thumbnail of any image. At the end I have added a download link of the script so that you can practice or make something more […]

Ajax File Upload Tutorial

In this article you will see how to upload file using JavaScript, iFrame so that it looks like uploading file using Ajax. As we know that to create a pure Ajax file upload system is not possible because of security limitations of JavaScript. All of the Ajax upload systems use some third party tools for […]

Read and Split text file with PHP

Hi there, recently one of my client ask for a script, that is he has a text file containing about 100000 lines. Now he needs to split those files into several files. In this tutorial I am going to describe about the simple script. After complete this script you can do the followings with it: […]

Connect database with ODBC in PHP

PHP supports a large number of databases to manage data. ODBC is one of the ways to connect database. PHP offers some functions (odbc_connect, odbc_exec, odbc_fetch_row, etc) that are used to connect ODBC and manages our data. To work with these functions we need to configure a Data Source Name (DSN) that we can create […]

Configure an ODBC Connection

In this tutorial we will see how to configure an ODBC connection in Windows XP Operating System. We can connect to any database with an ODBC connection, on any computer in a  network, till the  ODBC connection is available. Here are the steps to create an ODBC connection to a MS Access Database: Open the […]

Execute PHP Code from Database

Hi there, Recently in a project  I need to execute PHP text from database. Primarily I was confused how to execute text. But it is solved using the eval() function.  The eval() function evaluates a string as PHP code.  The string must be valid PHP code and must end with semicolon. In this tutorial You […]