Tuesday, 7 July 2015

HHVM Failed to open /var/www/.hhvm.hhbc

Hi if you get error Like Below

Failed to initialize central HHBC repository:\n  Failed to initialize schema in /var/run/hhvm/hhvm.hhbc: RepoQuery::step(repo=0x7f814678e600) error: 'CREATE TABLE main.UnitSourceLoc_6ba408ef27e1fc7820c8bd6352989f40c1acb812(unitSn INTEGER, pastOffset INTEGER, line0 INTEGER, char0 INTEGER, line1 INTEGER, char1 INTEGER, PRIMARY KEY (unitSn, pastOffset));' --> (13) database or disk is full\n  Failed to open /var/www/.hhvm.hhbc: 14 - unable to open database file\n
 

Failed to initialize central HHBC repository:\n  Failed to initialize schema in /var/run/hhvm/hhvm.hhbc: RepoQuery::step(repo=0x7fdf7b38e600) error: 'CREATE TABLE main.UnitSourceLoc_6ba408ef27e1fc7820c8bd6352989f40c1acb812(unitSn INTEGER, pastOffset INTEGER, line0 INTEGER, char0 INTEGER, line1 INTEGER, char1 INTEGER, PRIMARY KEY (unitSn, pastOffset));' --> (13) database or disk is full\n  Failed to open /var/www/.hhvm.hhbc: 14 - unable to open database file\n

Solution
create /var/www folder
and change owner to www-data
in /var folder run below commands
mkdir www
chown www-data:www-data www
Read More

Thursday, 19 February 2015

How to Install Scrapy in Linux with out Any Errors

While installing Scrapy (Python Crawl) you may get errors like below

1. src/lxml/lxml.etree.c:16:20: fatal error: Python.h: No such file or directory
    #include "Python.h"

2. Setup script exited with error: command 'gcc' failed with exit status 1

3. fatal error: openssl/aes.h: No such file or directory
    #include <openssl/aes.h>


4. c/_cffi_backend.c:13:17: fatal error: ffi.h: No such file or directory
    #include <ffi.h>

Above errors are problems of dependences while installing Scrapy

to avoid these error you need to install following packages (assuming you already have python2 and python3)

Note : based on distribution some times -devel work otherwise try -dev
example if python3-devel error then try python3-dev

install gcc
install python-devel
install python3-devel
install libevent-devel
install python3-setuptools (Optional)
install python-setuptools
install openssl
install libxslt-devel (if libxslt-devel error then try libxslt1-devel)
install libxml2-devel
install libffi-devel
install libssl-dev (if libssl-dev error then try openssl-devel)

Finally to install Scrapy
easy_install scrapy




Read More

Tuesday, 14 October 2014

Solution : PHP Warning: date(): It is not safe to rely on the system's timezone settings

Hi If you get error add below code in your php file

if( ! ini_get('date.timezone') )
{
    date_default_timezone_set('GMT');
}
Read More

Saturday, 6 September 2014

Steps to Install Xrdp in Ubuntu and Remote Desktop in Windows

Here the steps to Install Xrdp in Ubuntu and Remote Desktop in Windows

1. install xrdp
sudo apt-get install xrdp

2. install fallback
sudo apt-get install gnome-session-fallback

3. logout and login again by gnome theme. You can choose theme before log in (this step Optional)

4. open terminal by ctrl alt t , then input
echo "gnome-session --session=gnome" > ~/.xsession

5. sudo gedit /etec/xrdp/startwm.sh
. /etc/X11/Xsession
to
. /home/<user name>/.xsession

6. sudo /etc/init.d/xrdp restart

7. Open Remote Desktop application in Window and Enter Ubuntu System IP and click connect

8. Enter username and password of Ubuntu System

9. Enjoy
Read More

Saturday, 19 July 2014

CodeBlocks wxWidgets in Windows with 100% working Setup

To complete CodeBlocks wxWidgets in Windows I tried lot of times but always there is an error while compiling ( if not exist gcc_mswu mkdir gcc_mswu ). here the successful steps
1. It may be easy to install CodeBlock by simply downloading from here and click install in windows.
2. Download and unzip wxWidgets (version i used wxWidgets 3.0.1) from here
3. Goto control panel->system->Advance settings->Environment variable->Edit path variable (system level path)
Copy entire path value and save in a text file now Remove every thing from path (Be-live me)
and add only codeblock/mingw/bin path(check below example) to path variable and click ok.
example : C:\Program Files\CodeBlocks\MinGW\bin
4. Very Important open command prompt as Administrator
5. Goto wxWidgets\build\msw (check below example) location in command prompt
example: E:\wxWidgets-3.0.1\build\msw
6. Run Below commands one by one
mingw32-make.exe -f makefile.gcc clean 
mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0
mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=0

Same command two times one for Release and another for Debug
7. Now In codeblock while creating wxWidget project select wxWidgets extracted folder as path
example: E:\wxWidgets-3.0.1
8. Edit path variable add previously saved path to existing path by separating with semicolon (;) .
example : C:\Program Files\CodeBlocks\MinGW\bin; previously_saved_path
Read More

Thursday, 19 June 2014

Android device chooser not showing running Emulator in Eclipse

if Android device chooser not showing running emulator then reset ADB
To restart ADB in Eclipse :
Window -> Show View -> Other -> Android -> Devices
When the view is showing: View Menu of "Devices" (click Down rectangle) > Reset ADB




Read More

PhoneGap after Importing Android Projects to Eclipse Errors

If you got Different error after importing phonegap created projects into Eclipse as existing android project.

Note : While Importing do not set copy Project to Workspace, use same location where phonegap created project.

To solve all other errors do below steps.
a) import project from Android folder it will import both "hello world" and "hello world-cordovaLib"
b) clean both projects Project->Clean All (select two projects and unselect Automatic Build)->Clean
c ) remove the reference to "hello world-cordovaLib" from "hello world"
Rightclick on Hello World->Project->Android->is Library->Remove Reference of hello world-cordovaLib
d) build the "hello-cordovaLib"
e) restore the reference to "hello world-cordovaLib" from "hello world"
Rightclick->Project->Android->is Library->Add Reference of hello world-cordovaLib
f) clean "hello world" and run

Read More
Here We Write The Problems we face at different situations and Solutions to those problems.