Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

22 October 2013

How to install Xdebug with Sublime Text in Ubuntu 12.04

17 comments

Xdebug is a PHP extension for powerful debugging. It supports stack and function traces, profiling information and memory allocation and script execution analysis. Xdebug provide following functionality like function name, file name and line indications, support for member functions, full parameter display for user defined functions etc for PHP developers which help them to debug their code easily and quickly.

Installing Xdebug with Sublime Text in Ubuntu is little bit tricky, but you can easily install it if you follow along this post. Lets get started.

Installing Xdebug in Ubuntu

Step 1: Open terminal(Ctrl + Alt + t) and type following command to see whether Xdebug is installed or not.
$ php -v
PHP 5.3.10-1ubuntu3.8 with Suhosin-Patch (cli) (built: Sep  4 2013 20:00:51) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
Note: If your Output is same like mine then you are good to go. If not the type following command to install it.
$ sudo apt-get install php5-xdebug
Read More...

31 July 2012

MY First Program in PHP

40 comments

first php program
After installing all the prerequisites for setting up PHP environment like installing LAMP server, installing PhpMyAdmin we are now able to start with writing our first program in php. Lets start

Step 1: If you are using Linux system, then first go to /var/www/ directory.

Step 2: Create php file called first.php.

Step 3: Using your favorite text editor, open this file and write the following code and save it.

<?php
echo "My first program in php";
?>

Step 4: Now open your browser and enter following url to execute it localhost/first.php

first program in php

Note: <?php and ?> are opening and closing tags.
Read More...

30 July 2012

What is PHP??

7 comments

about php
PHP is a general-purpose server-side scripting language originally designed for Web development to produce dynamic Web pages. It is one of the first developed server-side scripting languages to be embedded into an HTML source document rather than calling an external file to process data. The code is interpreted by a Web server with a PHP processor module which generates the resulting Web page. It also has evolved to include a command-line interface capability and can be used in standalone graphical applications.PHP can be deployed on most Web servers and also as a standalone shell on almost every operating system and platform free of charge.PHP is installed on more than 20 million Web sites and 1 million Web servers.

Software that uses PHP includes Joomla, Wordpress, Concrete5, MyBB, and Drupal and many more.

PHP was originally created by Rasmus Lerdorf in 1995. The main implementation of PHP is now produced by The PHP Group and serves as the formal reference to the PHP language.PHP is free software released under the PHP License, which is incompatible with the GNU General Public License (GPL) due to restrictions on the usage of the term PHP.

While PHP originally stood for Personal Home Page, it is now said to stand for PHP: Hypertext Preprocessor, a recursive acronym.

Read More...

29 July 2012

How to install PhpMyAdmin in Ubuntu/Linux Mint

1 comment

phpMyAdmin is a free and open source tool written in PHP intended to handle the administration of MySQL with the use of a Web browser. It can perform various tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL statements; or managing users and permissions.

It is very easy to install PhpMyAdmin in Ubuntu/Linux Mint, To install it open terminal and type following command

$ sudo apt-get install phpmyadmin

Once installed you can open phpmyadmin by opening browser and type

http://localhost/phpmyadmin
Read More...

17 March 2012

Setting PHP environment in Linux/Ubuntu

1 comment

how to install lamp server in linux
courtesy http://myphpscriptz.com 
LAMP is an acronym for a  free, open source software, referring to the first letters of Linux (operating system), Apache HTTP Server, MySQL (database software) and PHP (or sometimes Perl or Python), principal components to build a viable general purpose web server.

Installation of LAMP server using Task sel

Step 1. Open your terminal and type

$ sudo tasksel

installing lamp server using tasksel

Step 2. Select LAMP server.

Step 3. Press space to mark it for installation.

Step 4. Press Enter to install it.

Step 5. While installing you will be prompt for MySQL "root" user , Enter you password and press <ok>.

Read More...