Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

command line interface - PHP cli session warnings -


is there possibility disable session warnings being displayed when php cli script run? without modyfing php.ini of course. need have clean output of script. script not run apache or root. in php.ini there session.auto_start enabled.

i've got following errors:

php warning:  unknown: open(/var/lib/php/session/sess_p6tpcdkpupelvho22qrkm699g4, o_rdwr) failed: permission denied (13) in unknown on line 0 php warning:  unknown: open(/var/lib/php/session/sess_p6tpcdkpupelvho22qrkm699g4, o_rdwr) failed: permission denied (13) in unknown on line 0 

thanks in advance!

quite simple, don't try open session in cli mode. won't work multiple reasons. so, 2 things (depending on how "dirty" of hack wanted):

if (!isset($argc)) {     //not cli     session_start(); } 

or, set session path writable (like /tmp) if via cli:

if (isset($argc)) {     session_save_path('/tmp'); } 

but i'd suggest not suppressing errors (error_reporting(0)) because make debugging , telling when went wrong harder... i'd suggest not using @ suppress errors (simply because think should avoid errors instead of suppressing them)


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -