GGshow reloaded GGshow reloaded

January 20, 2013

Netbeans will not start? Perhaps it does!

Unable to start Netbeans in Ubuntu, reinstalling it doesn’t help, installing a different version doesn’t help, tried to install from Software Centre, install from terminal apt-get command, install using the offline .sh installer, install different bundle… no luck.

From System Monitor Processes tab, it appears that the Netbeans is running, and the task appear at launcher, but I just can’t find the program on any workspace. Until I found the little 3px line on one of my workspace, on one of the display.

The program window was just too small to be found. No minimum window size? Who know?
Move the cursor onto it, click & drag to resize it, and now I’ve got my Netbeans back.

The program window move the cursor onto it click & drag to resize it Netbeans window

It may happens to any other software that doesn’t have a minimum windows size, or on other operating system. If you have a same problem, don’t reformat your pc 🙂

Filed under: Uncategorized — Tags: , , , — GG @ 8:51 pm

April 3, 2012

Debugging PHP application with Netbeans, Xdebug, and Chromium (or Google Chrome) in Ubuntu

  1. Requirements:
    Firstly, we must have Netbeans, Xdebug, Chromium (or Google Chrome) installed.How to check if Xdebug installed?

    user@ubuntu:~$ php -v
    PHP 5.3.6-13ubuntu3.6 with Suhosin-Patch (cli) (built: Feb 11 2012 02:17:16)
    Copyright (c) 1997-2011 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
        with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
  2. Install Xdebug helper extension
    Visit this URL using Chromium (or Google Chrome).
    Press [Add To Chrome] button to install the Xdebug helper extension.
  3. Configure Xdebug helper options
    Under Chrome extensions, Xdebug helper, press Options.
    Select Netbeans for IDE key.
    Add domains to the domain filter whitelist.
  4. Configure Netbeans
    Tools > Options > General > Web Browser, press [Edit] button.
    Press [Add] button to add a new browser, set configuration as below:Process:
    /usr/bin/chromium-browser
    or
    /usr/bin/google-chromeArguments:
    -remote “{URL}” –user-data-dir=~/.cache/chromium
    or
    -remote “{URL}” –user-data-dir=~/.cache/google-chrome[OK]

    Ubuntu Netbean Chromium Debugging

  5. Debugging
    You can now debug a project (Ctrl+F5) or debug a file (Ctrl+Shift+F5)

    Ubuntu Netbean Chromium Debugging

    To control debugger session
    Finish Debugger Session (Shift+F5)
    Continue (F5)
    Step Over (F8)
    Step Into (F7)
    Step Out (Ctrl+F7)
    Run to Cursor (F4)
    or use the buttons in Debug Toolbar

Filed under: Web,Web Browsers — Tags: , , , , , — GG @ 12:08 pm

March 24, 2012

Web Development Environment in Ubuntu Linux

PART 1 – Ubuntu
Ubuntu is a computer operating system based on the Debian Linux distribution and distributed as free and open source software, using its own desktop environment.

  1. Download & install Ubuntu Linux.
  2. Update package index and upgrade OS.
    To update package index
    sudo apt-get update

    To upgrade all installed packages

    sudo apt-get upgrade
  3. Installing software packages
    To install a package
    sudo apt-get install <package-name>

    To remove a package

    sudo apt-get remove <package-name>

PART 2 – LAMP
LAMP is an acronym for a solution stack of 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.

  1. Install LAMP
    To install Apache 2, MySQL 5, PHP 5, Apache PHP5 module, PHP MySQL package.
    sudo apt-get install apache2
    sudo apt-get install mysql-server
    sudo apt-get install mysql-client
    sudo apt-get install php5
    sudo apt-get install libapache2-mod-php5
    sudo apt-get install php5-mysql 

    or simply

    sudo apt-get install lamp-server^

    to install all packages below:
    perl-modules apache2 mysql-server-core-5.1 mysql-client-core-5.1 perl libmysqlclient16 libdbi-perl apache2-mpm-prefork apache2.2-common apache2.2-bin apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2 ssl-cert libwrap0 mysql-server libapache2-mod-php5 php5-common php5-cli libclass-isa-perl libdbd-mysql-perl libplrpc-perl libhtml-template-perl mysql-common libnet-daemon-perl libpod-plainer-perl libswitch-perl tcpd mysql-client-5.1 mysql-server-5.1 php5-mysql

