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') )
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
. /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

Thursday, 12 June 2014

Solution : WordPress Error Briefly unavailable for scheduled maintenance Check back in a minute

If you got Briefly unavailable for scheduled maintenance Check back in a minute error in WordPress means there is a .maintenance file in WordPress installed directory. To avoid this error go to WordPress installed location in your server and delete .maintenance file.
check below video

watch in YouTube 
Read More

Thursday, 15 May 2014

Solution : Nginx 502 Bad Gateway Error

If you got 502 Bad Gateway Error in Nginx after updating software in your system.
Because of update in php-fpm this error may occur.

1. Edit /etc/php-fpm.d/www.conf

vi /etc/php-fpm.d/www.conf
And set listen line to look as follows:

listen =

2. Now change nginx configuration files of each domain which may be in /etc/nginx/conf.d folder. in each file change

fastcgi_pass   unix:/tmp/php5-fpm.sock;

Restart nginx and php-fpm

And check in browser whether your site working or Not.

I hope It will work :)

Read More

Friday, 28 February 2014

solution to installation of expect module in php5

following message will come if php expect module didn't find on web server expect example page.

fopen(): Unable to find the wrapper "expect" - did you forget to enable it when you configured PHP?

This means expect.so is not there in /usr/lib/php5/extensions

to install expect module  follow streps :

1.   Before installation install dependencies  : expect-devel, tcl-devel packages

2. run following command to build and install expect module

pecl install channel://pecl.php.net/expect-0.3.1

It will create /usr/lib/php5/extensions/expect.so file

3. Now add config file for php in /etc/php5/conf.d/expect.ini

cat > /etc/php5/conf.d/expect.ini  << END
; comment out next line to disable mysqli extension in php

4. Now check php modules  by following command:

php -m   

 If you get following error  :

1   /usr/lib/gcc/i586-suse-linux/4.7/../../../../i586-suse-linux/bin/ld: cannot find -lexpect
/usr/lib/gcc/i586-suse-linux/4.7/../../../../i586-suse-linux/bin/ld: cannot find -ltcl
collect2: error: ld returned 1 exit status
make: *** [expect.la] Error 1
ERROR: `make' failed

for that  go to /usr/lib/ 

ln -s libexpect<version>.so  libexpect.so
ln -s libtcl<version>.so libtcl.so

( <version> : is the version number of the package )

Read More

Tuesday, 11 February 2014

Solution to Gnome 3 Error : "Oh no! Something has gone wrong." with gnome-fallback

Login into your account in text terminal by ctrl+alt+f<1-6>

run following line

$ gsettings set org.gnome.desktop.session session-name gnome-fallback

Then try login from gui using GNOME Desktop Environment.

Read More

Monday, 10 February 2014

Nginx Error - 413 Request Entity Too Large

Hi if you get 413 Request Entity Too Large error in Nginx Serve to avoid this error some people suggest increase post size in php.ini ie
post_max_size = 25M
But even changing this value error still occurring means you need to change nginx configuration file.
add client_max_body_size 20M to nginx configuration file of server. check below where to add that line.

server {
    client_max_body_size 20M;
    listen 80;
    server_name example.com;
    access_log /var/log/nginx/nginx.access.log;
    error_log /var/log/nginx/nginx.error.log;
Read More

Thursday, 23 January 2014

Solution : Blogger Remove Site name from Page Title

Hi, To remove site or blog name from the every title of blogger Page, you need to edit HTML Template of your blog


Template -> Edit HTML

Now find


And replace above line with 

<b:if cond='data:blog.pageType == "index"'>

Read More

Solution : Nginx Wordpress Pretty Permalinks Problem

To enable Pretty Permalinks feature in nginx simply modify the nginx conf file of wordpress site add following line
try_files $uri $uri/ /index.php?$args;
check example where to add above line

file: wordpress.conf
 location / {
        root   /var/www/html/wordpress;
        index  index.php index.html index.htm;
try_files $uri $uri/ /index.php?$args;

Read More

Thursday, 2 January 2014

Solution to record your Desktop Using FFMPEG in linux

Install ffmpeg packages in linux ( fedora, ubuntu and etc ) using installers (yum,apt-get and etc)

use the following command to record the Desktop :

ffmpeg -r 30 -s 1280x720  -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 1 out.avi

But when we give resolution 1280x720 it will only take that part of your Desktop ( or some it will not record when your Desktop resolution is less the specified ) for that problem we need use one small script to record the Desktop

cat > record_myDesktop.sh  << EOF
cur_dis=$( xrandr | grep '*' )
res=$(echo $cur_dis |awk '{print $1}')
echo $cur_dis
echo "ffmpeg -r 30 -s $res -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 1 out.avi"
ffmpeg -r 30 -s $res -f x11grab -i :0.0 -vcodec msmpeg4v2 -qscale 1 out.avi

chmod +x record_myDesktop.sh 



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