Thursday, May 8, 2014

Running Android Device (Mobile/Tab) as an Emulator in ADT

First visit this article... http://developer.android.com/tools/device.html

If can not find your USB Vendor IDs

Pl run command lsusb on terminal and take 4 char before :(colon)

ie here IDs is 0bb4...
Bus 001 Device 002: ID 0bb4:0c03 High Tech Computer Corp.

edit this code at file /etc/udev/rules.d/51-android.rules.
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev" 

Change running config... Target Device.. Always prompt to pick device

Select Your Mobile/Tab when ask for device to run.

Monday, March 10, 2014

Warning: require_once() [function.require-once]: SAFE MODE Restriction in effect.

After migration to new server Linux-Php on share hosting following error occur

Warning: require_once() [function.require-once]: SAFE MODE Restriction in effect. The script whose uid is 1438 is not allowed to access /usr/lib/php/PEAR.php owned by uid 0 in /home/yourdomain/php/DB.php on line 30

Warning: require_once(/usr/lib/php/PEAR.php) [function.require-once]: failed to open stream: No such file or directory in /home/yourdomain/php/DB.php on line 30

Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/yourdomain/php/DB.php on line 30

Resolve it by adding Include path in your php script....

some server not support
require_once( "/home/yourdomain/php/DB.php" );

It should be...
$path = '/home/yourdomain/php/';
set_include_path($path . PATH_SEPARATOR . get_include_path());
require_once( "DB.php" );

Saturday, November 24, 2012

Perl Script gives 500 Internal server error on shared hosting

Perl script throws error...

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@yourdomain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Following steps need to solve problem
Just try following code with test.pl...with execution permission (755) on folder (cgi-bin) www.yourdomain.com/cgi-bin/ and file test.pl
#!/usr/bin/perl
print "Content-type: text/plain\n\n";
print "testing...\n";


and if it works than no problem with server side configuration.

If not works than add -w in first line...
#!/usr/bin/perl -w
if not works than it may server configuration problem

Got clue from... http://encodable.com/internal_server_error/ Thanks to them.

Friday, November 16, 2012

Server migration problems and php with pear display blank page (PHP Path Problem)

My service provider( linux share hosting ) migrated my website to another server and following problems started
1)
require_once("DB.php"); gives error...
Warning: require_once(DB.php) [function.require-once]: failed to open stream: No such file or directory in /home/username/public_html/test.php on line 9

Fatal error: require_once() [function.require]: Failed opening required 'DB.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/username/public_html/test.php on line 9

2)
if you replace require_once("DB.php");
WITH full path...
require_once("/home/username/php/DB.php");
THAN IT DISPLAY BLANK PAGE!!!

Possible Solutions:

1) If your service provider ready to edit php.ini than request them to add PEAR path (most recommended )
2) edit .htaccess file and add
php_value include_path "/yourpath/mywebsite" ( NOT Recommended )
you may have to use ALLOW OVERRIDE 
3) edit your source code and add path
$path = '/home/username/php/';
set_include_path($path . PATH_SEPARATOR . get_include_path()); 

Conclusion:

ALL SHARE HOSTING PROVIDER must co-operate their user and
check all path with php.ini

Tuesday, August 28, 2012

"Access is Denied" error message when you try to open a folder

To retrieve data from Hard disk ( from other/old Machine and connected as secondary in the new/data retrieval machine boot with winXp with Primary hard disk ) WinXp.
Will not allow to access folders as different user permission with old machine.
Solution is simple here...
http://support.microsoft.com/?kbid=810881

Thursday, May 26, 2011

Export Excel CSVs with Double Quotes

visit... http://www.markinns.com/articles/full/export_excel_csvs_with_double_quotes

Very useful to transfer data from Excel to CSV. without this VBA code you have to replace all , with space

Use this with CSV using LOAD DATA and use Local LOCAL keyword

Friday, December 17, 2010

Excel adding days to specifc date gives error #VALUE!

Excel 2000 onward...
Content of B1 Cell : 17/12/2010
Content of A4 Cell : 7
Formula of C5 cell : =B1+A4

Gives error at C5 Cell #VALUE!

Solution:
With WinXp Change setting Date to dd/MM/yyyy ( Control Panel- Regional and Langauge Options - Customized - Date - Short Date )

After resolving problem content of C5 : 24/12/2010