Monday, October 3, 2016

Bootable Windows with Ubuntu

Create bootable windows with ubuntu is an alternative if you do not have an cd-rom to install laptop. I apply this experience when getting a new asus laptop and want to install Windows using a usb flash because it does not have an cd-rom. It is just like using unetbootin in linux distro. The following sequence of creating a bootable flash windows using ubuntu: 1. Open a terminal and type the command : a. sudo add-apt-repository ppa:colingille/freshlight
b. sudo apt-get update
c. sudo apt-get install winusb
2. open winusb
3. Prepare iso windows and flash that will be used for bootable. after opening WinUSB, click from a disk image (.iso) and navigate to the storage directory iso windows. Make sure the flash has been detected on your computer.
4. WinUSB process will use some time
5. If completed then we will have a bootable flash drive that is ready for install windows in laptops that do not have a cd-rom.
Read More

Wednesday, September 14, 2016

Virtual Statistics Laboratory

Starting from a less popular software-based non-commercial one R among practitioners of statistics, Statistics Virtual Laboratory designed with toolkits based R-shiny, to create a web-GUI interfaces. With the aim of using visualization R without having to master the language R, because communication with the user can be done through a web friendly. Professor of Statistics Prof. I Made Tirta create web content form of a tutorial / handouts / lecture notes electronically simulated illustrations presented directly by R. document that is therein, also includes mathematical notation correctly through the ability LaTeX on MathJax. By using server-based Ubuntu Server and apply the r-shiny therein made interactive web makes it not only learn but also to give it a try. As I wrote earlier about building R-Shiny local computer, Virtual Laboratory Statistics is a continuation and development of the HTML for ease of application. Added also the application of Latex and MathJax through the Java language. Visitors can learn about a wide range of simulation are: Probability Freq, Mean Distributions and Normal Distribution. Demo also many show started Basic Statistics, Simple Regression, Cluster Analysis to RGraphics.
Statistics Virtual Laboratory glance similar to R-cloud that has been there, but the advantage is visitors no longer need to learn to use the language R. All the facilities have been provided and have been programmed in it are also still using the R language is always complete with the package - a package terupdatenya , As we used to know and use R-Commander, this is more interactive and web-based major has. Where and whenever can be used easily and learning becomes simple.
Read More

Tuesday, December 30, 2014

Joomla jos_session problem

