Thursday, May 8, 2014

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

First visit this article...

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" );