venerdì 18 maggio 2012

How to enable URL rewriting on PrestaShop


PrestaShop is an e-commerce solution known by his many uses through the world. By using PHP and object oriented programmation, it allows to be easily customizable by the common run of programmers, hackers or integrators.

Install mod_rewrite

Before everything, you will have to check if the mod_rewrite module is installed on your Apache. You can see that in a simple phpinfo().
If it is not installed, type (while being root):

a2enmod rewrite

Allow .htaccess files

You will have then to tell Apache to enable the use of .htaccess files, either in the main conf file or in the conf (it is the AllowOverride property which is important):

<directory>
Order Deny,Allow
Deny from all
Options All
AllowOverride All
</directory>

Generate the .htaccess

Once .htaccess are allowed, you can use the tool brought by the Prestashop back office to generate automatically a .htaccess which will indicate to Apache which rewriting rules apply. You will have to previously create the file empty and give it the 666 rights (in the root of you PrestaShop file):

touch .htaccess
chmod 666 .htaccess

Apply modifications and check the logs

Don’t forget to restart apache2 to enable thoses operations:

/etc/init.d/apache2 restart

If you still get some errors or weirds behaviors (like no 404 page loaded, error 500, etc), don’t forget to check the Apache logs before trying anything else, they will tell you a lot about the problem (this path is the default one, yours may be different):

cat /var/log/apache2/error.log

giovedì 10 maggio 2012

No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted

Dynamic websites are becoming popular day by day. If you have a dynamic website, you are always interested to upgrade that website and add new features for all the website visitors. Instead of doing these type of modifications to the live website, I always recommend you to take a back up all of your full site and install it to your local computer and just implement the new features which you like to add for your live website. For doing these, you need to setup a local site on your computer with a server. To do this, we use a web server, a database and files of that site. Like me, most users often use wamp like server. So, you just take the database back up of your live server and then firstly like to import that database to your local database. But you do all the steps and at last find the error No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16. I faced this problem few hours ago when I just copy the database of my website www.hideMyTips.com and try to import to my local computer database. The size of the database is not so much and it was like 10MB. Don't worry. If you face this type of problem, you will get the solution here. In this page, I will discuss the solution of the problem during database uploading to your local computer.
No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16
No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16
If you face this type of problem to upload your large database to your local computer or if you face the error like No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.1, then just try the settings in C:\wamp\bin\apache\apache2.2.8\bin\php.ini. We just need to find the following things in the php.ini file:
  • post_max_size = 8M
  • upload_max_filesize = 2M
  • max_execution_time = 30
  • max_input_time = 60
  • memory_limit = 8M
The above settings are the default settings of php.ini file. Now, we just change the above things like the followings:
post_max_size = 1000M
upload_max_filesize = 1000M
max_execution_time = 10000
max_input_time = 10000
memory_limit = 500M
When you have completed the above settings, then save the file php.ini. Now, restart the wamp server to take effect with the new configuration. After completing these steps, try to upload your database again and you will be able to upload your database to the local computer database or solve the problem No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.

Where is php.ini located?

Well it depends on the Linux distribution you are using, the version of php and the way you install it with Apache web server. Php.ini may be here:

/etc/php.ini

Or here:

/etc/php/php.ini
/etc/php5/php.ini


Or here:

/usr/bin/php5/bin/php.ini

Anyway, you can always find any file named php.ini in this manner

find / -name php.ini

The simplest yet most powerful usage of the renowned find command. By its help I was able to locate the php.ini on my Ubuntu 9.04 Apache2 and PHP5:

/etc/php5/apache2/php.ini

Use phpinfo() to find out

Write a simple PHP file with the following content:

 
And upload it to your server and access it in your web browser to get a page like this:

PHP configuration file php.ini path

PHP configuration file php.ini path

mercoledì 9 maggio 2012

Gimp 2.8 is out! | PPA Ubuntu

Gimp is one of the most important tools we Linux users have in our hands being a powerful application that covers the specialized needs of photo manipulators. It may not be perfect, or as good as other commercial applications, but it is getting better and better with every release and is already very powerful and useful. It is natural that the linux world directs its attention to it every time a new major release comes out and this time it is the “majorest” ever!
After 3.5 years of exciting work, the developers of Gimp announced today the release of the long awaited 2.8 version that brings many new things to be happy about.
The most notable of all is the Single window mode option that users can choose over the default multi window mode. This is something that many people have been asking for a long time and it is finally here making things more handy and efficient.

 

Except for this there have been a ton of changes, improvements and additions of new features and you can read all about them on the release notes. Among them you will find other long anticipated features like layer groups, on-canvas text editing and advanced brush dynamics.
Currently version 2.8 is only available for the GNU/Linux platform but builds for Windows and Mac will soon be available too. If you don’t want to wait for your distribution to make a package for Gimp 2.8 available, proceed and download the source by pressing this button.
If you want to install Gimp2.8 in Ubuntu and LinuxMint you can use the following PPA
sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update && sudo apt-get install gimp
For other Linux distros, download Gimp2.8 from this link:

Top things to do after installing Ubuntu 12.04 LTS Precise Pangolin

Ubuntu 12.04 LTS Precise Pangolin final is almost out. The final release it scheduled to be out in the 26th of April 2012. After you actually get done with the installation, there would likely exist a heap of things you still need to take care of. This post will share some interesting insight and ideas about  what you can and should do after a successful installation.
If you have already a previous release of Ubuntu installed and you want to upgrade, then follow our step by step guide to upgrade to Ubuntu 12.04 Precise Pangolin.
First of things, after any fresh install, and before to start doing anything, check:
a- If sound is working, if not, check our previous post to resolve the issue.
b-If Wifi connexion speed is normal, if it is too slow, check our previous post to resolve the issue.
c-  Install Updates:  Just because you installed the latest version of the operating system doesn’t mean that you have all the upgrades to the softwares that were bundled. Bring up a terminal and run the following to get that fixed.
sudo apt-get update && sudo apt-get upgrade
If you have any other Issue, ask for help in our Question/Answer forum http://ask.unixmen.com
Now lets start.

Must have configuration Tools

1- Ubuntu Tweak

Ubuntu Tweak is a must have application for Ubuntu and LinuxMint, it is an application to config Ubuntu easier for everyone. It provides many useful desktop and system options that the default desktop environment doesn’t provide.
Using Ubuntu Tweak you can install all needed applications with a simple click, you can change the window buttons from Left to right…etc.

Install Ubuntu Tweak via PPA:
Open terminal and enter the following command:
sudo add-apt-repository ppa:tualatrix/ppa  
sudo apt-get update 
sudo apt-get install ubuntu-tweak
Most of the applications listed in this post, can be installed from Ubuntu Tweak Center with one click.
If you want to learn how to use Ubuntu Tweak read our previous post

2- MyUnity

MyUnity is a must have configuration tool for Unity ( change themes, icons, transparency…). More about what Unity can do, can be found on our previous post.
To install MyUnity on Precise Pangolin click this install link

Must have repositories -Medibuntu

3- Add Medibuntu repositories and activate Canonical partner repositories

Medibuntu is a packaging project dedicated to distributing software that cannot be included in Ubuntu for various reasons, related to geographical variations in      legislationMedibuntu regarding intellectual property, security and other issues. by adding Medibuntu repositories you will be able to install many softwares like Google-Earth , opera ,Win32codecs , Msfonts.
Click here and Follow the steps to add Medibuntu repositories to  Ubuntu 12.04 LTS Precise Pangolin

Don`t like Unity? Install Cinnamon, Gnome3 or switch back to classic Gnome

4- Install Cinnamon

Cinnamon is a Gnome 3 fork that allow you to have a panel at the bottom with a classic Menu, this is useful for people that want to use Ubuntu with a classic Bottom Menu.
sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable
sudo apt-get update
sudo apt-get install cinnamon

5- Back to Gnome classic:

Install the classic GNOME desktop by installing the gnome-panel package
sudo apt-get install gnome-panel

6- Install Gnome3:

You can install Gnome3 in Ubuntu 12.04 from repository by using this simple command:
sudo apt-get install gnome-shell

7- Move Unity to the bottom

This option is not available  yet for Precise Pangolin, i will inform you when the PPA is updated to ubuntu12.04 LTS. For Ubuntu11.10 check our previous post

Sys Monitoring & EyeCandy

8- Install Conky for Precise pangolin

Conky is a free, light-weight system monitor for X, that displays any information on your desktop. There are many nice themes available for conky that can display clock, CPU usage, ram usage, swap, disk, net and more. Check our previous post for installation and configuration of Conky in Ubuntu 12.04 Precise pangolin.

9- Change icons? Try these ones :

Wanna change the default icons to something that match your taste? Check this nice collection of icons for Ubuntu (PPA included)

Multimedia ( Don`t install everything, install just what you need)

10- VLC  Media player:

Unless you can use mplayer perfectly yourself, I recommend installing the vlc media player.
VLC is the best media player for Linux it play almost everything , he has many features that you can not find in any other media player , read this post if you want to know  what vlc media player can do:  25 things you can do with VLC Media player!
You can install VLC from Ubuntu software center or via terminal by using the following command:
sudo apt-get install vlc
Or click to install vlc

11- Media centers:  XMBC

XBMC is an award-winning free and open source (GPL) software media player and entertainment hub for digital media. XBMC is available for Linux, OSX, Windows, and the original Xbox. While XBMC functions very well as a standard media player application for your computer, it has been designed to be the perfect companion for your HTPC. Supporting an almost endless range of remote controls, and combined with its beautiful interface and powerful skinning engine, XBMC feels very natural to use from the couch and is the ideal solution for your home theater.
Open terminal and copy the following commands:
sudo add-apt-repository ppa:team-xbmc sudo apt-get update sudo apt-get install xbmc

12- Install common codecs

Perhaps installing a few common codecs might give you better sensibility of your system.
sudo apt-get install non-free-codecs libxine1-ffmpeg gxine mencoder totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0 mpg321 mpg123libjpeg-progs

13- To play encrypted DVDs, the libdvdcss2

To play encrypted DVDs, the libdvdcss2 package is essential. libdvdcss is a simple library designed for accessing DVDs like a block device without having to bother about the decryption.
If you already added Medibuntu repositories above, you can Install from software center or using the terminal by entering the following command:
sudo apt-get install libdvdcss2 && sudo /usr/share/doc/libdvdread4/./install-css.sh

14-Enabling Flash support on your browsers:

- For Ubuntu 32 bit & 64 bit : To be able to watch some videos and see flash website in your browser (firefox/ Chrome..), you need to install flash plugin, go to  ubuntu software center and search  word “flash” and install it.

Video Editors

15- Openshot video editor

My  favorite Video editor is Openshot,  the best existing actually for Linux.  You can install Openshot from Ubuntu software center, but if you want to install the latest release, you can do that by adding the following repositories:

sudo add-apt-repository ppa:jonoomph/openshot-edge sudo apt-get update sudo apt-get install openshot openshot-doc
Read also our interview with Jonathan Thomas the main developer of Openshot.

Torrents client

16- Deluge- The best torrent client

The Deluge application was designed to be a full-featured BitTorrent client. Deluge uses libtorrent in it’s backend and PyGTK for it’s user interface,  and is  currently usable on POSIX-compliant operating systems. It is intended to bring a native, full-featured client to GTK desktop environments such as GNOME and Xfce. An official Windows port is also available.
Open terminal and type the follwing commands:
sudo add-apt-repository ppa:deluge-team/ppa
sudo apt-get update
sudo apt-get install deluge


Messenger

17- Pidgin : The best messenger client and 30 plugins, you can enjoy chat with freinds using voice and cam.
18aMSN is a free windows Live Messenger clone. aMSN attempts to emulate the look and feel of Windows Live Messenger, and supports many of its features.
aMSN has features not present in Windows Live Messenger. Users can set alarms, are able to see others who have removed them from their contact list, and are able to open many profiles at once. It is also very customizable, with extensions and themes available at the main site.

19-Skype:

If you’re want to install Skype, check our previous post: Howto- Install Skype in Ubuntu 12.04 Precise Pangolin


Gaming & Emulators

20- Gaming made easy with playdeb (PPA)

If you are a fun of gaming so is important to add Playdeb repositories to your Lucid Lynx. Playdeb is a gaming repository for Ubuntu – aimed to provide titles already available on getdeb.net in an easier to install and update format. You can install many games by a simple click.

21- Wine

Wine enables Linux, Mac, FreeBSD, and Solaris users to run Windows applications without a copy of Microsoft Windows. Wine is free software under constant development. Other platforms may benefit as well.”
Please follow instructions in our previous post : how to install and configure games on wine


 Sharing folders in  Precise Pangolin

22- Smba share

In order to share folders in Precise Pangolin with other Linux and windows machines in your network, you will need to install and configure samba share, for instructions how to configure samba in Ubuntu check our previous post : Install and Configure Samba share in Ubuntu 12.04 Precise Pangolin | Howto

Extra application

23- Installing Archive Management Apps:

 If you’re a frequent media downloader from the internet, you know how various forms archives can have. Installing the following will allow you to deal with most of these.
sudo apt-get install unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack lha arj cabextract file-roller

24-Y PPA Manager:

Y PPA Manager is a GUI tool to easily add PPAs, search a package in all Launchpad PPAs, remove duplicate PPAs (only works with separate .list files), backup PPAs and other PPA-related tasks. Check out the Launchpad page for a complete features list.
sudo add-apt-repository ppa:webupd8team/y-ppa-manager sudo apt-get update sudo apt-get install y-ppa-manager

25- Install Java7

First you need to remove openjdk for this run the following command from your terminal
sudo apt-get purge openjdk*
Now you can install Java7 by adding the following repository:
sudo add-apt-repository ppa:eugenesan/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

26- Filezilla the best ftp client for linux

Filezilla is the best ftp client for Linux
Install via command line :
sudo apt-get install filezilla

27- DropBox:

Dropbox is a free service that lets you bring all your photos, docs, and videos anywhere. This means that any file you save to your Dropbox will automatically save to all your computers, phones and even the Dropbox website. Dropbox also makes it super easy to share with others, whether you’re a student or professional, parent or grandparent.
Download the Dropbox package:

28 – VirtualBox:

If you want to run another OS in a virtual Machine, the best is to install Virtualbox.
For installation, follow the instructions in my previous post.

29- Cheese for your cam?

Cheese uses your webcam to take photos and videos, applies fancy special effects and lets you share the fun with others.

30- Gimp:

Regardless of whether you need to edit images daily on a professional level or just a hobbyist, GIMP is an essential tool for all.

sudo add-apt-repository ppa:matthaeus123/mrw-gimp-svn 
sudo apt-get update 
sudo apt-get install gimp gimp-data gimp-plugin-registry gimp-data-extras

Other useful Internet applications:
  • Opera : The fastest browser on Earth is even faster. But that is not all. Use Opera Turbo to double your page-download speed on slow connections.
  • Google Earth- Travel to cities across the globe, dive into the depths of the ocean, explore remote islands, and even fly to faraway galaxies