Re: [PHP] Problems converting strings with 0 to integer

2010-11-03 Thread Alexander Holodny
To exclude unexcepted behavior in case of wrongly formated input data, it would be much better to use such type-casting method: intval(ltrim(trim($inStr), '0')) 2010/11/3, Nicholas Kell n...@monkeyknight.com: On Nov 3, 2010, at 4:22 PM, robert mena wrote: Hi, I have a text file (utf-8

Re: [PHP] PHP sessions - users being automatically logged out

2010-11-04 Thread Alexander Holodny
Inc session.cache_expire. You have only 3 minutes. This means browser will drop cookie containing session id in three minutes, or even less, of clients inactivity. I prefer to set expire-time to zero. So, browser will never forget session id. In other case, if security requires, i usually set it

Re: [PHP] read smb drive

2010-11-05 Thread Alexander Holodny
Small and maybe useless note about privileges required to exec 'mount' command via php's system(): root is not required if 'user' option exists in /etc/fstab. It is true because mount cmd has always root privileges due to suexec bit and it decides whether calling user is authorized to mount