The use of CMS in the web world are now widely used. Ease of managing the content of the web and many features provided, greatly helps web designer to create beautiful view of the web. Likewise with me were very keen to use the CMS. In case this is Joomla is arguably the most popular of several existing CMS. Some time ago there was a bit of a problem arising from the web that I manage. Error message is like this:
This is because jos_session is used to manage user sessions, so it is written to frequently. The most common cause of a corrupted table is a failed write. When the server runs out of resources, it is usually in the middle of a write, This the corrupt jos_session table.
After looking at several forums references and do some experiments there is a solution that might help to resolve the problem of the session. The first solution is to delete and re-create jos_session table using SQL commands:
DROP TABLE IF EXISTS `jos_session`;
CREATE TABLE IF NOT EXISTS `jos_session` ( `username` varchar (150) default '', `time` varchar (14) default '', `session_id` varchar (200) NOT NULL default '0', `guest` tinyint (4) default '1', userid` `int (11) default '0', `usertype` varchar (50) default '', `gid` tinyint (3) unsigned NOT NULL default '0', `client_id` tinyint (3) unsigned NOT NULL default '0', `data` LONGTEXT, PRIMARY KEY (`session_id` (64)), KEY `whosonline` (guest``, `usertype`), KEY `userid` (` userid`), KEY `time` (` time`) ) ENGINE = MyISAM DEFAULT charset = utf8;
The second solution to fix jos_session table using phpmyadmin: Find Joomla database in phpmyadmin then find table jos_session, repair that table
The third solution by modifying existing files in the directory joomla itself. For this section there are some files that are modified to overcome the problem session:
1. Edit the file libraries / joomla / database / table / session.php
function insert ($ sessionId, $ ClientID)
{ $ url = 'http: //'.$_SERVER [' SERVER_NAME ']. $ _ SERVER [' REQUEST_URI '];
$ this-> session_id = $ sessionId; $ this-> client_id = $ ClientID; $ this-> time = time ();
if ($ this-> guest! = 1 || stristr ($ url, '/ administrator')) $ ret = $ this -> _ db-> insertObject ($ this -> _ tbl, $ this, 'session_id');
if (! $ ret && $ this-> guest! = 1) { $ this-> setError (strtolower (get_class ($ this)). "::". JText :: _ ('store failed'). "
". $ this -> _ db-> stderr ()); return false; } else { return true; } }
 2. Edit the file /index.php
/ ** * CREATE THE APPLICATION * * NOTE: * / $ mainframe = & JFactory :: getApplication ('site');
 Change to:
$ mainframe = & JFactory :: getApplication ('site', array ('session' => false));
The next solution is to change the configuration in Joomla. Joomla by default tracks jos_session session data in the table, as I see you've figured out. However, you can disable this by going Easily to your admin panel - Global Configuration - System - Session Settings and change the session handler from "database" to "None".

And the last is the patience and prayer to overcome the problem.
Read More

Thursday, September 4, 2014

MySQL: Too Many Connection Error

It has been very much used MySQL since introduced around the year 2005, and this leads to a real DBMS Engine which allows the direction of the Enterprise. More economical than the use of another engine such as MS SQL or Oracle. But there are to watch out for with the economic value, is the issue of too many connection, many servers that have a very high visitor is having trouble. And I feel it when going on a website that I have ever manage at FMIPA Universitas Jember
Too Many Connection occurs because of some problems like this: too many connections that occur simultaneously, often experienced by these sites that weve crowded. packet flooding defect occurs to the port that MySQL is used, this can be tested by doing a telnet to 3306 too many connections are already obsolete, but not in the release or in-free
For the first cause, which occurs because the force is due to conditions that occur simultaneous connections. To solve this problem is to tweak the mysql configuration file (my.ini or my.cnf) and increase the value of the max_connections variable. Default variable values ​​100 For websites that crowded, maybe less default settings. Or it could be another way to dispose of or give a # at the max_connections variable. 

For the second cause, there are many defects in the pool MySQL package, how to fix this is to do mysqladmin flush using the tools. make a batch-script that contents mysqladmin flush-hosts then attach a handler in the web server or on a desktop program (adjust with the environment) if you find an error in MySQL engines with error code SQLSTATE = 08S01 (for server-related error bad packet) or 46000 (to a server error relating to that connection) 

For the third cause, too many connections that are already obsolete, but not in the release or in the free, this is a coding issue. Code that is not good, it will leave a lot of junk in the cache server. For the coder, may know how to connect to the DBMS, whether by way of persistent-connection or non-persistent. What is gained if you have too many connection, he replied restart the server. But if we understand the 3 terms above may be a bit inevitable. I HOPE
Read More

Friday, June 13, 2014

Internal Error Ubuntu 12.04

internal error message

In ubuntu discussion this time is about error messages that often appear in the ubuntu desktop. Ubuntu users must have got the message as shown above


Users do not get a choice but to press the Continue button. This error message is inadvertently displayed in Ubuntu 12.04 LTS with the goal of the developers can find out the bug / problem that can be fixed later for desktop users as we might a little disturbing because this message will appear any time if there is a bug / problem in ubuntu that we use.

There is a suggestion that this feature remains enabled, but not one as well to know a simple way to disable this feature.
1. Open a terminal or console (ctrl + alt + t)
2. Use any editor (gedit, vim, pico, nano) in this case I use vim sudo vim /etc/default/apport
3. At the line enabled = 0 to disable the content parameters, while 1 to re-activate.

vim editor to open apport

May be useful for us all
Read More

Wednesday, June 4, 2014

Ubuntu 14.04 Upgrade HowTo

14.04 LTS Ubuntu has been released last April 2014. For users of earlier versions of Ubuntu such as 13.10, 13.04 or 12.04 LTS there would be a question of how to upgrade to the latest edition of ubuntu 14.04 LTS? You can upgrade from a minor or major release of Ubuntu Easily and recommended for all users There are several steps that must be done to upgrade to Ubuntu 14.04 LTS:


1. Perform backups of your important data. Can save to another partition on the computer or storage media which you have.
2. Ensure release of Ubuntu you type the following command in the shell (to simplify the example I give a command shell and as root)
root@yoyok:~# uname -mrs
root@yoyok:~# lsb_release -a
the result are
Linux 3.2.0-51-generic x86_64 No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise

3. How do I upgrade to a newer version of Ubuntu 14.04, from an older Ubuntu? Type the following command to update package list and install the update-manager-core package if it is not already installed:

yyp@yoyok:~# sudo apt-get update
yyp@yoyok:~# sudo apt-get install update-manager-core

Next, type the following command to upgrade the Ubuntu to the latest release such as LTS 14.04 from the command-line.

yyp@yoyok:~# sudo do-release-upgrade

The do-release-upgrade will launch the upgrade tool. You need to follow the on-screen instructions. 

4. Fixing and forcing upgrade You may end up getting the following message on screen when you run sudo do-release-upgrade

Checking for a new Ubuntu release No new release found
To force upgrade pass the -d option to sudo do-release-upgrade command:
yyp@yoyok:~# sudo do-release-upgrade -d
5. Reboot the desktop or server Reboot the system
yyp@yoyok:~# sudo reboot
Verify, your new settings:
root@yoyok:~# lsb_release -a
root@yoyok:~# uname -mrs
Read More

Friday, May 30, 2014

Ubuntu 14.04 Trusty Tahr, What's new in this LTS

Ubuntu 14.04 LTS Final now there and ready for download. You can download it from the server Indonesia, one of which is in mirror.unej.ac.id 

14.04 LTS, LTS means Long Term Support, meaning that the Ubuntu LTS given support or updates for five years. This means that Ubuntu will be updated until 14.04 the next five years. 

To understand more deeply, it is better to download and try to install on your computer. Here are a few of the many advantages compared to previous versions of Ubuntu 14.04.


It's no secret since the Ubuntu Unity interface wear, they got a lot of criticism and problems. Unity itself becomes an interface defaut Ubuntu since 2011, the previous default Ubuntu is a Gnome interface. Ubuntu Unity, now much more refined and has better performance and faster. Perhaps there are still some less than perfect, but not too flashy. At 14.04 LTS Ubuntu Unity, Compiz plugins already replaced the same decor GTK3 CSS themed window decoration. GTK3 resize has better speed and anti-alias feature in every corner of the corner of the window. Top panel also already be in the right click option that will give you the option for minimize, unmaximize, set the window always on top. As a whole may not be too different from the previous edition. For systems in which there is a slightly different way of setting APT sources.list, in this edition source.lst been grouped by mirrors to be addressed. As for the disadvantages, there are some applications that are not available in this edition. But as a whole the same flavor and a little different.
Read More

Tuesday, September 17, 2013

Shiny R with Ubuntu


The first hearing of an application is not shiny like it as a song lyric I have ever heard. Shiny introduced by a professor, he was a friend of mine who is an expert in the field of statistics in particular R.

Shiny makes it super simple for R users like you to turn analyses into interactive web applications that anyone can use. Let your users choose input parameters using friendly controls like sliders, drop-downs, and text fields.

Easily incorporate any number of outputs like plots, tables, and summaries. No HTML or JavaScript knowledge is necessary. If you have some experience with R, you’re just minutes away from combining the statistical power of R with the simplicity of a web page. Next is complete list of instructions for installing Shiny Server and its prerequisites on Ubuntu
# Install Node.js
sudo apt-get update
sudo apt-get install software-properties-common python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

# Install R
sudo add-apt-repository 'deb http://cran.rstudio.com/bin/linux/ubuntu raring/'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt-get update
sudo apt-get install r-base r-base-dev


The same as above, except when installing R this line:
sudo add-apt-repository 'deb http://cran.rstudio.com/bin/linux/ubuntu raring/'
must be replaced with this line for Ubuntu 12.10:
sudo add-apt-repository 'deb http://cran.rstudio.com/bin/linux/ubuntu quantal/'
or with this line for Ubuntu 12.04:
sudo add-apt-repository 'deb http://cran.rstudio.com/bin/linux/ubuntu precise/'

# Install Shiny in system-wide library
sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""
sudo npm install -g shiny-server

# Install Upstart script
sudo wget\ https://raw.github.com/rstudio/shiny-server/master/config/upstart/shiny-server.conf\ -O /etc/init/shiny-server.conf
# Create a system account to run Shiny apps
sudo useradd -r shiny

# Create a root directory for your website
sudo mkdir -p /var/shiny-server/www

# Create a directory for application logs
sudo mkdir -p /var/shiny-server/log
# Start Shiny
sudo start shiny-server

# Optional: Install examples to test
sudo cp -R /usr/local/lib/R/site-library/shiny/examples /var/shiny-server/www/
Now open a browser to http://localhost:3838/examples/ and see if they work.
Read More

Monday, September 2, 2013

QMMP like WinAmp for Ubuntu 12.04 / 12.10 / 13.04

We all must have been a familiar winamp-based windows, applications mp3 player, mp4 and some videos but most of us use to play mp3. how in linux especially ubuntu, after several times trying different mp3 player application choice fell on QMMP. Similar to winamp and of course we have been accustomed to using.

Display the currently playing music, equalizer and playlist songs are easy and simple are the hallmarks of QMMP.

  
Very easy way to install it: 

sudo add-apt-repository ppa:forkotov02/ppa 

sudo apt-get update sudo apt-get install qmmp 


sudo apt-get install qmmp-plugin-pack 


For skins can be downloaded at this link.
Then place it in the folder : /home/username/.qmmp/skins


  Read More

Thursday, May 23, 2013

Shift Key Problem


Some time ago I had trouble in my notebook. Some keys do not work properly. Incidentally when I menngunakan windows 7 operating system, I thought this was definitely a virus. That could happen because for this notebook does not have any anti virus installed.

I have some anti virus download, especially free. Then started the experiment, anti virus installed complete with latest updates. After that do a scan with a very saturate. The result is very disappointing, fixed knob is not working as usual.

There's crazy ideas, one of which troubled push button button simultaneously while annotate. And the result: Press right shift key and the left shift key simultaneously for a few seconds, then work
Hopefully this can help you to share your experiences problems.
Read More

Thursday, January 17, 2013

Asus X201E Ubuntu 12.04 ( Function Keys )

I recently bought asus notebook X201e some time ago. Since I am a fans of Ubuntu, I just installed Ubuntu LTS 12.04, I chose it because the support of the old and very easy to use. Once installed, there are several issues that arise are the function keys are not used. By doing the test a few pointers on google, finally I got the solution and it can work well.
The first step is to upgrade the kernel ubuntu 12.04 by default is 3.2 to 3.5 following is how: Add repositories of Ubuntu 12.10 by editing “/etc/apt/sources.list”
sudo vim /etc/apt/sources.list
and add following lines:
deb http://security.ubuntu.com/ubuntu quantal-security main universe restricted multiverse deb-src http://security.ubuntu.com/ubuntu quantal-security main universe restricted multiverse deb http://archive.ubuntu.com/ubuntu/ quantal-updates main universe restricted multiverse deb-src http://archive.ubuntu.com/ubuntu/ quantal-updates main universe restricted multiverse deb http://archive.ubuntu.com/ubuntu/ quantal main universe restricted multiverse deb-src http://archive.ubuntu.com/ubuntu/ quantal main universe restricted multiverse
Then update and install the kernel:

sudo apt-get update sudo apt-get install linux
For PAE kernel (for intel i386 with more than 4GB RAM) :

sudo apt-get install linux-generic-pae
After that reboot: sudo reboot. Yessss !!!! ..., successfully. The volume setting can walk normally again, as well as wireless and others. But the Fn key for brightness is still not running. After dabbling again, This could be fixed by editing the /etc/default/grub file and changing the line "GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to "GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=". After running "sudo update-grub" in the terminal and rebooting, the keys were working again. And some functions in ASUS X201E worked. Good Luck Read More

Wednesday, October 17, 2012

FreeTDS MYSQL MSSQL PHP

You certainly know a wide range of database engine in the world. one of which is MYSQL.
My post this time about the experience of using the connector from MYSQL ubuntu server to MSSQL the course of microsoft. The goal is to read data from MSSQL database using PHP commands in a project I was working on. The first one is the installation of freetds package ubuntu package, by typing the command:
sudo apt-get install freetds-common freetds-bin unixodbc php5-sybase 
Once the process is complete, do the changes in the file freetds.conf use the command:
sudo vim /etc/freetds/freetds.conf then add some few lines at the bottom of the file: 
[yourserver] host = your.server.name 
port = 1433 
tds version = 8.0 
Furthermore restart the apache server on the machine by typing the command:
sudo /etc/init.d/apache2 restart 
The final step, create additional php file that is created as follows:
<? php
$ link = mssql_connect ('yourserver', 'yourusername', 'yourpassword');
if (!$link) { die ('Unable to connect!'); }  
if (!mssql_select_db ('yourdatabasename', $ link))
{ die ('Unable to select database'); }
$result = mssql_query ('SELECT * FROM yourtable');  
while ($row=mssql_fetch_array ($ result)) { var_dump ($ row); }  
mssql_free_result ($ result);
?>
Mysql database result has been able to read the data on MSSQL database. Furthermore, good luck, good luck
Read More

Wednesday, June 27, 2012

UBUNTU LTS 12.04 (Precise Pangolin)

Based on the Ubuntu Developer Summit in early September 2011 Canonical has announced the release of some new things related to Ubuntu LTS 12.04 

1. 64 Bit version for the default download. At 12. 04 Ubuntu main packages that can be downloaded is a 64 bit version. Nevertheless, the 32 bit version is still available as well. As the heart, it will use the Ubuntu 12.04 kernel version 3.2. (tested with my asus x201e)

2. Require DVD or USB drive to install. 12.04 Ubuntu seem to download this file image / ISO it will size around 750 MB. This means that with that much size will not fit if it is bundled on CD. Users will need a DVD or USB Drive to install it. Of course this is a shock to the user, especially with the addition of only 50 MB file only. 

3. Drop Banshee, Back to Rhythmbox Some reports suggested that the Banshee music player - which has just added to Ubuntu as the default music player - will be replaced again with Rhythmbox. The main problem in Banshee is the lack of software maintenance process / update the application and potentially not be compatible with ARM processors. It is still discussed in the mailing list Ubuntu-Desktop. 

4. No More Mono Framework Closely related to point (3) on the abolition of Banshee, Mono Framework is also possible to be eliminated from Ubuntu. Banshee is one of the few applications that still depend on Mono (another example is the Tomboy Notes and gBrainy), Mono is an implementation of Microsoft's. NET framework that is open source. According to the Ubuntu Community Manager Jono Bacon (written in his blog) that the Banshee and Mono problems have been fixed / finished. 

5. A much faster start up time for the Ubuntu Software Center The developers are hoping to improve the startup speed of the Ubuntu Software Center from 11 seconds to less than 2 seconds, and also continue to always make improvements Unity desktop. Ubuntu Software Center will be updated with support for multiple screenshots. 

6. Head-Up Display (HUD) Feature On January 2012, Mark Shuttleworth announced that Ubuntu will incorporate new features 12.04 of Head-Up Display (HUD), which will allow the search for an application menu item only via keyboard hotkey without the need for a mouse. Shuttlework added that HUD later on in the future will replace the Unity Applications menu. 

7. A Wayland Preview. 12.04 Ubuntu while still dependent on the primary server X.Org as a graphical display system, an experiment using Wayland Graphics System to run the X11 server and it allows the (successful). In the future maybe Ubuntu will adopt Waylang Graphics System as well. 8. Gnome 3.2 Gnome 3.4 plus some packages Most of the Gnome packages on Ubuntu LTS 12:04 it will use Gnome version 3.2 of the package, but some packages of Gnome version 3.4 will reportedly be included as well, for example GTK + 3.4, Gnome Games, gedit, gcalctool, Evince and Yelp.
Read More

Thursday, October 20, 2011

Ubuntu 11.10 (Oneiric Ocelot)

Has been released yesterday, this edition includes the Ubuntu desktop, server, cloud, Kubuntu, Xubuntu, Lubuntu, Edubuntu, Mythbuntu, and Ubuntu Studio. Not too much difference with the previous edition 11.04 / Natty, just adding a few additional applications one of them: Deja DUP for backing up data.

Merger unity and compiz is a different side view of its predecessor, the login screen is also another. But as a whole can be spelled similar to the previous edition.

Because similar to the reply already installed, I just try and then delete it because of who got the laptop says "what is windows 8?"
Even more fun is waiting for 12.04 Ubuntu LTS (Precise pangolin) which is planned to release on April 26 next year (I think it's what Precise, was an anteater). 10.04 Maybe it could replace the LTS as well, because according to its developers this is a tough, durable and a little bug.

Good luck to those interested:

http://releases.ubuntu.com/11.10/ (Ubuntu, Ubuntu Server)

http://cloud-images.ubuntu.com/releases/11.10/ (Ubuntu Cloud Images)

http://cdimage.ubuntu.com/releases/11.10/ (Ubuntu DVD, preinstalled ARM images, source)

http://cdimage.ubuntu.com/netboot/11.10/ (Ubuntu Netboot)

http://releases.ubuntu.com/kubuntu/11.10/ (Kubuntu)

http://cdimage.ubuntu.com/kubuntu/releases/11.10/ (Kubuntu DVD)

http://cdimage.ubuntu.com/xubuntu/releases/11.10/ (Xubuntu)

http://cdimage.ubuntu.com/edubuntu/releases/11.10/ (Edubuntu)

http://cdimage.ubuntu.com/ubuntustudio/releases/11.10/ (Ubuntu Studio)

http://cdimage.ubuntu.com/mythbuntu/releases/11.10/ (Mythbuntu)

http://cdimage.ubuntu.com/lubuntu/releases/11.10/ (Lubuntu)
Read More

Monday, May 9, 2011

Ubuntu 11.04 Natty Narwhal Review


After waiting many months, the latest ubuntu release has been published a few weeks ago. What and how the performance of the Natty this.

Here's the latest test release ubuntu 11:04 uses several different hardware. Incidentally kompeter could borrow from friends and laptop to have someone (only intel, amd who do not have the love and loans)

1. Booting requires only 50-10 seconds (I3 processors or more)
booting requires 10-30 (under the dual cores, or netbook)

2. Desktop look a little different than previous releases, since it uses unity ubuntu 11:04.


glance for Apple users if somewhat similar, because the application is on the left desktop.

3. In the latest Ubuntu, there are some applications that change, which is very striking is that Open Office is no longer a default install of ubuntu. His replacement is the Libre Office, but its user exactly like other office applications like openoffice and microsoft office. Separate also is gimp, applications for the designer is also already there when the installation is not automatic, but we can still download through the application sypnatic or via terminal (apt-get install)



4. Browser Mozilla Firefox on ubuntu still, what a coincidence when released yesterday, also firefox has just launched its latest version. To support the performance of Ubuntu users. The latest version of Firefox has become the default browser on this Natty.



5. Natty is the latest breakthrough in cloud computing. If you want to store data in the cloud of ubuntu, ubuntu just use one application. This application is suitable for users who are super mobile.



So Ubuntu Natty review, we wait for the latest terobasan in the next Ubuntu release Oneiric Ocelot 11:10

Read More

Friday, May 6, 2011

Downgrade PHP 5.3 to PHP 5.2 Ubuntu Lucid Server

This process is required at the server system does not match the needs of bcompiler to perform the randomization code in PHP. Discussion will I show is using Ubuntu Lucid Server.
The following process steps downgrade:
1. Check what PHP packages are installed on the server, then list to be removed from the system. To do this use the command: dpkg-l | grep php

yoyok@yoyok-desktop:~$ dpkg -l | grep php


will appear like this:
ii libapache2-mod-php5 5.3.2-0ubuntu1 server-side, HTML-embedded scripting languag
ii php-pear 5.3.2-0ubuntu1 PEAR - PHP Extension and Application Reposit
ii php5-cgi 5.3.2-0ubuntu1 server-side, HTML-embedded scripting languag
ii php5-cli 5.3.2-0ubuntu1 command-line interpreter for the php5 script
ii php5-common 5.3.2-0ubuntu1 Common files for packages built from the php
ii php5-dev 5.3.2-0ubuntu1 Files for PHP5 module development
ii php5-gd 5.3.2-0ubuntu1 GD module for php5
rc php5-mcrypt 5.3.2-0ubuntu1 MCrypt module for php5
ii php5-mysql 5.3.2-0ubuntu1 MySQL module for php5
ii php5-sqlite 5.3.2-0ubuntu1 SQLite module for php5


2. Prepare a PHP packages that will diremove

yoyok@yoyok-desktop:~$ dpkg -l | grep php | awk '{print $2}'

results:
libapache2-mod-php5
php-pear
php5-cgi
php5-cli
php5-common
php5-dev
php5-gd
php5-mcrypt
php5-mysql
php5-sqlite


3. Remove the php package with the command:

yoyok@yoyok-desktop:~$ sudo apt-get remove libapache2-mod-php5
php-pear php5-cgi php5-cli php5-common php5-dev php5-gd php5-mcrypt php5-mysql php5-sqlite


4. After the successful, add the karmic repository in /etc/apt/sources.list, for ease of use this command:

yoyok@yoyok-desktop:~$ sed s/lucid/karmic/g /etc/apt/sources.list | tee /etc/apt/sources.list.d/karmic.list


5. Then, create a pin whose function is to hold for package PHP will not be upgraded to Lucid again, Create a file called php which is stored in the folder /etc/apt/preferences.d/, whose contents are as follows:
Package: libapache2-mod-php5
Pin: release a=karmic
Pin-Priority: 991

Package: php-pear
Pin: release a=karmic
Pin-Priority: 991

Package: php5-cgi
Pin: release a=karmic
Pin-Priority: 991

Package: php5-cli
Pin: release a=karmic
Pin-Priority: 991

Package: php5-common
Pin: release a=karmic
Pin-Priority: 991

Package: php5-dev
Pin: release a=karmic
Pin-Priority: 991

Package: php5-gd
Pin: release a=karmic
Pin-Priority: 991

Package: php5-mcrypt
Pin: release a=karmic
Pin-Priority: 991

Package: php5-mysql
Pin: release a=karmic
Pin-Priority: 991

Package: php5-sqlite
Pin: release a=karmic
Pin-Priority: 991


6. Do the updates and install the package php
yoyok@yoyok-desktop:~$ sudo apt-get update
yoyok@yoyok-desktop:~$ sudo apt-get install libapache2-mod-php5
php-pear php5-cgi php5-cli php5-common php5-dev php5-gd php5-mcrypt php5-mysql php5-sqlite


7. When finished do check the package php (php 5.2) with the command dpkg-l | grep php. result like this:
ii libapache2-mod-php5 5.2.10.dfsg.1-2ubuntu6.4 server-side, HTML-embedded scripting languag
ii php-pear 5.2.10.dfsg.1-2ubuntu6.4 PEAR - PHP Extension and Application Reposit
ii php5-cgi 5.2.10.dfsg.1-2ubuntu6.4 server-side, HTML-embedded scripting languag
ii php5-cli 5.2.10.dfsg.1-2ubuntu6.4 command-line interpreter for the php5 script
ii php5-common 5.2.10.dfsg.1-2ubuntu6.4 Common files for packages built from the php
ii php5-dev 5.2.10.dfsg.1-2ubuntu6.4 Files for PHP5 module development
ii php5-gd 5.2.10.dfsg.1-2ubuntu6.4 GD module for php5
rc php5-mcrypt 5.2.6-0ubuntu2 MCrypt module for php5
ii php5-mysql 5.2.10.dfsg.1-2ubuntu6.4 MySQL module for php5
ii php5-sqlite 5.2.10.dfsg.1-2ubuntu6.4 SQLite module for php5


So now the downgrade of package php 5.3 to 5.2 successfully
Read More

Thursday, April 14, 2011

PHP and Javascript Autocomplete Search

Starting from the case when the search data using a key word table in a MySQL database. Search results can be done in several ways, but the accuracy and convenience take precedence. What is desired is to enter one character per word, it will display the results of database queries associated with that character.

Suppose we look for the word or the name of someone in a database, simply by memasukkam word Y, then Y is related to the word will be displayed in a list table: Yoyo, Sandy, Bayu and others. Next we discussed the script. In this case the language of php and javascript. Search techniques using javascript function showHint.


<head>
<script type="text/javascript">
function showHint(str)
{
if (str.length==0)
{
document.getElementById("txtHint").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","search1.php?q="+str,true);
xmlhttp.send();
}
</script>
</head>
<form>
Input Name : <input type="text" onkeyup="showHint(this.value)" size="20" />
</form>
<p><span id="txtHint"></span></p>

Save the script above with the name of search.php. Next create another php file with the name search1.php to invoke a MySQL database (database query) based on input from the file search.php

if (isset($_GET[q])) {
//load database from php
include ('../config/db_connect.php');
$q=$_GET[&quot;q&quot;];
$query = mysql_query(&quot;SELECT * FROM staff where name like '%$q%'&quot;);
?&gt;
&lt;table bgcolor=&quot;#000000&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot;&gt;
&lt;tr bgcolor=&quot;#DDDDDD&quot;&gt;
&lt;th&gt;ID&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;/tr&gt;
&lt;? while($row = mysql_fetch_object($query)): ?&gt;
&lt;tr bgcolor=&quot;#FFFFFF&quot;&gt;
&lt;td&gt;&lt;?=$row-&gt;ID?&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;?=$row-&gt;name?&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;? endwhile; ?&gt;
&lt;/table&gt;
&lt;? }

So hopefully can help
Read More

Tuesday, January 25, 2011

How to quickly and easily download youtube video

This trick will only be felt if you use the Linux operating system. It is very easy, simply use the existing browser, eg Mozilla Firefox or another browser.




The following process sequence:
1. Open your favorite browser
2. Type the address youtube.com
3. Allow it to finish spinning video
4. Open the / tmp directory on your computer, there will appear a file. flv is the result of streaming from youtube.com
5. Do not forget to quickly copy a file to another place, because after the computer restarts also missing file in the directory / tmp



Easy to do, so no need to use additional software to take a video on youtube. Good luck.
Read More

Thursday, October 21, 2010

SSH via web with JAVA


If at any time, you have problems with SSH in your workplace. Maybe the admin on your premises to close specific ports eg 443 or 22. This method can be effective, but there are a few tricks to put into the public html server. Maybe the hackers in cyberspace can help.

Okay, ready to empty file can use vi, vim, pico (editor unix) or notepad (windows). type the following script:


<html>

<body>

<APPLET CODE="com.mindbright.application.MindTerm.class" ARCHIVE="mindterm.jar" WIDTH=0 HEIGHT=0>

<PARAM NAME="sepframe" value="true">
<PARAM NAME="x11fwd" value="true">
<PARAM NAME="port" value="7575">

</APPLET>

</body>

</html>

give file name eg javassh.html

as supporting files, you can support the jar file (mindterm.jar). You can search via google.

good luck.


Read More

Wednesday, September 8, 2010

PHP Validate Form

Making the form on the php impressed casual. But one time we faced a problem with the validation of that form, eg filling of data can not be empty. Here are some scripts that can be used to check the validation of a form, especially checking space which can become the things we missed.

To make it easier, can be made a separate file with the parent file. suppose check.inc and later called in the php file using the command required


function check_not_empty($s, $include_whitespace = false)
{
if ($include_whitespace) {
// make it so strings containing white space are treated as empty too
$s = trim($s);
}
return (isset($s) && strlen($s)); // var is set and not an empty string ''
}
?>

Read More