command line lsphp5 and exteral app lsphp5 may pick up different php.ini.
to confirm, check if open_basedir are same value
#/usr/local/lsws/fcgi-bin/lsphp5 phpinfo.php |grep open_basedir
and in browser, access domain.com/phpinfo.php and search open_basedir