PART 3 – Optional Packages

  1. Zend Framework Zend Framework is an open source, object oriented web application framework for PHP 5.
    To install Zend Framwork CLI
    sudo apt-get install zend-framework-bin
  2. PHPUnit PHPUnit is a unit testing software framework for PHP.
    To install PHPUnit
    sudo apt-get install php-pear
    sudo pear channel-update pear.php.net
    sudo pear channel-discover pear.phpunit.de
    sudo pear channel-discover pear.symfony-project.com
    sudo pear update-channels
    sudo pear upgrade-all
    sudo pear install --alldeps phpunit/PHPUnit
    sudo apt-get install phpunit

    or

    sudo apt-get install php-pear
    sudo pear update-channels
    sudo pear config-set auto_discover 1
    sudo pear install --alldeps pear.phpunit.de/PHPUnit
    sudo apt-get install phpunit
  3. Xdebug
    Xdebug is a PHP extension which provides debugging and profiling capabilities.
    To install Xdebug
    sudo apt-get install php5-xdebug

    Add the following lines into etc/php5/conf.d/xdebug.ini if it does not exist.

    zend_extension = “/usr/lib/php5/20090626-lfs/xdebug.so”
    xdebug.remote_enable=on
    xdebug.remote_handler=dbgp
    xdebug.remote_host=localhost
    xdebug.remote_port=9000
  4. Optional PHP extensions
    To install PHP extensions
    sudo apt-get install php5-cgi php5-cli php5-curl php5-gd php5-idn php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-mysql php5-pgsql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

    * install only which needed.

  5. MySQL GUI tools
    1. Install MySQL Administrator and MySQL Query Browser
      sudo apt-get install mysql-admin
      sudo apt-get install mysql-query-browser

      and/or

    2. Install MySQL Workbench
      sudo apt-get install mysql-workbench
      sudo apt-get install mysql-query-browser

      and/or

    3. Install phpMyAdmin
      sudo apt-get install phpmyadmin

      Add the following line into /etc/apache2/apache2.conf

      Include /etc/phpmyadmin/apache.conf
  6. Integrated Development Environment
    1. Eclipse
      Install Eclipse IDE
      sudo apt-get install eclipse

      Install PHP Development Tools (PDT)

      sudo add-apt-repository ppa:yogarine/eclipse/ubuntu
      sudo apt-get update
      sudo apt-get install eclipse-pdt

      and/or

    2. Netbeans IDE
      Download & install Netbeans IDE
      Install Java
      sudo apt-get install sun-java6-jdk sun-java6-jre

      Download & install Netbeans

      sudo sh ./netbeans-7.1.1-ml-php-linux.sh

      Install Netbeans

      sudo apt-get install netbeans

      Or download & install the Java SE and NetBeans Cobundle

      sudo sh ./jdk-7u3-nb-7_1_1-linux-ml.sh
  7. Web browser debugging tool
    1. Firebug Install Firebug. or
    2. Developer tools in Chromium Browser Install Chromium Browser
      sudo apt-get install chromium-browser

      Press Ctrl+Shift+I to open Developer Tools

  8. Install version control system
    1. Subversion
      Subversion (SVN) is a software versioning and revision control system distributed under an open source license.
      Install Subversion
      sudo apt-get install subversion
      sudo apt-get install libapache2-svn
    2. Git
      Git is a distributed revision control and source code management (SCM) system with an emphasis on speed.
      Install Git
      sudo apt-get install git-core
      sudo apt-get install git-doc
      sudo apt-get install git-svn
      sudo apt-get build-dep git-core git-doc git-svn

PART 4 – Packages version
To check installed packages version

apache2 -v
php -v
mysql -V
phpunit --version
git --version
svn --version
java -version
zf show version
Filed under: Linux,MySQL,PHP,Web,Zend Framework — Tags: , , , , , — GG @ 10:26 pm

© 2024 GGSHOW | Powered by WordPress